Use CCLINKFLAGS for linking all executables and shared libraries
This allows packagers to set additional linker flags for executables and shared
libraries created by OCaml, and for the OCaml tools themselves.
OCaml code can be linked with various C stubs and C libraries that would
benefit from using hardening link flags, such as -Wl,-z,relro.
Origin: other
Bug-Debian: https://bugs.debian.org/702349
Forwarded: no
Last-Update: <2015-07-15>
Gbp-Pq: Name 0013-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
Stephane Glondu [Sun, 16 Aug 2015 18:59:14 +0000 (20:59 +0200)]
Add a .file directive to generated .s files
When no .file directive is given, the toolchain records the filename
of the .o file, which is sometimes random, making generated objects
non-deterministic.
We use Location.input_name for adding .file directives to assembly
files. Note: when the file is preprocessed, this reference holds the
name of the temporary file. Hence, files compiled with -pp are still
not deterministic.
This patch fixes non-strippability of bytecode executables linked with
custom runtime. The new behaviour is enabled when OCAML_CUSTOM_EMBED
is set to "y", or when DEB_HOST_ARCH is non-empty.
Avoid multiple declarations in generated .c files in -output-obj
In -output-obj mode, <caml/mlvalues.h> (which contains some
primitives) is included in the generated .c file, leading to errors
when compiling with g++ (multiple declarations).
There are probably better implementations (in particular, in this one,
care must be taken when changing the list of primitives available in
mlvalues.h), but this is a small and (not too) intrusive patch.
Bug: http://caml.inria.fr/mantis/view.php?id=5254 Signed-off-by: Stephane Glondu <steph@glondu.net>
Gbp-Pq: Name 0005-Avoid-multiple-declarations-in-generated-.c-files-in.patch
[changes brought forward from 4.01.0-5+rpi1 by Peter Michael Green <plugwash@raspbian.org> at Sat, 24 Jan 2015 10:29:46 +0000]
* Add logic in debian/rules to detect raspbian and give the upstream
configure script the correct instructions.
Use CCLINKFLAGS for linking all executables and shared libraries
This allows packagers to set additional linker flags for executables and shared
libraries created by OCaml, and for the OCaml tools themselves.
OCaml code can be linked with various C stubs and C libraries that would
benefit from using hardening link flags, such as -Wl,-z,relro.
Origin: other
Bug-Debian: https://bugs.debian.org/702349
Forwarded: no
Last-Update: <2015-07-15>
Gbp-Pq: Name 0013-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
Stephane Glondu [Sun, 16 Aug 2015 18:59:14 +0000 (20:59 +0200)]
Add a .file directive to generated .s files
When no .file directive is given, the toolchain records the filename
of the .o file, which is sometimes random, making generated objects
non-deterministic.
We use Location.input_name for adding .file directives to assembly
files. Note: when the file is preprocessed, this reference holds the
name of the temporary file. Hence, files compiled with -pp are still
not deterministic.
This patch fixes non-strippability of bytecode executables linked with
custom runtime. The new behaviour is enabled when OCAML_CUSTOM_EMBED
is set to "y", or when DEB_HOST_ARCH is non-empty.
Avoid multiple declarations in generated .c files in -output-obj
In -output-obj mode, <caml/mlvalues.h> (which contains some
primitives) is included in the generated .c file, leading to errors
when compiling with g++ (multiple declarations).
There are probably better implementations (in particular, in this one,
care must be taken when changing the list of primitives available in
mlvalues.h), but this is a small and (not too) intrusive patch.
Bug: http://caml.inria.fr/mantis/view.php?id=5254 Signed-off-by: Stephane Glondu <steph@glondu.net>
Gbp-Pq: Name 0005-Avoid-multiple-declarations-in-generated-.c-files-in.patch
Mehdi Dogguy [Wed, 21 Dec 2016 23:48:59 +0000 (23:48 +0000)]
ocaml (4.02.3-9) unstable; urgency=medium
* obey hardening LDFLAGS (Closes: #792502). Thanks to Török Edwin
for the patch!
- add patch 0013-Obey-ldflags.patch
* Compute a stable name for preprocessed files (Closes: #838188).
Thanks to Johannes Schauer for the patch!
* CVE-2015-8869 (Closes: #824139).
Stephane Glondu [Sun, 16 Aug 2015 18:59:14 +0000 (20:59 +0200)]
Add a .file directive to generated .s files
When no .file directive is given, the toolchain records the filename
of the .o file, which is sometimes random, making generated objects
non-deterministic.
We use Location.input_name for adding .file directives to assembly
files. Note: when the file is preprocessed, this reference holds the
name of the temporary file. Hence, files compiled with -pp are still
not deterministic.
This patch fixes non-strippability of bytecode executables linked with
custom runtime. The new behaviour is enabled when OCAML_CUSTOM_EMBED
is set to "y", or when DEB_HOST_ARCH is non-empty.
Avoid multiple declarations in generated .c files in -output-obj
In -output-obj mode, <caml/mlvalues.h> (which contains some
primitives) is included in the generated .c file, leading to errors
when compiling with g++ (multiple declarations).
There are probably better implementations (in particular, in this one,
care must be taken when changing the list of primitives available in
mlvalues.h), but this is a small and (not too) intrusive patch.
Bug: http://caml.inria.fr/mantis/view.php?id=5254 Signed-off-by: Stephane Glondu <steph@glondu.net>
Gbp-Pq: Name 0005-Avoid-multiple-declarations-in-generated-.c-files-in.patch
Mehdi Dogguy [Sun, 6 Nov 2016 10:29:41 +0000 (10:29 +0000)]
ocaml (4.02.3-8) unstable; urgency=medium
* Default to PIC on arm, to fix failing armhf tests (Closes: #837359).
* Use secure and canonical URIs for Vcs-* fields
* Sync Standards-Version's value in debian/control.in
Stephane Glondu [Sun, 16 Aug 2015 18:59:14 +0000 (20:59 +0200)]
Add a .file directive to generated .s files
When no .file directive is given, the toolchain records the filename
of the .o file, which is sometimes random, making generated objects
non-deterministic.
We use Location.input_name for adding .file directives to assembly
files. Note: when the file is preprocessed, this reference holds the
name of the temporary file. Hence, files compiled with -pp are still
not deterministic.
This patch fixes non-strippability of bytecode executables linked with
custom runtime. The new behaviour is enabled when OCAML_CUSTOM_EMBED
is set to "y", or when DEB_HOST_ARCH is non-empty.
Avoid multiple declarations in generated .c files in -output-obj
In -output-obj mode, <caml/mlvalues.h> (which contains some
primitives) is included in the generated .c file, leading to errors
when compiling with g++ (multiple declarations).
There are probably better implementations (in particular, in this one,
care must be taken when changing the list of primitives available in
mlvalues.h), but this is a small and (not too) intrusive patch.
Bug: http://caml.inria.fr/mantis/view.php?id=5254 Signed-off-by: Stephane Glondu <steph@glondu.net>
Gbp-Pq: Name 0005-Avoid-multiple-declarations-in-generated-.c-files-in.patch
* d/rules: split install-stamp target into -arch and -indep, to allow
for building with option -A (Closes: #806087).
* drop d/ocaml-nox.links.in since it contains only links to the
ocamlbuild.1 manpage which is no longer shipped by upstream. Thanks
to Andreas Beckmann for the hint (Closes: #801447).
* d/ocaml-base-nox.README.Debian: fix two spelling errors.
* standards-version 3.9.8 (no change)
This patch fixes non-strippability of bytecode executables linked with
custom runtime. The new behaviour is enabled when OCAML_CUSTOM_EMBED
is set to "y", or when DEB_HOST_ARCH is non-empty.
Avoid multiple declarations in generated .c files in -output-obj
In -output-obj mode, <caml/mlvalues.h> (which contains some
primitives) is included in the generated .c file, leading to errors
when compiling with g++ (multiple declarations).
There are probably better implementations (in particular, in this one,
care must be taken when changing the list of primitives available in
mlvalues.h), but this is a small and (not too) intrusive patch.
Bug: http://caml.inria.fr/mantis/view.php?id=5254 Signed-off-by: Stephane Glondu <steph@glondu.net>
Gbp-Pq: Name 0007-Avoid-multiple-declarations-in-generated-.c-files-in.patch