This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PR other/79543] Fix GNU ld --version scanning to conform to the GNU Coding Standards


Hi Joseph,

> However, I strongly encourage a followup to refactor this code 
> (*_CHECK_LINKER_FEATURES and *_ENABLE_SYMVERS that use it, not just the 
> fragment that determines the linker version number), which is evidently 
> duplicated far too much in different target library directories, into 
> common macros in a .m4 file in the top-level config/ directory, so it's 
> more maintainable in future.  (Note 1: I don't know what differences there 
> might be between the versions in different directories; that would need 
> investigating as part of such a refactoring; differences need not be 
> deliberate, they could easily have arisen by accident.  Note 2: although 
> libffi is maintained outside of GCC, I think such a refactoring should 
> still be applied to the libffi directory along with the others; standalone 
> libffi would simply need its own copy of the relevant .m4 file.  Note 3: 
> it should be possible to do such a refactoring bit by bit if that's more 
> approachable, rather than necessarily doing a complete refactoring of all 
> the definitions of all these macros at once.)

as it happens, I've been working on exactly this.  I'd noticed that
*_CHECK_LINKER_FEATURES enabled --gc-sections only with gld although
recent Solaris ld supports it as well.  What's worse, even with gld the
option is detected and used only for some of the libraries due to
inconsistencies between the different versions of the macro.

I'd meant to unify *_ENABLE_SYMVERS for a long time and this seemed the
perfect opportunity to do so, among others because several libs require
it from *_CHECK_LINKER_FEATURES to get the linker version info ;-(

On top of that, there are many different copies of the code that handles
--enable-version-specific-runtime-libs, sets toolexeclibdir and
--enable-generated-files-in-srcdir, as well as several instances of
*_CHECK_ATTRIBUTE_ALIAS, *_CHECK_ATTRIBUTE_DLLEXPORT, and
*_CHECK_ATTRIBUTE_VISIBILITY, and probably more that I've missed so
far.  Overall, we've created an incredible mess here, and I'm probably
partially responsible at least for the *_ENABLE_SYMVERS part.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


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