This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/6428] New: --noexecstack is not used with CFLAGS="-g1"


Configuring glibc with CFLAGS="-g1" causes glibc to be built without the
--noexecstack option:

$ ../libc/configure | grep noexecstack
checking whether --noexecstack is desirable for .S files... yes

$ ../libc/configure CFLAGS="-g1" | grep noexecstack
checking whether --noexecstack is desirable for .S files... no

Other variants of the -g option (-g, -g0, -g2) give the correct behaviour.

This happens because the configure script is doing an invocation of gcc like the
following:

$ gcc -g1 -S conftest.c
$ gcc -g1 -c conftest.s -Wa,--noexecstack
test.s: Assembler messages:
test.s:79: Error: file number 1 already allocated

This fails for a reason other than the -Wa,--noexecstack argument, but it causes
configure to conclude that --noexecstack is not available.  I filed a bug on gcc
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35925) because it was not clear
whether passing -g1 to both invocations should be expected to work.

One way to fix this is not to pass CFLAGS to the second invocation; using
ASFLAGS brings this into line with other compilations of .s files.  Suggested
patches attached.

-- 
           Summary: --noexecstack is not used with CFLAGS="-g1"
           Product: glibc
           Version: 2.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: mrs at mythic-beasts dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6428

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]