https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125449
Bug ID: 125449
Summary: libatomic: gcc_objdir breaks when MULTIBUILDTOP is an
absolute path
Product: gcc
Version: 16.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: Hemanth.KumarMD at windriver dot com
Target Milestone: ---
GCC 16 introduced the following logic in libatomic/Makefile.in:
gcc_objdir = `pwd`/$(MULTIBUILDTOP)../../gcc/
This assumes MULTIBUILDTOP is always a relative path. When an
absolute path is passed, gcc_objdir becomes malformed:
pwd = /build/work/libatomic
MULTIBUILDTOP = /build/work/libatomic/
Result: /build/work/libatomic//build/work/libatomic/../../gcc/
This causes libtool install to fail with "No such file or directory".
libgcc constructs gcc_objdir differently and works fine with both
relative and absolute paths:
gcc_objdir = $(MULTIBUILDTOP)../../$(host_subdir)/gcc
Would it make sense to align libatomic with libgcc and drop the
pwd prefix?
Introduced by:
https://github.com/gcc-mirror/gcc/commit/e63cf4b130b86dd7dde1bf499d3d40faca10ea2e