Skip to content

Commit 46b71f6

Browse files
committed
[root-config] Put the C++ version into auxcflags by default.
The C++ version flag should be needed on all linux/mac, but it was missing e.g. for RISC-V. To remedy that, the flags is now set by default, and only overridden when needed. See also: https://root-forum.cern.ch/t/no-auxcflags-set-in-root-config-when-building-for-riscv64-6-36-02/64163
1 parent 7a5a5c6 commit 46b71f6

File tree

1 file changed

+16
-21
lines changed

1 file changed

+16
-21
lines changed

config/root-config.in

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ fi
151151

152152
# Set the C++ standard version
153153
cxxversionflag="@configstd@ "
154+
auxcflags="${cxxversionflag} "
154155

155156
case $arch in
156157
aix5)
@@ -163,98 +164,95 @@ aix5)
163164
;;
164165
aixgcc)
165166
# IBM AIX with g++
166-
auxcflags="${cxxversionflag} -fsigned-char -fsized-deallocation"
167+
auxcflags+="-fsigned-char -fsized-deallocation"
167168
auxlibs=
168169
#forcelibs=$rootulibs
169170
#forceglibs=$rootuglibs
170171
#forceevelibs=$rootuevelibs
171172
;;
172173
solarisgcc)
173174
# Solaris g++ 2.8.x
174-
auxcflags="${cxxversionflag}"
175175
auxlibs="-L/usr/ccs/lib -lm -lsocket -lgen -ldl"
176176
;;
177177
solarisCC5)
178178
# Solaris CC 5.0
179179
if [ `uname -p` = "i386" ]; then
180-
auxcflags="${cxxversionflag} -library=stlport4"
180+
auxcflags+="-library=stlport4"
181181
auxldflags="-library=stlport4"
182182
else
183-
auxcflags="${cxxversionflag}"
184183
auxldflags=
185184
fi
186185
auxlibs="-lm -ldl -lnsl -lsocket"
187186
;;
188187
solaris64CC5)
189188
# Solaris CC 5.0 x86-64
190-
auxcflags="${cxxversionflag} -m64 -library=stlport4"
189+
auxcflags+="-m64 -library=stlport4"
191190
auxldflags="-m64 -library=stlport4"
192191
auxlibs="-lm -ldl -lnsl -lsocket"
193192
;;
194193
linux)
195194
# Linux with gcc >= 3.x
196-
auxcflags="${cxxversionflag} -m32 -msse -mfpmath=sse -fsized-deallocation"
195+
auxcflags+="-m32 -msse -mfpmath=sse -fsized-deallocation"
197196
auxldflags="-m32 -msse -mfpmath=sse "
198197
auxlibs="-lm -ldl -rdynamic"
199198
;;
200199
linuxicc)
201200
# Linux with the Intel icc compiler
202-
auxcflags="${cxxversionflag} -fsized-deallocation"
201+
auxcflags+="-fsized-deallocation"
203202
auxlibs="-limf -lm -ldl"
204203
;;
205204
linuxppcgcc)
206205
# PPC Linux with gcc
207-
auxcflags="${cxxversionflag} -m32 -fsigned-char -fsized-deallocation"
206+
auxcflags+="-m32 -fsigned-char -fsized-deallocation"
208207
auxldflags="-m32"
209208
auxlibs="-lm -ldl -rdynamic"
210209
;;
211210
linuxppc64gcc)
212211
# PPC64/PPC64LE (64 bit mode) Linux with gcc
213-
auxcflags="${cxxversionflag} -m64 -fsigned-char -fsized-deallocation"
212+
auxcflags+="-m64 -fsigned-char -fsized-deallocation"
214213
auxldflags="-m64"
215214
auxlibs="-lm -ldl -rdynamic"
216215
;;
217216
linuxx8664gcc)
218217
# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
219-
auxcflags="${cxxversionflag} -m64 -fsized-deallocation"
218+
auxcflags+="-m64 -fsized-deallocation"
220219
auxldflags="-m64"
221220
auxlibs="-lm -ldl -rdynamic"
222221
;;
223222
linuxx8664icc)
224223
# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc
225-
auxcflags="${cxxversionflag}"
226224
auxlibs="-limf -lm -ldl"
227225
;;
228226
linuxx8664k1omicc)
229227
# Intel Many Integrated Cores Architecture (Knights Corner) Linux with Intel icc
230-
auxcflags="${cxxversionflag} -mmic -I/usr/include"
228+
auxcflags+="-mmic -I/usr/include"
231229
auxlibs="-limf -lm -ldl"
232230
;;
233231
linuxx32gcc)
234232
# x32 ABI (64 bit mode with 32 bit pointers) Linux with gcc > 4.7
235-
auxcflags="${cxxversionflag} -mx32 -fsized-deallocation"
233+
auxcflags+="-mx32 -fsized-deallocation"
236234
auxldflags="-mx32"
237235
auxlibs="-lm -ldl -rdynamic"
238236
;;
239237
linuxarm)
240238
# ARM Linux with gcc
241-
auxcflags="${cxxversionflag} -fsigned-char -fsized-deallocation"
239+
auxcflags+="-fsigned-char -fsized-deallocation"
242240
auxlibs="-lm -ldl -rdynamic"
243241
;;
244242
linuxarm64)
245243
# ARMv8-A (AArch64) Linux with gcc
246-
auxcflags="${cxxversionflag} -fsigned-char -fsized-deallocation"
244+
auxcflags+="-fsigned-char -fsized-deallocation"
247245
auxlibs="-lm -ldl -rdynamic"
248246
;;
249247
linuxs390gcc)
250248
# s390 (31 bit mode) Linux with gcc
251-
auxcflags="${cxxversionflag} -m31 -fsigned-char -fsized-deallocation"
249+
auxcflags+="-m31 -fsigned-char -fsized-deallocation"
252250
auxldflags="-m31"
253251
auxlibs="-lm -ldl -rdynamic"
254252
;;
255253
linuxs390xgcc)
256254
# s390x (64 bit mode) Linux with gcc
257-
auxcflags="${cxxversionflag} -m64 -fsigned-char -fsized-deallocation"
255+
auxcflags+="-m64 -fsigned-char -fsized-deallocation"
258256
auxldflags="-m64"
259257
auxlibs="-lm -ldl -rdynamic"
260258
;;
@@ -268,22 +266,19 @@ linuxloong64)
268266
;;
269267
freebsd*)
270268
# FreeBSD
271-
auxcflags="${cxxversionflag}"
272269
auxlibs="-lm"
273270
;;
274271
openbsd)
275272
# OpenBSD with libc
276-
auxcflags="${cxxversionflag}"
277273
auxlibs="-lm -lstdc++"
278274
;;
279275
macosxicc)
280276
# MacOS X with Intel icc compiler
281-
auxcflags="${cxxversionflag}"
282277
auxlibs="-lm -ldl"
283278
;;
284279
macosx64|macosxarm64)
285280
# MacOS X with gcc (GNU cc v4.x) in 64 bit mode
286-
auxcflags="${cxxversionflag} -m64"
281+
auxcflags+="-m64"
287282
auxldflags="-m64"
288283
auxlibs="-lm -ldl"
289284
;;

0 commit comments

Comments
 (0)