public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/55268] New: gcc4.8 mingw-w64 Wrong stdcall import symbols generated after rev 193204
@ 2012-11-11  5:29 squallatf at gmail dot com
  2012-11-11 11:06 ` [Bug target/55268] gcc4.8 mingw-w64 wrong " squallatf at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: squallatf at gmail dot com @ 2012-11-11  5:29 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55268

             Bug #: 55268
           Summary: gcc4.8 mingw-w64 Wrong stdcall import symbols
                    generated after rev 193204
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: squallatf@gmail.com


Warning: resolving __imp__GetModuleHandleA by linking to
__imp__GetModuleHandleA@4
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
Warning: resolving __imp__VirtualProtect by linking to __imp__VirtualProtect@16
Warning: resolving __imp__Sleep by linking to __imp__Sleep@4
Warning: resolving __imp__GetLastError by linking to __imp__GetLastError@0
Warning: resolving __imp__TlsGetValue by linking to __imp__TlsGetValue@4
Warning: resolving __imp__GetCurrentThreadId by linking to
__imp__GetCurrentThreadId@0
Warning: resolving __imp__VirtualQuery by linking to __imp__VirtualQuery@12
E:/msys/src/gcc/trunk/build/gcc/crtbegin.o:cygming-crtbegin.c:(.text+0x35):
undefined reference to `_imp__GetProcAddress'
gthr-win32_s.o: In function `_gthr_win32_key_create':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:105:
undefined reference to `_imp__TlsAlloc'
gthr-win32_s.o: In function `_gthr_win32_key_delete':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:123:
undefined reference to `_imp__TlsFree'
gthr-win32_s.o: In function `_gthr_win32_getspecific':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:133:
undefined reference to `_imp__SetLastError'
gthr-win32_s.o: In function `_gthr_win32_setspecific':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:140:
undefined reference to `_imp__TlsSetValue'
gthr-win32_s.o: In function `_gthr_win32_mutex_init_function':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:150:
undefined reference to `_imp__CreateSemaphoreA'
gthr-win32_s.o: In function `_gthr_win32_mutex_destroy':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:156:
undefined reference to `_imp__CloseHandle'
gthr-win32_s.o: In function `_gthr_win32_mutex_lock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:163:
undefined reference to `_imp__WaitForSingleObject'
gthr-win32_s.o: In function `_gthr_win32_mutex_unlock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:187:
undefined reference to `_imp__ReleaseSemaphore'
gthr-win32_s.o: In function `_gthr_win32_recursive_mutex_init_function':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:198:
undefined reference to `_imp__CreateSemaphoreA'
gthr-win32_s.o: In function `_gthr_win32_recursive_mutex_lock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:215:
undefined reference to `_imp__WaitForSingleObject'
gthr-win32_s.o: In function `_gthr_win32_recursive_mutex_unlock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:256:
undefined reference to `_imp__ReleaseSemaphore'
gthr-win32_s.o: In function `_gthr_win32_recursive_mutex_destroy':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/../../../libgcc/config/i386/gthr-win32.c:265:
undefined reference to `_imp__CloseHandle'
unwind-dw2-fde_s.o: In function `_gthread_mutex_init_function':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:638:
undefined reference to `_imp__CreateSemaphoreA'
unwind-dw2-fde_s.o: In function `_gthread_mutex_lock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:655:
undefined reference to `_imp__WaitForSingleObject'
unwind-dw2-fde_s.o: In function `_gthread_mutex_unlock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:689:
undefined reference to `_imp__ReleaseSemaphore'
unwind-dw2-fde_s.o: In function `_gthread_mutex_lock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:655:
undefined reference to `_imp__WaitForSingleObject'
unwind-dw2-fde_s.o: In function `_gthread_mutex_unlock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:689:
undefined reference to `_imp__ReleaseSemaphore'
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:689:
undefined reference to `_imp__ReleaseSemaphore'
unwind-dw2-fde_s.o: In function `_gthread_mutex_lock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:655:
undefined reference to `_imp__WaitForSingleObject'
unwind-dw2-fde_s.o: In function `_gthread_mutex_unlock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:689:
undefined reference to `_imp__ReleaseSemaphore'
unwind-dw2-fde_s.o: In function `_gthread_mutex_lock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:655:
undefined reference to `_imp__WaitForSingleObject'
unwind-sjlj_s.o: In function `_gthread_key_create':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:589:
undefined reference to `_imp__TlsAlloc'
unwind-sjlj_s.o: In function `_gthread_setspecific':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:628:
undefined reference to `_imp__TlsSetValue'
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:628:
undefined reference to `_imp__TlsSetValue'
unwind-sjlj_s.o: In function `_gthread_getspecific':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:620:
undefined reference to `_imp__SetLastError'
unwind-sjlj_s.o: In function `_gthread_setspecific':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:628:
undefined reference to `_imp__TlsSetValue'
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:628:
undefined reference to `_imp__TlsSetValue'
unwind-sjlj_s.o: In function `_gthread_getspecific':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:620:
undefined reference to `_imp__SetLastError'
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:620:
undefined reference to `_imp__SetLastError'
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:620:
undefined reference to `_imp__SetLastError'
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:620:
undefined reference to `_imp__SetLastError'
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:620:
undefined reference to `_imp__SetLastError'
emutls_s.o: In function `_gthread_mutex_init_function':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:638:
undefined reference to `_imp__CreateSemaphoreA'
emutls_s.o: In function `_gthread_key_create':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:589:
undefined reference to `_imp__TlsAlloc'
emutls_s.o: In function `_gthread_getspecific':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:620:
undefined reference to `_imp__SetLastError'
emutls_s.o: In function `_gthread_setspecific':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:628:
undefined reference to `_imp__TlsSetValue'
emutls_s.o: In function `_gthread_mutex_lock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:655:
undefined reference to `_imp__WaitForSingleObject'
emutls_s.o: In function `_gthread_mutex_unlock':
E:\msys\src\gcc\trunk\build\i686-w64-mingw32\libgcc/./gthr-default.h:689:
undefined reference to `_imp__ReleaseSemaphore'
collect2.exe: error: ld returned 1 exit status
make[3]: *** [libgcc_s.dll] Error 1
make[3]: Leaving directory `/src/gcc/trunk/build/i686-w64-mingw32/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/src/gcc/trunk/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/src/gcc/trunk/build'
make: *** [all] Error 2

