This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH Take 2]: Fix two fortran testcases when using -fpic/-fPIC


From: "Steve Kargl" <sgk@troutmask.apl.washington.edu>

Two questions.  Do we need to place a warning in gfortran.info
that -fwhole-file may require -fpie?  If so, what wording
would be appropriate?

-fwhole-file (or -fwhole-program) only require -fpie when someone adds -fpic. I think -fwhole-program wants to treat globals as static and -fpic wants to treat them as weak. These are in conflict with each other and right now gcc honors -fpic over -fwhole-program when both are supplied. It seems that -fwhole-file has similar issues.


Whether we need to warn the user via documentation or a compiler diagnostic is IMHO subjective. There are other optimizations that get disabled when using -fpic, I don't know if -fwhole-file is unique in this regard that we ought to document it. It might make sense for -fwhole-program and/or -fwhole-file to imply -fpie when using -fpic. I don't feel strongly about it either way.

--Kaveh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]