]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
gcc on older HPUX may need +allowdups. Harlan Stenn.
authorHarlan Stenn <stenn@ntp.org>
Fri, 25 Sep 2015 04:13:23 +0000 (04:13 +0000)
committerHarlan Stenn <stenn@ntp.org>
Fri, 25 Sep 2015 04:13:23 +0000 (04:13 +0000)
bk: 5604c9e3gjK2NzwiVvUIrcVyiVxRAw

ChangeLog
sntp/m4/os_cflags.m4

index 614617f4b72e5b59147c6490c8ef6965edbe9a07..40125ec31ee7cfb4136bc9f3b5c10a15a460aac7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -120,6 +120,7 @@ fixed formatting. Tomasz Flendrich
 * Update the patch for bug 2817.  Harlan Stenn.
 * More updates for bug 2817.  Harlan Stenn.
 * Fix bugs in tests/ntpd/ntp_prio_q.c.  Harlan Stenn.
+* gcc on older HPUX may need +allowdups.  Harlan Stenn.
 ---
 (4.2.8p3) 2015/06/29 Released by Harlan Stenn <stenn@ntp.org>
 
index a2161e659ad305e91f6d9e22dbb431b40a8f01ae..e9cc79fb0f8eac4d609f7ce0738e3d07d4d22a2b 100644 (file)
@@ -2,7 +2,7 @@ dnl ######################################################################
 dnl Specify additional compile options based on the OS and the compiler
 AC_DEFUN([NTP_OS_CFLAGS], [
     AC_MSG_CHECKING([additional compiler flags])
-    # allow ntp_os_flags to be preset to skip this stuff
+    # allow ntp_os_cflags to be preset to skip this stuff
     case "${ntp_os_cflags+set}" in
      set)
        ;;
@@ -90,7 +90,7 @@ AC_DEFUN([NTP_OS_CFLAGS], [
            ;;
        esac
     esac
-    case "$ntp_os_flags" in
+    case "$ntp_os_cflags" in
      '')
        ntp_os_cflags_msg="none needed"
        ;;
@@ -100,5 +100,35 @@ AC_DEFUN([NTP_OS_CFLAGS], [
     CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
     AC_MSG_RESULT([$ntp_os_cflags_msg])
     AS_UNSET([ntp_os_cflags_msg])
+    ###
+    AC_MSG_CHECKING([additional linker flags])
+    # HMS: The following might still need tweaking
+    # allow ntp_os_ldflags to be preset to skip this stuff
+    case "${ntp_os_ldflags+set}" in
+     set)
+       ;;
+     *)
+       ntp_os_ldflags=
+       case "$host_os" in
+        hpux*)
+           case "$GCC" in
+            yes)
+               ntp_os_ldflags="+allowdups"
+               ;;
+           esac
+           ;;
+       esac
+       ;;
+    esac
+    case "$ntp_os_ldflags" in
+     '')
+       ntp_os_ldflags_msg="none needed"
+       ;;
+     *)
+       ntp_os_ldflags_msg="$ntp_os_ldflags"
+    esac
+    LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
+    AC_MSG_RESULT([$ntp_os_ldflags_msg])
+    AS_UNSET([ntp_os_ldflags_msg])
 ])
 dnl ======================================================================