summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2007-05-14 22:37:06 +0000
committerAlexis Ballier <aballier@gentoo.org>2007-05-14 22:37:06 +0000
commit07916b9a4a95c9c655eaac8e257f30bd37a07f9b (patch)
tree099872e04e783bca99819aba33f30394e809307e /dev-lang/ocaml/files
parentMake the tests pass without FEATURES=-userpriv (bug #176201). (diff)
downloadgentoo-2-07916b9a4a95c9c655eaac8e257f30bd37a07f9b.tar.gz
gentoo-2-07916b9a4a95c9c655eaac8e257f30bd37a07f9b.tar.bz2
gentoo-2-07916b9a4a95c9c655eaac8e257f30bd37a07f9b.zip
Call ld with proper flags to prevent compilation failures of some other ocaml packages
(Portage version: 2.1.2.7)
Diffstat (limited to 'dev-lang/ocaml/files')
-rw-r--r--dev-lang/ocaml/files/ocaml-3.09.3-call_ld_with_proper_flags.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/dev-lang/ocaml/files/ocaml-3.09.3-call_ld_with_proper_flags.patch b/dev-lang/ocaml/files/ocaml-3.09.3-call_ld_with_proper_flags.patch
new file mode 100644
index 000000000000..edf040570d99
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-3.09.3-call_ld_with_proper_flags.patch
@@ -0,0 +1,30 @@
+As we now support LDFLAGS in NATIVECCLINKOPTS
+it can happen that -Wl,--foo,--bar option is in that variable
+As ocaml happens to call ld with NATIVECCLINKOPTS
+we have to "translate" it so that ld doesn't bail out with unrecognized option
+Initial patch from Julien Cristau : http://caml.inria.fr/mantis/view.php?id=4142
+Modified a bit to catch comma separated options
+Index: ocaml-3.09.3/Makefile
+===================================================================
+--- ocaml-3.09.3.orig/Makefile
++++ ocaml-3.09.3/Makefile
+@@ -314,6 +314,8 @@ partialclean::
+ rm -f ocaml toplevel/toplevellib.cma
+
+ # The configuration file
++comma = ,
++Wl = -Wl,
+
+ utils/config.ml: utils/config.mlp config/Makefile
+ @rm -f utils/config.ml
+@@ -324,8 +326,8 @@ utils/config.ml: utils/config.mlp config
+ -e 's|%%BYTELINK%%|$(BYTECC) $(BYTECCLINKOPTS)|' \
+ -e 's|%%NATIVECC%%|$(NATIVECC) $(NATIVECCCOMPOPTS)|' \
+ -e 's|%%NATIVELINK%%|$(NATIVECC) $(NATIVECCLINKOPTS)|' \
+- -e 's|%%PARTIALLD%%|ld -r $(NATIVECCLINKOPTS)|' \
+- -e 's|%%PACKLD%%|ld -r $(NATIVECCLINKOPTS)|' \
++ -e 's|%%PARTIALLD%%|ld -r $(subst $(comma), ,$(subst $(Wl),,$(NATIVECCLINKOPTS)))|' \
++ -e 's|%%PACKLD%%|ld -r $(subst $(comma), ,$(subst $(Wl),,$(NATIVECCLINKOPTS)))|' \
+ -e 's|%%BYTECCLIBS%%|$(BYTECCLIBS)|' \
+ -e 's|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|' \
+ -e 's|%%RANLIBCMD%%|$(RANLIBCMD)|' \