From 2f3066df94e794dc91a1ddb6425755ed0d8c9dd0 Mon Sep 17 00:00:00 2001 From: kinichiro Date: Tue, 23 Nov 2021 13:27:17 +0900 Subject: Set IA-64 compiler flag only if it is HP-UX with IA-64 Compiler switch -mlp64 (GCC) or +DD64(HP CC) gives build failure with platform HP-UX other than IA-64. This avoids build break on HP-UX with PA-RISC platform. Suggested from Larkin Nickle (me larbob org) by libressl ML. --- m4/check-os-options.m4 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'm4') diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4 index 644bf71..8080dcb 100644 --- a/m4/check-os-options.m4 +++ b/m4/check-os-options.m4 @@ -68,10 +68,15 @@ char buf[1]; getentropy(buf, 1); ;; *hpux*) HOST_OS=hpux; - if test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then - CFLAGS="$CFLAGS -mlp64" - else - CFLAGS="-g -O2 +DD64 +Otype_safety=off $USER_CFLAGS" + if test "`echo $host_os | cut -c 1-4`" = "ia64" ; then + if test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then + CFLAGS="$CFLAGS -mlp64" + else + CFLAGS="+DD64" + fi + fi + if ! test "`echo $CC | cut -d ' ' -f 1`" = "gcc" ; then + CFLAGS="-g -O2 +Otype_safety=off $CFLAGS $USER_CFLAGS" fi CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT" ;; -- cgit v1.2.3-55-g6feb