| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: transform-gcc,v 1.25 2012/02/06 13:03:55 bsiegert Exp $ | | 1 | # $NetBSD: transform-gcc,v 1.26 2012/03/07 12:55:53 he Exp $ |
2 | # | | 2 | # |
3 | # This file handles the transformations needed for gcc that can be done | | 3 | # This file handles the transformations needed for gcc that can be done |
4 | # looking at only one argument at a time. | | 4 | # looking at only one argument at a time. |
5 | # | | 5 | # |
6 | | | 6 | |
7 | transform_setname "transform-gcc" | | 7 | transform_setname "transform-gcc" |
8 | | | 8 | |
9 | case $arg in | | 9 | case $arg in |
10 | | | 10 | |
11 | # Standard options. | | 11 | # Standard options. |
12 | -[EcgOos] |\ | | 12 | -[EcgOos] |\ |
13 | -[DILlU]?* |\ | | 13 | -[DILlU]?* |\ |
14 | -O[01] ) transform_pass ;; | | 14 | -O[01] ) transform_pass ;; |
| @@ -122,25 +122,31 @@ case $arg in | | | @@ -122,25 +122,31 @@ case $arg in |
122 | # Options specific to g++. | | 122 | # Options specific to g++. |
123 | -fexceptions |\ | | 123 | -fexceptions |\ |
124 | -fmessage-length=* |\ | | 124 | -fmessage-length=* |\ |
125 | -fno-check-new |\ | | 125 | -fno-check-new |\ |
126 | -fno-exceptions |\ | | 126 | -fno-exceptions |\ |
127 | -fno-rtti |\ | | 127 | -fno-rtti |\ |
128 | -Wno-non-virtual-dtor |\ | | 128 | -Wno-non-virtual-dtor |\ |
129 | -ftemplate-depth=* ) transform_pass ;; | | 129 | -ftemplate-depth=* ) transform_pass ;; |
130 | | | 130 | |
131 | # Options specific to Objective C | | 131 | # Options specific to Objective C |
132 | -fgnu-runtime |\ | | 132 | -fgnu-runtime |\ |
133 | -fconstant-string-class=* ) transform_pass ;; | | 133 | -fconstant-string-class=* ) transform_pass ;; |
134 | | | 134 | |
| | | 135 | # Old-style rpath specifier, may come from autoconf's AC_PATH_XTRA. |
| | | 136 | # Our gcc re-orders -R args relative to -Wl,-R specifiers (puts -R |
| | | 137 | # args at the front of the "ld" invocation), which messes up the relative |
| | | 138 | # search order. Fix this by rewriting -R to -Wl,-R. |
| | | 139 | -R* ) transform_to "-Wl,$arg" ;; |
| | | 140 | |
135 | # Other compiler's options that have corresponding GCC options. | | 141 | # Other compiler's options that have corresponding GCC options. |
136 | -Kpic |\ | | 142 | -Kpic |\ |
137 | -kpic |\ | | 143 | -kpic |\ |
138 | -KPIC |\ | | 144 | -KPIC |\ |
139 | -kPIC ) transform_to "-fPIC" ;; | | 145 | -kPIC ) transform_to "-fPIC" ;; |
140 | -mt ) transform_to "-threads" ;; | | 146 | -mt ) transform_to "-threads" ;; |
141 | -64 ) transform_to "-m64" ;; | | 147 | -64 ) transform_to "-m64" ;; |
142 | | | 148 | |
143 | # Unknown options. | | 149 | # Unknown options. |
144 | -* ) transform_pass_with_warning ;; | | 150 | -* ) transform_pass_with_warning ;; |
145 | | | 151 | |
146 | esac | | 152 | esac |