Add patch to make ocamlopt -output-obj and ocamlopt -pack call the linker
authorJulien Cristau <julien.cristau@ens-lyon.org>
Thu, 12 Jan 2006 14:32:42 +0000 (14:32 +0000)
committerJulien Cristau <julien.cristau@ens-lyon.org>
Thu, 12 Jan 2006 14:32:42 +0000 (14:32 +0000)
via gcc instead of directly, which allows us to pass the same linking
options in these cases and in the common case (where ocamlopt already used
gcc). This should unbreak ocamlopt -pack on alpha, and thus fix the build
failure of camomile.

debian/changelog
debian/patches/00list
debian/patches/call_ld_via_gcc.dpatch [new file with mode: 0644]

index 493f395ca1ddd7259a6ee47502f163c407cc43af..ce7f65f43806eb4004a8401e789b1ca202aff1b1 100644 (file)
@@ -5,8 +5,13 @@ ocaml (3.09.1-2) UNRELEASED; urgency=low
 
   [ Julien Cristau ]
   * build-arch is a phony target.
+  * Add patch to make ocamlopt -output-obj and ocamlopt -pack call the linker
+    via gcc instead of directly, which allows us to pass the same linking
+    options in these cases and in the common case (where ocamlopt already used
+    gcc). This should unbreak ocamlopt -pack on alpha, and thus fix the build
+    failure of camomile.
 
- -- Julien Cristau <julien.cristau@ens-lyon.org>  Mon,  9 Jan 2006 23:43:40 +0100
+ -- Julien Cristau <julien.cristau@ens-lyon.org>  Thu, 12 Jan 2006 15:29:51 +0100
 
 ocaml (3.09.1-1) unstable; urgency=low
 
index 04b4ec79099302eb4ba72b3ebddb0a3c670dd9e7..f2986019b494dcf73cd71f318e8407ff094d935e 100644 (file)
@@ -4,3 +4,4 @@ dumpobj
 man-ocamlmklib
 kbsd-gnu
 alpha_ld_no-relax
+call_ld_via_gcc
diff --git a/debian/patches/call_ld_via_gcc.dpatch b/debian/patches/call_ld_via_gcc.dpatch
new file mode 100644 (file)
index 0000000..7277552
--- /dev/null
@@ -0,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## call_ld_via_gcc.dpatch by Julien Cristau <julien.cristau@ens-lyon.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Make ocamlopt -output-obj and -pack call ld via gcc instead of 
+## DP: directly, so the options we pass to it can be the same as in the normal 
+## DP: linking case
+
+@DPATCH@
+
+--- ocaml-3.09.1.orig/Makefile 2005-09-24 18:20:36.000000000 +0200
++++ ocaml-3.09.1/Makefile      2006-01-12 10:17:42.000000000 +0100
+@@ -324,8 +324,8 @@
+             -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%%|gcc -nostdlib -Wl,-r $(NATIVECCLINKOPTS)|' \
++            -e 's|%%PACKLD%%|gcc -nostdlib -Wl,-r $(NATIVECCLINKOPTS)|' \
+             -e 's|%%BYTECCLIBS%%|$(BYTECCLIBS)|' \
+             -e 's|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|' \
+             -e 's|%%RANLIBCMD%%|$(RANLIBCMD)|' \