PATCH RFA: Add -static-libstdc++ option to g++
Ian Lance Taylor
iant@google.com
Tue Jun 30 17:56:00 GMT 2009
NightStrike <nightstrike@gmail.com> writes:
>> That revision breaks the linux64 to win64 cross compiler for g++. Any
>> attempt to use g++ results in output like this:
>>
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412c0 ***
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412a0 ***
>> *** glibc detected *** corrupted double-linked list: 0x00000000005412b0 ***
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412c0 ***
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412a0 ***
>> *** glibc detected *** corrupted double-linked list: 0x00000000005412c0 ***
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412b0 ***
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412b0 ***
>> *** glibc detected *** corrupted double-linked list: 0x00000000005412c0 ***
>> libtool.m4: error: problem compiling CXX test program
>> *** glibc detected *** malloc(): memory corruption (fast):
>> 0x00000000005412b0 ***
The patch in question is fairly short, and only affects the g++ driver
program, specifically g++spec.c. Can you run that under the debugger
and find out where these problems occur?
Or, see if changing this
num_args = argc + added + need_math + (library > 0) * 4 + 1;
to this
num_args = argc + added + need_math + (library > 0) * 4 + 2;
fixed the problem.
Ian
More information about the Gcc-patches
mailing list