[PATCH] gdb: unconditionally define _initialize_string_view_selftests

Tom Tromey tom@tromey.com
Fri Mar 15 14:24:00 GMT 2019


>>>>> "Sergei" == Sergei Trofimovich <slyfox@gentoo.org> writes:

Sergei> The build failure was noticed by Helmut Jarausch in
Sergei> https://bugs.gentoo.org/680232:
Sergei>     $ ./configure CXXFLAGS='-std=c++17 -Os'
Sergei>     ...
Sergei>       CXXLD  gdb
Sergei>     ld: init.o: in function `initialize_all_files()':
Sergei>     init.c:(.text+0x113): undefined reference to `_initialize_string_view_selftests()'

Sergei> It happens because '_initialize_string_view_selftests()' is
Sergei> conditionally defined based on C++ default.

Sergei> The change defines '_initialize_string_view_selftests()'
Sergei> unconditionally and leaves implementation a no-op on c++17
Sergei> compilers.

Thank you.  This is OK with a ChangeLog entry.
Let me know if you need me to check it in for you.

thanks,
Tom



More information about the Gdb-patches mailing list