On Wed, Jun 10, 2020 at 04:27:27PM -0600, Jeff Law wrote: > On Mon, 2019-07-22 at 12:39 -0400, Arvind Sankar wrote: > > The gcc configure script does not use the config/picflag.m4 macro to > > customize PICFLAG according to the host when using --enable-host-shared. > > > > Fix configure.ac to do so. > > > > Tested bootstrap on x86_64-linux-gnu. > > > > 2019-07-22 Arvind Sankar <nived...@alum.mit.edu> > > > > * gcc/configure.ac: Use GCC_PICFLAG. > I know this is old.... > > Can you be more specific here about what you're trying to fix? ie, what > host/target combination are you working on. What behavior are you seeing > (presumably usage of -fPIC) what behavior did you expect (some other flag > presumably). > > From looking at picflag.m4 the thing I worry the most about is the various > ix86/x86_64 clauses which specify -fpic. It looks like your change would > cause > us to start using -fpic rather than -fPIC as we've been doing for eons and I > worry that might have unintended consequences. > > Thanks, > Jeff > > >
I don't remember exactly, but I don't think there was any actual problem. At the time, I was playing around with trying to build the bulk of cc1 etc as a shared library to reduce the size of the compiler installation. IIRC I just came across this, noticed that there's a config/picflag.m4 which wasn't getting used and posted this as a cleanup. This was originally added in r177967 ("Centralize PICFLAG configuration") which used it for PICFLAG_FOR_TARGET (which still goes via config/picflag.m4) but the host code which was added later just hardcodes -fPIC.