Tru64: if cc given both -O and -g, -g must be -g3
Jarkko Hietaniemi [Sun, 23 Jul 2006 10:18:11 +0000 (13:18 +0300)]
Message-Id: <200607230718.k6N7IB4u009170@kosh.hut.fi>

p4raw-id: //depot/perl@28609

hints/dec_osf.sh

index 2a2bf61..a4155bd 100644 (file)
@@ -179,6 +179,16 @@ case "$optimize" in
        ;;
 esac
 
+case "$isgcc" in
+gcc)   ;;
+*)     case "$optimize" in
+       *-O*)   # With both -O and -g, the -g must be -g3.
+               optimize="`echo $optimize | sed 's/-g[1-4]*/-g3/'`"
+               ;;
+       esac
+       ;;
+esac
+
 ## Optimization limits
 case "$isgcc" in
 gcc) #  gcc 3.2.1 wants a lot of memory for -O3'ing toke.c