Andrew Geissler | 706d5aa | 2021-02-12 15:55:30 -0600 | [diff] [blame] | 1 | From c22c6c16362c7dbc8d6faea06edee5e07759c5fa Mon Sep 17 00:00:00 2001 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Wed, 15 Jan 2020 17:16:28 +0100 |
| 4 | Subject: [PATCH] tests: do not statically link a test |
| 5 | |
| 6 | This fails on e.g. centos 7 |
| 7 | |
| 8 | Upstream-Status: Inappropriate [oe-core specific] |
| 9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
Andrew Geissler | 706d5aa | 2021-02-12 15:55:30 -0600 | [diff] [blame] | 10 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | --- |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 12 | progs/Makefile | 2 +- |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 13 | tests/Makefile | 4 ++-- |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 14 | 2 files changed, 3 insertions(+), 3 deletions(-) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 16 | diff --git a/progs/Makefile b/progs/Makefile |
| 17 | index 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 Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 | diff --git a/tests/Makefile b/tests/Makefile |
Andrew Geissler | 706d5aa | 2021-02-12 15:55:30 -0600 | [diff] [blame] | 30 | index 3431df9..727fb86 100644 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 31 | --- a/tests/Makefile |
| 32 | +++ b/tests/Makefile |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 33 | @@ -22,7 +22,7 @@ ifeq ($(PTHREADS),yes) |
| 34 | DEPS += ../libcap/libpsx.so |
| 35 | endif |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 36 | else |
| 37 | -LDFLAGS += --static |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 38 | +LDFLAGS += |
Andrew Geissler | 706d5aa | 2021-02-12 15:55:30 -0600 | [diff] [blame] | 39 | DEPS=../libcap/libcap.a ../progs/tcapsh-static |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 40 | ifeq ($(PTHREADS),yes) |
| 41 | DEPS += ../libcap/libpsx.a |
| 42 | @@ -106,7 +106,7 @@ noexploit: exploit.o $(DEPS) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 43 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 44 | # This one runs in a chroot with no shared library files. |
Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 45 | noop: noop.c |
| 46 | - $(CC) $(CFLAGS) $< -o $@ --static |
| 47 | + $(CC) $(CFLAGS) $< -o $@ |
| 48 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 49 | clean: |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 50 | rm -f psx_test libcap_psx_test libcap_launch_test *~ |