⛏️ index : buildtools.git

author Ingo Weinhold <ingo_weinhold@gmx.de> 2013-08-04 3:00:54.0 +02:00:00
committer Ingo Weinhold <ingo_weinhold@gmx.de> 2013-08-04 3:00:54.0 +02:00:00
commit
eddee0bfd68206ef70acf2300cdbee8a4b18467b [patch]
tree
01981796d60881041640d6d67a2e4eeef39b5bab
parent
dee1a38d2ce5814c42cd63bca96df5a839771e28
download
eddee0bfd68206ef70acf2300cdbee8a4b18467b.tar.gz

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.

Diff

 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