for example the _imp__TlsAlloc, the correct symbol should be _imp__TlsAlloc@0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/55268] gcc4.8 mingw-w64 wrong stdcall import symbols generated after rev 193204
  2012-11-11  5:29 [Bug target/55268] New: gcc4.8 mingw-w64 Wrong stdcall import symbols generated after rev 193204 squallatf at gmail dot com
@ 2012-11-11 11:06 ` squallatf at gmail dot com
  2012-11-14 12:28 ` ktietz at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: squallatf at gmail dot com @ 2012-11-11 11:06 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55268

--- Comment #1 from SquallATF <squallatf at gmail dot com> 2012-11-11 11:05:58 UTC ---
I found the reason, TARGET_MANGLE_DECL_ASSEMBLER_NAME is defined to
ix86_mangle_decl_assembler_name in gcc/config/i386/i386.c overide the define
i386_pe_mangle_decl_assembler_name in gcc/config/i386/cygming.h


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/55268] gcc4.8 mingw-w64 wrong stdcall import symbols generated after rev 193204
  2012-11-11  5:29 [Bug target/55268] New: gcc4.8 mingw-w64 Wrong stdcall import symbols generated after rev 193204 squallatf at gmail dot com
  2012-11-11 11:06 ` [Bug target/55268] gcc4.8 mingw-w64 wrong " squallatf at gmail dot com
@ 2012-11-14 12:28 ` ktietz at gcc dot gnu.org
  2012-11-14 12:36 ` ktietz at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-11-14 12:28 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55268

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-11-14
                 CC|                            |ktietz at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #2 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-11-14 12:28:22 UTC ---
I have the following patch which should solve this issue:

Index: i386.c
===================================================================
--- i386.c      (Revision 193485)
+++ i386.c      (Arbeitskopie)
@@ -28805,7 +28805,10 @@
   /* For function version, add the target suffix to the assembler name.  */
   if (TREE_CODE (decl) == FUNCTION_DECL
       && DECL_FUNCTION_VERSIONED (decl))
-    return ix86_mangle_function_version_assembler_name (decl, id);
+    id = ix86_mangle_function_version_assembler_name (decl, id);
+#ifdef TARGET_MANGLE_DECL_ASSEMBLER_NAME
+  id = TARGET_MANGLE_DECL_ASSEMBLER_NAME (decl, id);
+#endif

   return id;
 }


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/55268] gcc4.8 mingw-w64 wrong stdcall import symbols generated after rev 193204
  2012-11-11  5:29 [Bug target/55268] New: gcc4.8 mingw-w64 Wrong stdcall import symbols generated after rev 193204 squallatf at gmail dot com
  2012-11-11 11:06 ` [Bug target/55268] gcc4.8 mingw-w64 wrong " squallatf at gmail dot com
  2012-11-14 12:28 ` ktietz at gcc dot gnu.org
@ 2012-11-14 12:36 ` ktietz at gcc dot gnu.org
  2012-11-20 16:17 ` ktietz at gcc dot gnu.org
  2012-11-20 18:21 ` ktietz at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-11-14 12:36 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55268

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jojelino at gmail dot com

