[Bug c/41692] New: -fno-leading-underscore ignored
adrian dot alexander dot may at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Oct 13 04:43:00 GMT 2009
That sums it up really. On Linux everything is fine, but on Windows this flag
is ignored. To reproduce, just compile void foo() {} with and without the flag,
nm the resulting obj and see that the underscore is always there.
This is a problem for me because I'm mixing nasm and c and hoping to build on
both linux and windows. The linux version doesn't use leading underscores
anyway, but the windows version does. Why? Why don't they behave the same and
save all the hassle? I could tell my nasm code to import symbols with
underscores, but then the linux version would break. I tried telling the linux
version to use the underscores, but the linker still expected none and couldn't
link between c files. The linker wouldn't be told to expect underscores unless
it was making a shared library. This is all just obscuring the code and I see
no reason for the difference. Even if the difference is justified, at the very
least -fno-leading-underscores should work.
I don't really have the option of using a different gcc version because I just
let the cygwin installer decide that and I don't want to break it. Besides, my
customers wouldn't want that adventure either. So it looks like I'm stuffed all
round.
--
Summary: -fno-leading-underscore ignored
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: adrian dot alexander dot may at gmail dot com
GCC build triplet: Cygwin
GCC host triplet: Cygwin
GCC target triplet: Cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41692
More information about the Gcc-bugs
mailing list