This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
amigaos4: Configure: -fstack-protector* compiles but does not link
authorAndy Broad <andy@broad.ology.org.uk>
Mon, 17 Aug 2015 11:18:04 +0000 (07:18 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 5 Sep 2015 15:12:41 +0000 (11:12 -0400)
Now an explicit test, a more portable fix would test compile + link.
Trickier, though, because e.g. with AmigaOS 4 a particular option
is required for the failure to happen (-use-dynld).

Configure

index 8da3690..5b8c4d4 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -5461,15 +5461,19 @@ 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 "$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
-                  ;;
+       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
+                       ;;
                esac
                ;;
        esac