C++ libstdc&x2B+;静态链接&;系统V ABI

C++ libstdc&x2B+;静态链接&;系统V ABI,c++,gcc,static-linking,abi,gcc7,C++,Gcc,Static Linking,Abi,Gcc7,当我使用-static libstdc++编译时,编译的二进制文件使用UNIX-GNUABI,但我需要使用UNIX-System VABI获取二进制文件。(我需要与FreeBSD兼容) 我也试过了,但没用 $ gcc-7.1 -v Using built-in specs. COLLECT_GCC=gcc-7.1 COLLECT_LTO_WRAPPER=/usr/local/gcc-7.1/libexec/gcc/x86_64-linux-gnu/7.1.0/lto-wrapper Target

当我使用
-static libstdc++
编译时,编译的二进制文件使用
UNIX-GNU
ABI,但我需要使用
UNIX-System V
ABI获取二进制文件。(我需要与FreeBSD兼容) 我也试过了,但没用

$ gcc-7.1 -v
Using built-in specs.
COLLECT_GCC=gcc-7.1
COLLECT_LTO_WRAPPER=/usr/local/gcc-7.1/libexec/gcc/x86_64-linux-gnu/7.1.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../gcc-7.1.0/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-7.1 --enable-checking=release --enable-languages=c,c++,fortran --disable-multilib --program-suffix=-7.1 : (reconfigured) ../gcc-7.1.0/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-7.1 --enable-checking=release --enable-languages=c,c++,fortran --program-suffix=-7.1 : (reconfigured) ../gcc-7.1.0/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-7.1 --enable-checking=release --enable-languages=c,c++,fortran --program-suffix=-7.1 --disable-gnu-unique-object
Thread model: posix
gcc version 7.1.0 (GCC)

因此,当我完全重新编译gcc而不是重新配置时,问题就解决了