aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-04-12 13:52:18 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-06-11 11:17:12 +0200
commit75299e4fe50aa8d9b3ff529e48db4ed246083e64 (patch)
tree77fc792748f27f6413bd8ef87d2ffdae18e07242 /gcc/rust
parenta0004feb87efbe41fb1e9cd77f1c9af06e98ccb5 (diff)
downloadgcc-75299e4fe50aa8d9b3ff529e48db4ed246083e64.zip
gcc-75299e4fe50aa8d9b3ff529e48db4ed246083e64.tar.gz
gcc-75299e4fe50aa8d9b3ff529e48db4ed246083e64.tar.bz2
rust: Do not link with libdl and libpthread unconditionally
ChangeLog: * Makefile.tpl: Add CRAB1_LIBS variable. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Check if -ldl and -lpthread are needed, and if so, add them to CRAB1_LIBS. gcc/rust/ChangeLog: * Make-lang.in: Remove overazealous LIBS = -ldl -lpthread line, link crab1 against CRAB1_LIBS.
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/Make-lang.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in
index 8db0416..e437c32 100644
--- a/gcc/rust/Make-lang.in
+++ b/gcc/rust/Make-lang.in
@@ -210,8 +210,11 @@ rust_OBJS = $(RUST_ALL_OBJS) rust/rustspec.o
LIBPROC_MACRO_INTERNAL = ../libgrust/libproc_macro_internal/libproc_macro_internal.a
+
+RUST_LIBDEPS = $(LIBDEPS) $(LIBPROC_MACRO_INTERNAL)
+
# The compiler itself is called crab1
-crab1$(exeext): $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBDEPS) $(LIBPROC_MACRO_INTERNAL) $(rust.prev)
+crab1$(exeext): $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(RUST_LIBDEPS) $(rust.prev)
@$(call LINK_PROGRESS,$(INDEX.rust),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBS) $(LIBPROC_MACRO_INTERNAL) $(BACKENDLIBS)