Re: windres and cmd.exe command line limit
On 8/05/2012 7:17 PM, Joe Burmeister wrote: I've been doing some QT work with MinGW and run up against that windres.exe uses popen, which on Windows calls cmd.exe, which only has a 8192 character limit. Building something in QT (which sometimes has masses of defines) in Windows with MinGW, was failing with "command line is too long". I felt the correct thing was that windres.exe didn't have this limit on Windows, so I've implemented an alternative popen for Windows with a larger character limit of 32768. Include the attached file in your build and in resrc.c change: /*#if defined (_WIN32) && ! defined (__CYGWIN__) #define popen _popen* * #define pclose _pclose #endif*/ to: */#if defined (_WIN32) && ! defined (__CYGWIN__) extern FILE *win_popen_biglimit(const char *command,const char *mode ); extern FILE *win_popen_biglimit(const char *command, const char *mode); extern int win_pclose_biglimit(FILE *stream); #undef popen #define popen win_popen_biglimit #undef pclose #define pclose win_pclose_biglimit #endif/ * Of course solve this how ever you want, but this is the direction I think it should go. This can "just work" better than it is. It would be better if cmd.exe didn't have this low limit, but it does and I doubt MS are going to fix it anytime soon and even if they did, it wouldn't help the people running or targeting the existing version of Windows. Some builds of MinGW have POSIX threads support so popen and pclose are already defined and need to be undef-ed first (see above). The patch unfortunately breaks reading from standard input. If you start windres without any arguments from a command prompt after building with the patch applied, it shows the following error: windres: can't open file `error:': Invalid argument windres: preprocessing failed. Regards, Jonathan ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/14608] New: --detect-odr-violations doesn't work with GCC 4.7
http://sourceware.org/bugzilla/show_bug.cgi?id=14608 Bug #: 14608 Summary: --detect-odr-violations doesn't work with GCC 4.7 Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: i...@airs.com ReportedBy: hjl.to...@gmail.com CC: ccout...@google.com Classification: Unclassified On Linux/ia32, with GCC 4.7, I got [hjl@gnu-26 testsuite]$ /usr/gcc-4.7.1/bin/g++ -W -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -o debug_msg_so.err -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_so debug_msg.so odr_violation1.so odr_violation2.so gcctestdir/ld: warning: while linking debug_msg_so: symbol 'Ordering::operator()(int, int)' defined in multiple places (possible ODR violation): /net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/odr_violation1.cc:6 from odr_violation1.so /net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/odr_violation2.cc:12 from odr_violation2.so debug_msg.so: error: undefined reference to 'undef_int' debug_msg.so: error: undefined reference to 'undef_float' debug_msg.so: error: undefined reference to 'undef_fn1()' debug_msg.so: error: undefined reference to 'undef_fn2()' collect2: error: ld returned 1 exit status [hjl@gnu-26 testsuite]$ FAIL: debug_msg.sh It passed with GCC 4.2: [hjl@gnu-26 testsuite]$ /usr/gcc-4.2/bin/g++ -W -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -o debug_msg_so.err -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_so debug_msg.so odr_violation1.so odr_violation2.so gcctestdir/ld: warning: while linking debug_msg_so: symbol 'SometimesInlineFunction(int)' defined in multiple places (possible ODR violation): /net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/odr_violation2.cc:27 from odr_violation2.so /net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/debug_msg.cc:68 from debug_msg.so gcctestdir/ld: warning: while linking debug_msg_so: symbol 'Ordering::operator()(int, int)' defined in multiple places (possible ODR violation): /net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/odr_violation2.cc:12 from odr_violation2.so /net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/odr_violation1.cc:6 from odr_violation1.so debug_msg.so: error: undefined reference to 'undef_fn1()' debug_msg.so: error: undefined reference to 'undef_fn2()' debug_msg.so: error: undefined reference to 'undef_int' collect2: ld returned 1 exit status [hjl@gnu-26 testsuite]$ Linux/x86-64 is OK. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/14608] --detect-odr-violations doesn't work with GCC 4.7
http://sourceware.org/bugzilla/show_bug.cgi?id=14608 H.J. Lu changed: What|Removed |Added Version|unspecified |2.24 (HEAD) -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils