diff options
author | rillig <rillig@pkgsrc.org> | 2006-12-18 00:21:31 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-12-18 00:21:31 +0000 |
commit | 5aceb423df258a08da688b65313049a14883adff (patch) | |
tree | 444bafc28bdf1e62cda291482bf60a77e02241fb /mk | |
parent | 1248a36317c2d221cd6560ef2b812a1c78cf6ab1 (diff) | |
download | pkgsrc-5aceb423df258a08da688b65313049a14883adff.tar.gz |
Some of the SunPro compilers (cc, c89) cannot handle the -O0 and -O1
options. Some others (c99, CC) can. To avoid linker errors about
"illegal option -- 1", these options are converted to -xO0 and -xO1,
which work.
Committed during the freeze to avoid breakage of packages. The code that
passed the -O0 and -O1 options through is relatively new, so there may
not have shown packages that break because of this.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/wrapper/transform-sunpro-cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mk/wrapper/transform-sunpro-cc b/mk/wrapper/transform-sunpro-cc index dcd46436cd5..ed1921f6d5c 100644 --- a/mk/wrapper/transform-sunpro-cc +++ b/mk/wrapper/transform-sunpro-cc @@ -1,4 +1,4 @@ -# $NetBSD: transform-sunpro-cc,v 1.20 2006/12/08 05:35:55 rillig Exp $ +# $NetBSD: transform-sunpro-cc,v 1.21 2006/12/18 00:21:31 rillig Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,17 +38,16 @@ transform_setname "transform-sunpro-cc" case $arg in -# Standard options. +# Standard options, except -O0 and -O1. -[cEgOos] |\ --[DILlU]?* |\ --O[01] ) transform_pass ;; +-[DILlU]?* ) transform_pass ;; # Create dependency lines for Makefiles -MM ) transform_to "-xM1" ;; -# SunPro can handle -xO<n> (n={1|2|3|4|5}), so optimistically +# SunPro can handle -xO<n> (n={0|1|2|3|4|5}), so optimistically # convert those GCC -O<n> values to -xO<n>. --O[2345] ) transform_to "-xO${arg#-O}" ;; +-O[012345] ) transform_to "-xO${arg#-O}" ;; # Ignore all other -O* options. -O* ) transform_discard_with_warning ;; |