Message ID | 4CB69B25.8050106@gmail.com |
---|---|
State | New |
Headers | show |
On 10/13/2010 10:54 PM, Dave Korn wrote: > + x86_64*-mingw*) > + SYM_STYLE=elf What does SYM_STYLE mean? No leading underscore? r~
2010/10/14 Richard Henderson <rth@redhat.com>: > On 10/13/2010 10:54 PM, Dave Korn wrote: >> + x86_64*-mingw*) >> + SYM_STYLE=elf > > What does SYM_STYLE mean? No leading underscore? > > > r~ > Yes, it is intended for specifying leading underscore. I was discussing this with Dave offlist already. The value of this SYM_STYLE is more then questionable as it is misleading. It is true that x64 mingw don't use underscores by default, but for sure it has less with ELF in common (btw there is arm wince, which has no leading underscores, too). So to define that win32 means leading underscore is here also not correct. I would suggest to name the thing by its real name and use "SYM_STYLE=underscore" and "SYM_STYLE=none". Maybe the word SYM_STLYE could be renamed into SYM_UNDERSCORED and the values are simply "yes" and "no". Regards, Kai
On 10/14/2010 09:57 AM, Kai Tietz wrote: > I would suggest to name the thing by its real name and use > "SYM_STYLE=underscore" and "SYM_STYLE=none". Maybe the word SYM_STLYE > could be renamed into SYM_UNDERSCORED and the values are simply "yes" > and "no". I don't mind =underscore. It leaves the door open for something more odd. Like the sym + .sym style used by ppc64. r~
Index: lto-plugin/configure.ac =================================================================== --- lto-plugin/configure.ac (revision 165450) +++ lto-plugin/configure.ac (working copy) @@ -10,14 +10,27 @@ AC_ARG_VAR(LIBELFLIBS,[How to link libelf]) AC_ARG_VAR(LIBELFINC,[How to find libelf include files]) AM_PROG_LIBTOOL AC_SUBST(target_noncanonical) -. ${srcdir}/../gcc/config.gcc -case ${lto_binary_reader} in - *coff*) LTO_FORMAT=coff ;; - *elf*) LTO_FORMAT=elf ;; - *) AC_MSG_ERROR([LTO plugin is not supported on this target.]) ;; +# Trying to get this information from gcc's config is tricky. +case $target in + x86_64*-mingw*) + SYM_STYLE=elf + LTO_FORMAT=coff + COFFENDIAN=-DCOFFENDIAN=0 + ;; + *-cygwin* | *-mingw* ) + SYM_STYLE=win32 + LTO_FORMAT=coff + COFFENDIAN=-DCOFFENDIAN=0 + ;; + *) + SYM_STYLE=elf + LTO_FORMAT=elf + COFFENDIAN= + ;; esac - +AC_SUBST(SYM_STYLE) AC_SUBST(LTO_FORMAT) +AC_SUBST(COFFENDIAN) AC_TYPE_UINT64_T AC_CONFIG_FILES(Makefile) AC_OUTPUT