diff options
| author | Peter Jones <pjones@redhat.com> | 2018-03-15 11:13:25 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2018-03-15 11:23:26 -0400 |
| commit | 138deeff23707b2db46bbb5c90f1c08bd4b2a429 (patch) | |
| tree | 1508ae7da5432bfb707eab4dba6672d90abdee79 /Make.defaults | |
| parent | bfb6bd7b83c4dd937fd7e8fd5ad5233f1ec58bf9 (diff) | |
| download | efi-boot-shim-138deeff23707b2db46bbb5c90f1c08bd4b2a429.tar.gz efi-boot-shim-138deeff23707b2db46bbb5c90f1c08bd4b2a429.zip | |
Work around clang bugs for scan-build.
I don't think the x86 binaries clang builds will actually work unless
they just infer -maccumulate-outgoing-args from __attribute__((__ms_abi__),
but it's nice to have the analyzer working.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'Make.defaults')
| -rw-r--r-- | Make.defaults | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Make.defaults b/Make.defaults index 8c321d2c..e11ab5a7 100644 --- a/Make.defaults +++ b/Make.defaults @@ -47,6 +47,8 @@ CFLAGS = -ggdb -O0 -fno-stack-protector -fno-strict-aliasing -fpic \ "-DDEFAULT_LOADER_CHAR=\"$(DEFAULT_LOADER)\"" \ $(EFI_INCLUDES) +CLANG_BUGS = $(if $(findstring gcc,$(CC)),-maccumulate-outgoing-args,) + COMMIT_ID ?= $(shell if [ -e .git ] ; then git log -1 --pretty=format:%H ; elif [ -f commit ]; then cat commit ; else echo master; fi) ifneq ($(origin OVERRIDE_SECURITY_POLICY), undefined) @@ -63,7 +65,7 @@ endif ifeq ($(ARCH),x86_64) CFLAGS += -mno-mmx -mno-sse -mno-red-zone -nostdinc \ - -maccumulate-outgoing-args -m64 \ + $(CLANG_BUGS) -m64 \ -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI \ -DNO_BUILTIN_VA_FUNCS -DMDE_CPU_X64 -DPAGE_SIZE=4096 LIBDIR ?= $(prefix)/lib64 @@ -73,7 +75,7 @@ ifeq ($(ARCH),x86_64) endif ifeq ($(ARCH),ia32) CFLAGS += -mno-mmx -mno-sse -mno-red-zone -nostdinc \ - -maccumulate-outgoing-args -m32 \ + $(CLANG_BUGS) -m32 \ -DMDE_CPU_IA32 -DPAGE_SIZE=4096 LIBDIR ?= $(prefix)/lib ARCH_SUFFIX ?= ia32 |
