fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
521 B17 linesraw
1# Regression test for issue #68794
2#
3# Verify that no text relocations are accidentally introduced by linking a
4# minimal rust staticlib.
5#
6# The test links a rust static library into a shared library, and checks that
7# the linker doesn't have to flag the resulting file as containing TEXTRELs.
8
9-include ../tools.mk
10
11# only-linux
12
13all:
14	$(RUSTC) foo.rs
15	$(CC) bar.c $(call STATICLIB,foo) -fPIC -shared -o $(call DYLIB,bar) \
16		$(EXTRACFLAGS) $(EXTRACXXFLAGS)
17	readelf -d $(call DYLIB,bar) | grep TEXTREL; test $$? -eq 1