Trouble building gcc-3.4.0 cygwin->linux

Dan Kegel dank@kegel.com
Sun Jun 6 20:39:00 GMT 2004


[Dangit, somebody replied to this six weeks ago and told me
what configuration variable controlled this choice, but I
can't find the email now that I have time and need to fix this problem!]

Can someone remind me which gcc configuration thingy controls
the choice of whether to use "__i686.get_pc_thunk.cx"?
It appears this is being made wrong sometimes in gcc-3.4.0's configury,
but not in earlier versions.
The problem happens with many versions of binutils;
it happens reliably when I try to build libstdc++ cross cygwin->linux
(failing in strstream.s), but only when I'm building on
cygwin and targeting linux.

Thanks,
Dan

Dan Kegel wrote:
> [my broken asm is marked with -, hj's good asm is marked with +]
> 
>> --- foo.s    2004-04-18 08:47:40.000000000 -0700
>> +++ strstream.s    2004-04-18 11:35:17.000000000 -0700
>> @@ -8369,7 +8369,8 @@ _ZNSt9strstreamC2Ev:
>>      .uleb128 0x0
>>  .LLSDACSE1490:
>>      .section    .text._ZNSt9strstreamC2Ev
>> -    .section    .gnu.linkonce.t._ZTv0_n12_NSdD1Ev,"ax",@progbits
>> +    .set    .LTHUNK8,_ZNSdD1Ev
>> +    .section    .gnu.linkonce.t._ZNSdD1Ev,"ax",@progbits
>>      .align 2
>>      .p2align 4,,15
>>      .weak    _ZTv0_n12_NSdD1Ev
>> @@ -8379,24 +8380,17 @@ _ZTv0_n12_NSdD1Ev:
>>      movl    (%eax), %ecx
>>      addl    -12(%ecx), %eax
>>      movl    %eax, 4(%esp)
>> -    call    __i686.get_pc_thunk.cx
>> -    addl    $_GLOBAL_OFFSET_TABLE_, %ecx
>> -    movl    $_ZNSdD1Ev@GOT(%ecx), %ecx
>> -    jmp    *%ecx
>> +    jmp    .LTHUNK8
>>      .size    _ZTv0_n12_NSdD1Ev, .-_ZTv0_n12_NSdD1Ev
>> ...
> 
> 
> A nearly identically configured gcc, built on linux instead of cygwin,
> doesn't have this problem.  The only difference in how they're
> configured is --host, which is i686-host-linux-gnu for the one
> built on Linux, and i686-host-cygwin for the one built on Cygwin:
> 
> .../crosstool-0.28-rc5/build/i686-unknown-linux-gnu/gcc-3.4.0-20040416-glibc-2.1.3/gcc-3.4.0-20040416/configure  
> --target=i686-unknown-linux-gnu --host=i686-host_pc-cygwin 
> --prefix=/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.0-20040416-glibc-2.1.3 
> --with-headers=/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.0-20040416-glibc-2.1.3/i686-unknown-linux-gnu/include 
> --with-local-prefix=/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.0-20040416-glibc-2.1.3/i686-unknown-linux-gnu 
> --disable-nls --enable-threads=posix --enable-symvers=gnu 
> --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared 
> --enable-c99 --enable-long-long 
> --with-gcc-version-trigger=.../crosstool-0.28-rc5/build/i686-unknown-linux-gnu/gcc-3.4.0-20040416-glibc-2.1.3/gcc-3.4.0-20040416/gcc/version.c 
> 
> 
> .../crosstool-0.28-rc5/build/i686-unknown-linux-gnu/gcc-3.4.0-20040416-glibc-2.1.3/gcc-3.4.0-20040416/configure  
> --target=i686-unknown-linux-gnu --host=i686-host_pc-linux-gnu 
> --prefix=/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.0-20040416-glibc-2.1.3 
> --with-headers=/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.0-20040416-glibc-2.1.3/i686-unknown-linux-gnu/include 
> --with-local-prefix=/opt/crosstool/i686-unknown-linux-gnu/gcc-3.4.0-20040416-glibc-2.1.3/i686-unknown-linux-gnu 
> --disable-nls --enable-threads=posix --enable-symvers=gnu 
> --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared 
> --enable-c99 --enable-long-long 
> --with-gcc-version-trigger=.../crosstool-0.28-rc5/build/i686-unknown-linux-gnu/gcc-3.4.0-20040416-glibc-2.1.3/gcc-3.4.0-20040416/gcc/version.c 
> 
> 
> Hmm.  Maybe gcc-3.4's --host means something different than I expected.
> Or maybe the problem is I'm not passing --build, too?
> Sigh.  I guess I'll go back and study the manual a bit more.
> Clue-sticks gladly accepted...
> - Dan
> 


-- 
My technical stuff: http://kegel.com
My politics: see http://www.misleader.org for examples of why I'm for regime change



More information about the Gcc mailing list