and execstack flag

Bjoern Baumbach bb at
Wed Nov 1 11:41:45 UTC 2017

On 10/30/2017 05:00 PM, Jeremy Allison wrote:
> Hmmm. Can you figure out how to add this to the wscript build
> so we can add this as a patch ?

Please find attached a patch which solves the issue on my system. I've
verified that this does not overwrite other ldflags.

BUT this breaks the build when using the ADDITIONAL_LDFLAGS option. If I
specify for example ADDITIONAL_LDFLAGS="-z textoff", gcc is called with
a 'textoff' argument, without the '-z'. This produces the following error:

[3457/4105] Linking default/third_party/aesni-intel/
gcc: error: textoff: No such file or directory

I'm not sure if we need to check if the '-z noexecstack' option is
available on the system or not, and also not how to add this to the waf

Do we need a bug report?

Best regards,

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen, mailto:kontakt at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-build-third_party-link-aesni-intel-library-with-z-no.patch
Type: text/x-patch
Size: 1046 bytes
Desc: not available
URL: <>

More information about the samba-technical mailing list