@@ -94,7 +94,7 @@ cc=${cc:-cc}
94
94
95
95
ccflags=" $ccflags -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE"
96
96
case " $cc " in
97
- * gcc* |* g++* ) ;;
97
+ * gcc* |* g++* | * clang * ) ;;
98
98
* ) ccflags=" $ccflags -qmaxmem=-1 -qnoansialias -qlanglvl=extc99" ;;
99
99
esac
100
100
nm_opt=' -B'
@@ -109,7 +109,7 @@ d_setreuid='undef'
109
109
cccdlflags=' none' # All AIX code is position independent
110
110
cc_type=xlc # do not export to config.sh
111
111
case " $cc " in
112
- * gcc* |* g++* )
112
+ * gcc* |* g++* | * clang * )
113
113
cc_type=gcc
114
114
ccdlflags=' -Xlinker'
115
115
if [ " X$gccversion " = " X" ]; then
@@ -189,7 +189,7 @@ case $cc_type in
189
189
esac
190
190
191
191
case " $cc " in
192
- * gcc* |* g++* ) ;;
192
+ * gcc* |* g++* | * clang * ) ;;
193
193
194
194
cc* |xlc* ) # cc should've been set by line 116 or so if empty.
195
195
if test ! -x /usr/bin/$cc -a -x /usr/vac/bin/$cc ; then
@@ -236,9 +236,8 @@ case "$usethreads" in
236
236
d_srandom_r='undef'
237
237
d_strerror_r='undef'
238
238
239
- ccflags="$ccflags -DNEED_PTHREAD_INIT"
240
239
case "$cc" in
241
- *gcc*|*g++*)
240
+ *gcc*|*g++*|*clang* )
242
241
ccflags="-D_THREAD_SAFE $ccflags"
243
242
;;
244
243
cc_r)
429
428
ccflags="`echo $ccflags | sed -e 's@-q32@@'`"
430
429
ldflags="`echo $ldflags | sed -e 's@-b32@@'`"
431
430
case "$cc" in
432
- *gcc*|*g++*)
431
+ *gcc*|*g++*|*clang* )
433
432
ccflags="`echo $ccflags | sed -e 's@-q64@-maix64@'`"
434
433
ccflags_uselargefiles="`echo $ccflags_uselargefiles | sed -e 's@-q64@-maix64@'`"
435
434
qacflags="`echo $qacflags | sed -e 's@-q64@-maix64@'`"
@@ -474,10 +473,10 @@ if test $usenativedlopen = 'true' ; then
474
473
# libraries. AIX allows both .so and .a libraries to
475
474
# contain dynamic shared objects.
476
475
case " $cc " in
477
- * gcc* |* g++* ) ldflags=" $ldflags -Wl,-brtl -Wl,-bdynamic" ;;
476
+ * gcc* |* g++* | * clang * ) ldflags=" $ldflags -Wl,-brtl -Wl,-bdynamic" ;;
478
477
* ) ldflags=" $ldflags -brtl -bdynamic" ;;
479
478
esac
480
- elif test -f /lib/libC.a -a X" ` $cc -v 2>&1 | grep gcc` " = X; then
479
+ elif test -f /lib/libC.a -a X" ` $cc -v 2>&1 | grep -E ' gcc|clang ' ` " = X; then
481
480
# If the C++ libraries, libC and libC_r, are available we will
482
481
# prefer them over the vanilla libc, because the libC contain
483
482
# loadAndInit() and terminateAndUnload() which work correctly
0 commit comments