]> git.lizzy.rs Git - rust.git/blob - tests/run-make-fulldeps/issue-68794-textrel-on-minimal-lib/Makefile
Rollup merge of #106664 - chenyukang:yukang/fix-106597-remove-lseek, r=cuviper
[rust.git] / tests / run-make-fulldeps / issue-68794-textrel-on-minimal-lib / Makefile
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
13 all:
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