blob: 3c737b884eb954be676bb68e98e1bdc08d12a6bf [file] [log] [blame]
Andrew Geissler09209ee2020-12-13 08:44:15 -06001From c22c6c16362c7dbc8d6faea06edee5e07759c5fa 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>
Andrew Geisslerc182c622020-05-15 14:13:32 -050010
Andrew Geissler82c905d2020-04-13 13:39:40 -050011---
Andrew Geissler09209ee2020-12-13 08:44:15 -060012 progs/Makefile | 2 +-
Andrew Geissler6ce62a22020-11-30 19:58:47 -060013 tests/Makefile | 4 ++--
Andrew Geissler09209ee2020-12-13 08:44:15 -060014 2 files changed, 3 insertions(+), 3 deletions(-)
Andrew Geissler82c905d2020-04-13 13:39:40 -050015
Andrew Geissler09209ee2020-12-13 08:44:15 -060016diff --git a/progs/Makefile b/progs/Makefile
17index 1d7fc7a..37db8f7 100644
18--- a/progs/Makefile
19+++ b/progs/Makefile
20@@ -42,7 +42,7 @@ endif
21 test: $(PROGS)
22
23 tcapsh-static: capsh.c $(DEPS)
24- $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) --static
25+ $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
26
27 sudotest: test tcapsh-static
28 sudo $(LDPATH) ./quicktest.sh
Andrew Geissler82c905d2020-04-13 13:39:40 -050029diff --git a/tests/Makefile b/tests/Makefile
Andrew Geissler09209ee2020-12-13 08:44:15 -060030index 3431df9..727fb86 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -050031--- a/tests/Makefile
32+++ b/tests/Makefile
Andrew Geissler09209ee2020-12-13 08:44:15 -060033@@ -22,7 +22,7 @@ ifeq ($(PTHREADS),yes)
34 DEPS += ../libcap/libpsx.so
35 endif
Andrew Geissler6ce62a22020-11-30 19:58:47 -060036 else
37-LDFLAGS += --static
Andrew Geissler09209ee2020-12-13 08:44:15 -060038+LDFLAGS +=
39 DEPS=../libcap/libcap.a ../progs/tcapsh-static
40 ifeq ($(PTHREADS),yes)
41 DEPS += ../libcap/libpsx.a
42@@ -106,7 +106,7 @@ noexploit: exploit.o $(DEPS)
Andrew Geissler82c905d2020-04-13 13:39:40 -050043
Andrew Geissler6ce62a22020-11-30 19:58:47 -060044 # This one runs in a chroot with no shared library files.
Andrew Geisslerc182c622020-05-15 14:13:32 -050045 noop: noop.c
46- $(CC) $(CFLAGS) $< -o $@ --static
47+ $(CC) $(CFLAGS) $< -o $@
48
Andrew Geissler82c905d2020-04-13 13:39:40 -050049 clean:
Andrew Geissler635e0e42020-08-21 15:58:33 -050050 rm -f psx_test libcap_psx_test libcap_launch_test *~