All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: vdso32: drop -no-integrated-as flag
@ 2021-04-13 23:06 ` Nick Desaulniers
  0 siblings, 0 replies; 12+ messages in thread
From: Nick Desaulniers @ 2021-04-13 23:06 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: vincenzo.frascino, Nick Desaulniers, Nathan Chancellor,
	Masahiro Yamada, Bill Wendling, linux-arm-kernel, linux-kernel,
	clang-built-linux

Clang can assemble these files just fine; this is a relic from the top
level Makefile conditionally adding this.

To test building:
$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
  CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
  defconfig arch/arm64/kernel/vdso32/

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 arch/arm64/kernel/vdso32/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index 789ad420f16b..7812717f8b79 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -15,7 +15,7 @@ COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
 
 CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
 CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
-CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
+CC_COMPAT_CLANG_FLAGS += -Qunused-arguments
 ifneq ($(COMPAT_GCC_TOOLCHAIN),)
 CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
 endif
-- 
2.31.1.295.g9ea45b61b8-goog


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] arm64: vdso32: drop -no-integrated-as flag
@ 2021-04-13 23:06 ` Nick Desaulniers
  0 siblings, 0 replies; 12+ messages in thread
From: Nick Desaulniers @ 2021-04-13 23:06 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: vincenzo.frascino, Nick Desaulniers, Nathan Chancellor,
	Masahiro Yamada, Bill Wendling, linux-arm-kernel, linux-kernel,
	clang-built-linux

Clang can assemble these files just fine; this is a relic from the top
level Makefile conditionally adding this.

To test building:
$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
  CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
  defconfig arch/arm64/kernel/vdso32/

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 arch/arm64/kernel/vdso32/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index 789ad420f16b..7812717f8b79 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -15,7 +15,7 @@ COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
 
 CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
 CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
-CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
+CC_COMPAT_CLANG_FLAGS += -Qunused-arguments
 ifneq ($(COMPAT_GCC_TOOLCHAIN),)
 CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
 endif
-- 
2.31.1.295.g9ea45b61b8-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arm64: vdso32: drop -no-integrated-as flag
  2021-04-13 23:06 ` Nick Desaulniers
@ 2021-04-13 23:12   ` Nathan Chancellor
  -1 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2021-04-13 23:12 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Catalin Marinas, Will Deacon, vincenzo.frascino, Masahiro Yamada,
	Bill Wendling, linux-arm-kernel, linux-kernel, clang-built-linux

On Tue, Apr 13, 2021 at 04:06:06PM -0700, Nick Desaulniers wrote:
> Clang can assemble these files just fine; this is a relic from the top
> level Makefile conditionally adding this.
> 
> To test building:
> $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
>   CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
>   defconfig arch/arm64/kernel/vdso32/
> 
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
>  arch/arm64/kernel/vdso32/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> index 789ad420f16b..7812717f8b79 100644
> --- a/arch/arm64/kernel/vdso32/Makefile
> +++ b/arch/arm64/kernel/vdso32/Makefile
> @@ -15,7 +15,7 @@ COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
>  
>  CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
>  CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
> -CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
> +CC_COMPAT_CLANG_FLAGS += -Qunused-arguments

Might as well just eliminate '--prefix=' and '--gcc-toolchain=' along
with the variables COMPAT_GCC_TOOLCHAIN_DIR and COMPAT_GCC_TOOLCHAIN
while you are at it, they serve no purpose without '-no-integrated-as'.

