Blame SOURCES/f23-harden.patch

4496ab
Introduce build hardening flags for f23
4496ab
4496ab
From: Al Stone <ahs3@redhat.com>
4496ab
4496ab
4496ab
---
4496ab
 generate/unix/Makefile.config |    2 ++
4496ab
 generate/unix/iasl/Makefile   |   13 +++++++------
4496ab
 2 files changed, 9 insertions(+), 6 deletions(-)
4496ab
4496ab
Index: acpica-unix2-20180209/generate/unix/Makefile.config
4496ab
===================================================================
4496ab
--- acpica-unix2-20180209.orig/generate/unix/Makefile.config
4496ab
+++ acpica-unix2-20180209/generate/unix/Makefile.config
4496ab
@@ -182,6 +182,8 @@ ifneq ($(NOFORTIFY),TRUE)
4496ab
 OPT_CFLAGS += -D_FORTIFY_SOURCE=2
4496ab
 endif
4496ab
 
4496ab
+OPT_CFLAGS += -fPIC -pie
4496ab
+
4496ab
 CFLAGS += \
4496ab
     -D$(HOST)\
4496ab
     -D_GNU_SOURCE\
4496ab
Index: acpica-unix2-20180209/generate/unix/iasl/Makefile
4496ab
===================================================================
4496ab
--- acpica-unix2-20180209.orig/generate/unix/iasl/Makefile
4496ab
+++ acpica-unix2-20180209/generate/unix/iasl/Makefile
4496ab
@@ -344,26 +344,27 @@ $(OBJDIR)/prparserparse.c $(OBJDIR)/prpa
4496ab
 # Cannot use the common compile warning flags since the C files are created
4496ab
 # by the utilities above and they are not necessarily ANSI C, etc.
4496ab
 #
4496ab
+HARDENING_FLAGS = -fPIC -pie
4496ab
 $(OBJDIR)/aslcompilerlex.o :   $(OBJDIR)/aslcompilerlex.c
4496ab
 	@echo "- " "Intermediate" $<
4496ab
-	@$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
4496ab
+	@$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
4496ab
 
4496ab
 $(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c
4496ab
 	@echo "- " "Intermediate" $<
4496ab
-	@$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
4496ab
+	@$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
4496ab
 
4496ab
 $(OBJDIR)/dtparserlex.o :      $(OBJDIR)/dtparserlex.c
4496ab
 	@echo "- " "Intermediate" $<
4496ab
-	@$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
4496ab
+	@$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
4496ab
 
4496ab
 $(OBJDIR)/dtparserparse.o :    $(OBJDIR)/dtparserparse.c
4496ab
 	@echo "- " "Intermediate" $<
4496ab
-	@$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
4496ab
+	@$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
4496ab
 
4496ab
 $(OBJDIR)/prparserlex.o :      $(OBJDIR)/prparserlex.c
4496ab
 	@echo "- " "Intermediate" $<
4496ab
-	@$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
4496ab
+	@$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
4496ab
 
4496ab
 $(OBJDIR)/prparserparse.o :    $(OBJDIR)/prparserparse.c
4496ab
 	@echo "- " "Intermediate" $<
4496ab
-	@$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
4496ab
+	@$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<