From: Harlan Stenn Date: Fri, 25 Sep 2015 04:13:23 +0000 (+0000) Subject: gcc on older HPUX may need +allowdups. Harlan Stenn. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3d321419cb649875da055a5f461fc3ef1f52111;p=thirdparty%2Fntp.git gcc on older HPUX may need +allowdups. Harlan Stenn. bk: 5604c9e3gjK2NzwiVvUIrcVyiVxRAw --- diff --git a/ChangeLog b/ChangeLog index 614617f4b..40125ec31 100644 --- 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 diff --git a/sntp/m4/os_cflags.m4 b/sntp/m4/os_cflags.m4 index a2161e659..e9cc79fb0 100644 --- a/sntp/m4/os_cflags.m4 +++ b/sntp/m4/os_cflags.m4 @@ -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 ======================================================================