a280c3
From 320a7ec41342c95fd6bdc500cd207eb0ea5cda6a Mon Sep 17 00:00:00 2001
a280c3
From: Giuseppe Scrivano <gscrivan@redhat.com>
a280c3
Date: Fri, 19 Feb 2021 13:25:37 +0100
a280c3
Subject: [PATCH] Revert "tests: build init always statically"
a280c3
a280c3
This reverts commit a0f322a49a10a014a447b505eda5923a8e6aff7c as it
a280c3
causes issues on RHEL 8.
a280c3
a280c3
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
a280c3
---
a280c3
 Makefile.am | 8 ++++----
a280c3
 1 file changed, 4 insertions(+), 4 deletions(-)
a280c3
a280c3
diff --git a/Makefile.am b/Makefile.am
a280c3
index e39dc3b..2b8e18b 100644
a280c3
--- a/Makefile.am
a280c3
+++ b/Makefile.am
a280c3
@@ -14,7 +14,7 @@ srpm: dist-gzip rpm/crun.spec
a280c3
 	$(MAKE) -C $(WD) dist-gzip
a280c3
 	rpmbuild -bs --define "_sourcedir $(WD)" --define "_specdir $(WD)" --define "_builddir $(WD)" --define "_srcrpmdir $(WD)" --define "_rpmdir $(WD)" --define "_buildrootdir $(WD)/.build" rpm/crun.spec
a280c3
 
a280c3
-CLEANFILES = crun.spec tests/init
a280c3
+CLEANFILES = crun.spec
a280c3
 
a280c3
 lib_LTLIBRARIES = libcrun.la
a280c3
 
a280c3
@@ -79,9 +79,9 @@ noinst_PROGRAMS = tests/init $(UNIT_TESTS)
a280c3
 
a280c3
 TESTS_LDADD = libcrun_testing.a $(FOUND_LIBS)
a280c3
 
a280c3
-tests/init: tests/init.c
a280c3
-	$(CC) -static-libgcc --static -o $@ $<
a280c3
-EXTRA_DIST += tests/init.c
a280c3
+tests_init_LDADD =
a280c3
+tests_init_LDFLAGS = -static-libgcc -all-static
a280c3
+tests_init_SOURCES = tests/init.c $(UNIT_TESTS)
a280c3
 
a280c3
 tests_tests_libcrun_utils_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
a280c3
 tests_tests_libcrun_utils_SOURCES = tests/tests_libcrun_utils.c
a280c3
-- 
a280c3
2.29.2
a280c3
a280c3