File: stop_arm_linker_wchar_warnings.patch

package info (click to toggle)
pesign 116-8.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,112 kB
  • sloc: ansic: 14,144; sh: 784; makefile: 226
file content (26 lines) | stat: -rw-r--r-- 1,023 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/Make.defaults b/Make.defaults
index 05aadd0..4295bb8 100644
--- a/Make.defaults
+++ b/Make.defaults
@@ -23,7 +23,7 @@ EFI_ARCHES ?= aa64 ia32 x64
 enabled = $(if $(filter undefined,$(origin $(1))),$(3),$(2))
 
 HOSTARCH   = $(shell uname -m | sed s,i[3456789]86,ia32,)
-ARCH	   := $(shell uname -m | sed s,i[3456789]86,ia32,)
+ARCH	   := $(shell uname -m | sed s,i[3456789]86,ia32, | sed 's,arm.*,arm,')
 
 
 PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
@@ -73,6 +73,12 @@ gcc_ccldflags = -fno-merge-constants \
 	-Wl,--fatal-warnings,--no-allow-shlib-undefined,--default-symver \
 	-Wl,-O2 -Wl,--no-undefined-version -Wl,-z,relro,-z,now \
 	-Wl,--no-add-needed,--no-copy-dt-needed-entries,--as-needed -pie
+ifeq ($(ARCH),arm)
+  gcc_ccldflags += -Wl,--no-wchar-size-warning
+endif
+ifeq ($(ARCH),aarch64)
+  gcc_ccldflags += -Wl,--no-wchar-size-warning
+endif
 ccldflags = $(cflags) $(CCLDFLAGS) $(LDFLAGS) \
 	$(if $(filter $(CCLD),clang),$(clang_ccldflags),) \
 	$(if $(filter $(CCLD),gcc),$(gcc_ccldflags),) \