From eddee0bfd68206ef70acf2300cdbee8a4b18467b Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 04 Aug 2013 03:00:54 +0200 Subject: [PATCH] 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. --- gcc/gcc/Makefile.in | 2 +- gcc/gcc/configure | 8 ++++++-- gcc/gcc/configure.ac | 6 ++++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/gcc/Makefile.in b/gcc/gcc/Makefile.in index d3760c5..d673c32 100644 --- a/gcc/gcc/Makefile.in +++ b/gcc/gcc/Makefile.in @@ -3965,7 +3965,7 @@ 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 \ diff --git a/gcc/gcc/configure b/gcc/gcc/configure index b9dabdc..47ca08b 100755 --- a/gcc/gcc/configure +++ b/gcc/gcc/configure @@ -599,7 +599,7 @@ #endif" ac_subst_vars='LTLIBOBJS -math_library +build_math_library LIBOBJS enable_plugin pluginlibs @@ -8849,11 +8849,11 @@ # 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 diff --git a/gcc/gcc/configure.ac b/gcc/gcc/configure.ac index 578c238..63a0be9 100644 --- a/gcc/gcc/configure.ac +++ b/gcc/gcc/configure.ac @@ -1003,11 +1003,11 @@ # 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 -- gitore 0.2.3