leading underscores

2009-10-09
2013-06-06
  • Alexey Pushkin

    Alexey Pushkin - 2009-10-09

    Hi guys, I haven't been here for a while.

    Is it now possible to build a 64-bit toolchain that would NOT add leading underscores to symbols ? (This is needed for compatibility with VC-compiled libs).

    P.S. BTW does multilib work now ?

     
  • Kai Tietz

    Kai Tietz - 2009-10-09

    Hi foobar,

    Long time not seen. Hope things are fine for you. The tasks about the ansi IO feature are solved. Our default is still to build with underscores, but our runtime (beside the configure and Makefile) is prepared for this.
    We have branched and want to do the first release of our runtime soon.

    Kai

     
  • Alexey Pushkin

    Alexey Pushkin - 2009-10-09

    Hello Kai,

    Do you think I can build the toolchain with no underscores _NOW_ ? What do I need ? Edit configure ? Could you provide directions ?

    Heh, customers are waiting :-)

    P.S. BTW what is "ansi IO feature"

     
  • Kai Tietz

    Kai Tietz - 2009-10-09

    Yes, it is possible. You need to patch crt's Makefile.am and you have to change default settings in _mingw_mac.h for x64 to underscoring.
    For dlltool the underscoring generation has to be turned off, and our crt needs to be build with -fno-leading-underscore. (same is necessary for ld & co).

    Ansi IO is the override of the stdio printf family functions by the POSIX emulation function (__mingw_<printf>).

    Kai

     
  • Alexey Pushkin

    Alexey Pushkin - 2009-10-13

    Kai, thanx,

    I tried that …  at some point I ran into a problem with the .def files: mingw-w64-crt/lib64/*.def files have all the MS symbols with underscores. How do I fix this ? Or I'm missing something ?

     
  • Alexey Pushkin

    Alexey Pushkin - 2009-10-14

    Please disregard previous post, I was tired :-)

     
  • Alexey Pushkin

    Alexey Pushkin - 2009-10-15

    Kai, I'm still struggling with this.

    What should the imp prefixes be in the import libs be: _imp_Symbol or __imp_Symbol ?

     
  • Alexey Pushkin

    Alexey Pushkin - 2009-10-15

    SF replaced my underscores :-( I meant -imp-Symbol or -imp-Symbol ?

     
  • Alexey Pushkin

    Alexey Pushkin - 2009-10-15

    Answering to myself: MSVC makes -imp-Symbol. Contrary to your definition of __MINGW_IMP_SYMBOL in _mingw_mac.h

     
  • Xenofears [Peter]

    As for your ps, Multilib works for gcc 4.5.0 (32-bit default now too.) Multilib is not supported for mingw targets in gcc 4.4.x at all.

    So FYI (everyone) for our Cygwin release, I am finishing it up right now, there is no multilib. There is Win32 target gcc 4.4.2 and Win64 target gcc 4.4.2 (pre-releases.)

    I'd like to see this underscore issue dealt with, it seems to be coming up more often. It is not something I fully understand (why we add an underscore, which was done by decision, and what needs to be done to change it.)

     
  • Ozkan Sezer

    Ozkan Sezer - 2009-10-17

    Peter:  If you care for multilib and want it in your 4.4 based builds, backporting it to 4.4 is easy and I can mail you my work. It is just a 12 KB of a patch.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks