X-Recipient: archive-cygwin AT delorie DOT com Date: 13 Oct 2009 04:43:37 -0000 Subject: [Bug c/41692] New: -fno-leading-underscore ignored X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla AT gcc DOT gnu DOT org To: cygwin AT cygwin DOT com From: "adrian dot alexander dot may at gmail dot com" Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple