Lines 26-31
Link Here
|
26 |
# Strip C[XX]FLAGS of everything except known |
26 |
# Strip C[XX]FLAGS of everything except known |
27 |
# good options. |
27 |
# good options. |
28 |
# |
28 |
# |
|
|
29 |
#### strip-unsupported-flags #### |
30 |
# Strip C[XX]FLAGS of any flags not supported by |
31 |
# installed version of gcc |
32 |
# |
29 |
#### get-flag <flag> #### |
33 |
#### get-flag <flag> #### |
30 |
# Find and echo the value for a particular flag |
34 |
# Find and echo the value for a particular flag |
31 |
# |
35 |
# |
Lines 178-183
Link Here
|
178 |
export CXXFLAGS="${NEW_CXXFLAGS}" |
182 |
export CXXFLAGS="${NEW_CXXFLAGS}" |
179 |
} |
183 |
} |
180 |
|
184 |
|
|
|
185 |
test_flag () { |
186 |
if gcc -S -xc $1 -o /dev/null /dev/null >/dev/null 2>&1; then |
187 |
echo "$1" |
188 |
fi |
189 |
} |
190 |
|
191 |
strip-unsupported-flags() { |
192 |
for x in ${CFLAGS} |
193 |
do |
194 |
NEW_CFLAGS=${NEW_CFLAGS}" ""`test_flag ${x}`" |
195 |
done |
196 |
|
197 |
for x in ${CXXFLAGS} |
198 |
do |
199 |
NEW_CXXFLAGS=${NEW_CXXFLAGS}" ""`test_flag ${x}`" |
200 |
done |
201 |
|
202 |
CFLAGS="${NEW_CFLAGS}" |
203 |
CXXFLAGS="${NEW_CXXFLAGS}" |
204 |
} |
205 |
|
181 |
get-flag() { |
206 |
get-flag() { |
182 |
local findflag="$1" |
207 |
local findflag="$1" |
183 |
for f in ${CFLAGS} ${CXXFLAGS} ; do |
208 |
for f in ${CFLAGS} ${CXXFLAGS} ; do |