@@ -971,7 +971,7 @@ AS_CASE([$flexdll_source_dir,$supports_shared_libraries,$flexlink,$host],
971
971
972
972
mkexe_cmd_exp="$CC"
973
973
974
- AS_CASE ( [ $cc_basename ,$host] ,
974
+ AS_CASE ( [ $ocaml_cv_cc_vendor ,$host] ,
975
975
[ *,x86_64-*-darwin*] ,
976
976
[ oc_ldflags='-Wl,-no_compact_unwind';
977
977
AC_DEFINE ( [ HAS_ARCH_CODE32] , [ 1] ) ] ,
@@ -1013,10 +1013,10 @@ AS_CASE([$cc_basename,$host],
1013
1013
mkexedebugflag=''] ,
1014
1014
[ *,x86_64-*-linux*] ,
1015
1015
AC_DEFINE ( [ HAS_ARCH_CODE32] , [ 1] ) ,
1016
- [ xlc*,powerpc-ibm-aix*] ,
1016
+ [ xlc- *,powerpc-ibm-aix*] ,
1017
1017
[ oc_ldflags='-brtl -bexpfull'
1018
1018
AC_DEFINE ( [ HAS_ARCH_CODE32] , [ 1] ) ] ,
1019
- [ gcc*,powerpc-*-linux*] ,
1019
+ [ gcc- *,powerpc-*-linux*] ,
1020
1020
[ oc_ldflags="-mbss-plt"] )
1021
1021
1022
1022
# # Program to use to install files
@@ -1177,8 +1177,8 @@ AS_IF([test x"$enable_shared" != "xno"],
1177
1177
[ [ *-*-linux*|*-*-freebsd[ 3-9] *|*-*-freebsd[ 1-9] [ 0-9] *\
1178
1178
|*-*-openbsd*|*-*-netbsd*|*-*-dragonfly*|*-*-gnu*|*-*-haiku*] ] ,
1179
1179
[ sharedlib_cflags="-fPIC"
1180
- AS_CASE ( [ $cc_basename ,$host] ,
1181
- [ * gcc*,powerpc-*-linux*] ,
1180
+ AS_CASE ( [ $ocaml_cv_cc_vendor ,$host] ,
1181
+ [ gcc- *,powerpc-*-linux*] ,
1182
1182
[ mkdll_flags='-shared -mbss-plt'] ,
1183
1183
[ [ *,i[ 3456] 86-*] ] ,
1184
1184
# Disable DT_TEXTREL warnings on Linux and BSD i386
@@ -1257,7 +1257,7 @@ AS_CASE([$enable_native_toplevel,$natdynlink],
1257
1257
[ install_ocamlnat=false] )
1258
1258
1259
1259
# Try to work around the Skylake/Kaby Lake processor bug.
1260
- AS_CASE ( [ "$cc_basename ,$host"] ,
1260
+ AS_CASE ( [ "$ocaml_cv_cc_vendor ,$host"] ,
1261
1261
[ *gcc*,x86_64-*|*gcc*,i686-*] ,
1262
1262
[ OCAML_CC_HAS_FNO_TREE_VRP
1263
1263
AS_IF ( [ $cc_has_fno_tree_vrp] ,
@@ -1418,10 +1418,10 @@ AC_DEFINE_UNQUOTED([OCAML_OS_TYPE], ["$ostype"])
1418
1418
1419
1419
AC_CHECK_TOOL ( [ DIRECT_LD] ,[ ld] )
1420
1420
AS_IF ( [ test -z "$PARTIALLD"] ,
1421
- [ AS_CASE ( [ "$host,$cc_basename "] ,
1422
- [ x86_64-*-darwin*,* gcc*] , [ PACKLD_FLAGS=' -arch x86_64'] ,
1423
- [ powerpc64le*-*-linux*,* gcc*] , [ PACKLD_FLAGS=' -m elf64lppc'] ,
1424
- [ powerpc*-*-linux*,* gcc*] ,
1421
+ [ AS_CASE ( [ "$host,$ocaml_cv_cc_vendor "] ,
1422
+ [ x86_64-*-darwin*,gcc- *] , [ PACKLD_FLAGS=' -arch x86_64'] ,
1423
+ [ powerpc64le*-*-linux*,gcc- *] , [ PACKLD_FLAGS=' -m elf64lppc'] ,
1424
+ [ powerpc*-*-linux*,gcc- *] ,
1425
1425
[ AS_IF ( [ $arch64] ,
1426
1426
[ PACKLD_FLAGS=' -m elf64ppc'] ,
1427
1427
[ PACKLD_FLAGS=' -m elf32ppclinux'] ) ] ,
@@ -1430,10 +1430,11 @@ AS_IF([test -z "$PARTIALLD"],
1430
1430
# output filename. Don't assume that all C compilers understand GNU -ofoo
1431
1431
# form, so ensure that the definition includes a space at the end (which is
1432
1432
# achieved using the $(EMPTY) expansion trick in Makefile.config.in).
1433
- AS_IF ( [ test x"$cc_basename" = "xcl"] ,
1434
- # For the Microsoft C compiler there must be no space at the end of the
1435
- # string.
1436
- [ PACKLD="link -lib -nologo $machine -out:"] ,
1433
+ AS_CASE ( [ "$ocaml_cv_cc_vendor"] ,
1434
+ [ msvc-*] ,
1435
+ # For the Microsoft C compiler there must be no space at the end of the
1436
+ # string.
1437
+ [ PACKLD="link -lib -nologo $machine -out:"] ,
1437
1438
[ PACKLD="$DIRECT_LD -r$PACKLD_FLAGS -o "] ) ] ,
1438
1439
[ PACKLD="$PARTIALLD -o "] )
1439
1440
@@ -2264,8 +2265,8 @@ AS_IF([$native_compiler],
2264
2265
# # Frame pointers
2265
2266
2266
2267
AS_IF ( [ test x"$enable_frame_pointers" = "xyes"] ,
2267
- [ AS_CASE ( [ "$host,$cc_basename "] ,
2268
- [ x86_64-*-linux*,gcc*|x86_64-*-linux*,clang*] ,
2268
+ [ AS_CASE ( [ "$host,$ocaml_cv_cc_vendor "] ,
2269
+ [ x86_64-*-linux*,gcc- *|x86_64-*-linux*,clang- *] ,
2269
2270
[ common_cflags="$common_cflags -g -fno-omit-frame-pointer"
2270
2271
frame_pointers=true
2271
2272
AC_DEFINE ( [ WITH_FRAME_POINTERS] )
0 commit comments