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 | d5f37a2a18e970a9ae7b6a895d8b1f95c3fde537 (patch) | |
tree | 444bafc28bdf1e62cda291482bf60a77e02241fb /mk/wrapper | |
parent | c2ea63012acb06750b79f122c6c328b2a67b2da5 (diff) | |
download | pkgsrc-d5f37a2a18e970a9ae7b6a895d8b1f95c3fde537.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/wrapper')
-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 ;; |