opnsense-ports/lang/ocaml/files/patch-configure
Franco Fichtner e75280838c */*: sync with upstream
Taken from: HardenedBSD
2019-06-29 05:57:10 +02:00

65 lines
2.9 KiB
Text

--- configure.orig 2017-07-13 08:56:44 UTC
+++ configure
@@ -806,7 +806,7 @@ if test $with_sharedlibs = "yes"; then
*-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*\
|*-*-openbsd*|*-*-netbsd*|*-*-dragonfly*|*-*-gnu*|*-*-haiku*)
sharedcccompopts="-fPIC"
- mksharedlib="$bytecc -shared"
+ mksharedlib="$bytecc $bytecclinkopts -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
byteccrpath="-Wl,-rpath,"
mksharedlibrpath="-Wl,-rpath,"
@@ -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;;
sparc*-*-linux*) natdynlink=true;;
i686-*-kfreebsd*) natdynlink=true;;
x86_64-*-kfreebsd*) 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,7 @@ case "$target" in
powerpc*-*-linux*) arch=power;
if $arch64; then model=ppc64; else model=ppc; fi
system=elf;;
+ powerpc-*-freebsd*) arch=power; model=ppc; system=bsd_elf;;
powerpc-*-netbsd*) arch=power; model=ppc; system=elf;;
powerpc-*-openbsd*) arch=power; model=ppc; system=bsd_elf;;
s390x*-*-linux*) arch=s390x; model=z10; system=elf;;
@@ -946,6 +949,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 +1055,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 +2035,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
-echo "ARCH=$arch" >> Makefile
+echo "SYSTEM_ARCH=$arch" >> Makefile
echo "MODEL=$model" >> Makefile
echo "SYSTEM=$system" >> Makefile
echo "NATIVECC=$nativecc $nativecccompopts" >> Makefile