This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow cflags.SH edits to ccflags to stick.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 16 Jun 2014 12:32:48 +0000 (08:32 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 18 Jun 2014 12:04:44 +0000 (08:04 -0400)
cflags.SH

index 524dab1..f9a3838 100755 (executable)
--- a/cflags.SH
+++ b/cflags.SH
@@ -176,10 +176,6 @@ Intel*) ;; # # Is that you, Intel C++?
 esac
 rm -f _cflags.c _cflags$_exe
 
-# XXX There is something wrong in the below: furious editing on ccflags,
-# but that ccflags will be overwritten by the source of config.sh in the
-# extracted cflags.
-
 case "$gccversion" in
 '') ;;
 *)
@@ -231,7 +227,8 @@ $startsh
 
 # This file is generated by cflags.SH
 
-
+# Base flags.  myccflags so that the possible edits by cflags.SH will stick.
+myccflags="$ccflags"
 # Extra warnings, used e.g. for gcc.
 warn="$warn"
 # Extra standardness.
@@ -256,6 +253,7 @@ case $PERL_CONFIG_SH in
                echo "Can't find config.sh."; exit 1
        fi
        . $TOP/config.sh
+        ccflags="$myccflags"  # Restore possible edits by cflags.SH.
        ;;
 esac