]> git.proxmox.com Git - rustc.git/commit - debian/rules
Set CFLAGS/LDFLAGS/etc according to Debian policy
authorAngus Lees <gus@inodes.org>
Mon, 2 Mar 2015 10:16:15 +0000 (21:16 +1100)
committerAngus Lees <gus@inodes.org>
Sun, 8 Mar 2015 12:50:25 +0000 (23:50 +1100)
commit7d40d3e194ea4a76eef2a94fa3839067f847a11f
treee3792aa6d344cf9cc137970b64d043111436399a
parentd677860b89ec0097b9ecd6ffa176cedfa7c41486
Set CFLAGS/LDFLAGS/etc according to Debian policy

Debian wants to build all binaries with particular hardening flags.  The
Rust makefiles inconsistently support CFLAGS/etc from the environment
for only some platforms (see mk/cfg/*).

This patch adds upstream support for LDFLAGS, and then unconditionally
prepends CFLAGS/LDFLAGS/etc to the build commands regardless of rust
platform.  debian/rules then sets these flags from dpkg-buildflags.  A
slight wrinkle in the above is also passing LDFLAGS via `rustc -C
link-args` (which in turn assumes rust is using GNU ld for linking).
debian/patches/buildflags [new file with mode: 0644]
debian/patches/series
debian/rules