This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/67092] bootstrap failure in running genpreds, libstdc++ version mismatch


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67092

vries at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|bootstrap failure with      |bootstrap failure in
                   |CFLAGS/CXXFLAGS/BOOT_CFLAGS |running genpreds, libstdc++
                   |="-O0 -g" in running        |version mismatch
                   |genpreds                    |

--- Comment #2 from vries at gcc dot gnu.org ---
Also ran into it now without setting CFLAGS.

This failure is with ld 2.23.51:
...
$ ld -v
GNU ld (GNU Binutils) 2.23.51.20120829
...

With a different set of build scripts, another linker is used:
...
$ /usr/bin/ld -v
GNU ld (GNU Binutils for Ubuntu) 2.20.1-system.20100303
...
and I don't run into this problem.

I once case we end up needed libstdc++ for genpreds, in the other case, not.

In the case we end up needing it, we need these symbols:
...
$ objdump -d -a -x
obj/gcc-mainline-0-x86_64-unknown-linux-gnu-x86_64-unknown-linux-gnu/prev-gcc/build/genpreds
| grep GLIBCXX | c++filt 
    0x08922974 0x00 03 GLIBCXX_3.4
0000000000000000       F *UND*  0000000000000000             
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str()
const@@GLIBCXX_3.4
0000000000000000       F *UND*  0000000000000000              operator
delete(void*)@@GLIBCXX_3.4
0000000000000000       F *UND*  0000000000000000             
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::basic_string(unsigned long, char, std::allocator<char> const&)@@GLIBCXX_3.4
0000000000000000       F *UND*  0000000000000000             
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::~basic_string()@@GLIBCXX_3.4
0000000000000000       F *UND*  0000000000000000             
std::allocator<char>::~allocator()@@GLIBCXX_3.4
0000000000000000       F *UND*  0000000000000000             
std::allocator<char>::allocator()@@GLIBCXX_3.4
0000000000000000       F *UND*  0000000000000000              operator
new(unsigned long)@@GLIBCXX_3.4
...

AFAICT, there are no uses of these symbols.

I think that by inserting some c++ code in genpreds.c, we should be able to
trigger this reliably, independent of ld version.

Updating summary.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]