GCC: -static and -pie are incompatible for x86?
问题 I'm recompiling some executable for Android 5.0 as it requires executables to be PIE . I was able to recompile it for ARM with just adding some arguments while configuring (with standalone toolchain): export CFLAGS="-I/softdev/arm-libs/include -fPIE" export CPPLAGS="$CPPFLAGS -fPIE" export CXXLAGS="$CXXFLAGS -fPIE" export LDFLAGS="-L/softdev/arm-libs/lib -static -fPIE -pie" No error for ARM: configure:3406: arm-linux-androideabi-gcc -o conftest -I/softdev/arm-libs/include -fPIE -L/softdev/arm