aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml/020_all_configure.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml/020_all_configure.patch')
-rw-r--r--testing/ocaml/020_all_configure.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/testing/ocaml/020_all_configure.patch b/testing/ocaml/020_all_configure.patch
new file mode 100644
index 0000000000..2ae0c49432
--- /dev/null
+++ b/testing/ocaml/020_all_configure.patch
@@ -0,0 +1,50 @@
+The configure script doesn't inherit previous defined variables,
+overwriting previous declarations of bytecccompopts, bytecclinkopts,
+nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
+
+Index: ocaml-3.12.0/configure
+===================================================================
+--- ocaml-3.12.0.orig/configure
++++ ocaml-3.12.0/configure
+@@ -241,7 +241,7 @@ esac
+ # Configure the bytecode compiler
+
+ bytecc="$cc"
+-mkexe="\$(BYTECC)"
++mkexe="\$(BYTECC) \$(BYTECCLINKOPTS)"
+ bytecccompopts=""
+ bytecclinkopts=""
+ dllccompopts=""
+@@ -1582,7 +1582,15 @@ fi
+
+ # Final twiddling of compiler options to work around known bugs
+
++bytecccompopts="$CFLAGS $bytecccompopts"
++bytecclinkopts="$LDFLAGS $bytecclinkopts"
++natdynlinkopts="$LDFLAGS $natdynlinkopts"
++nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts"
++nativecclinkopts="$LDFLAGS $nativecclinkopts"
++nativecccompopts="$CFLAGS $nativecccompopts"
+ nativeccprofopts="$nativecccompopts"
++mksharedlib="$mksharedlib $LDFLAGS"
++mkmaindll="$mkmaindll $LDFLAGS"
+ case "$buggycc" in
+ gcc.2.96)
+ bytecccompopts="$bytecccompopts -fomit-frame-pointer"
+@@ -1618,6 +1626,7 @@ echo "NATIVECC=$nativecc" >> Makefile
+ echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile
+ echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile
+ echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile
++echo "NATIVECCRAWLINKOPTS=$nativeccrawlinkopts" >> Makefile
+ echo "NATIVECCRPATH=$nativeccrpath" >> Makefile
+ echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile
+ echo "ASM=$as" >> Makefile
+@@ -1630,7 +1639,7 @@ echo "DEBUGGER=$debugger" >> Makefile
+ echo "CC_PROFILE=$cc_profile" >> Makefile
+ echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
+ echo "PARTIALLD=$partialld" >> Makefile
+-echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " \
++echo "PACKLD=\$(PARTIALLD) \$(NATIVECCRAWLINKOPTS) -o " \
+ | sed -e 's/ $/\\ /' >> Makefile
+ echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
+ echo "IFLEXDIR=$iflexdir" >> Makefile