]> git.ipfire.org Git - thirdparty/gcc.git/commit
Config,Darwin: Allow for configuring Darwin to use embedded runpath.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 28 Mar 2021 13:48:17 +0000 (14:48 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 22 Oct 2023 18:30:02 +0000 (19:30 +0100)
commit6a6d3817afa02bbcd2388c8e005da6faf88932f1
treef5997d899baddd1788da7a28f48bfbaa278355f9
parent829b0c4cbabbe5056b79a8a1ec4cd9e9d928a5fb
Config,Darwin: Allow for configuring Darwin to use embedded runpath.

Recent Darwin versions place contraints on the use of run paths
specified in environment variables.  This breaks some assumptions
in the GCC build.

This change allows the user to configure a Darwin build to use
'@rpath/libraryname.dylib' in library names and then to add an
embedded runpath to executables (and libraries with dependents).

The embedded runpath is added by default unless the user adds
'-nodefaultrpaths' to the link line.

For an installed compiler, it means that any executable built with
that compiler will reference the runtimes installed with the
compiler (equivalent to hard-coding the library path into the name
of the library).

During build-time configurations  any "-B" entries will be added to
the runpath thus the newly-built libraries will be found by exes.

Since the install name is set in libtool, that decision needs to be
available here (but might also cause dependent ones in Makefiles,
so we need to export a conditional).

This facility is not available for Darwin 8 or earlier, however the
existing environment variable runpath does work there.

We default this on for systems where the external DYLD_LIBRARY_PATH
does not work and off for Darwin 8 or earlier.  For systems that can
use either method, if the value is unset, we use the default (which
is currently DYLD_LIBRARY_PATH).

ChangeLog:

* configure: Regenerate.
* configure.ac: Do not add default runpaths to GCC exes
when we are building -static-libstdc++/-static-libgcc (the
default).
* libtool.m4: Add 'enable-darwin-at-runpath'.  Act  on the
enable flag to alter Darwin libraries to use @rpath names.

gcc/ChangeLog:

* aclocal.m4: Regenerate.
* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.
* config/darwin.h: Handle Darwin rpaths.
* config/darwin.opt: Handle Darwin rpaths.
* Makefile.in:  Handle Darwin rpaths.

gcc/ada/ChangeLog:

* gcc-interface/Makefile.in: Handle Darwin rpaths.

gcc/jit/ChangeLog:
* Make-lang.in: Handle Darwin rpaths.

libatomic/ChangeLog:

* Makefile.am: Handle Darwin rpaths.
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.

libbacktrace/ChangeLog:

* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.

libcc1/ChangeLog:

* configure: Regenerate.

libffi/ChangeLog:

* Makefile.am: Handle Darwin rpaths.
* Makefile.in: Regenerate.
* configure: Regenerate.

libgcc/ChangeLog:

* config/t-slibgcc-darwin: Generate libgcc_s
with an @rpath name.
* config.host: Handle Darwin rpaths.

libgfortran/ChangeLog:

* Makefile.am: Handle Darwin rpaths.
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Handle Darwin rpaths

libgm2/ChangeLog:

* Makefile.am: Handle Darwin rpaths.
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.
* libm2cor/Makefile.am: Handle Darwin rpaths.
* libm2cor/Makefile.in: Regenerate.
* libm2iso/Makefile.am: Handle Darwin rpaths.
* libm2iso/Makefile.in: Regenerate.
* libm2log/Makefile.am: Handle Darwin rpaths.
* libm2log/Makefile.in: Regenerate.
* libm2min/Makefile.am: Handle Darwin rpaths.
* libm2min/Makefile.in: Regenerate.
* libm2pim/Makefile.am: Handle Darwin rpaths.
* libm2pim/Makefile.in: Regenerate.

libgomp/ChangeLog:

* Makefile.am: Handle Darwin rpaths.
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Handle Darwin rpaths

libitm/ChangeLog:

* Makefile.am: Handle Darwin rpaths.
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.

libobjc/ChangeLog:

* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.

libphobos/ChangeLog:

* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.
* libdruntime/Makefile.am: Handle Darwin rpaths.
* libdruntime/Makefile.in: Regenerate.
* src/Makefile.am: Handle Darwin rpaths.
* src/Makefile.in: Regenerate.

libquadmath/ChangeLog:

* Makefile.am: Handle Darwin rpaths.
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.

libsanitizer/ChangeLog:

* asan/Makefile.am: Handle Darwin rpaths.
* asan/Makefile.in: Regenerate.
* configure: Regenerate.
* hwasan/Makefile.am: Handle Darwin rpaths.
* hwasan/Makefile.in: Regenerate.
* lsan/Makefile.am: Handle Darwin rpaths.
* lsan/Makefile.in: Regenerate.
* tsan/Makefile.am: Handle Darwin rpaths.
* tsan/Makefile.in: Regenerate.
* ubsan/Makefile.am: Handle Darwin rpaths.
* ubsan/Makefile.in: Regenerate.

libssp/ChangeLog:

* Makefile.am: Handle Darwin rpaths.
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.

libstdc++-v3/ChangeLog:

* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.
* src/Makefile.am: Handle Darwin rpaths.
* src/Makefile.in: Regenerate.

libvtv/ChangeLog:

* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.

lto-plugin/ChangeLog:
* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.

zlib/ChangeLog:
* configure: Regenerate.
* configure.ac: Handle Darwin rpaths.
93 files changed:
configure
configure.ac
gcc/Makefile.in
gcc/aclocal.m4
gcc/ada/gcc-interface/Makefile.in
gcc/config/darwin.h
gcc/config/darwin.opt
gcc/configure
gcc/configure.ac
gcc/jit/Make-lang.in
libatomic/Makefile.am
libatomic/Makefile.in
libatomic/configure
libatomic/configure.ac
libbacktrace/configure
libbacktrace/configure.ac
libcc1/configure
libffi/Makefile.am
libffi/Makefile.in
libffi/configure
libffi/configure.ac
libffi/doc/version.texi
libgcc/config.host
libgcc/config/t-darwin-rpath [new file with mode: 0644]
libgcc/config/t-slibgcc-darwin
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/configure
libgfortran/configure.ac
libgm2/Makefile.am
libgm2/Makefile.in
libgm2/aclocal.m4
libgm2/configure
libgm2/configure.ac
libgm2/libm2cor/Makefile.am
libgm2/libm2cor/Makefile.in
libgm2/libm2iso/Makefile.am
libgm2/libm2iso/Makefile.in
libgm2/libm2log/Makefile.am
libgm2/libm2log/Makefile.in
libgm2/libm2min/Makefile.am
libgm2/libm2min/Makefile.in
libgm2/libm2pim/Makefile.am
libgm2/libm2pim/Makefile.in
libgo/configure
libgo/configure.ac
libgomp/Makefile.am
libgomp/Makefile.in
libgomp/configure
libgomp/configure.ac
libitm/Makefile.am
libitm/Makefile.in
libitm/configure
libitm/configure.ac
libobjc/configure
libobjc/configure.ac
libphobos/configure
libphobos/configure.ac
libphobos/libdruntime/Makefile.am
libphobos/libdruntime/Makefile.in
libphobos/src/Makefile.am
libphobos/src/Makefile.in
libquadmath/Makefile.am
libquadmath/Makefile.in
libquadmath/configure
libquadmath/configure.ac
libsanitizer/asan/Makefile.am
libsanitizer/asan/Makefile.in
libsanitizer/configure
libsanitizer/configure.ac
libsanitizer/hwasan/Makefile.am
libsanitizer/hwasan/Makefile.in
libsanitizer/lsan/Makefile.am
libsanitizer/lsan/Makefile.in
libsanitizer/tsan/Makefile.am
libsanitizer/tsan/Makefile.in
libsanitizer/ubsan/Makefile.am
libsanitizer/ubsan/Makefile.in
libssp/Makefile.am
libssp/Makefile.in
libssp/configure
libssp/configure.ac
libstdc++-v3/configure
libstdc++-v3/configure.ac
libstdc++-v3/src/Makefile.am
libstdc++-v3/src/Makefile.in
libtool.m4
libvtv/configure
libvtv/configure.ac
lto-plugin/configure
lto-plugin/configure.ac
zlib/configure
zlib/configure.ac