Compile libstdC ++ with SYSV hash style

Is there a way to compile GCC libstdC ++ with the SYSV hash style instead of GNU / Linux? I have a toolchain (via crosstool-ng) that I use to compile our corporate library to work with a very wide range of Linux systems.

One of these systems is the very old RedHat, which has only the SYSV hash style, when I compile only the C library / program using the toolchain, it works fine because the generated binary uses SYSV.

But when I contact libstdC ++, the binary automatically changes to GNU / Linux style, the reason is that libstdC ++ was built as GNU / Linux, so the question is.

Running a binary on this system gives me an error

ELF file OS ABI invalid

Just for completeness, I already tried -Wl, - hash-style = sysv, without success.

In addition, I have another toolchain for an ARM system that has the same version of GCC, GLIBC, etc., but in this toolchain libstdC ++ uses SYSV, dunno why.

Thanks in advance!

+4
source share
1 answer

Try rebuilding GCC with - disable-gnu-unique-object configure. According to the GCC settings documentation:

- enable-GNU unique-object

- disable-GNU unique-object

GCC gnu_unique_object ++ . , , GLIBC 2.11 , .

gnu_unique_object GNU ABI , Red Hat.

+4

Source: https://habr.com/ru/post/1652387/


All Articles