|
|
b9fbeb |
From 4878775c8e0f2ea6869aff139d219f6eb0c4006c Mon Sep 17 00:00:00 2001
|
|
|
b9fbeb |
From: Adrian Reber <areber@redhat.com>
|
|
|
b9fbeb |
Date: Fri, 28 Jan 2022 15:10:31 +0000
|
|
|
b9fbeb |
Subject: [PATCH] Fix building with annobin
|
|
|
b9fbeb |
|
|
|
b9fbeb |
Annobin (used at least in Fedora and RHEL) injects annotation into the
|
|
|
b9fbeb |
compiled objects which break the parasite and restorer.
|
|
|
b9fbeb |
|
|
|
b9fbeb |
This removes the annobin flags as used in Fedora and RHEL and makes CRIU
|
|
|
b9fbeb |
work on Fedora and RHEL with annobin enabled.
|
|
|
b9fbeb |
|
|
|
b9fbeb |
Signed-off-by: Adrian Reber <areber@redhat.com>
|
|
|
b9fbeb |
---
|
|
|
b9fbeb |
compel/plugins/Makefile | 2 +-
|
|
|
b9fbeb |
criu/pie/Makefile | 2 +-
|
|
|
b9fbeb |
criu/pie/Makefile.library | 2 +-
|
|
|
b9fbeb |
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
b9fbeb |
|
|
|
b9fbeb |
diff --git a/compel/plugins/Makefile b/compel/plugins/Makefile
|
|
|
b9fbeb |
index e5fa781ac..37630d438 100644
|
|
|
b9fbeb |
--- a/compel/plugins/Makefile
|
|
|
b9fbeb |
+++ b/compel/plugins/Makefile
|
|
|
b9fbeb |
@@ -1,4 +1,4 @@
|
|
|
b9fbeb |
-CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN),$(CFLAGS))
|
|
|
b9fbeb |
+CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN) -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1,$(CFLAGS))
|
|
|
b9fbeb |
CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
|
|
|
b9fbeb |
CFLAGS += -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0
|
|
|
b9fbeb |
|
|
|
b9fbeb |
diff --git a/criu/pie/Makefile b/criu/pie/Makefile
|
|
|
b9fbeb |
index 265dcf82b..386626334 100644
|
|
|
b9fbeb |
--- a/criu/pie/Makefile
|
|
|
b9fbeb |
+++ b/criu/pie/Makefile
|
|
|
b9fbeb |
@@ -4,7 +4,7 @@
|
|
|
b9fbeb |
|
|
|
b9fbeb |
target := parasite restorer
|
|
|
b9fbeb |
|
|
|
b9fbeb |
-CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN),$(CFLAGS))
|
|
|
b9fbeb |
+CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN) -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1,$(CFLAGS))
|
|
|
b9fbeb |
CFLAGS += $(CFLAGS_PIE)
|
|
|
b9fbeb |
ccflags-y += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
|
|
|
b9fbeb |
ccflags-y += -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0
|
|
|
b9fbeb |
diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library
|
|
|
b9fbeb |
index da2a2fab3..6247afe7e 100644
|
|
|
b9fbeb |
--- a/criu/pie/Makefile.library
|
|
|
b9fbeb |
+++ b/criu/pie/Makefile.library
|
|
|
b9fbeb |
@@ -21,7 +21,7 @@ ifeq ($(ARCH),arm)
|
|
|
b9fbeb |
lib-y += ./$(ARCH_DIR)/pie-cacheflush.o
|
|
|
b9fbeb |
endif
|
|
|
b9fbeb |
|
|
|
b9fbeb |
-CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN),$(CFLAGS))
|
|
|
b9fbeb |
+CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN) -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1,$(CFLAGS))
|
|
|
b9fbeb |
CFLAGS += $(CFLAGS_PIE)
|
|
|
b9fbeb |
|
|
|
b9fbeb |
ifeq ($(ARCH),mips)
|
|
|
b9fbeb |
--
|
|
|
b9fbeb |
2.34.1
|
|
|
b9fbeb |
|