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