reinstate patch which should not have been removed

This commit is contained in:
sthen 2022-11-07 16:33:55 +00:00
parent d654368c52
commit 867f54f358
2 changed files with 46 additions and 1 deletions

View File

@ -3,7 +3,7 @@ COMMENT = ML language with complete class-based objective system
# XXX Don't even think of updating ocaml alone.
# Do check that the ports that depend on it still work, or repair them.
VERSION= 4.12.1
REVISION= 1
REVISION= 2
PKGNAME = ocaml-${VERSION:C/\+//}

View File

@ -0,0 +1,45 @@
Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -735,6 +735,11 @@ AS_CASE([$CC,$host],
)
+# Respect LDFLAGS and CFLAGS
+common_cflags="$common_cflags $CFLAGS"
+oc_ldflags="$oc_ldflags $LDFLAGS"
+
+
## Program to use to install files
AC_PROG_INSTALL
@@ -867,10 +872,10 @@ AS_IF([test x"$enable_shared" != "xno"],
[[*-*-linux*|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*\
|*-*-openbsd*|*-*-netbsd*|*-*-dragonfly*|*-*-gnu*|*-*-haiku*]],
[sharedlib_cflags="-fPIC"
+ oc_ldflags="$oc_ldflags -Wl,-E"
AS_CASE([$CC,$host],
[gcc*,powerpc-*-linux*], [mksharedlib="$CC -shared -mbss-plt"],
- [mksharedlib="$CC -shared"])
- oc_ldflags="$oc_ldflags -Wl,-E"
+ [mksharedlib="$CC -shared $oc_ldflags"])
rpath="-Wl,-rpath,"
mksharedlibrpath="-Wl,-rpath,"
natdynlinkopts="-Wl,-E"
@@ -912,6 +917,7 @@ AS_IF([test x"$enable_shared" != "xno"],
[earm*-*-netbsd*], [natdynlink=true],
[aarch64-*-linux*], [natdynlink=true],
[aarch64-*-freebsd*], [natdynlink=true],
+ [aarch64-*-openbsd*], [natdynlink=true],
[riscv*-*-linux*], [natdynlink=true])])
# Try to work around the Skylake/Kaby Lake processor bug.
@@ -1013,6 +1019,8 @@ AS_CASE([$host],
[arch=arm64; system=linux],
[aarch64-*-freebsd*],
[arch=arm64; system=freebsd],
+ [aarch64-*-openbsd*],
+ [arch=arm64; system=openbsd],
[x86_64-*-cygwin*],
[arch=amd64; system=cygwin],
[riscv64-*-linux*],