--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-11-14 12:36:25 UTC ---
*** Bug 55317 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/55268] gcc4.8 mingw-w64 wrong stdcall import symbols generated after rev 193204
  2012-11-11  5:29 [Bug target/55268] New: gcc4.8 mingw-w64 Wrong stdcall import symbols generated after rev 193204 squallatf at gmail dot com
                   ` (2 preceding siblings ...)
  2012-11-14 12:36 ` ktietz at gcc dot gnu.org
@ 2012-11-20 16:17 ` ktietz at gcc dot gnu.org
  2012-11-20 18:21 ` ktietz at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-11-20 16:17 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55268

--- Comment #4 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-11-20 16:17:30 UTC ---
Author: ktietz
Date: Tue Nov 20 16:17:16 2012
New Revision: 193666

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193666
Log:
        PR target/55268
        * i386.c (ix86_mangle_decl_assembler_name): Use
        SUBTARGET_MANGLE_DECL_ASSEMBLER_NAME if defined.
        * cygming.h (TARGET_MANGLE_DECL_ASSEMBLER_NAME): Rename
        to SUBTARGET_MANGLE_DECL_ASSEMBLER_NAME.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/cygming.h
    trunk/gcc/config/i386/i386.c


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/55268] gcc4.8 mingw-w64 wrong stdcall import symbols generated after rev 193204
  2012-11-11  5:29 [Bug target/55268] New: gcc4.8 mingw-w64 Wrong stdcall import symbols generated after rev 193204 squallatf at gmail dot com
                   ` (3 preceding siblings ...)
  2012-11-20 16:17 ` ktietz at gcc dot gnu.org
@ 2012-11-20 18:21 ` ktietz at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-11-20 18:21 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55268

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-11-20 18:20:27 UTC ---
Fixed


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-20 18:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-11  5:29 [Bug target/55268] New: gcc4.8 mingw-w64 Wrong stdcall import symbols generated after rev 193204 squallatf at gmail dot com
2012-11-11 11:06 ` [Bug target/55268] gcc4.8 mingw-w64 wrong " squallatf at gmail dot com
2012-11-14 12:28 ` ktietz at gcc dot gnu.org
2012-11-14 12:36 ` ktietz at gcc dot gnu.org
2012-11-20 16:17 ` ktietz at gcc dot gnu.org
2012-11-20 18:21 ` ktietz at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).