1 Star 0 Fork 27

niuzj0/acpica-tools

forked from src-openEuler/acpica-tools 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
openEuler-harden.patch 2.33 KB
一键复制 编辑 原始数据 按行查看 历史
靳智敏 提交于 2020-07-23 07:18 . update to 20200528
diff -Naur a/generate/unix/iasl/Makefile b/generate/unix/iasl/Makefile
--- a/generate/unix/iasl/Makefile 2020-07-23 06:45:14.064000000 +0000
+++ b/generate/unix/iasl/Makefile 2020-07-23 06:57:32.080000000 +0000
@@ -358,34 +358,35 @@
# 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
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
$(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(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$@ $<
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
$(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
$(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
$(OBJDIR)/prparserlex.o : $(OBJDIR)/prparserlex.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
$(OBJDIR)/prparserparse.o : $(OBJDIR)/prparserparse.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) $(HARDENING_FLAGS) -Wall -Werror -o$@ $<
diff -Naur a/generate/unix/Makefile.config b/generate/unix/Makefile.config
--- a/generate/unix/Makefile.config 2020-07-23 06:45:14.065000000 +0000
+++ b/generate/unix/Makefile.config 2020-07-23 06:47:00.436000000 +0000
@@ -181,6 +181,8 @@
OPT_CFLAGS += -D_FORTIFY_SOURCE=2
endif
+OPT_CFLAGS += -fPIC -pie
+
CFLAGS += \
-D$(ACPI_HOST)\
-D_GNU_SOURCE\
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/niuzj0/acpica-tools.git
git@gitee.com:niuzj0/acpica-tools.git
niuzj0
acpica-tools
acpica-tools
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385