Skip to content
Snippets Groups Projects
  • Jakub Jelinek's avatar
    6ee58926
    lto-plugin: Use GNU ld or Solaris ld version script in preference to... · 6ee58926
    Jakub Jelinek authored
    lto-plugin: Use GNU ld or Solaris ld version script in preference to -export-symbols-regex [PR102426]
    
    As reported, libtool -export-symbols-regex doesn't work on Solaris
    when using GNU ld instead of Sun ld, libtool just always assumes Sun ld.
    As I'm unsure what is the maintainance status of libtool right now,
    this patch solves it on the lto-plugin side instead, tests at configure time
    similar way how libssp and other target libraries test for symbol versioning
    (except omitting the symbol version because we just want one GLOBAL symbol
    and rest of them LOCAL), and will use the current way of
    -export-symbols-regex onload as fallback when this doesn't work.
    
    2022-03-22  Jakub Jelinek  <jakub@redhat.com>
    
    	PR lto/102426
    lto-plugin/
    	* configure.ac (LTO_PLUGIN_USE_SYMVER, LTO_PLUGIN_USE_SYMVER_GNU,
    	LTO_PLUGIN_USE_SYMVER_SUN): New test for symbol versioning support.
    	* Makefile.am (version_arg, version_dep): Set conditionally based
    	on LTO_PLUGIN_USE_SYMVER*.
    	(liblto_plugin_la_LDFLAGS): Use $(version_arg) instead of
    	-export-symbols-regex onload.
    	(liblto_plugin_la_DEPENDENCIES): Depend on $(version_dep).
    	* lto-plugin.map: New file.
    	* configure: Regenerated.
    	* Makefile.in: Regenerated.
    6ee58926
    History
    lto-plugin: Use GNU ld or Solaris ld version script in preference to...
    Jakub Jelinek authored
    lto-plugin: Use GNU ld or Solaris ld version script in preference to -export-symbols-regex [PR102426]
    
    As reported, libtool -export-symbols-regex doesn't work on Solaris
    when using GNU ld instead of Sun ld, libtool just always assumes Sun ld.
    As I'm unsure what is the maintainance status of libtool right now,
    this patch solves it on the lto-plugin side instead, tests at configure time
    similar way how libssp and other target libraries test for symbol versioning
    (except omitting the symbol version because we just want one GLOBAL symbol
    and rest of them LOCAL), and will use the current way of
    -export-symbols-regex onload as fallback when this doesn't work.
    
    2022-03-22  Jakub Jelinek  <jakub@redhat.com>
    
    	PR lto/102426
    lto-plugin/
    	* configure.ac (LTO_PLUGIN_USE_SYMVER, LTO_PLUGIN_USE_SYMVER_GNU,
    	LTO_PLUGIN_USE_SYMVER_SUN): New test for symbol versioning support.
    	* Makefile.am (version_arg, version_dep): Set conditionally based
    	on LTO_PLUGIN_USE_SYMVER*.
    	(liblto_plugin_la_LDFLAGS): Use $(version_arg) instead of
    	-export-symbols-regex onload.
    	(liblto_plugin_la_DEPENDENCIES): Depend on $(version_dep).
    	* lto-plugin.map: New file.
    	* configure: Regenerated.
    	* Makefile.in: Regenerated.