Thomas Schwinge <[email protected]> writes: > In the x86_64-pc-linux-gnu configuration that I'm currently looking at, I > noticed that libgomp is libtool-linked as follows: > > /bin/bash ./libtool --tag CC --mode=link [xgcc] ['AM_CFLAGS'] ['CFLAGS'] > -Wl,-O1 -o libgomp.la -version-info 1:0:0 -Wl,--version-script,libgomp.ver > -rpath [...] ['*.lo'] -ldl > > In contrast, libgomp's nvptx, gcn plugins are libtool-linked as follows: > > /bin/bash ./libtool --tag=CC --tag=disable-static --mode=link [xgcc] > ['AM_CFLAGS'] ['CFLAGS'] -version-info 1:0:0 -o libgomp-plugin-nvptx.la > -rpath [...] ['*.lo'] libgomp.la -ldl > > Certain differences between the two variants are intentional -- but not that > the latter is missing '-Wl,-O1'. That's due to 'AM_LDFLAGS' missing, which > consists of: > > - 'XLDFLAGS' (via 'libgomp/configure.tgt'; optional) > - 'SECTION_LDFLAGS', 'OPT_LDFLAGS' (via > 'libgomp/acinclude.m4:LIBGOMP_CHECK_LINKER_FEATURES'; optional) > > Align the libgomp plugins' linking by using new 'libgomp_plugin_LINK', similar > to the 'libgomp/Makefile.am:LINK' used for libgomp proper. > > ('LINK' and its usage in 'libgomp_la_LINK' date back to 2009-09-11 > Subversion r151627 (Git commit 878f62e5bdb9b1adb8f234c36af5c39292c23713) > "Override all per-target *_LINK variables correctly". It may be the case that > the approach used there isn't entirely correct, but looking into that further > is for another day.) > > libgomp/ > * plugin/Makefrag.am (libgomp_plugin_nvptx_la_LINK) > (libgomp_plugin_gcn_la_LINK): Set, to use... > (libgomp_plugin_LINK): ... this new variable. > * Makefile.in: Regenerate.
LGTM -- Arsen Arsenović
signature.asc
Description: PGP signature
