blob: 08234ff06ead3d3752835952ca161d15d816fc34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
# $NetBSD: transform-gcc,v 1.35 2020/05/02 19:32:59 rillig Exp $
#
# This file handles the transformations needed for gcc that can be done
# looking at only one argument at a time.
#
transform_setname "transform-gcc"
case $arg in
# Standard options.
-[EcgOos] |\
-[DILlU]?* |\
-O[01] ) transform_pass ;;
# Needed for the GNU configure scripts:
-V |\
-v |\
--version ) transform_pass ;;
# We occasionally override specs to force particular options.
-specs=* |\
-specs ) transform_pass ;;
# GCC extensions.
- |\
-dynamic |\
-export-dynamic |\
-falign-functions=* |\
-falign-loops=* |\
-falign-jumps=* |\
-fexpensive-optimizations |\
-ffast-math |\
-ffloat-store |\
-fhonour-copts |\
-finline-functions |\
-fno-align-* |\
-fno-builtin* |\
-fno-common |\
-fno-implicit-templates |\
-fno-inline-functions |\
-fno-strict-aliasing |\
-fomit-frame-pointer |\
-fPIC |\
-fpic |\
-fPIE |\
-fpie |\
-fpcc-struct-return |\
-freg-struct-return |\
-frename-registers |\
-fsigned-char |\
-fstack-protector |\
-fstack-protector-all |\
-funroll-loops |\
-funsigned-char |\
-fweb |\
-fwrapv |\
-ggdb |\
-isystem,* |\
-M |\
-M[DFMPT] |\
-MMD |\
-m32 |\
-m64 |\
-mabi=* |\
-march=* |\
-mcpu=* |\
-momit-leaf-frame-pointer |\
-mpreferred-stack-boundary=* |\
-mpush-args |\
-mschedule=* |\
-mieee-fp |\
-O[23s] |\
-pedantic |\
-pedantic-errors |\
-pie |\
-pipe |\
-pthread |\
-print-prog-name=* |\
-print-search-dirs |\
-S |\
-shared |\
-shared-gcc |\
-shared-libgcc |\
-static |\
-std=c99 |\
-std=gnu89 |\
-std=gnu99 |\
-W |\
-W[cLlS],* |\
-Wall |\
-Wbounded |\
-Wcast-align |\
-Wcast-qual |\
-Wchar-subscripts |\
-Wconversion |\
-Wextra |\
-Werror |\
-Werror-implicit-function-declaration |\
-Werror=* |\
-Wformat* |\
-Winline |\
-Wmissing-declarations |\
-Wmissing-format-attribute |\
-Wmissing-prototypes |\
-Wnested-externs |\
-Wno-* |\
-Wparentheses |\
-Wpointer-arith |\
-Wredundant-decls |\
-Wreturn-type |\
-Wshadow |\
-Wsign-compare |\
-Wstrict-aliasing |\
-Wstrict-prototypes |\
-Wswitch |\
-Wtrigraphs |\
-Wunused |\
-Wundef |\
-Wwrite-strings ) transform_pass ;;
# There are some packages suppressing all warnings. We don't want that.
-w ) transform_discard ;;
# Options specific to g++.
-fexceptions |\
-fmessage-length=* |\
-fno-check-new |\
-fno-exceptions |\
-fno-rtti |\
-Wno-non-virtual-dtor |\
-ftemplate-depth=* ) transform_pass ;;
# Options specific to Objective C
-fgnu-runtime |\
-fconstant-string-class=* ) transform_pass ;;
# Old-style rpath specifier, may come from autoconf's AC_PATH_XTRA.
# Our gcc re-orders -R args relative to -Wl,-R specifiers (puts -R
# args at the front of the "ld" invocation), which messes up the relative
# search order. Fix this by rewriting -R to -Wl,-R.
-R* ) transform_to "-Wl,$arg" ;;
# Other compiler's options that have corresponding GCC options.
-Kpic |\
-kpic |\
-KPIC |\
-kPIC ) transform_to "-fPIC" ;;
-mt ) transform_discard ;;
-64 ) transform_to "-m64" ;;
# Ignore SunPRO flags to prevent it from being recognized as a entry point
# option for `ld'.
-errwarn=* |\
-errwarn ) transform_discard_with_warning ;;
# Disable the flags for PKGSRC_MKPIE.
-fno-pie |\
-fno-PIE |\
-nopie ) MKPIE_CFLAGS=; MKPIE_LDFLAGS=; transform_pass ;;
# Unknown options.
-* ) transform_pass_with_warning ;;
esac
|