blob: d2653afb75419020cc26b500aca90a770ca91aa9 [file] [log] [blame]
Andrew Geisslerd1e89492021-02-12 15:35:20 -06001From 6aa15fe548e5b1d6ca3b373779beb7521ea95ba9 Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 15 Jan 2020 17:16:28 +0100
4Subject: [PATCH] tests: do not statically link a test
5
6This fails on e.g. centos 7
7
8Upstream-Status: Inappropriate [oe-core specific]
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10---
Andrew Geissler09209ee2020-12-13 08:44:15 -060011 progs/Makefile | 2 +-
Andrew Geissler6ce62a22020-11-30 19:58:47 -060012 tests/Makefile | 4 ++--
Andrew Geissler09209ee2020-12-13 08:44:15 -060013 2 files changed, 3 insertions(+), 3 deletions(-)
Andrew Geissler82c905d2020-04-13 13:39:40 -050014
Andrew Geissler09209ee2020-12-13 08:44:15 -060015diff --git a/progs/Makefile b/progs/Makefile
16index 1d7fc7a..37db8f7 100644
17--- a/progs/Makefile
18+++ b/progs/Makefile
19@@ -42,7 +42,7 @@ endif
20 test: $(PROGS)
21
22 tcapsh-static: capsh.c $(DEPS)
23- $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) --static
24+ $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
25
26 sudotest: test tcapsh-static
27 sudo $(LDPATH) ./quicktest.sh
Andrew Geissler82c905d2020-04-13 13:39:40 -050028diff --git a/tests/Makefile b/tests/Makefile
Andrew Geisslerd1e89492021-02-12 15:35:20 -060029index 01f7589..094ec57 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -050030--- a/tests/Makefile
31+++ b/tests/Makefile
Andrew Geissler09209ee2020-12-13 08:44:15 -060032@@ -22,7 +22,7 @@ ifeq ($(PTHREADS),yes)
33 DEPS += ../libcap/libpsx.so
34 endif
Andrew Geissler6ce62a22020-11-30 19:58:47 -060035 else
36-LDFLAGS += --static
Andrew Geissler09209ee2020-12-13 08:44:15 -060037+LDFLAGS +=
Andrew Geisslerd1e89492021-02-12 15:35:20 -060038 DEPS=../libcap/libcap.a
Andrew Geissler09209ee2020-12-13 08:44:15 -060039 ifeq ($(PTHREADS),yes)
40 DEPS += ../libcap/libpsx.a
41@@ -106,7 +106,7 @@ noexploit: exploit.o $(DEPS)
Andrew Geissler82c905d2020-04-13 13:39:40 -050042
Andrew Geissler6ce62a22020-11-30 19:58:47 -060043 # This one runs in a chroot with no shared library files.
Andrew Geisslerc182c622020-05-15 14:13:32 -050044 noop: noop.c
45- $(CC) $(CFLAGS) $< -o $@ --static
46+ $(CC) $(CFLAGS) $< -o $@
47
Andrew Geissler82c905d2020-04-13 13:39:40 -050048 clean:
Andrew Geissler635e0e42020-08-21 15:58:33 -050049 rm -f psx_test libcap_psx_test libcap_launch_test *~
Andrew Geisslerd1e89492021-02-12 15:35:20 -060050--
512.17.1
52