gcc 4: fix math library fix for genautomata

* The build host's math library is needed, not the host's. Makes a
  difference when build host != host, e.g. when cross-compiling a native
  Haiku compiler on Linux.
* Rename the variable math_library -> build_math_library for clarity.
This commit is contained in:
Ingo Weinhold 2013-08-04 03:00:54 +02:00
parent dee1a38d2c
commit eddee0bfd6
3 changed files with 8 additions and 8 deletions

View File

@ -3965,7 +3965,7 @@ $(genprogerr:%=build/gen%$(build_exeext)): $(BUILD_ERRORS)
genprog = $(genprogerr) check checksum condmd
# These programs need libs over and above what they get from the above list.
build/genautomata$(build_exeext) : BUILD_LIBS += @math_library@
build/genautomata$(build_exeext) : BUILD_LIBS += @build_math_library@
# These programs are not linked with the MD reader.
build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \

8
gcc/gcc/configure vendored
View File

@ -599,7 +599,7 @@ ac_includes_default="\
#endif"
ac_subst_vars='LTLIBOBJS
math_library
build_math_library
LIBOBJS
enable_plugin
pluginlibs
@ -8849,11 +8849,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Configure -lm usage for host tools that need it
math_library="-lm"
case $host in
build_math_library="-lm"
case $build in
*-*-haiku*)
# no separate math library needed
math_library=
build_math_library=
;;
esac

View File

@ -1003,11 +1003,11 @@ AC_LANG_POP(C++)
# Configure -lm usage for host tools that need it
math_library="-lm"
case $host in
build_math_library="-lm"
case $build in
*-*-haiku*)
# no separate math library needed
math_library=
build_math_library=
;;
esac