Lines 123-144
Link Here
|
123 |
include="-I$pkgincludedir" |
123 |
include="-I$pkgincludedir" |
124 |
|
124 |
|
125 |
# Remove some options that a client doesn't have to care about |
125 |
# Remove some options that a client doesn't have to care about |
126 |
# FIXME until we have a --cxxflags, we need to remove -Xa |
126 |
tmpcflags="" |
127 |
# and -xstrconst to make --cflags usable for Sun Forte C++ |
127 |
for f in $cflags |
128 |
# FIXME until we have a --cxxflags, we need to remove -AC99 |
|
|
129 |
# to make --cflags usable for HP C++ (aCC) |
130 |
for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \ |
131 |
DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \ |
132 |
DEXTRA_DEBUG DHAVE_valgrind O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \ |
133 |
'mtune=[-A-Za-z0-9]*' 'mcpu=[-A-Za-z0-9]*' 'march=[-A-Za-z0-9]*' \ |
134 |
Xa xstrconst "xc99=none" AC99 \ |
135 |
unroll2 ip mp restrict |
136 |
do |
128 |
do |
137 |
# The first option we might strip will always have a space before it because |
129 |
case "${f}" in |
138 |
# we set -I$pkgincludedir as the first option |
130 |
-DDBUG_OFF) f="" ;; |
139 |
cflags=`echo "$cflags"|sed -e "s/ -$remove */ /g"` |
131 |
-DSAFEMALLOC) f="" ;; |
|
|
132 |
-USAFEMALLOC) f="" ;; |
133 |
-DSAFE_MUTEX) f="" ;; |
134 |
-DPEDANTIC_SAFEMALLOC) f="" ;; |
135 |
-DUNIV_MUST_NOT_INLINE) f="" ;; |
136 |
-DFORCE_INIT_OF_VARS) f="" ;; |
137 |
-DEXTRA_DEBUG) f="" ;; |
138 |
-DHAVE_purify) f="" ;; |
139 |
-[ID]*) tmpcflags="${tmpcflags} ${f}" ;; |
140 |
-[Ll]*) |
141 |
libs="${libs} ${f}" |
142 |
libs_r="${libs_r} ${f}" |
143 |
embedded_libs="${embedded_libs} ${f}" |
144 |
;; |
145 |
esac |
140 |
done |
146 |
done |
141 |
cflags=`echo "$cflags"|sed -e 's/ *\$//'` |
147 |
cflags="${tmpcflags# }" |
142 |
|
148 |
|
143 |
# Same for --libs(_r) |
149 |
# Same for --libs(_r) |
144 |
for remove in lmtmalloc static-libcxa i-static static-intel |
150 |
for remove in lmtmalloc static-libcxa i-static static-intel |