From: SourceForge.net <no...@so...> - 2004-07-15 20:12:22
|
Bugs item #991565, was opened at 2004-07-16 00:54 Message generated for change (Comment added) made by dannysmith You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=991565&group_id=2435 >Category: binutils Group: None Status: Open Resolution: None Priority: 5 Submitted By: Aaron W. LaFramboise (aaronwl) >Assigned to: Nobody/Anonymous (nobody) Summary: Optimization/link problem at gcc -O1 Initial Comment: This fails on MinGW GCC 3.4.1 RC, as well as vanilla FSF GCC 3.4.0 and FSF GCC head. It's not a minimal testcase, and not even proper C, and I have not done too much past this to analyze the failure beyond get this testcase. I'm sort of frazzled at the moment. ixx reported that this causing build failures in dna analysis tool. a websearch indicates that this may be causing failures in quite a few other programs also. the code itself is distilled from mingwrt head. This fails with: gcc -O1 -shared p.c -o p.dll but not with: gcc -O1 -shared p.c -o p.dll Errors: Info: resolving ___mb_cur_max by linking to __imp____mb_cur_max (auto-import) Info: resolving __pctype by linking to __imp___pctype (auto-import) fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname' fu000003.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname' nmth000000.o(.idata$4+0x0): undefined reference to `_nm____mb_cur_max' nmth000002.o(.idata$4+0x0): undefined reference to `_nm___pctype' Testcase: extern int __mb_cur_max; extern unsigned short* _pctype; extern __inline__ int isdigit(int c) { return (__mb_cur_max == 1 ? (_pctype[c] & 0x0004) : _isctype(c, 0x0004)); } extern __inline__ int isspace(int c) { return (__mb_cur_max == 1 ? (_pctype[c] & 0x0008) : _isctype(c, 0x0008)); } int llama() { if (!isdigit(0) && isspace(0)) return 1; return 0; } ---------------------------------------------------------------------- >Comment By: Danny Smith (dannysmith) Date: 2004-07-16 08:12 Message: Logged In: YES user_id=11494 The auto-import extension doesn't work when linking against an import lib built with dlltool -- in this case libmsvcrt.a. You actually need to build a dll from source to allow auto- importing from that dll Danny ---------------------------------------------------------------------- Comment By: Aaron W. LaFramboise (aaronwl) Date: 2004-07-16 00:59 Message: Logged In: YES user_id=1040098 This also fails on gcc 3.2.3, so its not a regression from that. I don't know anything anything earlier. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=991565&group_id=2435 |