blob: 55872aa8fa3eb7cf19e965e9d6ea9817bf575d77 [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>
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
Andrew Geissler5f350902021-07-23 13:09:54 -040016index 3e82862..48533f3 100644
Andrew Geissler09209ee2020-12-13 08:44:15 -060017--- a/progs/Makefile
18+++ b/progs/Makefile
Andrew Geissler09036742021-06-25 14:25:14 -050019@@ -49,7 +49,7 @@ capsh: capsh.c capshdoc.h.cf $(DEPS)
20 $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
Andrew Geissler09209ee2020-12-13 08:44:15 -060021
Andrew Geissler09036742021-06-25 14:25:14 -050022 tcapsh-static: capsh.c capshdoc.h.cf $(DEPS)
Andrew Geissler09209ee2020-12-13 08:44:15 -060023- $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) --static
24+ $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
25
Andrew Geissler5f350902021-07-23 13:09:54 -040026 uns_test: ../tests/uns_test.c
27 $(MAKE) -C ../tests uns_test
Andrew Geissler82c905d2020-04-13 13:39:40 -050028diff --git a/tests/Makefile b/tests/Makefile
Andrew Geissler09036742021-06-25 14:25:14 -050029index 4a5f2f9..4266d86 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
Andrew Geissler09036742021-06-25 14:25:14 -050041@@ -113,7 +113,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 Geissler09036742021-06-25 14:25:14 -050049 rm -f psx_test libcap_psx_test libcap_launch_test uns_test *~
Andrew Geissler5f350902021-07-23 13:09:54 -040050--
512.25.1
52