Question regarding runtime library exception

Felix Natter felix.natter@sidact.com
Fri Nov 9 12:10:00 GMT 2018


Dear libstdc++ developers,

we are linking our products dynamically against libstdc++.so.6.
Now we would like to compile with g++ 4.8.2 on systems (Scientific Linux
6, based on Redhat6) that ship with gcc 4.4.

This can be achieved by installing a "devtools-2" package, which
installs to /opt/rh:
/opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2

This causes the resulting binary to link against
/usr/lib64/libstdc++.so.6 (libstdc++.so.6.0.13).
This means our product will run on the customer's SL6 system while still
allowing us to use C++11 (gcc 4.8.2).

However, due to the link script
/opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libstdc++.so:

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf64-x86-64)
INPUT ( /usr/lib64/libstdc++.so.6 -lstdc++_nonshared )

symbols that are missing in gcc 4.4 (like std::regex_error) are linked
statically from gcc 4.8.2's libstdc++_nonshared.a.
(I can see this with nm on the binary)

The question is: Is this allowed with the gcc runtime library exception,
or is our code forced to be GPL'd
in this setup?

Please CC: me as I am not subscribed to this list.

Many Thanks and Best Regards,
-- 

*SIDACT GmbH
Simulation Data Analysis and
Compression Technologies
*
*Felix Natter*
/Software Developer /

Grantham-Allee 2-8
53757 Sankt Augustin
Germany

Phone 	 :   +49 228 5348 0430
Direct 	 :   +49 228 4097 7118
Email 	 :   felix.natter@sidact.com
Web 	 :   http://www.sidact.com/



More information about the Libstdc++ mailing list