> -----Original Message-----
> From: Prathamesh Kulkarni <prathame...@nvidia.com>
> Sent: 08 July 2025 08:37
> To: gcc-patches@gcc.gnu.org
> Cc: Matthew Malcomson <mmalcom...@nvidia.com>; Joseph Myers
> <josmy...@redhat.com>; Thomas Schwinge <tschwi...@baylibre.com>; Sam
> James <s...@gentoo.org>
> Subject: [v2] PR81358: Enable automatic linking of libatomic
> 
> External email: Use caution opening links or attachments
> 
> 
> Hi,
> This is v2 of patch originally posted at:
> https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673811.html
> 
> IIUC, there were two outstanding issues with the previous patch:
> 
> (1) LINK_LIBATOMIC_SPEC was only handled in config/gnu-user.h and not
> in all definitions of LINK_GCC_C_SEQUENCE_SPEC that use %L.
> The attached patch uses LINK_LIBATOMIC_SPEC in all definitions of
> LINK_GCC_C_SEQUENCE_SPEC that use %L. I have tested most of the
> affected targets in patch with stage-1 build (make all-gcc), but not
> sure if that's sufficient.
> Does it look OK ?
> 
> (2) $gcc_objdir ($buid/gcc) was getting added to RPATH, which made it
> insecure.
> The issue in previous patch seems to be primarily coming from copying
> of libatomic.la into $gcc_objdir with libtool --mode=install
> libatomic.la, which (somehow) ends up adding $gcc_objdir to RPATH in
> libraries that get built after libatomic, thus making it insecure.
> I verified that removing libatomic.la from $gcc_objdir seems to fix
> the issue, and there is no more difference in RPATH for built shared
> libraries with and without patch.
> (make install still works correctly by copying libatomic.la into
> $DESTDIR).
> However I am not entirely sure if this is the correct approach to
> resolve RPATH issue, and would be grateful for suggestions.
> 
> So far, the patch is bootstrapped and tested on aarch64-linux-gnu and
> on x86_64-pc-linux-gnu with multilib enabled with --enable-
> languages=all.
Hi,
ping: https://gcc.gnu.org/pipermail/gcc-patches/2025-July/688838.html

Thanks,
Prathamesh
> 
> Signed-off-by: Prathamesh Kulkarni <prathame...@nvidia.com>
> 
> Thanks,
> Prathamesh

Reply via email to