2016-01-07 00:44:04 +00:00
|
|
|
Introduce build hardening flags for f23
|
|
|
|
|
|
|
|
From: Al Stone <ahs3@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
generate/unix/Makefile.config | 2 ++
|
|
|
|
generate/unix/iasl/Makefile | 13 +++++++------
|
|
|
|
2 files changed, 9 insertions(+), 6 deletions(-)
|
|
|
|
|
2022-04-03 21:18:02 +00:00
|
|
|
Index: acpica-unix2-20220331/generate/unix/Makefile.config
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2022-04-03 21:18:02 +00:00
|
|
|
--- acpica-unix2-20220331.orig/generate/unix/Makefile.config
|
|
|
|
+++ acpica-unix2-20220331/generate/unix/Makefile.config
|
2020-06-12 21:50:29 +00:00
|
|
|
@@ -189,6 +189,8 @@ ifneq ($(NOFORTIFY),TRUE)
|
2015-04-06 23:17:50 +00:00
|
|
|
OPT_CFLAGS += -D_FORTIFY_SOURCE=2
|
|
|
|
endif
|
|
|
|
|
|
|
|
+OPT_CFLAGS += -fPIC -pie
|
|
|
|
+
|
|
|
|
CFLAGS += \
|
2020-02-24 22:41:56 +00:00
|
|
|
-D$(ACPI_HOST)\
|
2015-04-06 23:17:50 +00:00
|
|
|
-D_GNU_SOURCE\
|
2022-04-03 21:18:02 +00:00
|
|
|
Index: acpica-unix2-20220331/generate/unix/iasl/Makefile
|
2016-03-19 21:32:48 +00:00
|
|
|
===================================================================
|
2022-04-03 21:18:02 +00:00
|
|
|
--- acpica-unix2-20220331.orig/generate/unix/iasl/Makefile
|
|
|
|
+++ acpica-unix2-20220331/generate/unix/iasl/Makefile
|
2020-10-19 18:24:09 +00:00
|
|
|
@@ -359,34 +359,35 @@ $(OBJDIR)/prparserparse.c $(OBJDIR)/prpa
|
2015-04-06 23:35:24 +00:00
|
|
|
# Cannot use the common compile warning flags since the C files are created
|
|
|
|
# by the utilities above and they are not necessarily ANSI C, etc.
|
|
|
|
#
|
|
|
|
+HARDENING_FLAGS = -fPIC -pie
|
|
|
|
$(OBJDIR)/aslcompilerlex.o : $(OBJDIR)/aslcompilerlex.c
|
2017-08-11 22:17:24 +00:00
|
|
|
@echo "- " "Intermediate" $<
|
|
|
|
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
|
|
|
|
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
|
2015-04-06 23:35:24 +00:00
|
|
|
|
|
|
|
$(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c
|
2017-08-11 22:17:24 +00:00
|
|
|
@echo "- " "Intermediate" $<
|
|
|
|
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
|
2019-10-27 22:01:59 +00:00
|
|
|
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
|
|
|
|
|
|
|
|
$(OBJDIR)/dtcompilerparserlex.o : $(OBJDIR)/dtcompilerparserlex.c
|
|
|
|
@echo "- " "Intermediate" $<
|
|
|
|
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
|
|
|
|
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
|
|
|
|
|
|
|
|
$(OBJDIR)/dtcompilerparserparse.o : $(OBJDIR)/dtcompilerparserparse.c
|
|
|
|
@echo "- " "Intermediate" $<
|
|
|
|
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
|
2017-08-11 22:17:24 +00:00
|
|
|
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
|
2015-04-06 23:35:24 +00:00
|
|
|
|
|
|
|
$(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c
|
2017-08-11 22:17:24 +00:00
|
|
|
@echo "- " "Intermediate" $<
|
|
|
|
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
|
|
|
|
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
|
2015-04-06 23:35:24 +00:00
|
|
|
|
|
|
|
$(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c
|
2017-08-11 22:17:24 +00:00
|
|
|
@echo "- " "Intermediate" $<
|
|
|
|
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
|
|
|
|
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
|
2015-04-06 23:35:24 +00:00
|
|
|
|
|
|
|
$(OBJDIR)/prparserlex.o : $(OBJDIR)/prparserlex.c
|
2017-08-11 22:17:24 +00:00
|
|
|
@echo "- " "Intermediate" $<
|
|
|
|
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
|
|
|
|
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
|
2015-04-06 23:35:24 +00:00
|
|
|
|
|
|
|
$(OBJDIR)/prparserparse.o : $(OBJDIR)/prparserparse.c
|
2017-08-11 22:17:24 +00:00
|
|
|
@echo "- " "Intermediate" $<
|
|
|
|
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
|
|
|
|
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
|