In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/2485732a89bf5918fbda457cba014bb1b771356d?hp=cca38fda51b9e232acf5d92b06d2c4b0af253f62>

- Log -----------------------------------------------------------------
commit 2485732a89bf5918fbda457cba014bb1b771356d
Author: Reini Urban <rur...@x-ray.at>
Date:   Tue Nov 15 16:14:28 2011 -0600

    Sun cc and CC do not support gcc attributes.
    
    Similar code as in linux.sh

M       hints/solaris_2.sh

commit ceaf555e5ba90cfbfecd1d510d2dc88501bf0360
Author: Reini Urban <rur...@x-ray.at>
Date:   Tue Nov 15 16:11:02 2011 -0600

    Detect SunOS CC workshop c++ compiler
    
    Solaris 11 SunStudio 12.2. ships without cc, so CC must be used.
    Detect it and set ccversion correctly

M       hints/solaris_2.sh
-----------------------------------------------------------------------

Summary of changes:
 hints/solaris_2.sh |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh
index 508cd3e..0574ce7 100644
--- a/hints/solaris_2.sh
+++ b/hints/solaris_2.sh
@@ -311,11 +311,15 @@ else
        cat > try.c << 'EOM'
 #include <stdio.h>
 int main() {
-#ifdef __SUNPRO_C
+#if defined(__SUNPRO_C)
        printf("workshop\n");
 #else
+#if defined(__SUNPRO_CC)
+       printf("workshop CC\n");
+#else
        printf("\n");
 #endif
+#endif
 return(0);
 }
 EOM
@@ -323,10 +327,32 @@ EOM
        if $tryworkshopcc >/dev/null 2>&1; then
                cc_name=`./try`
                if test "$cc_name" = "workshop"; then
-                       ccversion="`${cc:-cc} -V 2>&1|sed -n -e '1s/^cc: //p'`"
+                       ccversion="`${cc:-cc} -V 2>&1|sed -n -e '1s/^cc: //ip'`"
+                       if test ! "$use64bitall_done"; then
+                               loclibpth="/usr/lib /usr/ccs/lib 
`$getworkshoplibs` $loclibpth"
+                       fi
+                       # Sun cc doesn't support gcc attributes
+                       d_attribute_format='undef'
+                       d_attribute_malloc='undef'
+                       d_attribute_nonnull='undef'
+                       d_attribute_noreturn='undef'
+                       d_attribute_pure='undef'
+                       d_attribute_unused='undef'
+                       d_attribute_warn_unused_result='undef'
+               fi
+               if test "$cc_name" = "workshop CC"; then
+                       ccversion="`${cc:-CC} -V 2>&1|sed -n -e '1s/^CC: //ip'`"
                        if test ! "$use64bitall_done"; then
                                loclibpth="/usr/lib /usr/ccs/lib 
`$getworkshoplibs` $loclibpth"
                        fi
+                       # Sun CC doesn't support gcc attributes
+                       d_attribute_format='undef'
+                       d_attribute_malloc='undef'
+                       d_attribute_nonnull='undef'
+                       d_attribute_noreturn='undef'
+                       d_attribute_pure='undef'
+                       d_attribute_unused='undef'
+                       d_attribute_warn_unused_result='undef'
                fi
        fi
 

--
Perl5 Master Repository

Reply via email to