Attempt to allow -fPIC work on GNU compilers for Fedora
The CMakelists has logic to properly set things for fPIC but then undoes it later in the Make statements. This attempts to move the logic of using -fPIC or -fPIE higher up and removing the area where it overrode itself and caused problems with gcc.
@smooge we have a PR :https://github.com/COVESA/vsomeip/pull/734 that will deal with those flags. I have tested to run your build, as you described, without the flags patch, but instead using the modern_cmake branch, and i was able to build vsomeip. Can you confirm that this is the case? Thanks!
@smooge can you confirm that this would work?
closed due to inactivity
My apologies, this was completely on me for failing to come back on this.
I am still getting an error on 3.5.7 for compiling on RHEL/Fedora systems, but this looks definitely with an external environment variable Fedora/RHEL defines when building RPMs. I am trying to see if there is a general fix and would make a new fix for it
The patches do fix the problem and my newer problem is due to the build system setting LTO flags of -flto=auto -ffat-lto-objects Those flags seem to trigger a similar looking problem of gcc saying that things need to be compiled with -fPIC even though they are all compiled that way.
Again my apologies for the delay in answering you and thankyou and others for the software.