Skip to content

Commit

Permalink
Fixed cross-compile bug in configure script, thanks to patch from Vla…
Browse files Browse the repository at this point in the history
…d Zakharov.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3315 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
  • Loading branch information
stephena committed Aug 24, 2016
1 parent b0960a5 commit be2f6f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions Changes.txt
Expand Up @@ -21,6 +21,13 @@
Thanks to Omegamatrix of AtariAge for the bug report and patch to fix
the issue.

* Fixed bug in debugger 'reset' command; it wasn't resetting the
bankswitching, so after a reset the banks were in an undefined state.

* Updated UNIX configure script to fix a bug where it fails in
cross-compilation under certain circumstances. Thanks to Vlad
Zakharov for providing a patch to fix this issue.

-Have fun!


Expand Down
8 changes: 4 additions & 4 deletions configure
Expand Up @@ -63,9 +63,9 @@ cc_check() {
echo >> "$TMPLOG"
cat "$TMPC" >> "$TMPLOG"
echo >> "$TMPLOG"
echo "$CXX $TMPC $LDFLAGS -o $TMPO$EXEEXT $@" >> "$TMPLOG"
echo "$CXX $TMPC $CXXFLAGS $LDFLAGS -o $TMPO$EXEEXT $@" >> "$TMPLOG"
rm -f "$TMPO$EXEEXT"
( $CXX "$TMPC" $LDFLAGS -o "$TMPO$EXEEXT" "$@" ) >> "$TMPLOG" 2>&1
( $CXX "$TMPC" $CXXFLAGS $LDFLAGS -o "$TMPO$EXEEXT" "$@" ) >> "$TMPLOG" 2>&1
TMP="$?"
echo >> "$TMPLOG"
return "$TMP"
Expand Down Expand Up @@ -107,9 +107,9 @@ EOF

if test -n "$_host"; then
# In cross-compiling mode, we cannot run the result
eval "$1 $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
else
eval "$1 $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
fi
}

Expand Down

0 comments on commit be2f6f5

Please sign in to comment.