build: Enable BIND_NOW
PATCH 1/3 build: Enable BIND_NOW
From: Florian Weimer <[email protected]>
Partial RELRO means that the object is GNU_RELRO but not BIND_NOW. This reduces the effectiveness of RELRO. bluez triggers this because it enables PIE during the build, and rpmdiff takes this as an indicator that the best possible hardening is desired.
https://bugzilla.redhat.com/show_bug.cgi?id=983161
--- acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
acinclude.m4 +1 -1
@@ -50,7 +50,7 @@ AC_DEFUN([MISC_FLAGS], [ if (test "${enableval}" = "yes" && test "${ac_cv_prog_cc_pie}" = "yes"); then misc_cflags="$misc_cflags -fPIC" - misc_ldflags="$misc_ldflags -pie" + misc_ldflags="$misc_ldflags -pie -Wl,-z,now" fi ]) if (test "$enable_coverage" = "yes"); then
Signature · 1 line
2.13.5
PATCH 2/3 obexd: Fix compilation error on F27
In file included from obexd/plugins/mas.c:41:0:./obexd/src/obex.h:37:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
ssize_t obex_get_size(struct obex_session *os);
^~~~~~~
--- obexd/src/obex.h | 2 ++ 1 file changed, 2 insertions(+)
obexd/src/obex.h +2 -0
@@ -22,6 +22,8 @@* */ +#include <unistd.h> +#define OBJECT_SIZE_UNKNOWN -1#define OBJECT_SIZE_DELETE -2
Signature · 1 line
2.13.5
PATCH 3/3 build: Add a few default configure options
In reply to Bastien NoceraAdd 3 optional features that are currently used and distributed in the Fedora packages to the default build configuration.
The additional build time is minimal, and it ensures that the build gets maximum coverage.
--- bootstrap-configure | 3 +++ 1 file changed, 3 insertions(+)
bootstrap-configure +3 -0
@@ -24,4 +24,7 @@ fi --enable-sixaxis \ --enable-midi \ --enable-mesh \ + --enable-pie \ + --enable-cups \ + --enable-library \ --disable-datafiles $*
Signature · 1 line
2.13.5
Re: [PATCH 3/3] build: Add a few default configure options
Quoted 5 lines · Bastien Nocera
Add 3 optional features that are currently used and distributed in the Fedora packages to the default build configuration.
The additional build time is minimal, and it ensures that the build gets maximum coverage.
This still applies as well.
Quoted 9 lines · Bastien Nocera
From: Florian Weimer <[email protected]>
Partial RELRO means that the object is
GNU_RELRObut notBIND_NOW. This
reduces the effectiveness of RELRO. bluez triggers this because it enables PIE during the build, and rpmdiff takes this as an indicator that the best possible hardening is desired.
Florian made the comments, I made the patch and sent it. Feel free to remove the internal Bugzilla reference before pushing.
Cheers
Quoted 9 lines · Bastien Nocera
Quoted 8 lines · Bastien Nocera
From: Florian Weimer <[email protected]>
Partial RELRO means that the object is
GNU_RELRObut notBIND_NOW. This
reduces the effectiveness of RELRO. bluez triggers this because it enables PIE during the build, and rpmdiff takes this as an indicator that the best possible hardening is desired.
Quoted 4 lines
Quoted 1 line
Florian made the comments, I made the patch and sent it. Feel free to remove the internal Bugzilla reference before pushing.
It might be simpler to just pass through any CC/CFLAGS/LDFLAGS settings the build environment is using, without trying to second-guess what the user is doing.
Thanks,
Florian