diff options
author | Thibault DUPONCHELLE <thibault.duponchelle@gmail.com> | 2020-06-12 14:19:52 +0200 |
---|---|---|
committer | ℕicolas ℝ <nicolas@atoomic.org> | 2020-09-29 10:11:41 -0600 |
commit | 6b6e83fce2074294ac11d547c8a75bc106bebab9 (patch) | |
tree | 5e7ff6198fa105ccd4053a6b692d1e4b46f4db3a | |
parent | 941f2f38259a2fa17ca703554d5158c5435d7fc5 (diff) | |
download | perl-6b6e83fce2074294ac11d547c8a75bc106bebab9.tar.gz |
Fix build on Haiku beta, set correct Haiku usrinc and locinc, add -fno-stack-protector to hints for amigaos.sh
and haiku.sh (and disable accordingly -fstack-protector* in Configure)
-rwxr-xr-x | Configure | 29 | ||||
-rw-r--r-- | ext/Errno/Errno_pm.PL | 2 | ||||
-rw-r--r-- | hints/amigaos.sh | 2 | ||||
-rw-r--r-- | hints/haiku.sh | 3 |
4 files changed, 20 insertions, 16 deletions
@@ -5388,23 +5388,24 @@ default|recommended) # is to add the flag to the flags passed to the compiler at link time, # as that way the compiler can do the right implementation dependant # thing. (NWC) - case "$osname" in - amigaos) ;; # -fstack-protector builds but doesn't work - *) case "$gccversion" in - ?*) set stack-protector-strong -fstack-protector-strong - eval $checkccflag - case "$dflt" in - *-fstack-protector-strong*) ;; # It got added. - *) # Try the plain/older -fstack-protector. - set stack-protector -fstack-protector - eval $checkccflag - ;; - esac - ;; + case "$ccflags" in + *-fno-stack-protector*) + echo "Do not add -fstack-protector nor -fstack-protector-strong" 2>&1 + ;; + *) case "$gccversion" in + ?*) set stack-protector-strong -fstack-protector-strong + eval $checkccflag + case "$dflt" in + *-fstack-protector-strong*) ;; # It got added. + *) # Try the plain/older -fstack-protector. + set stack-protector -fstack-protector + eval $checkccflag + ;; esac ;; + esac + ;; esac - ;; esac case "$mips_type" in diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL index 762f3820a5..1fddb94be9 100644 --- a/ext/Errno/Errno_pm.PL +++ b/ext/Errno/Errno_pm.PL @@ -147,7 +147,7 @@ sub get_files { $file{$linux_errno_h} = 1; } elsif ($^O eq 'haiku') { # hidden in a special place - $file{'/boot/develop/headers/posix/errno.h'} = 1; + $file{'/boot/system/develop/headers/posix/errno.h'} = 1; } elsif ($^O eq 'vos') { # avoid problem where cpp returns non-POSIX pathnames diff --git a/hints/amigaos.sh b/hints/amigaos.sh index c7b9e5e609..8b34d89708 100644 --- a/hints/amigaos.sh +++ b/hints/amigaos.sh @@ -6,3 +6,5 @@ for f in amigaos4/*.h amigaos4/*.c do cp -f $f . done + +ccflags="$ccflags -fno-stack-protector" diff --git a/hints/haiku.sh b/hints/haiku.sh index 9e2f4473e6..0ec7479bc0 100644 --- a/hints/haiku.sh +++ b/hints/haiku.sh @@ -6,7 +6,6 @@ case "$prefix" in *) ;; # pass the user supplied value through esac - libpth="$(finddir B_USER_DEVELOP_DIRECTORY)/lib $(finddir B_SYSTEM_DEVELOP_DIRECTORY)/lib $(finddir B_COMMON_DIRECTORY)/lib /system/lib" usrinc="$(finddir B_SYSTEM_DEVELOP_DIRECTORY)/headers/posix" locinc="$(finddir B_USER_CONFIG_DIRECTORY)/develop/headers $(finddir B_COMMON_DIRECTORY)/headers $(finddir B_SYSTEM_DEVELOP_DIRECTORY)/headers" @@ -32,6 +31,8 @@ d_syserrlst='undef' cc="gcc" ld='gcc' +ccflags="$ccflags -fno-stack-protector" + # The runtime loader library path variable is LIBRARY_PATH. case "$ldlibpthname" in '') ldlibpthname=LIBRARY_PATH ;; |