aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-04-12 13:52:18 +0200
committerCohenArthur <arthur.cohen@embecosm.com>2024-06-12 08:29:11 +0000
commita45362e582e24f7997edc25dde660297bde710f5 (patch)
treec2daeea08549bab45b1780edd8f74f1acea90065 /gcc
parent14c4c2f142d1908e8e93aa15d49f61f97f060727 (diff)
downloadgcc-a45362e582e24f7997edc25dde660297bde710f5.zip
gcc-a45362e582e24f7997edc25dde660297bde710f5.tar.gz
gcc-a45362e582e24f7997edc25dde660297bde710f5.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')
-rw-r--r--gcc/rust/Make-lang.in6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in
index dd94c9b..edcf2ee 100644
--- a/gcc/rust/Make-lang.in
+++ b/gcc/rust/Make-lang.in
@@ -54,8 +54,6 @@ GCCRS_D_OBJS = \
rust/rustspec.o \
$(END)
-LIBS += -ldl -lpthread
-
gccrs$(exeext): $(GCCRS_D_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a $(LIBDEPS)
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(GCCRS_D_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a \
@@ -234,7 +232,7 @@ crab1$(exeext): $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBDEPS) $(LIBPROC_MACRO
@$(call LINK_PROGRESS,$(INDEX.rust),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(RUST_ALL_OBJS) attribs.o $(BACKEND) \
- $(LIBS) $(LIBPROC_MACRO_INTERNAL) $(LIBFORMAT_PARSER) $(LIBFFI_POLONIUS) \
+ $(LIBS) $(CRAB1_LIBS) $(LIBPROC_MACRO_INTERNAL) $(LIBFORMAT_PARSER) $(LIBFFI_POLONIUS) \
$(BACKENDLIBS)
@$(call LINK_PROGRESS,$(INDEX.rust),end)
@@ -496,4 +494,4 @@ rust/libffi_polonius.a: \
rust/checks/errors/borrowck/ffi-polonius/Cargo.toml \
$(wildcard $(srcdir)/rust/checks/errors/borrowck/ffi-polonius/src/*)
cargo build --manifest-path $(srcdir)/rust/checks/errors/borrowck/ffi-polonius/Cargo.toml --release --target-dir rust/ffi-polonius
- cp rust/ffi-polonius/release/libffi_polonius.a rust/libffi_polonius.a \ No newline at end of file
+ cp rust/ffi-polonius/release/libffi_polonius.a rust/libffi_polonius.a