On Wed, Aug 12, 2015 at 5:31 AM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > On 12 August 2015 at 10:22, Jonathan Wakely wrote: >> On 12 August 2015 at 00:03, Jeffrey Walton wrote: >>> >>> *If* I force -fPIC on the command line and endure 135 or so of these: >>> >>> $ make >>> g++ -DNDEBUG -g -O3 -fPIC -march=native -pipe -c shacal2.cpp >>> shacal2.cpp:1:0: warning: -fPIC ignored for target (all code is >>> position independent) >>> // shacal2.cpp - by Kevin Springle, 2003 >>> ^ >>> >>> Then the program executes fine. But its a very messy compile, and its >>> probably not going to be worth forcing -fPIC because we will get too >>> much negative feedback. >> >> This doesn't make any sense. If -fPIC is ignored then how does addng >> it make any difference? >> >> Have you compared the object files with and without -fPIC to see if it >> does make any difference? If it does, there shouldn't be a warning >> about ignoring it. > > Looking at the code for Cysgin it looks like for 64-bit -fpic is > always used, so if you use -fPIC you get a warning, but -fpic would > not get a warning. Adding -fPIC should not affect codegen, because > with or without it you get -fpic. For 32-bit adding either -fpic or > -fPIC gives a warning, but should not affect codegen. I think you might be right here. I think I was working it with as order-of-initialization problem, and I did add init_priority to try and tame the issue. Let me try to isolate it further in a cleaner room. (And I know this is a horrible, open ended question. Sorry about the question. I'm trying to figure out how to get a toehold into the problem). Jeff