Issue in detection of assembler support for --noexecstack flag

Marc Glisse marc.glisse at inria.fr
Thu Feb 25 16:27:45 UTC 2016


On Wed, 24 Feb 2016, Rahul Chaudhry wrote:

> I'm reporting a configure issue and attaching a patch to fix it.
> Apologies if this is not the right forum for it (and please point to
> the proper channel if that's the case).
>
> We're hitting an issue where configure incorrectly determines that the
> assembler does not support the "--noexecstack" flag.
>
> The problem is with how the script tries to detect support for this
> flag. During configure, the assembler command fails with:
>  conftest.s:8:8: error: file number already allocated

Independently of what we do in GMP, it would be nice if someone could file 
a bug with binutils as asked in 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35925 .

> According to acinclude.m4, the macro for this was adapted from one
> found in glibc-2.3.5.
> A similar issue was reported for glibc:
> https://sourceware.org/bugzilla/show_bug.cgi?id=6428
> This was fixed in glibc on 15 May 2008:
> https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=215a87451d1fd623fd2699fa57f16f8ab6f6a2f3
>
> The fix is to use $ASMFLAGS (instead of $CFLAGS) when invoking the assembler.
> The attached patch applies the fix to the macro in acinclude.m4

I don't feel very confident about doing that. We do a lot of things with 
CFLAGS in configure but don't touch ASMFLAGS at all, so it might not be 
very consistent with CFLAGS.

One workaround you could try is:
CC='gcc -g1'
CCAS='gcc -c'

-- 
Marc Glisse


More information about the gmp-bugs mailing list