From: Julien Cristau Date: Thu, 9 Feb 2006 14:17:03 +0000 (+0000) Subject: * Change the patch added in 3.09.1-2, because it broke ocamlopt -pack on X-Git-Tag: archive/raspbian/4.08.1-4+rpi1~3^2~661 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4ece07f0875a878ae8f0874ce905a52563c0a9fa;p=ocaml.git * Change the patch added in 3.09.1-2, because it broke ocamlopt -pack on sparc (we now filter link options to remove the "-Wl," part, and then use ld). Thanks to Sylvain Le Gall for noticing, and to Samuel Thibault for his help debugging this (Closes: #351853). * [debian/rules] Make install-* depend on build-*, and tweak the rules to not rerun configure in the 'binary' phase. --- diff --git a/debian/changelog b/debian/changelog index 761da21b..179ef043 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ ocaml (3.09.1-3) unstable; urgency=low * Enable ocaml-mode for emacs-snapshot (Closes: #347917). - - -- Julien Cristau Fri, 13 Jan 2006 15:43:06 +0100 + * Change the patch added in 3.09.1-2, because it broke ocamlopt -pack on + sparc (we now filter link options to remove the "-Wl," part, and then use + ld). Thanks to Sylvain Le Gall for noticing, and to Samuel Thibault for + his help debugging this (Closes: #351853). + * [debian/rules] Make install-* depend on build-*, and tweak the rules to + not rerun configure in the 'binary' phase. + + -- Julien Cristau Thu, 9 Feb 2006 15:14:43 +0100 ocaml (3.09.1-2) unstable; urgency=low diff --git a/debian/patches/00list b/debian/patches/00list index f2986019..f628d34e 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -4,4 +4,4 @@ dumpobj man-ocamlmklib kbsd-gnu alpha_ld_no-relax -call_ld_via_gcc +call_ld_with_proper_flags diff --git a/debian/patches/call_ld_via_gcc.dpatch b/debian/patches/call_ld_via_gcc.dpatch deleted file mode 100644 index 72775525..00000000 --- a/debian/patches/call_ld_via_gcc.dpatch +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## call_ld_via_gcc.dpatch by Julien Cristau -## -## 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)|' \ diff --git a/debian/patches/call_ld_with_proper_flags.dpatch b/debian/patches/call_ld_with_proper_flags.dpatch new file mode 100644 index 00000000..523bba8b --- /dev/null +++ b/debian/patches/call_ld_with_proper_flags.dpatch @@ -0,0 +1,31 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## call_ld_with_proper_flags.dpatch by Julien Cristau +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Filter linkflags passed to ld by ocamlopt -pack and -output-obj +## DP: to remove the "-Wl," parts, which are only used when ocamlopt calls +## DP: gcc. + +@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 +@@ -313,6 +313,7 @@ + partialclean:: + rm -f ocaml toplevel/toplevellib.cma + ++Wl = -Wl, + # The configuration file + + utils/config.ml: utils/config.mlp config/Makefile +@@ -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%%|ld -r $(subst $(Wl),,$(NATIVECCLINKOPTS))|' \ ++ -e 's|%%PACKLD%%|ld -r $(subst $(Wl),,$(NATIVECCLINKOPTS))|' \ + -e 's|%%BYTECCLIBS%%|$(BYTECCLIBS)|' \ + -e 's|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|' \ + -e 's|%%RANLIBCMD%%|$(RANLIBCMD)|' \ diff --git a/debian/rules b/debian/rules index 216b0fa7..63d6e3e9 100755 --- a/debian/rules +++ b/debian/rules @@ -43,6 +43,7 @@ abi-sed: for t in `find debian/ -name \*.in | grep -v debian/control.in`; do \ sed -e 's%#OcamlABI#%$(OCAMLABI)%' -e 's%#OcamlMAJOR#%$(OCAMLMAJOR)%' $$t >$${t%.in}; \ done + touch $@ # Generate ocaml-native-compilers' Architecture field. # Should never be called automatically. @@ -101,14 +102,14 @@ endif build-indep: build-indep-stamp build-indep-stamp: patch-stamp config-stamp - # Add here commands to compile the indep part of the package. #$(MAKE) doc + touch $@ clean: abi-sed unpatch dh_testdir dh_testroot - rm -f build-arch-stamp build-indep-stamp config-stamp + rm -f build-arch-stamp build-indep-stamp config-stamp abi-sed # Add here commands to clean up after the build process. -$(MAKE) clean @@ -128,7 +129,7 @@ endif dh_clean debian/README.labltk camlp4/config/Makefile.cnf camlp4/config/Makefile config/m.h config/s.h config/Makefile emacs/ocamltags driver/ocamlcomp.sh install: install-indep install-arch -install-indep: +install-indep: build-indep dh_testdir dh_testroot dh_clean -k -i @@ -154,7 +155,7 @@ install-indep: dh_install -i -install-arch: +install-arch: build-arch dh_testdir dh_testroot dh_clean -k -a @@ -261,14 +262,14 @@ binary-common: dh_installdeb # Build architecture independant packages using the common target. -binary-indep: build-indep install-indep +binary-indep: install-indep $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common dh_gencontrol -i -- -VF:OCamlABI="$(OCAMLABI)" dh_md5sums -i dh_builddeb -i # Build architecture dependant packages using the common target. -binary-arch: build-arch install-arch +binary-arch: install-arch $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common dh_shlibdeps -s if [ ! -e opt-built-stamp ]; then \ @@ -292,4 +293,4 @@ binary-arch: build-arch install-arch dh_builddeb -s binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch abi-sed build-arch +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch build-arch