>  ifneq ($(COMPAT_GCC_TOOLCHAIN),)
>  CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
>  endif
> -- 
> 2.31.1.295.g9ea45b61b8-goog
> 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arm64: vdso32: drop -no-integrated-as flag
@ 2021-04-13 23:12   ` Nathan Chancellor
  0 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2021-04-13 23:12 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Catalin Marinas, Will Deacon, vincenzo.frascino, Masahiro Yamada,
	Bill Wendling, linux-arm-kernel, linux-kernel, clang-built-linux

On Tue, Apr 13, 2021 at 04:06:06PM -0700, Nick Desaulniers wrote:
> Clang can assemble these files just fine; this is a relic from the top
> level Makefile conditionally adding this.
> 
> To test building:
> $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
>   CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
>   defconfig arch/arm64/kernel/vdso32/
> 
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
>  arch/arm64/kernel/vdso32/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> index 789ad420f16b..7812717f8b79 100644
> --- a/arch/arm64/kernel/vdso32/Makefile
> +++ b/arch/arm64/kernel/vdso32/Makefile
> @@ -15,7 +15,7 @@ COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
>  
>  CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
>  CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
> -CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
> +CC_COMPAT_CLANG_FLAGS += -Qunused-arguments

Might as well just eliminate '--prefix=' and '--gcc-toolchain=' along
with the variables COMPAT_GCC_TOOLCHAIN_DIR and COMPAT_GCC_TOOLCHAIN
while you are at it, they serve no purpose without '-no-integrated-as'.

>  ifneq ($(COMPAT_GCC_TOOLCHAIN),)
>  CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
>  endif
> -- 
> 2.31.1.295.g9ea45b61b8-goog
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] arm64: vdso32: drop -no-integrated-as flag
  2021-04-13 23:12   ` Nathan Chancellor
@ 2021-04-14 21:45     ` Nick Desaulniers
  -1 siblings, 0 replies; 12+ messages in thread
From: Nick Desaulniers @ 2021-04-14 21:45 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: vincenzo.frascino, Nick Desaulniers, Nathan Chancellor,
	Masahiro Yamada, Stephen Boyd, linux-arm-kernel, linux-kernel,
	clang-built-linux

Clang can assemble these files just fine; this is a relic from the top
level Makefile conditionally adding this. We no longer need --prefix,
--gcc-toolchain, or -Qunused-arguments flags either with this change, so
remove those too.

To test building:
$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
  CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
  defconfig arch/arm64/kernel/vdso32/

Suggested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
Changes V1 -> V2:
* Remove --prefix, --gcc-toolchain, COMPAT_GCC_TOOLCHAIN, and
  COMPAT_GCC_TOOLCHAIN_DIR as per Nathan.
* Credit Nathan with Suggested-by tag.
* Remove -Qunused-arguments.
* Update commit message.

 arch/arm64/kernel/vdso32/Makefile | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index 789ad420f16b..3dba0c4f8f42 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -10,15 +10,7 @@ include $(srctree)/lib/vdso/Makefile
 
 # Same as cc-*option, but using CC_COMPAT instead of CC
 ifeq ($(CONFIG_CC_IS_CLANG), y)
-COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit))
-COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
-
 CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
-CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
-CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
-ifneq ($(COMPAT_GCC_TOOLCHAIN),)
-CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
-endif
 
 CC_COMPAT ?= $(CC)
 CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
-- 
2.31.1.295.g9ea45b61b8-goog


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] arm64: vdso32: drop -no-integrated-as flag
@ 2021-04-14 21:45     ` Nick Desaulniers
  0 siblings, 0 replies; 12+ messages in thread
From: Nick Desaulniers @ 2021-04-14 21:45 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: vincenzo.frascino, Nick Desaulniers, Nathan Chancellor,
	Masahiro Yamada, Stephen Boyd, linux-arm-kernel, linux-kernel,
	clang-built-linux

Clang can assemble these files just fine; this is a relic from the top
level Makefile conditionally adding this. We no longer need --prefix,
--gcc-toolchain, or -Qunused-arguments flags either with this change, so
remove those too.

To test building:
$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
  CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
  defconfig arch/arm64/kernel/vdso32/

Suggested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
Changes V1 -> V2:
* Remove --prefix, --gcc-toolchain, COMPAT_GCC_TOOLCHAIN, and
  COMPAT_GCC_TOOLCHAIN_DIR as per Nathan.
