Don't blindly assume -lm presence. Add a check for the host and remove the -lm on Haiku so building should work natively.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29071 a95241bf-73f2-0310-859d-f6bbb57e9c96
Diff
gcc/gcc/Makefile.in | 2 +-
gcc/gcc/configure | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
@@ -3265,7 +3265,7 @@
$(genprogmd:%=build/gen%$(build_exeext)): $(BUILD_RTL) $(BUILD_ERRORS)
# These programs need libs over and above what they get from the above list.
build/genautomata$(build_exeext) : BUILD_LIBS += -lm
build/genautomata$(build_exeext) : BUILD_LIBS += @math_library@
# These programs are not linked with the MD reader.
build/gengenrtl$(build_exeext) : $(BUILD_ERRORS)
@@ -9064,6 +9064,15 @@
# --------
# Configure -lm usage for host tools that need it
math_library="-lm"
case $host in
*-*-haiku*)
# no separate math library needed
math_library=
;;
esac
# These libraries may be used by collect2.
# We may need a special search path to get them linked.
echo "$as_me:$LINENO: checking for collect2 libraries" >&5
@@ -24035,6 +24044,7 @@
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
/@language_hooks@/r $language_hooks
s,@language_hooks@,,;t t
s,@math_library@,$math_library,;t t
CEOF
_ACEOF