forked from mirrors/linux
		
	efi/x86: Fix build with gcc 4
Commit
  bbf8e8b0fe ("efi/libstub: Optimize for size instead of speed")
changed the optimization level for the EFI stub to -Os from -O2.
Andrey Ignatov reports that this breaks the build with gcc 4.8.5.
Testing on godbolt.org, the combination of -Os,
-fno-asynchronous-unwind-tables, and ms_abi functions doesn't work,
failing with the error:
  sorry, unimplemented: ms_abi attribute requires
  -maccumulate-outgoing-args or subtarget optimization implying it
This does appear to work with gcc 4.9 onwards.
Add -maccumulate-outgoing-args explicitly to unbreak the build with
pre-4.9 versions of gcc.
Reported-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200605150638.1011637-1-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
			
			
This commit is contained in:
		
							parent
							
								
									b3a9e3b962
								
							
						
					
					
						commit
						5435f73d5c
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -6,7 +6,8 @@ | |||
| # enabled, even if doing so doesn't break the build.
 | ||||
| #
 | ||||
| cflags-$(CONFIG_X86_32)		:= -march=i386 | ||||
| cflags-$(CONFIG_X86_64)		:= -mcmodel=small | ||||
| cflags-$(CONFIG_X86_64)		:= -mcmodel=small \
 | ||||
| 				   $(call cc-option,-maccumulate-outgoing-args) | ||||
| cflags-$(CONFIG_X86)		+= -m$(BITS) -D__KERNEL__ \
 | ||||
| 				   -fPIC -fno-strict-aliasing -mno-red-zone \
 | ||||
| 				   -mno-mmx -mno-sse -fshort-wchar \
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Arvind Sankar
						Arvind Sankar