* Credit Nathan with Suggested-by tag.
* Remove -Qunused-arguments.
* Update commit message.

 arch/arm64/kernel/vdso32/Makefile | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index 789ad420f16b..3dba0c4f8f42 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -10,15 +10,7 @@ include $(srctree)/lib/vdso/Makefile
 
 # Same as cc-*option, but using CC_COMPAT instead of CC
 ifeq ($(CONFIG_CC_IS_CLANG), y)
-COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit))
-COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
-
 CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
-CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
-CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
-ifneq ($(COMPAT_GCC_TOOLCHAIN),)
-CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
-endif
 
 CC_COMPAT ?= $(CC)
 CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
-- 
2.31.1.295.g9ea45b61b8-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] arm64: vdso32: drop -no-integrated-as flag
  2021-04-14 21:45     ` Nick Desaulniers
@ 2021-04-15  0:17       ` Nathan Chancellor
  -1 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2021-04-15  0:17 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Catalin Marinas, Will Deacon, vincenzo.frascino, Masahiro Yamada,
	Stephen Boyd, linux-arm-kernel, linux-kernel, clang-built-linux

On Wed, Apr 14, 2021 at 02:45:45PM -0700, Nick Desaulniers wrote:
> Clang can assemble these files just fine; this is a relic from the top
> level Makefile conditionally adding this. We no longer need --prefix,
> --gcc-toolchain, or -Qunused-arguments flags either with this change, so
> remove those too.
> 
> To test building:
> $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
>   CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
>   defconfig arch/arm64/kernel/vdso32/
> 
> Suggested-by: Nathan Chancellor <nathan@kernel.org>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
> Changes V1 -> V2:
> * Remove --prefix, --gcc-toolchain, COMPAT_GCC_TOOLCHAIN, and
>   COMPAT_GCC_TOOLCHAIN_DIR as per Nathan.
> * Credit Nathan with Suggested-by tag.
> * Remove -Qunused-arguments.
> * Update commit message.
> 
>  arch/arm64/kernel/vdso32/Makefile | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> index 789ad420f16b..3dba0c4f8f42 100644
> --- a/arch/arm64/kernel/vdso32/Makefile
> +++ b/arch/arm64/kernel/vdso32/Makefile
> @@ -10,15 +10,7 @@ include $(srctree)/lib/vdso/Makefile
>  
>  # Same as cc-*option, but using CC_COMPAT instead of CC
>  ifeq ($(CONFIG_CC_IS_CLANG), y)
> -COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit))
> -COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
> -
>  CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
> -CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
> -CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
> -ifneq ($(COMPAT_GCC_TOOLCHAIN),)
> -CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
> -endif
>  
>  CC_COMPAT ?= $(CC)
>  CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
> -- 
> 2.31.1.295.g9ea45b61b8-goog
> 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] arm64: vdso32: drop -no-integrated-as flag
@ 2021-04-15  0:17       ` Nathan Chancellor
  0 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2021-04-15  0:17 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Catalin Marinas, Will Deacon, vincenzo.frascino, Masahiro Yamada,
	Stephen Boyd, linux-arm-kernel, linux-kernel, clang-built-linux

On Wed, Apr 14, 2021 at 02:45:45PM -0700, Nick Desaulniers wrote:
> Clang can assemble these files just fine; this is a relic from the top
> level Makefile conditionally adding this. We no longer need --prefix,
> --gcc-toolchain, or -Qunused-arguments flags either with this change, so
> remove those too.
> 
> To test building:
> $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
>   CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
>   defconfig arch/arm64/kernel/vdso32/
> 
> Suggested-by: Nathan Chancellor <nathan@kernel.org>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
> Changes V1 -> V2:
> * Remove --prefix, --gcc-toolchain, COMPAT_GCC_TOOLCHAIN, and
>   COMPAT_GCC_TOOLCHAIN_DIR as per Nathan.
> * Credit Nathan with Suggested-by tag.
> * Remove -Qunused-arguments.
> * Update commit message.
> 
>  arch/arm64/kernel/vdso32/Makefile | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> index 789ad420f16b..3dba0c4f8f42 100644
> --- a/arch/arm64/kernel/vdso32/Makefile
> +++ b/arch/arm64/kernel/vdso32/Makefile
> @@ -10,15 +10,7 @@ include $(srctree)/lib/vdso/Makefile
>  
>  # Same as cc-*option, but using CC_COMPAT instead of CC
>  ifeq ($(CONFIG_CC_IS_CLANG), y)
> -COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit))
> -COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
> -
>  CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
> -CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
> -CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
> -ifneq ($(COMPAT_GCC_TOOLCHAIN),)
> -CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
> -endif
>  
>  CC_COMPAT ?= $(CC)
>  CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
> -- 
> 2.31.1.295.g9ea45b61b8-goog
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] arm64: vdso32: drop -no-integrated-as flag
  2021-04-14 21:45     ` Nick Desaulniers
