x86: compile boot code with -std=gnu11 too

Message ID 2058761e-12a4-4b2f-9690-3c3c1c9902a5@p183
State New
Headers
Series x86: compile boot code with -std=gnu11 too |

Commit Message

Alexey Dobriyan Sept. 27, 2023, 3:42 p.m. UTC
  Use -std=gnu11 for consistency with main kernel code.

It doesn't seem to change anything in vmlinux.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 arch/x86/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

H. Peter Anvin Sept. 27, 2023, 11:05 p.m. UTC | #1
On September 27, 2023 8:42:11 AM PDT, Alexey Dobriyan <adobriyan@gmail.com> wrote:
>Use -std=gnu11 for consistency with main kernel code.
>
>It doesn't seem to change anything in vmlinux.
>
>Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
>---
>
> arch/x86/Makefile |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>--- a/arch/x86/Makefile
>+++ b/arch/x86/Makefile
>@@ -43,7 +43,7 @@ endif
> 
> # How to compile the 16-bit code.  Note we always compile for -march=i386;
> # that way we can complain to the user if the CPU is insufficient.
>-REALMODE_CFLAGS	:= -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
>+REALMODE_CFLAGS	:= -std=gnu11 -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
> 		   -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
> 		   -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
> 		   -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)

Acked-by: H. Peter Anvin (Intel) <hpa@zytor.com>
  

Patch

--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -43,7 +43,7 @@  endif
 
 # How to compile the 16-bit code.  Note we always compile for -march=i386;
 # that way we can complain to the user if the CPU is insufficient.
-REALMODE_CFLAGS	:= -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
+REALMODE_CFLAGS	:= -std=gnu11 -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
 		   -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
 		   -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
 		   -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)