summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure183
1 files changed, 115 insertions, 68 deletions
diff --git a/configure b/configure
index 1e63ca75b3..fe382fd868 100755
--- a/configure
+++ b/configure
@@ -803,6 +803,7 @@ install_ocamlnat
install_source_artifacts
install_bytecode_programs
mksharedlibrpath
+mkmaindll_exp
mkmaindll
mkdll_exp
mkdll
@@ -3237,7 +3238,7 @@ SO="so"
toolchain="cc"
profinfo=false
profinfo_width=0
-instrumented_runtime=true
+instrumented_runtime=false
force_instrumented_runtime=false
instrumented_runtime_libs=""
bootstrapping_flexdll=false
@@ -3398,6 +3399,7 @@ OCAML_VERSION_SHORT=5.1
+
## Generated files
ac_config_files="$ac_config_files Makefile.build_config"
@@ -13799,12 +13801,8 @@ else $as_nop
supports_shared_libraries=true
fi
-# The flexlink command
-
-flexlink_cmd=flexlink
-flexlink_flags=''
-
# Define flexlink chain and flags correctly for the different Windows ports
+flexlink_flags=''
case $host in #(
i686-*-cygwin) :
flexdll_chain='cygwin'
@@ -14157,8 +14155,13 @@ esac
mkexe_cmd_exp="$CC"
-boot_flexlink_cmd=\
+if $bootstrapping_flexdll
+then :
+ flexlink_cmd=\
'$(ROOTDIR)/boot/ocamlruns.exe $(ROOTDIR)/boot/flexlink.byte.exe'
+else $as_nop
+ flexlink_cmd=flexlink
+fi
case $cc_basename,$host in #(
*,x86_64-*-darwin*) :
@@ -14175,13 +14178,7 @@ case $cc_basename,$host in #(
if $supports_shared_libraries
then :
mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}"
- if $bootstrapping_flexdll
-then :
- mkexe_cmd=\
-"$boot_flexlink_cmd -exe -chain ${flexdll_chain} ${flexlink_flags}"
-else $as_nop
- mkexe_cmd="$mkexe_cmd_exp"
-fi
+ mkexe_cmd="${flexlink_cmd} -exe -chain ${flexdll_chain} ${flexlink_flags}"
mkexe_cflags=''
mkexe_ldflags_prefix='-link '
else $as_nop
@@ -14200,13 +14197,7 @@ esac
ostype="Win32"
toolchain="mingw"
mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}"
- if $bootstrapping_flexdll
-then :
- mkexe_cmd=\
-"${boot_flexlink_cmd} -exe -chain ${flexdll_chain} ${flexlink_flags}"
-else $as_nop
- mkexe_cmd="$mkexe_cmd_exp"
-fi
+ mkexe_cmd="${flexlink_cmd} -exe -chain ${flexdll_chain} ${flexlink_flags}"
mkexe_cflags=''
mkexe_ldflags_prefix='-link '
oc_exe_ldflags='-municode'
@@ -14216,13 +14207,7 @@ fi
toolchain=msvc
ostype="Win32"
mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}"
- if $bootstrapping_flexdll
-then :
- mkexe_cmd=\
-"${boot_flexlink_cmd} -exe -chain ${flexdll_chain} ${flexlink_flags}"
-else $as_nop
- mkexe_cmd="$mkexe_cmd_exp"
-fi
+ mkexe_cmd="${flexlink_cmd} -exe -chain ${flexdll_chain} ${flexlink_flags}"
mkexe_cflags=''
mkexe_ldflags_prefix='-link '
mkexe_via_cc_ldflags_prefix='/link '
@@ -15121,9 +15106,9 @@ rpath=''
mksharedlibrpath=''
natdynlinkopts=""
-mkdll_ld=''
if test x"$enable_shared" != "xno"
then :
+ mkdll=''
case $host in #(
x86_64-apple-darwin*) :
mkdll_flags=\
@@ -15132,20 +15117,12 @@ then :
aarch64-apple-darwin*|arm64-apple-darwin*) :
mkdll_flags='-shared -undefined dynamic_lookup -Wl,-w'
supports_shared_libraries=true ;; #(
- *-*-mingw32) :
- mkdll_ld="${flexlink_cmd} -chain ${flexdll_chain} ${flexlink_flags}"
- mkmaindll=\
-"${flexlink_cmd} -maindll -chain ${flexdll_chain} ${flexlink_flags}" ;; #(
- *-pc-windows) :
- mkdll_ld="${flexlink_cmd} -chain ${flexdll_chain} ${flexlink_flags}"
- mkdll_flags=''
- mkmaindll=\
-"${flexlink_cmd} -maindll -chain ${flexdll_chain} ${flexlink_flags}" ;; #(
- *-*-cygwin*) :
- mkdll_ld="${flexlink_cmd} -chain ${flexdll_chain} ${flexlink_flags}"
- mkdll_flags=''
- mkmaindll=\
-"${flexlink_cmd} -maindll -chain ${flexdll_chain} ${flexlink_flags}" ;; #(
+ *-*-mingw32|*-pc-windows|*-*-cygwin*) :
+ mkdll_flags="-chain ${flexdll_chain} ${flexlink_flags}"
+ mkdll_exp="flexlink ${mkdll_flags}"
+ mkdll="${flexlink_cmd} ${mkdll_flags}"
+ mkmaindll_exp="flexlink -maindll ${mkdll_flags}"
+ mkmaindll="${flexlink_cmd} -maindll ${mkdll_flags}" ;; #(
powerpc-ibm-aix*) :
case $ocaml_cv_cc_vendor in #(
xlc*) :
@@ -15179,13 +15156,10 @@ esac
natdynlinkopts="-Wl,-E"
supports_shared_libraries=true ;; #(
*) :
- ;;
+ mkdll='shared-libs-not-available' ;;
esac
- if $supports_shared_libraries && test -n "$mkdll_ld"
+ if test -z "$mkdll"
then :
- mkdll="$mkdll_ld $mkdll_flags"
- mkdll_exp="$mkdll"
-else $as_nop
mkdll="\$(CC) $mkdll_flags"
mkdll_exp="$CC $mkdll_flags"
fi
@@ -15193,7 +15167,8 @@ fi
if test -z "$mkmaindll"
then :
- mkmaindll=$mkdll_exp
+ mkmaindll_exp="$mkdll_exp"
+ mkmaindll="$mkdll"
fi
# Configure native dynlink
@@ -15364,33 +15339,105 @@ arch=none
model=default
system=unknown
+has_native_backend=no
case $host in #(
- x86_64-*-linux*) :
- arch=amd64; system=linux ;; #(
- x86_64-*-solaris*) :
- arch=amd64; system=solaris ;; #(
+ i[3456]86-*-linux*) :
+ arch=i386; system=linux_elf ;; #(
+ i[3456]86-*-*bsd*) :
+ arch=i386; system=bsd_elf ;; #(
+ i[3456]86-*-haiku*) :
+ arch=i386; system=beos ;; #(
+ i[3456]86-*-cygwin) :
+ arch=i386; system=cygwin ;; #(
+ i[3456]86-*-gnu*) :
+ arch=i386; system=gnu ;; #(
+ i[3456]86-*-mingw32) :
+ arch=i386; system=mingw ;; #(
+ i686-pc-windows) :
+ arch=i386; system=win32 ;; #(
+ x86_64-pc-windows) :
+ arch=amd64; system=win64 ;; #(
+ powerpc64le*-*-linux*) :
+ arch=power; model=ppc64le; system=elf ;; #(
+ powerpc*-*-linux*) :
+ arch=power; if $arch64
+then :
+ model=ppc64
+else $as_nop
+ model=ppc
+fi; system=elf ;; #(
+ s390x*-*-linux*) :
+ arch=s390x; model=z10; system=elf ;; #(
+ # expected to match "gnueabihf" as well as "musleabihf"
+ armv6*-*-linux-*eabihf) :
+ arch=arm; model=armv6; system=linux_eabihf ;; #(
+ armv7*-*-linux-*eabihf) :
+ arch=arm; model=armv7; system=linux_eabihf ;; #(
+ armv8*-*-linux-*eabihf) :
+ arch=arm; model=armv8; system=linux_eabihf ;; #(
+ armv8*-*-linux-*eabi) :
+ arch=arm; model=armv8; system=linux_eabi ;; #(
+ armv7*-*-linux-*eabi) :
+ arch=arm; model=armv7; system=linux_eabi ;; #(
+ armv6t2*-*-linux-*eabi) :
+ arch=arm; model=armv6t2; system=linux_eabi ;; #(
+ armv6*-*-linux-*eabi) :
+ arch=arm; model=armv6; system=linux_eabi ;; #(
+ armv6*-*-freebsd*) :
+ arch=arm; model=armv6; system=freebsd ;; #(
+ earmv6*-*-netbsd*) :
+ arch=arm; model=armv6; system=netbsd ;; #(
+ earmv7*-*-netbsd*) :
+ arch=arm; model=armv7; system=netbsd ;; #(
+ armv5te*-*-linux-*eabi) :
+ arch=arm; model=armv5te; system=linux_eabi ;; #(
+ armv5*-*-linux-*eabi) :
+ arch=arm; model=armv5; system=linux_eabi ;; #(
+ arm*-*-linux-*eabihf) :
+ arch=arm; system=linux_eabihf ;; #(
+ arm*-*-linux-*eabi) :
+ arch=arm; system=linux_eabi ;; #(
+ arm*-*-openbsd*) :
+ arch=arm; system=bsd ;; #(
+ zaurus*-*-openbsd*) :
+ arch=arm; system=bsd ;; #(
+ x86_64-*-linux*) :
+ has_native_backend=yes; arch=amd64; system=linux ;; #(
+ x86_64-*-gnu*) :
+ arch=amd64; system=gnu ;; #(
+ x86_64-*-dragonfly*) :
+ arch=amd64; system=dragonfly ;; #(
+ x86_64-*-solaris*) :
+ has_native_backend=yes; arch=amd64; system=solaris ;; #(
x86_64-*-freebsd*) :
- arch=amd64; system=freebsd ;; #(
+ has_native_backend=yes; arch=amd64; system=freebsd ;; #(
x86_64-*-netbsd*) :
- arch=amd64; system=netbsd ;; #(
+ has_native_backend=yes; arch=amd64; system=netbsd ;; #(
x86_64-*-openbsd*) :
- arch=amd64; system=openbsd ;; #(
- arm64-*-darwin*) :
- arch=arm64; system=macosx ;; #(
+ has_native_backend=yes; arch=amd64; system=openbsd ;; #(
+ x86_64-*-haiku*) :
+ arch=amd64; system=beos ;; #(
+ arm64-*-darwin*) :
+ has_native_backend=yes; arch=arm64; system=macosx ;; #(
aarch64-*-darwin*) :
- arch=arm64; system=macosx ;; #(
+ has_native_backend=yes; arch=arm64; system=macosx ;; #(
x86_64-*-darwin*) :
- arch=amd64; system=macosx ;; #(
+ has_native_backend=yes; arch=amd64; system=macosx ;; #(
x86_64-*-mingw32) :
- arch=amd64; system=mingw64 ;; #(
+ has_native_backend=yes; arch=amd64; system=mingw64 ;; #(
aarch64-*-linux*) :
- arch=arm64; system=linux ;; #(
+ has_native_backend=yes; arch=arm64; system=linux ;; #(
aarch64-*-freebsd*) :
- arch=arm64; system=freebsd ;; #(
+ has_native_backend=yes; arch=arm64; system=freebsd ;; #(
aarch64-*-openbsd*) :
- arch=arm64; system=openbsd ;; #(
+ has_native_backend=yes; arch=arm64; system=openbsd ;; #(
aarch64-*-netbsd*) :
- arch=arm64; system=netbsd ;; #(
+ has_native_backend=yes; arch=arm64; system=netbsd ;; #(
+ x86_64-*-cygwin*) :
+ arch=amd64; system=cygwin ;; #(
+ riscv64-*-linux*) :
+ arch=riscv; model=riscv64; system=linux
+ ;; #(
*) :
;;
esac
@@ -15402,14 +15449,14 @@ case $ccomptype in #(
runtime_asm_objects=${arch}.${OBJEXT} ;;
esac
-case $enable_native_compiler,$arch in #(
+case $enable_native_compiler,$has_native_backend in #(
no,*) :
native_compiler=false
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: the native compiler is disabled" >&5
printf "%s\n" "$as_me: the native compiler is disabled" >&6;} ;; #(
- yes,none) :
+ yes,no) :
as_fn_error 69 "the native compiler is not supported on this platform" "$LINENO" 5 ;; #(
- *,none) :
+ *,no) :
native_compiler=false
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: the native compiler is not supported on this platform" >&5
printf "%s\n" "$as_me: the native compiler is not supported on this platform" >&6;} ;; #(