@ 2021-04-15 13:31       ` Vincenzo Frascino
  -1 siblings, 0 replies; 12+ messages in thread
From: Vincenzo Frascino @ 2021-04-15 13:31 UTC (permalink / raw)
  To: Nick Desaulniers, Catalin Marinas, Will Deacon
  Cc: Nathan Chancellor, Masahiro Yamada, Stephen Boyd,
	linux-arm-kernel, linux-kernel, clang-built-linux



On 4/14/21 10:45 PM, Nick Desaulniers wrote:
> Clang can assemble these files just fine; this is a relic from the top
> level Makefile conditionally adding this. We no longer need --prefix,
> --gcc-toolchain, or -Qunused-arguments flags either with this change, so
> remove those too.
> 
> To test building:
> $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
>   CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
>   defconfig arch/arm64/kernel/vdso32/
> 
> Suggested-by: Nathan Chancellor <nathan@kernel.org>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

The patch looks fine, but I have one question: the kernel requires as a minimum
Clang/LLVM version 10.0.1. Did you verify that with that version compat vDSOs
still builds and works correctly?

Otherwise:

Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

> ---
> Changes V1 -> V2:
> * Remove --prefix, --gcc-toolchain, COMPAT_GCC_TOOLCHAIN, and
>   COMPAT_GCC_TOOLCHAIN_DIR as per Nathan.
> * Credit Nathan with Suggested-by tag.
> * Remove -Qunused-arguments.
> * Update commit message.
> 
>  arch/arm64/kernel/vdso32/Makefile | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> index 789ad420f16b..3dba0c4f8f42 100644
> --- a/arch/arm64/kernel/vdso32/Makefile
> +++ b/arch/arm64/kernel/vdso32/Makefile
> @@ -10,15 +10,7 @@ include $(srctree)/lib/vdso/Makefile
>  
>  # Same as cc-*option, but using CC_COMPAT instead of CC
>  ifeq ($(CONFIG_CC_IS_CLANG), y)
> -COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit))
> -COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
> -
>  CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
> -CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
> -CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
> -ifneq ($(COMPAT_GCC_TOOLCHAIN),)
> -CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
> -endif
>  
>  CC_COMPAT ?= $(CC)
>  CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
> 

-- 
Regards,
Vincenzo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] arm64: vdso32: drop -no-integrated-as flag
@ 2021-04-15 13:31       ` Vincenzo Frascino
  0 siblings, 0 replies; 12+ messages in thread
From: Vincenzo Frascino @ 2021-04-15 13:31 UTC (permalink / raw)
  To: Nick Desaulniers, Catalin Marinas, Will Deacon
  Cc: Nathan Chancellor, Masahiro Yamada, Stephen Boyd,
	linux-arm-kernel, linux-kernel, clang-built-linux



On 4/14/21 10:45 PM, Nick Desaulniers wrote:
> Clang can assemble these files just fine; this is a relic from the top
> level Makefile conditionally adding this. We no longer need --prefix,
> --gcc-toolchain, or -Qunused-arguments flags either with this change, so
> remove those too.
> 
> To test building:
> $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
>   CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
>   defconfig arch/arm64/kernel/vdso32/
> 
> Suggested-by: Nathan Chancellor <nathan@kernel.org>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

The patch looks fine, but I have one question: the kernel requires as a minimum
Clang/LLVM version 10.0.1. Did you verify that with that version compat vDSOs
still builds and works correctly?

Otherwise:

Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

> ---
> Changes V1 -> V2:
> * Remove --prefix, --gcc-toolchain, COMPAT_GCC_TOOLCHAIN, and
>   COMPAT_GCC_TOOLCHAIN_DIR as per Nathan.
> * Credit Nathan with Suggested-by tag.
> * Remove -Qunused-arguments.
> * Update commit message.
> 
>  arch/arm64/kernel/vdso32/Makefile | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> index 789ad420f16b..3dba0c4f8f42 100644
> --- a/arch/arm64/kernel/vdso32/Makefile
> +++ b/arch/arm64/kernel/vdso32/Makefile
> @@ -10,15 +10,7 @@ include $(srctree)/lib/vdso/Makefile
>  
>  # Same as cc-*option, but using CC_COMPAT instead of CC
>  ifeq ($(CONFIG_CC_IS_CLANG), y)
> -COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit))
> -COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
> -
>  CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
> -CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
> -CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
> -ifneq ($(COMPAT_GCC_TOOLCHAIN),)
> -CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
> -endif
>  
>  CC_COMPAT ?= $(CC)
>  CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
> 

-- 
Regards,
Vincenzo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] arm64: vdso32: drop -no-integrated-as flag
  2021-04-15 13:31       ` Vincenzo Frascino
@ 2021-04-15 16:52         ` Nick Desaulniers
  -1 siblings, 0 replies; 12+ messages in thread
From: Nick Desaulniers @ 2021-04-15 16:52 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: Catalin Marinas, Will Deacon, Nathan Chancellor, Masahiro Yamada,
	Stephen Boyd, Linux ARM, LKML, clang-built-linux

On Thu, Apr 15, 2021 at 6:31 AM Vincenzo Frascino
<vincenzo.frascino@arm.com> wrote:
>
>
>
> On 4/14/21 10:45 PM, Nick Desaulniers wrote:
> > Clang can assemble these files just fine; this is a relic from the top
> > level Makefile conditionally adding this. We no longer need --prefix,
> > --gcc-toolchain, or -Qunused-arguments flags either with this change, so
> > remove those too.
> >
> > To test building:
> > $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
> >   CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
> >   defconfig arch/arm64/kernel/vdso32/
> >
> > Suggested-by: Nathan Chancellor <nathan@kernel.org>
> > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
>
> The patch looks fine, but I have one question: the kernel requires as a minimum
> Clang/LLVM version 10.0.1. Did you verify that with that version compat vDSOs
> still builds and works correctly?

Hi Vincenzo,
Great question, let's check.
$ cd path/to/llvm-project
$ git checkout origin/release/10.x
$ cd llvm/build && ninja
$ cd path/to/linux
$ b4 am https://lore.kernel.org/lkml/20210413230609.3114365-1-ndesaulniers@google.com/
-o - | git am -3

We can't generally build ARCH=arm64 defconfig with LLVM_IAS=1 with
clang-10, but dropping LLVM_IAS=1 it looks like we can still build
without that.

$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 defconfig
clean all
$ ls -l arch/arm64/kernel/vdso32
total 116
-rw-r----- 1 ndesaulniers primarygroup  7534 Apr 14 14:41 Makefile
-rw-r----- 1 ndesaulniers primarygroup   387 Mar 31 10:47 note.c
-rw-r----- 1 ndesaulniers primarygroup  2544 Apr 15 09:48 note.o
-rw-r----- 1 ndesaulniers primarygroup  4552 Apr 15 09:48 vdso.lds
-rw-r----- 1 ndesaulniers primarygroup  1587 Apr  1 12:55 vdso.lds.S
-rw------- 1 ndesaulniers primarygroup  3576 Apr 15 09:48 vdso.so
-rw------- 1 ndesaulniers primarygroup 24380 Apr 15 09:48 vdso.so.dbg
-rwxr-x--- 1 ndesaulniers primarygroup 24380 Apr 15 09:48 vdso.so.raw
-rw-r----- 1 ndesaulniers primarygroup   828 Apr  1 12:55 vgettimeofday.c
-rw-r----- 1 ndesaulniers primarygroup 29084 Apr 15 09:48 vgettimeofday.o

FWIW, clang-10 was missing support for R_AARCH64_PREL32, which affects
building arch/arm64/kvm/hyp/nvhe/hyp-reloc.S.

>
> Otherwise:
>
> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
>
> > ---
> > Changes V1 -> V2:
> > * Remove --prefix, --gcc-toolchain, COMPAT_GCC_TOOLCHAIN, and
> >   COMPAT_GCC_TOOLCHAIN_DIR as per Nathan.
> > * Credit Nathan with Suggested-by tag.
> > * Remove -Qunused-arguments.
> > * Update commit message.
> >
> >  arch/arm64/kernel/vdso32/Makefile | 8 --------
> >  1 file changed, 8 deletions(-)
> >
> > diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> > index 789ad420f16b..3dba0c4f8f42 100644
> > --- a/arch/arm64/kernel/vdso32/Makefile
> > +++ b/arch/arm64/kernel/vdso32/Makefile
> > @@ -10,15 +10,7 @@ include $(srctree)/lib/vdso/Makefile
> >
> >  # Same as cc-*option, but using CC_COMPAT instead of CC
> >  ifeq ($(CONFIG_CC_IS_CLANG), y)
> > -COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit))
> > -COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
> > -
> >  CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
> > -CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
> > -CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
> > -ifneq ($(COMPAT_GCC_TOOLCHAIN),)
> > -CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
> > -endif
> >
> >  CC_COMPAT ?= $(CC)
> >  CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
> >
>
> --
> Regards,
> Vincenzo



