This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/35925] New: -g1 causes "Error: file number 1 already allocated"
- From: "mrs at mythic-beasts dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Apr 2008 17:29:20 -0000
- Subject: [Bug c/35925] New: -g1 causes "Error: file number 1 already allocated"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ echo "void foo(void) { }" >test.c
$ gcc -g1 -S test.c
$ gcc -g1 -c test.s
test.s: Assembler messages:
test.s:79: Error: file number 1 already allocated
If "-g1" is changed to "-g", "-g0" or "-g2", or is removed, the error goes
away.
This causes problems when building glibc with CFLAGS="-g1". glibc's configure
script invokes gcc as above in order to test whether --noexecstack is
available. It gets an error and wrongly concludes that --noexecstack is not
available, which means libc.so doesn't get the benefit of a non-executable
stack.
Is this supposed to work, or should glibc work around it, perhaps by not
passing CFLAGS to the second invocation of gcc?
--
Summary: -g1 causes "Error: file number 1 already allocated"
Product: gcc
Version: 4.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mrs at mythic-beasts dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35925