blob: 414e45a6f4947f74717076a993ab863c17feb27d [file] [log] [blame]
Andrew Geissler09036742021-06-25 14:25:14 -05001From 897900f3f9084c5542097851323bba3f2691df20 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 Geissler09036742021-06-25 14:25:14 -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
Andrew Geissler09036742021-06-25 14:25:14 -050017index 289186e..071a285 100644
Andrew Geissler09209ee2020-12-13 08:44:15 -060018--- a/progs/Makefile
19+++ b/progs/Makefile
Andrew Geissler09036742021-06-25 14:25:14 -050020@@ -49,7 +49,7 @@ capsh: capsh.c capshdoc.h.cf $(DEPS)
21 $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
Andrew Geissler09209ee2020-12-13 08:44:15 -060022
Andrew Geissler09036742021-06-25 14:25:14 -050023 tcapsh-static: capsh.c capshdoc.h.cf $(DEPS)
Andrew Geissler09209ee2020-12-13 08:44:15 -060024- $(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 Geissler09036742021-06-25 14:25:14 -050030index 4a5f2f9..4266d86 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 +=
Andrew Geisslerd1e89492021-02-12 15:35:20 -060039 DEPS=../libcap/libcap.a
Andrew Geissler09209ee2020-12-13 08:44:15 -060040 ifeq ($(PTHREADS),yes)
41 DEPS += ../libcap/libpsx.a
Andrew Geissler09036742021-06-25 14:25:14 -050042@@ -113,7 +113,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 Geissler09036742021-06-25 14:25:14 -050050 rm -f psx_test libcap_psx_test libcap_launch_test uns_test *~