* [PATCH] x86, build: remove -m16 workaround for unsupported versions of GCC
@ 2020-12-01 1:13 Nick Desaulniers
2020-12-01 3:51 ` Nathan Chancellor
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Nick Desaulniers @ 2020-12-01 1:13 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Borislav Petkov
Cc: David Woodhouse, Nick Desaulniers, x86, H. Peter Anvin,
Nathan Chancellor, linux-kernel, clang-built-linux
A revert of the following two commits.
commit de3accdaec88 ("x86, build: Build 16-bit code with -m16 where
possible")
commit a9cfccee6604 ("x86, build: Change code16gcc.h from a C header to
an assembly header")
Since commit 0bddd227f3dc ("Documentation: update for gcc 4.9
requirement") the minimum supported version of GCC is gcc-4.9. It's now
safe to remove this code.
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
arch/x86/Makefile | 9 +--------
arch/x86/boot/code16gcc.h | 12 ------------
2 files changed, 1 insertion(+), 20 deletions(-)
delete mode 100644 arch/x86/boot/code16gcc.h
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 1bf21746f4ce..7116da3980be 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -24,14 +24,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.
-#
-# The -m16 option is supported by GCC >= 4.9 and clang >= 3.5. For
-# older versions of GCC, include an *assembly* header to make sure that
-# gcc doesn't play any games behind our back.
-CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h
-M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
-
-REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \
+REALMODE_CFLAGS := -m16 -g -Os -DDISABLE_BRANCH_PROFILING \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-mno-mmx -mno-sse
diff --git a/arch/x86/boot/code16gcc.h b/arch/x86/boot/code16gcc.h
deleted file mode 100644
index e19fd7536307..000000000000
--- a/arch/x86/boot/code16gcc.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#
-# code16gcc.h
-#
-# This file is added to the assembler via -Wa when compiling 16-bit C code.
-# This is done this way instead via asm() to make sure gcc does not reorder
-# things around us.
-#
-# gcc 4.9+ has a real -m16 option so we can drop this hack long term.
-#
-
- .code16gcc
--
2.29.2.454.gaff20da3a2-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] x86, build: remove -m16 workaround for unsupported versions of GCC
2020-12-01 1:13 [PATCH] x86, build: remove -m16 workaround for unsupported versions of GCC Nick Desaulniers
@ 2020-12-01 3:51 ` Nathan Chancellor
2020-12-01 9:49 ` David Woodhouse
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2020-12-01 3:51 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, David Woodhouse,
x86, H. Peter Anvin, linux-kernel, clang-built-linux
On Mon, Nov 30, 2020 at 05:13:06PM -0800, 'Nick Desaulniers' via Clang Built Linux wrote:
> A revert of the following two commits.
> commit de3accdaec88 ("x86, build: Build 16-bit code with -m16 where
> possible")
> commit a9cfccee6604 ("x86, build: Change code16gcc.h from a C header to
> an assembly header")
>
> Since commit 0bddd227f3dc ("Documentation: update for gcc 4.9
> requirement") the minimum supported version of GCC is gcc-4.9. It's now
> safe to remove this code.
>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> arch/x86/Makefile | 9 +--------
> arch/x86/boot/code16gcc.h | 12 ------------
> 2 files changed, 1 insertion(+), 20 deletions(-)
> delete mode 100644 arch/x86/boot/code16gcc.h
>
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 1bf21746f4ce..7116da3980be 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -24,14 +24,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.
> -#
> -# The -m16 option is supported by GCC >= 4.9 and clang >= 3.5. For
> -# older versions of GCC, include an *assembly* header to make sure that
> -# gcc doesn't play any games behind our back.
> -CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h
> -M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
> -
> -REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \
> +REALMODE_CFLAGS := -m16 -g -Os -DDISABLE_BRANCH_PROFILING \
> -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
> -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
> -mno-mmx -mno-sse
> diff --git a/arch/x86/boot/code16gcc.h b/arch/x86/boot/code16gcc.h
> deleted file mode 100644
> index e19fd7536307..000000000000
> --- a/arch/x86/boot/code16gcc.h
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -#
> -# code16gcc.h
> -#
> -# This file is added to the assembler via -Wa when compiling 16-bit C code.
> -# This is done this way instead via asm() to make sure gcc does not reorder
> -# things around us.
> -#
> -# gcc 4.9+ has a real -m16 option so we can drop this hack long term.
> -#
> -
> - .code16gcc
> --
> 2.29.2.454.gaff20da3a2-goog
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86, build: remove -m16 workaround for unsupported versions of GCC
2020-12-01 1:13 [PATCH] x86, build: remove -m16 workaround for unsupported versions of GCC Nick Desaulniers
2020-12-01 3:51 ` Nathan Chancellor
@ 2020-12-01 9:49 ` David Woodhouse
2020-12-01 16:43 ` [tip: x86/build] x86/build: Remove " tip-bot2 for Nick Desaulniers
2020-12-02 5:49 ` [PATCH] x86, build: remove " hpa
3 siblings, 0 replies; 5+ messages in thread
From: David Woodhouse @ 2020-12-01 9:49 UTC (permalink / raw)
To: Nick Desaulniers, Thomas Gleixner, Ingo Molnar, Borislav Petkov
Cc: x86, H. Peter Anvin, Nathan Chancellor, linux-kernel, clang-built-linux
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
On Mon, 2020-11-30 at 17:13 -0800, Nick Desaulniers wrote:
> A revert of the following two commits.
> commit de3accdaec88 ("x86, build: Build 16-bit code with -m16 where
> possible")
> commit a9cfccee6604 ("x86, build: Change code16gcc.h from a C header to
> an assembly header")
>
> Since commit 0bddd227f3dc ("Documentation: update for gcc 4.9
> requirement") the minimum supported version of GCC is gcc-4.9. It's now
> safe to remove this code.
>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5174 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip: x86/build] x86/build: Remove -m16 workaround for unsupported versions of GCC
2020-12-01 1:13 [PATCH] x86, build: remove -m16 workaround for unsupported versions of GCC Nick Desaulniers
2020-12-01 3:51 ` Nathan Chancellor
2020-12-01 9:49 ` David Woodhouse
@ 2020-12-01 16:43 ` tip-bot2 for Nick Desaulniers
2020-12-02 5:49 ` [PATCH] x86, build: remove " hpa
3 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Nick Desaulniers @ 2020-12-01 16:43 UTC (permalink / raw)
To: linux-tip-commits
Cc: Nick Desaulniers, Borislav Petkov, Nathan Chancellor,
David Woodhouse, x86, linux-kernel
The following commit has been merged into the x86/build branch of tip:
Commit-ID: 2838307b019dfec0c309c4e8e589658736cff4c9
Gitweb: https://git.kernel.org/tip/2838307b019dfec0c309c4e8e589658736cff4c9
Author: Nick Desaulniers <ndesaulniers@google.com>
AuthorDate: Mon, 30 Nov 2020 17:13:06 -08:00
Committer: Borislav Petkov <bp@suse.de>
CommitterDate: Tue, 01 Dec 2020 17:17:18 +01:00
x86/build: Remove -m16 workaround for unsupported versions of GCC
Revert the following two commits:
de3accdaec88 ("x86, build: Build 16-bit code with -m16 where possible")
a9cfccee6604 ("x86, build: Change code16gcc.h from a C header to an assembly header")
Since
0bddd227f3dc ("Documentation: update for gcc 4.9 requirement")
the minimum supported version of GCC is gcc-4.9. It's now safe to remove
this code.
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Link: https://lkml.kernel.org/r/20201201011307.3676986-1-ndesaulniers@google.com
---
arch/x86/Makefile | 9 +--------
arch/x86/boot/code16gcc.h | 12 ------------
2 files changed, 1 insertion(+), 20 deletions(-)
delete mode 100644 arch/x86/boot/code16gcc.h
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 154259f..b891066 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -24,14 +24,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.
-#
-# The -m16 option is supported by GCC >= 4.9 and clang >= 3.5. For
-# older versions of GCC, include an *assembly* header to make sure that
-# gcc doesn't play any games behind our back.
-CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h
-M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
-
-REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \
+REALMODE_CFLAGS := -m16 -g -Os -DDISABLE_BRANCH_PROFILING \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-mno-mmx -mno-sse
diff --git a/arch/x86/boot/code16gcc.h b/arch/x86/boot/code16gcc.h
deleted file mode 100644
index e19fd75..0000000
--- a/arch/x86/boot/code16gcc.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#
-# code16gcc.h
-#
-# This file is added to the assembler via -Wa when compiling 16-bit C code.
-# This is done this way instead via asm() to make sure gcc does not reorder
-# things around us.
-#
-# gcc 4.9+ has a real -m16 option so we can drop this hack long term.
-#
-
- .code16gcc
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] x86, build: remove -m16 workaround for unsupported versions of GCC
2020-12-01 1:13 [PATCH] x86, build: remove -m16 workaround for unsupported versions of GCC Nick Desaulniers
` (2 preceding siblings ...)
2020-12-01 16:43 ` [tip: x86/build] x86/build: Remove " tip-bot2 for Nick Desaulniers
@ 2020-12-02 5:49 ` hpa
3 siblings, 0 replies; 5+ messages in thread
From: hpa @ 2020-12-02 5:49 UTC (permalink / raw)
To: Nick Desaulniers, Thomas Gleixner, Ingo Molnar, Borislav Petkov
Cc: David Woodhouse, x86, Nathan Chancellor, linux-kernel, clang-built-linux
On November 30, 2020 5:13:06 PM PST, Nick Desaulniers <ndesaulniers@google.com> wrote:
>A revert of the following two commits.
>commit de3accdaec88 ("x86, build: Build 16-bit code with -m16 where
>possible")
>commit a9cfccee6604 ("x86, build: Change code16gcc.h from a C header to
>an assembly header")
>
>Since commit 0bddd227f3dc ("Documentation: update for gcc 4.9
>requirement") the minimum supported version of GCC is gcc-4.9. It's
>now
>safe to remove this code.
>
>Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
>---
> arch/x86/Makefile | 9 +--------
> arch/x86/boot/code16gcc.h | 12 ------------
> 2 files changed, 1 insertion(+), 20 deletions(-)
> delete mode 100644 arch/x86/boot/code16gcc.h
>
>diff --git a/arch/x86/Makefile b/arch/x86/Makefile
>index 1bf21746f4ce..7116da3980be 100644
>--- a/arch/x86/Makefile
>+++ b/arch/x86/Makefile
>@@ -24,14 +24,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.
>-#
>-# The -m16 option is supported by GCC >= 4.9 and clang >= 3.5. For
>-# older versions of GCC, include an *assembly* header to make sure
>that
>-# gcc doesn't play any games behind our back.
>-CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h
>-M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
>-
>-REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \
>+REALMODE_CFLAGS := -m16 -g -Os -DDISABLE_BRANCH_PROFILING \
> -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
> -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
> -mno-mmx -mno-sse
>diff --git a/arch/x86/boot/code16gcc.h b/arch/x86/boot/code16gcc.h
>deleted file mode 100644
>index e19fd7536307..000000000000
>--- a/arch/x86/boot/code16gcc.h
>+++ /dev/null
>@@ -1,12 +0,0 @@
>-/* SPDX-License-Identifier: GPL-2.0 */
>-#
>-# code16gcc.h
>-#
>-# This file is added to the assembler via -Wa when compiling 16-bit C
>code.
>-# This is done this way instead via asm() to make sure gcc does not
>reorder
>-# things around us.
>-#
>-# gcc 4.9+ has a real -m16 option so we can drop this hack long term.
>-#
>-
>- .code16gcc
With enthusiasm:
Acked-by: H. Peter Anvin <hpa@zytor.com>
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-02 5:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 1:13 [PATCH] x86, build: remove -m16 workaround for unsupported versions of GCC Nick Desaulniers
2020-12-01 3:51 ` Nathan Chancellor
2020-12-01 9:49 ` David Woodhouse
2020-12-01 16:43 ` [tip: x86/build] x86/build: Remove " tip-bot2 for Nick Desaulniers
2020-12-02 5:49 ` [PATCH] x86, build: remove " hpa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).