Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 1 | From 897900f3f9084c5542097851323bba3f2691df20 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 |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 16 | index 3e82862..48533f3 100644 |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 17 | --- a/progs/Makefile |
| 18 | +++ b/progs/Makefile |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 19 | @@ -49,7 +49,7 @@ capsh: capsh.c capshdoc.h.cf $(DEPS) |
| 20 | $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 21 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 22 | tcapsh-static: capsh.c capshdoc.h.cf $(DEPS) |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 23 | - $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) --static |
| 24 | + $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) |
| 25 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 26 | uns_test: ../tests/uns_test.c |
| 27 | $(MAKE) -C ../tests uns_test |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 28 | diff --git a/tests/Makefile b/tests/Makefile |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 29 | index 4a5f2f9..4266d86 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 |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 41 | @@ -113,7 +113,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 | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 49 | rm -f psx_test libcap_psx_test libcap_launch_test uns_test *~ |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 50 | -- |
| 51 | 2.25.1 |
| 52 | |