This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Sun c99 needs -Xa for many system interfaces.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 5 Aug 2014 15:47:51 +0000 (11:47 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 5 Aug 2014 16:42:40 +0000 (12:42 -0400)
hints/solaris_2.sh

index b47b439..57f4d14 100644 (file)
@@ -359,11 +359,17 @@ EOM
                        d_attribute_pure='undef'
                        d_attribute_unused='undef'
                        d_attribute_warn_unused_result='undef'
-                       # The c99 doesn't like bare -O.
                        case "$cc" in
-                       *c99)   case "$optimize" in
+                       *c99)   # c99 rejects bare '-O'.
+                               case "$optimize" in
                                ''|-O) optimize=-O3 ;;
                                esac
+                               # Without -Xa c99 doesn't see
+                               # many OS interfaces.
+                               case "$ccflags" in
+                               *-Xa*)  ;;
+                               *) ccflags="$ccflags -Xa" ;;
+                               esac
                                ;;
                        esac
                        ;;