[SOLVED] Can I recompile all of the .o source objects?
[SOLVED] Can I recompile all of the .o source objects?
I'm using arch linux. My gcc is configured with --enable-default-pie. When I try to compile my .cpp file I get many errors from the .a library that say "relocation R_X86_64_325 against '.rodata' can not be used when making a PIE object; recompile with -fPIC" I have deleted the .a library and recompiled it using the CXXFLAGS and CFLAGS -fPIC and -no-pie option but it does not help. I think it is because the .o files from source/ are being used and they were compiled with an option that is incompatible with the gcc configuration. Is it possible for me to recompile all of the .o files with -fPIC or -no-pie as well?
Last edited by javar on Sat May 25, 2019 4:37 am, edited 1 time in total.
Re: Can I recompile all of the .o source objects?
I did `make clean` then make with CXXFLAGS= -fPIC and that fixed it.