Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame^] | 1 | From 6aa15fe548e5b1d6ca3b373779beb7521ea95ba9 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> |
| 10 | --- |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 11 | progs/Makefile | 2 +- |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 12 | tests/Makefile | 4 ++-- |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 13 | 2 files changed, 3 insertions(+), 3 deletions(-) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 15 | diff --git a/progs/Makefile b/progs/Makefile |
| 16 | index 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 Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 28 | diff --git a/tests/Makefile b/tests/Makefile |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame^] | 29 | index 01f7589..094ec57 100644 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 30 | --- a/tests/Makefile |
| 31 | +++ b/tests/Makefile |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 32 | @@ -22,7 +22,7 @@ ifeq ($(PTHREADS),yes) |
| 33 | DEPS += ../libcap/libpsx.so |
| 34 | endif |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 35 | else |
| 36 | -LDFLAGS += --static |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 37 | +LDFLAGS += |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame^] | 38 | DEPS=../libcap/libcap.a |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 39 | ifeq ($(PTHREADS),yes) |
| 40 | DEPS += ../libcap/libpsx.a |
| 41 | @@ -106,7 +106,7 @@ noexploit: exploit.o $(DEPS) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 42 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 43 | # This one runs in a chroot with no shared library files. |
Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 44 | noop: noop.c |
| 45 | - $(CC) $(CFLAGS) $< -o $@ --static |
| 46 | + $(CC) $(CFLAGS) $< -o $@ |
| 47 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 48 | clean: |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 49 | rm -f psx_test libcap_psx_test libcap_launch_test *~ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame^] | 50 | -- |
| 51 | 2.17.1 |
| 52 | |