public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3004] Darwin: Handle the -rpath command line option.
@ 2021-08-18 18:29 Iain D Sandoe
0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2021-08-18 18:29 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:15bdae016654f63a36e49a37c9d26282bebb1da9
commit r12-3004-g15bdae016654f63a36e49a37c9d26282bebb1da9
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Sun Mar 28 14:48:17 2021 +0100
Darwin: Handle the -rpath command line option.
This handles the command line '-rpath' option by passing it through
to the static linker.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/ChangeLog:
* config.gcc: Include rpath.opt for Darwin.
* config/darwin.h (DRIVER_SELF_SPECS): Handle -rpath.
Diff:
---
gcc/config.gcc | 2 +-
gcc/config/darwin.h | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/config.gcc b/gcc/config.gcc
index d9bfbfdc0d2..eb232df6df4 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -700,7 +700,7 @@ case ${target} in
tm_file="${tm_file} ${cpu_type}/darwin.h"
tm_p_file="${tm_p_file} darwin-protos.h"
target_gtfiles="$target_gtfiles \$(srcdir)/config/darwin.c"
- extra_options="${extra_options} darwin.opt"
+ extra_options="${extra_options} rpath.opt darwin.opt"
c_target_objs="${c_target_objs} darwin-c.o"
cxx_target_objs="${cxx_target_objs} darwin-c.o"
d_target_objs="${d_target_objs} darwin-d.o"
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 20d6b1e9c05..b1be561e854 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -132,6 +132,7 @@ extern GTY(()) int darwin_ms_struct;
"%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform} \
%<gsplit-dwarf", \
"%{gused:-g -feliminate-unused-debug-symbols} %<gused", \
+"%{rpath*: -Xlinker -rpath -Xlinker %*}", \
"%{shared:-Zdynamiclib} %<shared", \
"%{static:%{Zdynamic:%e conflicting code gen style switches are used}}",\
"%{y*:%nthe y option is obsolete and ignored} %<y*", \
@@ -238,7 +239,7 @@ extern GTY(()) int darwin_ms_struct;
DARWIN_NOPIE_SPEC \
DARWIN_RDYNAMIC \
DARWIN_NOCOMPACT_UNWIND \
- "}}}}}}} %<pie %<no-pie %<rdynamic %<X "
+ "}}}}}}} %<pie %<no-pie %<rdynamic %<X %<rpath "
/* Spec that controls whether the debug linker is run automatically for
a link step. This needs to be done if there is a source file on the
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-18 18:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 18:29 [gcc r12-3004] Darwin: Handle the -rpath command line option Iain D Sandoe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).