ports/lang/ocaml/files/patch-configure
Alexey Dokuchaev 317aa0442c OCaml: transient update of the stack to version 4.07.1
This is the first step in modernizing our OCaml ports infrastructure,
as we had accumulated substantial technical debt over the years when
many of its consumer ports had not received proper care and updates.

It is currently considered as the lowest supported version (baseline)
in majority of open-source OCaml projects, which would help to pull
up other ports, e.g. `devel/ocaml-dune' in smaller, manageable pieces.

For conservative hackers among us and for compatibility with RHEL 8
which is also on it, having 4.07 in the tree would allow users stick
to that package (pkg lock it) if needed.

PR:		250408, 262781
Exp-run by:	antoine
2022-04-16 07:19:46 +00:00

76 lines
3.4 KiB
Text

--- configure.orig 2017-07-13 08:56:44 UTC
+++ configure
@@ -838,6 +838,7 @@ if test $with_sharedlibs = "yes"; then
x86_64-*-darwin*) natdynlink=true;;
s390x*-*-linux*) natdynlink=true;;
powerpc*-*-linux*) natdynlink=true;;
+ powerpc*-*-freebsd*) natdynlink=true;;
i686-*-kfreebsd*) natdynlink=true;;
x86_64-*-kfreebsd*) natdynlink=true;;
x86_64-*-dragonfly*) natdynlink=true;;
@@ -854,6 +855,7 @@ if test $with_sharedlibs = "yes"; then
arm*-*-freebsd*) natdynlink=true;;
earm*-*-netbsd*) natdynlink=true;;
aarch64-*-linux*) natdynlink=true;;
+ aarch64-*-freebsd*) natdynlink=true;;
esac
fi
@@ -921,6 +923,10 @@ case "$target" in
powerpc*-*-linux*) arch=power;
if $arch64; then model=ppc64; else model=ppc; fi
system=elf;;
+ powerpc64le*-*-freebsd*) arch=power; model=ppc64le; system=bsd_elf;;
+ powerpc*-*-freebsd*) arch=power;
+ if $arch64; then model=ppc64; else model=ppc; fi
+ system=bsd_elf;;
powerpc-*-netbsd*) arch=power; model=ppc; system=netbsd;;
powerpc-*-openbsd*) arch=power; model=ppc; system=bsd_elf;;
s390x*-*-linux*) arch=s390x; model=z10; system=elf;;
@@ -930,6 +936,7 @@ case "$target" in
armv6t2*-*-linux-gnueabi) arch=arm; model=armv6t2; system=linux_eabi;;
armv6*-*-linux-gnueabi) arch=arm; model=armv6; system=linux_eabi;;
armv6*-*-freebsd*) arch=arm; model=armv6; system=freebsd;;
+ armv7*-*-freebsd*) arch=arm; model=armv7; system=freebsd;;
earmv6*-*-netbsd*) arch=arm; model=armv6; system=netbsd;;
earmv7*-*-netbsd*) arch=arm; model=armv7; system=netbsd;;
armv5te*-*-linux-gnueabi) arch=arm; model=armv5te; system=linux_eabi;;
@@ -946,6 +953,7 @@ case "$target" in
x86_64-*-darwin*) arch=amd64; system=macosx;;
x86_64-*-mingw*) arch=amd64; system=mingw;;
aarch64-*-linux*) arch=arm64; system=linux;;
+ aarch64-*-freebsd*) arch=arm64; system=freebsd;;
x86_64-*-cygwin*) arch=amd64; system=cygwin;;
esac
@@ -1051,10 +1059,12 @@ case "$arch,$system" in
case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
amd64,linux) profiling='true';;
amd64,openbsd) profiling='true';;
+ amd64,dragonfly) profiling='true';;
amd64,freebsd) profiling='true';;
amd64,netbsd) profiling='true';;
arm,netbsd) profiling='true';;
amd64,gnu) profiling='true';;
+ arm,freebsd) profiling='true';;
arm,linux*) profiling='true';;
power,elf) profiling='true';;
power,bsd*) profiling='true';;
@@ -2029,7 +2037,7 @@ MKLIB=${TOOLPREF}ar rc \$(1) \$(2); ${TOOLPREF}ranlib
#ml Printf.sprintf "${TOOLPREF}ar rc %s %s %s && ${TOOLPREF}ranlib %s"
#ml out opts files out;;
EOF
-config ARCH "$arch"
+config SYSTEM_ARCH "$arch"
config MODEL "$model"
config SYSTEM "$system"
config OCAMLOPT_CFLAGS "$common_cflags"
@@ -2112,7 +2122,7 @@ config NATDYNLINK "$natdynlink"
config CMXS "$cmxs"
config MKEXE "$mkexe"
config MKEXEDEBUGFLAG "$mkexedebugflag"
-config MKDLL "$mksharedlib"
+config MKDLL "$mksharedlib \$(LDFLAGS)"
config MKMAINDLL "$mkmaindll"
config RUNTIMED "${debugruntime}"
config RUNTIMEI "${with_instrumented_runtime}"