Fix up modify-cflags.patch

This commit is contained in:
lkx690 2020-03-18 15:39:45 +08:00
parent 5ed19f48fb
commit 6b17bb0240
2 changed files with 21 additions and 14 deletions

View File

@ -1,7 +1,7 @@
%define debug_package %{nil} %define debug_package %{nil}
Name: gnu-efi Name: gnu-efi
Version: 3.0.8 Version: 3.0.8
Release: 6 Release: 7
Summary: Development Libraries and headers for EFI Summary: Development Libraries and headers for EFI
Epoch: 1 Epoch: 1
License: BSD License: BSD
@ -77,6 +77,9 @@ mv ia32/apps/{route80h.efi,modelist.efi} %{buildroot}/boot/efi/EFI/%{efidir}/ia3
%{_includedir}/efi %{_includedir}/efi
%changelog %changelog
* Wed Mar 18 2020 likexin <likexin4@huawei.com> - 3.0.8-7
- Fix up modify-cflags.patch
* Wed Mar 18 2020 likexin <likexin4@huawei.com> - 3.0.8-6 * Wed Mar 18 2020 likexin <likexin4@huawei.com> - 3.0.8-6
- Add cflags -fstack-protector-strong - Add cflags -fstack-protector-strong

View File

@ -1,21 +1,22 @@
diff -Nur gnu-efi-3.0.8.orig/Make.defaults gnu-efi-3.0.8-2/Make.defaults diff -Nur gnu-efi-3.0.8.orig/Make.defaults gnu-efi-3.0.8/Make.defaults
--- gnu-efi-3.0.8.orig/Make.defaults 2018-03-15 02:54:51.000000000 +0800 --- gnu-efi-3.0.8.orig/Make.defaults 2018-03-15 02:54:51.000000000 +0800
+++ gnu-efi-3.0.8-2/Make.defaults 2020-03-17 23:23:49.602158451 +0800 +++ gnu-efi-3.0.8/Make.defaults 2020-03-18 15:33:04.818719470 +0800
@@ -87,7 +87,7 @@ @@ -155,6 +155,9 @@
# Arch-specific compilation flags CFLAGS += -marm
CPPFLAGS += -DCONFIG_$(ARCH) endif
-CFLAGS += -Wno-error=pragmas +ifeq ($(ARCH),aarch64)
+CFLAGS += -Wno-error=pragmas -fstack-protector-strong +CFLAGS += -fstack-protector-strong
+endif
ifeq ($(ARCH),ia64) # Generic compilation flags
CFLAGS += -mfixed-range=f32-f127 INCDIR += -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) \
@@ -168,16 +168,15 @@ -I$(TOPDIR)/inc/protocol
@@ -168,16 +171,18 @@
ifeq (FreeBSD, $(findstring FreeBSD, $(OS))) ifeq (FreeBSD, $(findstring FreeBSD, $(OS)))
CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \ CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
-fshort-wchar -fno-strict-aliasing \ -fshort-wchar -fno-strict-aliasing \
- -ffreestanding -fno-stack-protector - -ffreestanding -fno-stack-protector
+ -ffreestanding + -ffreestanding -fno-stack-protector
else else
CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \ CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
-fshort-wchar -fno-strict-aliasing \ -fshort-wchar -fno-strict-aliasing \
@ -23,10 +24,13 @@ diff -Nur gnu-efi-3.0.8.orig/Make.defaults gnu-efi-3.0.8-2/Make.defaults
- -fno-stack-check \ - -fno-stack-check \
+ -ffreestanding \ + -ffreestanding \
$(if $(findstring gcc,$(CC)),-fno-merge-all-constants,) $(if $(findstring gcc,$(CC)),-fno-merge-all-constants,)
+ifneq ($(ARCH),aarch64)
+CFLAGS += -fno-stack-protector -fno-stack-check
+endif
endif endif
ARFLAGS := rDv ARFLAGS := rDv
ASFLAGS += $(ARCH3264) ASFLAGS += $(ARCH3264)
-LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings \ -LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings \
+LDFLAGS += -nostdlib --warn-common --fatal-warnings \ +LDFLAGS += -nostdlib --warn-common --fatal-warnings \
--build-id=sha1 --build-id=sha1