Until recently, I've been able to build gcc under cygwin just fine. But
(relatively) recent checkins (232454 & 232071) are causing problems.
I've been trying to track down what to do about them, but crawling thru
the depths of makefiles, sed scripts, etc is proving difficult for this
long-time Windows programmer. But I do have some clues.
The problems all seem to revolve around __GXX_WEAK__.
I notice that cygwin's current (and experimental 5.2.0) builds of gcc
don't define __GXX_WEAK__. After reading this
(https://cygwin.com/ml/cygwin/2010-04/msg00281.html), that makes sense.
And that's fine by me, I don't need it anyway.
But during the building of gcc, the xgcc that gets built *does* define
it. And with these new changes, that leads to errors like this:
../src/c++11/.libs/libc++11convenience.a(cow-stdexcept.o): In function
`_txnal_cow_string_C1_for_exceptions(void*, char const*, void*)':
/cygdrive/c/cygwin64/src/gcc-trunk/libstdc++-v3/src/c++11/cow-stdexcept.cc:236:(.text$_Z35_txnal_cow_string_C1_for_exceptionsPvPKcS_+0x2c):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`_ITM_RU1'
/cygdrive/c/cygwin64/src/gcc-trunk/libstdc++-v3/src/c++11/cow-stdexcept.cc:248:(.text$_Z35_txnal_cow_string_C1_for_exceptionsPvPKcS_+0x39):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`transaction clone for operator
new[](unsigned long)'
/cygdrive/c/cygwin64/src/gcc-trunk/libstdc++-v3/src/c++11/cow-stdexcept.cc:267:(.text$_Z35_txnal_cow_string_C1_for_exceptionsPvPKcS_+0x5d):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`_ITM_memcpyRtWn'
../src/c++11/.libs/libc++11convenience.a(cow-stdexcept.o): In function
`txnal_read_ptr':
/cygdrive/c/cygwin64/src/gcc-trunk/libstdc++-v3/src/c++11/cow-stdexcept.cc:278:(.text$_Z23_txnal_cow_string_c_strPKv+0x1):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`_ITM_RU8'
/cygdrive/c/cygwin64/src/gcc-trunk/libstdc++-v3/src/c++11/cow-stdexcept.cc:278:(.text$_Z23_txnal_sso_string_c_strPKv+0x1):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`_ITM_RU8'
/cygdrive/c/cygwin64/src/gcc-trunk/libstdc++-v3/src/c++11/cow-stdexcept.cc:278:(.text$_Z20_txnal_cow_string_D1Pv+0x5):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`_ITM_RU8'
../src/c++11/.libs/libc++11convenience.a(cow-stdexcept.o): In function
`_txnal_cow_string_D1(void*)':
/cygdrive/c/cygwin64/src/gcc-trunk/libstdc++-v3/src/c++11/cow-stdexcept.cc:324:(.text$_Z20_txnal_cow_string_D1Pv+0x1e):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`_ITM_addUserCommitAction'
../src/c++11/.libs/libc++11convenience.a(cow-stdexcept.o): In function
`transaction clone for std::logic_error::logic_error(char const*)':
/cygdrive/c/cygwin64/src/gcc-trunk/libstdc++-v3/src/c++11/cow-stdexcept.cc:408:(.text$_ZGTtNSt11logic_errorC1EPKc+0x2e):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`_ITM_memcpyRnWt'
../src/c++11/.libs/libc++11convenience.a(cow-stdexcept.o): In function
`transaction clone for
std::logic_error::logic_error(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)':
/cygdrive/c/cygwin64/src/gcc-trunk/libstdc++-v3/src/c++11/cow-stdexcept.cc:408:(.text$_ZGTtNSt11logic_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2e):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`_ITM_memcpyRnWt'
../src/c++11/.libs/libc++11convenience.a(cow-stdexcept.o): In function
`txnal_read_ptr':
/cygdrive/c/cygwin64/src/gcc-trunk/libstdc++-v3/src/c++11/cow-stdexcept.cc:278:(.text$_ZGTtNSt11logic_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x36):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`_ITM_RU8'
../src/c++11/.libs/libc++11convenience.a(cow-stdexcept.o): In function
`transaction clone for std::logic_error::~logic_error()':
/cygdrive/c/cygwin64/src/gcc-trunk/libstdc++-v3/src/c++11/cow-stdexcept.cc:408:(.text$_ZGTtNSt11logic_errorD0Ev+0x1a):
additional relocation overflows omitted from the output
I can fix the errors and get my build working again by:
a) adding "#define __GXX_WEAK__ 0" to the top of cow-stdexcept.cc
b) commenting out the undef and define of MAKE_DECL_ONE_ONLY in cygming.h
But there's got to be a better way.
Is there some configure option I'm supposed to be using when building
gcc for cygwin? How else could your 5.2.0 not be defining
__GXX_WEAK__? Looking at the configure options in gcc -v isn't showing
me anything that looks like a solution.
dw
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple