aboutsummaryrefslogtreecommitdiffstats
path: root/lang/ocaml
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2015-12-17 18:00:27 +0800
committermarino <marino@FreeBSD.org>2015-12-17 18:00:27 +0800
commite0214445a8bb168d5c90e6a3a8b264ff4fb9bd72 (patch)
treecabf5ef0683b0c963b5892d8448fabfb93f13bd7 /lang/ocaml
parente329be18314159698d5aba473e8e0018e6f18ec2 (diff)
downloadfreebsd-ports-gnome-e0214445a8bb168d5c90e6a3a8b264ff4fb9bd72.tar.gz
freebsd-ports-gnome-e0214445a8bb168d5c90e6a3a8b264ff4fb9bd72.tar.zst
freebsd-ports-gnome-e0214445a8bb168d5c90e6a3a8b264ff4fb9bd72.zip
lang/ocaml: Unbreak DragonFly
The previous upgrade removed all the dragonfly patches. Bring those back to restore the port on DragonFly. PR: 203589
Diffstat (limited to 'lang/ocaml')
-rw-r--r--lang/ocaml/files/patch-configure80
1 files changed, 67 insertions, 13 deletions
diff --git a/lang/ocaml/files/patch-configure b/lang/ocaml/files/patch-configure
index 10f57e7a5ae4..5af51fcb2680 100644
--- a/lang/ocaml/files/patch-configure
+++ b/lang/ocaml/files/patch-configure
@@ -9,12 +9,15 @@
export cc cclibs verbose
# Check C compiler
-@@ -690,7 +690,7 @@ if test $with_sharedlibs = "yes"; then
+@@ -688,9 +688,9 @@ if test $with_sharedlibs = "yes"; then
+ mksharedlib="$flexlink"
+ mkmaindll="$flexlink -maindll"
shared_libraries_supported=true;;
- *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*)
+- *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*)
++ *-*-linux-gnu|*-*-linux|*-*-dragonfly*|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*)
sharedcccompopts="-fPIC"
- mksharedlib="$bytecc -shared"
-+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -shared"
++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
byteccrpath="-Wl,-rpath,"
mksharedlibrpath="-Wl,-rpath,"
@@ -23,7 +26,7 @@
*gcc*)
sharedcccompopts="-fPIC"
- mksharedlib="$bytecc -shared"
-+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -shared"
++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
byteccrpath="-Wl,-rpath,"
mksharedlibrpath="-Wl,-rpath,"
shared_libraries_supported=true;;
@@ -32,12 +35,12 @@
sharedcccompopts="-fPIC"
if sh ./solaris-ld; then
- mksharedlib="$bytecc -shared"
-+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -shared"
++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
byteccrpath="-R"
mksharedlibrpath="-R"
else
- mksharedlib="$bytecc -shared"
-+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -shared"
++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
natdynlinkopts="-Wl,-E"
byteccrpath="-Wl,-rpath,"
@@ -46,13 +49,13 @@
shared_libraries_supported=true;;
i[3456]86-*-darwin[89].*)
- mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
-+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
bytecccompopts="$dl_defs $bytecccompopts"
dl_needs_underscore=false
shared_libraries_supported=true;;
*-apple-darwin*)
- mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
-+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
bytecccompopts="$dl_defs $bytecccompopts"
dl_needs_underscore=false
shared_libraries_supported=true;;
@@ -61,11 +64,27 @@
*-*-openbsd*)
sharedcccompopts="-fPIC"
- mksharedlib="$bytecc -shared"
-+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -shared"
++ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
natdynlinkopts="-Wl,-E"
byteccrpath="-Wl,-rpath,"
-@@ -889,7 +889,7 @@ else
+@@ -793,6 +793,7 @@ if test $with_sharedlibs = "yes"; then
+ sparc*-*-linux*) natdynlink=true;;
+ i686-*-kfreebsd*) natdynlink=true;;
+ x86_64-*-kfreebsd*) natdynlink=true;;
++ x86_64-*-dragonfly*) natdynlink=true;;
+ i[3456]86-*-freebsd*) natdynlink=true;;
+ x86_64-*-freebsd*) natdynlink=true;;
+ i[3456]86-*-openbsd*) natdynlink=true;;
+@@ -862,6 +863,7 @@ case "$target" in
+ zaurus*-*-openbsd*) arch=arm; system=bsd;;
+ x86_64-*-linux*) arch=amd64; system=linux;;
+ x86_64-*-gnu*) arch=amd64; system=gnu;;
++ x86_64-*-dragonfly*) arch=amd64; system=dragonfly;;
+ x86_64-*-freebsd*) arch=amd64; system=freebsd;;
+ x86_64-*-netbsd*) arch=amd64; system=netbsd;;
+ x86_64-*-openbsd*) arch=amd64; system=openbsd;;
+@@ -889,7 +891,7 @@ else
fi
nativecccompopts=''
@@ -74,7 +93,42 @@
# FIXME the naming of nativecclinkopts is broken: these are options for
# ld (for shared libs), not for cc
nativeccrpath="$byteccrpath"
-@@ -1601,6 +1601,7 @@ if test "$x11_include" = "not found"; th
+@@ -932,6 +934,8 @@ case "$arch,$system" in
+ esac;;
+ arm,freebsd) as="${TOOLPREF}cc -c"
+ aspp="${TOOLPREF}cc -c";;
++ *,dragonfly) as="${TOOLPREF}as"
++ aspp="${TOOLPREF}cc -c";;
+ *,freebsd) as="${TOOLPREF}as"
+ aspp="${TOOLPREF}cc -c";;
+ amd64,*|arm,*|arm64,*|i386,*|power,bsd*|sparc,*)
+@@ -955,6 +959,7 @@ case "$arch,$system" in
+ case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
+ amd64,linux) profiling='prof';;
+ amd64,openbsd) profiling='prof';;
++ amd64,dragonfly) profiling='prof';;
+ amd64,freebsd) profiling='prof';;
+ amd64,netbsd) profiling='prof';;
+ amd64,gnu) profiling='prof';;
+@@ -1415,6 +1420,8 @@ if test "$pthread_wanted" = "yes"; then
+ case "$target" in
+ *-*-solaris*) pthread_link="-lpthread -lposix4"
+ pthread_caml_link="-cclib -lpthread -cclib -lposix4";;
++ *-*-dragon*) pthread_link="-pthread"
++ pthread_caml_link="-cclib -pthread";;
+ *-*-freebsd*) pthread_link="-pthread"
+ pthread_caml_link="-cclib -pthread";;
+ *-*-openbsd*) pthread_link="-pthread"
+@@ -1431,7 +1438,7 @@ if test "$pthread_wanted" = "yes"; then
+ bytecccompopts="$bytecccompopts -D_REENTRANT"
+ nativecccompopts="$nativecccompopts -D_REENTRANT"
+ case "$target" in
+- *-*-freebsd*)
++ *-*-freebsd*|*-*-dragonfly*)
+ bytecccompopts="$bytecccompopts -D_THREAD_SAFE"
+ nativecccompopts="$nativecccompopts -D_THREAD_SAFE";;
+ *-*-openbsd*)
+@@ -1601,6 +1608,7 @@ if test "$x11_include" = "not found"; th
else
x11_libs="-L$dir"
case "$target" in
@@ -82,7 +136,7 @@
*-kfreebsd*-gnu) x11_link="-L$dir -lX11";;
*-*-*bsd*) x11_link="-R$dir -L$dir -lX11";;
*) x11_link="-L$dir -lX11";;
-@@ -1644,10 +1645,10 @@ echo "X11_LINK=$x11_link" >> Makefile
+@@ -1644,10 +1652,10 @@ echo "X11_LINK=$x11_link" >> Makefile
# Look for BFD library
if sh ./hasgot -DPACKAGE=ocaml -i bfd.h && \
@@ -95,7 +149,7 @@
else
wrn "BFD library not found, 'objinfo' will be unable to display info on .cmxs files."
echo "LIBBFD_LINK=" >> Makefile
-@@ -1686,12 +1687,6 @@ if $no_naked_pointers; then
+@@ -1686,12 +1694,6 @@ if $no_naked_pointers; then
echo "#define NO_NAKED_POINTERS" >> m.h
fi