]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Don't add -lm on haiku.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 19 Oct 2013 00:20:21 +0000 (02:20 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 19 Oct 2013 00:20:21 +0000 (02:20 +0200)
* configure.ac: Define BUILD_LIBM to -lm on most platforms
and empty on haiku.
* grub-core/Makefile.am (gentrigtables): Use $(BUILD_LIBM) rather than
-lm.

ChangeLog
configure.ac
grub-core/Makefile.am

index 272f4d6c5f5aa9fcb4e108685b662bfe97ebc0ad..4859537366d266d3e2ef6cf7b7a11e0cdc07662d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-10-18  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Don't add -lm on haiku.
+
+       * configure.ac: Define BUILD_LIBM to -lm on most platforms
+       and empty on haiku.
+       * grub-core/Makefile.am (gentrigtables): Use $(BUILD_LIBM) rather than
+       -lm.
+
 2013-10-18  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * configure.ac: Use -melf_*_haiku as target on haiku.
index c9ee9f842ec6b56e9efa8c2eab1d1fa6200e69c8..e08aecb6c0e8da9419cdcb51a0014516db805eb1 100644 (file)
@@ -405,6 +405,10 @@ AC_CHECK_PROGS(BUILD_CC, [gcc egcs cc])
 test -z "$BUILD_CC" && AC_MSG_ERROR([none of gcc, egcs and cc is found. set BUILD_CC manually.])
 BUILD_CPP="$BUILD_CC -E"
 
+case "$build_os" in
+  haiku*)                              BUILD_LIBM= ;;
+  *)                                   BUILD_LIBM=-lm ;;
+esac
 # For gnulib.
 gl_INIT
 
@@ -793,6 +797,8 @@ AC_SUBST(HOST_LDFLAGS)
 AC_SUBST(HOST_CPPFLAGS)
 AC_SUBST(HOST_CCASFLAGS)
 
+AC_SUBST(BUILD_LIBM)
+
 # Set them to their new values for the tests below.
 CC="$TARGET_CC"
 if test "x$TARGET_APPLE_CC" = x1 ; then
index 7d84496061f0b91b17032cc5339c3f6f7c0673a2..6a987442d919f5f65c752eee406b7a56dc19befd 100644 (file)
@@ -35,7 +35,7 @@ build-grub-pe2elf: $(top_srcdir)/util/grub-pe2elf.c $(top_srcdir)/grub-core/kern
 
 # gentrigtables
 gentrigtables: gentrigtables.c
-       $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -lm
+       $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< $(BUILD_LIBM)
 CLEANFILES += gentrigtables
 
 # trigtables.c