-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] arm64: vdso32: drop -no-integrated-as flag
@ 2021-04-15 16:52         ` Nick Desaulniers
  0 siblings, 0 replies; 12+ messages in thread
From: Nick Desaulniers @ 2021-04-15 16:52 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: Catalin Marinas, Will Deacon, Nathan Chancellor, Masahiro Yamada,
	Stephen Boyd, Linux ARM, LKML, clang-built-linux

On Thu, Apr 15, 2021 at 6:31 AM Vincenzo Frascino
<vincenzo.frascino@arm.com> wrote:
>
>
>
> On 4/14/21 10:45 PM, Nick Desaulniers wrote:
> > Clang can assemble these files just fine; this is a relic from the top
> > level Makefile conditionally adding this. We no longer need --prefix,
> > --gcc-toolchain, or -Qunused-arguments flags either with this change, so
> > remove those too.
> >
> > To test building:
> > $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
> >   CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \
> >   defconfig arch/arm64/kernel/vdso32/
> >
> > Suggested-by: Nathan Chancellor <nathan@kernel.org>
> > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
>
> The patch looks fine, but I have one question: the kernel requires as a minimum
> Clang/LLVM version 10.0.1. Did you verify that with that version compat vDSOs
> still builds and works correctly?

Hi Vincenzo,
Great question, let's check.
$ cd path/to/llvm-project
$ git checkout origin/release/10.x
$ cd llvm/build && ninja
$ cd path/to/linux
$ b4 am https://lore.kernel.org/lkml/20210413230609.3114365-1-ndesaulniers@google.com/
-o - | git am -3

We can't generally build ARCH=arm64 defconfig with LLVM_IAS=1 with
clang-10, but dropping LLVM_IAS=1 it looks like we can still build
without that.

$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 defconfig
clean all
$ ls -l arch/arm64/kernel/vdso32
total 116
-rw-r----- 1 ndesaulniers primarygroup  7534 Apr 14 14:41 Makefile
-rw-r----- 1 ndesaulniers primarygroup   387 Mar 31 10:47 note.c
-rw-r----- 1 ndesaulniers primarygroup  2544 Apr 15 09:48 note.o
-rw-r----- 1 ndesaulniers primarygroup  4552 Apr 15 09:48 vdso.lds
-rw-r----- 1 ndesaulniers primarygroup  1587 Apr  1 12:55 vdso.lds.S
-rw------- 1 ndesaulniers primarygroup  3576 Apr 15 09:48 vdso.so
-rw------- 1 ndesaulniers primarygroup 24380 Apr 15 09:48 vdso.so.dbg
-rwxr-x--- 1 ndesaulniers primarygroup 24380 Apr 15 09:48 vdso.so.raw
-rw-r----- 1 ndesaulniers primarygroup   828 Apr  1 12:55 vgettimeofday.c
-rw-r----- 1 ndesaulniers primarygroup 29084 Apr 15 09:48 vgettimeofday.o

FWIW, clang-10 was missing support for R_AARCH64_PREL32, which affects
building arch/arm64/kvm/hyp/nvhe/hyp-reloc.S.

>
> Otherwise:
>
> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
>
> > ---
> > Changes V1 -> V2:
> > * Remove --prefix, --gcc-toolchain, COMPAT_GCC_TOOLCHAIN, and
> >   COMPAT_GCC_TOOLCHAIN_DIR as per Nathan.
> > * Credit Nathan with Suggested-by tag.
> > * Remove -Qunused-arguments.
> > * Update commit message.
> >
> >  arch/arm64/kernel/vdso32/Makefile | 8 --------
> >  1 file changed, 8 deletions(-)
> >
> > diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> > index 789ad420f16b..3dba0c4f8f42 100644
> > --- a/arch/arm64/kernel/vdso32/Makefile
> > +++ b/arch/arm64/kernel/vdso32/Makefile
> > @@ -10,15 +10,7 @@ include $(srctree)/lib/vdso/Makefile
> >
> >  # Same as cc-*option, but using CC_COMPAT instead of CC
> >  ifeq ($(CONFIG_CC_IS_CLANG), y)
> > -COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit))
> > -COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
> > -
> >  CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
> > -CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE_COMPAT))
> > -CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
> > -ifneq ($(COMPAT_GCC_TOOLCHAIN),)
> > -CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
> > -endif
> >
> >  CC_COMPAT ?= $(CC)
> >  CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
> >
>
> --
> Regards,
> Vincenzo



-- 
Thanks,
~Nick Desaulniers

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-04-15 16:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 23:06 [PATCH] arm64: vdso32: drop -no-integrated-as flag Nick Desaulniers
2021-04-13 23:06 ` Nick Desaulniers
2021-04-13 23:12 ` Nathan Chancellor
2021-04-13 23:12   ` Nathan Chancellor
2021-04-14 21:45   ` [PATCH v2] " Nick Desaulniers
2021-04-14 21:45     ` Nick Desaulniers
2021-04-15  0:17     ` Nathan Chancellor
2021-04-15  0:17       ` Nathan Chancellor
2021-04-15 13:31     ` Vincenzo Frascino
2021-04-15 13:31       ` Vincenzo Frascino
2021-04-15 16:52       ` Nick Desaulniers
2021-04-15 16:52         ` Nick Desaulniers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.