* [PATCH bpf-next 1/6] tools: Factor HOSTCC, HOSTLD, HOSTAR definitions
[not found] <20200827153629.3820891-1-jean-philippe@linaro.org>
@ 2020-08-27 15:36 ` Jean-Philippe Brucker
2020-08-27 17:44 ` Rafael J. Wysocki
2020-08-27 18:35 ` Jiri Olsa
0 siblings, 2 replies; 3+ messages in thread
From: Jean-Philippe Brucker @ 2020-08-27 15:36 UTC (permalink / raw)
To: ast, daniel
Cc: bpf, kafai, songliubraving, yhs, andriin, john.fastabend,
kpsingh, Jean-Philippe Brucker, Josh Poimboeuf, Peter Zijlstra,
Ingo Molnar, Arnaldo Carvalho de Melo, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Namhyung Kim, Robert Moore,
Erik Kaneda, Rafael J. Wysocki, Len Brown, linux-acpi, devel
Several Makefiles in tools/ need to define the host toolchain variables.
Move their definition to tools/scripts/Makefile.include
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Robert Moore <robert.moore@intel.com>
Cc: Erik Kaneda <erik.kaneda@intel.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Cc: devel@acpica.org
---
tools/bpf/resolve_btfids/Makefile | 9 ---------
tools/build/Makefile | 4 ----
tools/objtool/Makefile | 9 ---------
tools/perf/Makefile.perf | 4 ----
tools/power/acpi/Makefile.config | 1 -
tools/scripts/Makefile.include | 10 ++++++++++
6 files changed, 10 insertions(+), 27 deletions(-)
diff --git a/tools/bpf/resolve_btfids/Makefile b/tools/bpf/resolve_btfids/Makefile
index a88cd4426398..b06935578a96 100644
--- a/tools/bpf/resolve_btfids/Makefile
+++ b/tools/bpf/resolve_btfids/Makefile
@@ -17,15 +17,6 @@ else
endif
# always use the host compiler
-ifneq ($(LLVM),)
-HOSTAR ?= llvm-ar
-HOSTCC ?= clang
-HOSTLD ?= ld.lld
-else
-HOSTAR ?= ar
-HOSTCC ?= gcc
-HOSTLD ?= ld
-endif
AR = $(HOSTAR)
CC = $(HOSTCC)
LD = $(HOSTLD)
diff --git a/tools/build/Makefile b/tools/build/Makefile
index 727050c40f09..8a55378e8b7c 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -15,10 +15,6 @@ endef
$(call allow-override,CC,$(CROSS_COMPILE)gcc)
$(call allow-override,LD,$(CROSS_COMPILE)ld)
-HOSTCC ?= gcc
-HOSTLD ?= ld
-HOSTAR ?= ar
-
export HOSTCC HOSTLD HOSTAR
ifeq ($(V),1)
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 7770edcda3a0..b7cb4f26ccde 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -3,15 +3,6 @@ include ../scripts/Makefile.include
include ../scripts/Makefile.arch
# always use the host compiler
-ifneq ($(LLVM),)
-HOSTAR ?= llvm-ar
-HOSTCC ?= clang
-HOSTLD ?= ld.lld
-else
-HOSTAR ?= ar
-HOSTCC ?= gcc
-HOSTLD ?= ld
-endif
AR = $(HOSTAR)
CC = $(HOSTCC)
LD = $(HOSTLD)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 6031167939ae..43e90334a54e 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -175,10 +175,6 @@ endef
LD += $(EXTRA_LDFLAGS)
-HOSTCC ?= gcc
-HOSTLD ?= ld
-HOSTAR ?= ar
-
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
LLVM_CONFIG ?= llvm-config
diff --git a/tools/power/acpi/Makefile.config b/tools/power/acpi/Makefile.config
index 54a2857c2510..331f6d30f472 100644
--- a/tools/power/acpi/Makefile.config
+++ b/tools/power/acpi/Makefile.config
@@ -54,7 +54,6 @@ INSTALL_SCRIPT = ${INSTALL_PROGRAM}
CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
CROSS_COMPILE ?= $(CROSS)
LD = $(CC)
-HOSTCC = gcc
# check if compiler option is supported
cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -x c /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index a7974638561c..1358e89cdf7d 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -59,6 +59,16 @@ $(call allow-override,LD,$(CROSS_COMPILE)ld)
$(call allow-override,CXX,$(CROSS_COMPILE)g++)
$(call allow-override,STRIP,$(CROSS_COMPILE)strip)
+ifneq ($(LLVM),)
+HOSTAR ?= llvm-ar
+HOSTCC ?= clang
+HOSTLD ?= ld.lld
+else
+HOSTAR ?= ar
+HOSTCC ?= gcc
+HOSTLD ?= ld
+endif
+
ifeq ($(CC_NO_CLANG), 1)
EXTRA_WARNINGS += -Wstrict-aliasing=3
endif
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next 1/6] tools: Factor HOSTCC, HOSTLD, HOSTAR definitions
2020-08-27 15:36 ` [PATCH bpf-next 1/6] tools: Factor HOSTCC, HOSTLD, HOSTAR definitions Jean-Philippe Brucker
@ 2020-08-27 17:44 ` Rafael J. Wysocki
2020-08-27 18:35 ` Jiri Olsa
1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2020-08-27 17:44 UTC (permalink / raw)
To: Jean-Philippe Brucker, ast, daniel
Cc: bpf, kafai, songliubraving, yhs, andriin, john.fastabend,
kpsingh, Josh Poimboeuf, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Namhyung Kim, Robert Moore, Erik Kaneda, Len Brown,
linux-acpi, devel
On 8/27/2020 5:36 PM, Jean-Philippe Brucker wrote:
> Several Makefiles in tools/ need to define the host toolchain variables.
> Move their definition to tools/scripts/Makefile.include
>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> ---
> Cc: Josh Poimboeuf <jpoimboe@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Robert Moore <robert.moore@intel.com>
> Cc: Erik Kaneda <erik.kaneda@intel.com>
> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> Cc: Len Brown <lenb@kernel.org>
> Cc: linux-acpi@vger.kernel.org
> Cc: devel@acpica.org
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
for the ACPI part.
> ---
> tools/bpf/resolve_btfids/Makefile | 9 ---------
> tools/build/Makefile | 4 ----
> tools/objtool/Makefile | 9 ---------
> tools/perf/Makefile.perf | 4 ----
> tools/power/acpi/Makefile.config | 1 -
> tools/scripts/Makefile.include | 10 ++++++++++
> 6 files changed, 10 insertions(+), 27 deletions(-)
>
> diff --git a/tools/bpf/resolve_btfids/Makefile b/tools/bpf/resolve_btfids/Makefile
> index a88cd4426398..b06935578a96 100644
> --- a/tools/bpf/resolve_btfids/Makefile
> +++ b/tools/bpf/resolve_btfids/Makefile
> @@ -17,15 +17,6 @@ else
> endif
>
> # always use the host compiler
> -ifneq ($(LLVM),)
> -HOSTAR ?= llvm-ar
> -HOSTCC ?= clang
> -HOSTLD ?= ld.lld
> -else
> -HOSTAR ?= ar
> -HOSTCC ?= gcc
> -HOSTLD ?= ld
> -endif
> AR = $(HOSTAR)
> CC = $(HOSTCC)
> LD = $(HOSTLD)
> diff --git a/tools/build/Makefile b/tools/build/Makefile
> index 727050c40f09..8a55378e8b7c 100644
> --- a/tools/build/Makefile
> +++ b/tools/build/Makefile
> @@ -15,10 +15,6 @@ endef
> $(call allow-override,CC,$(CROSS_COMPILE)gcc)
> $(call allow-override,LD,$(CROSS_COMPILE)ld)
>
> -HOSTCC ?= gcc
> -HOSTLD ?= ld
> -HOSTAR ?= ar
> -
> export HOSTCC HOSTLD HOSTAR
>
> ifeq ($(V),1)
> diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
> index 7770edcda3a0..b7cb4f26ccde 100644
> --- a/tools/objtool/Makefile
> +++ b/tools/objtool/Makefile
> @@ -3,15 +3,6 @@ include ../scripts/Makefile.include
> include ../scripts/Makefile.arch
>
> # always use the host compiler
> -ifneq ($(LLVM),)
> -HOSTAR ?= llvm-ar
> -HOSTCC ?= clang
> -HOSTLD ?= ld.lld
> -else
> -HOSTAR ?= ar
> -HOSTCC ?= gcc
> -HOSTLD ?= ld
> -endif
> AR = $(HOSTAR)
> CC = $(HOSTCC)
> LD = $(HOSTLD)
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 6031167939ae..43e90334a54e 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -175,10 +175,6 @@ endef
>
> LD += $(EXTRA_LDFLAGS)
>
> -HOSTCC ?= gcc
> -HOSTLD ?= ld
> -HOSTAR ?= ar
> -
> PKG_CONFIG = $(CROSS_COMPILE)pkg-config
> LLVM_CONFIG ?= llvm-config
>
> diff --git a/tools/power/acpi/Makefile.config b/tools/power/acpi/Makefile.config
> index 54a2857c2510..331f6d30f472 100644
> --- a/tools/power/acpi/Makefile.config
> +++ b/tools/power/acpi/Makefile.config
> @@ -54,7 +54,6 @@ INSTALL_SCRIPT = ${INSTALL_PROGRAM}
> CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
> CROSS_COMPILE ?= $(CROSS)
> LD = $(CC)
> -HOSTCC = gcc
>
> # check if compiler option is supported
> cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -x c /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
> diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
> index a7974638561c..1358e89cdf7d 100644
> --- a/tools/scripts/Makefile.include
> +++ b/tools/scripts/Makefile.include
> @@ -59,6 +59,16 @@ $(call allow-override,LD,$(CROSS_COMPILE)ld)
> $(call allow-override,CXX,$(CROSS_COMPILE)g++)
> $(call allow-override,STRIP,$(CROSS_COMPILE)strip)
>
> +ifneq ($(LLVM),)
> +HOSTAR ?= llvm-ar
> +HOSTCC ?= clang
> +HOSTLD ?= ld.lld
> +else
> +HOSTAR ?= ar
> +HOSTCC ?= gcc
> +HOSTLD ?= ld
> +endif
> +
> ifeq ($(CC_NO_CLANG), 1)
> EXTRA_WARNINGS += -Wstrict-aliasing=3
> endif
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next 1/6] tools: Factor HOSTCC, HOSTLD, HOSTAR definitions
2020-08-27 15:36 ` [PATCH bpf-next 1/6] tools: Factor HOSTCC, HOSTLD, HOSTAR definitions Jean-Philippe Brucker
2020-08-27 17:44 ` Rafael J. Wysocki
@ 2020-08-27 18:35 ` Jiri Olsa
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2020-08-27 18:35 UTC (permalink / raw)
To: Jean-Philippe Brucker
Cc: ast, daniel, bpf, kafai, songliubraving, yhs, andriin,
john.fastabend, kpsingh, Josh Poimboeuf, Peter Zijlstra,
Ingo Molnar, Arnaldo Carvalho de Melo, Mark Rutland,
Alexander Shishkin, Namhyung Kim, Robert Moore, Erik Kaneda,
Rafael J. Wysocki, Len Brown, linux-acpi, devel
On Thu, Aug 27, 2020 at 05:36:25PM +0200, Jean-Philippe Brucker wrote:
> Several Makefiles in tools/ need to define the host toolchain variables.
> Move their definition to tools/scripts/Makefile.include
>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
for perf and resolve_btfids
Acked-by: Jiri Olsa <jolsa@redhat.com>
thanks,
jirka
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-27 18:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200827153629.3820891-1-jean-philippe@linaro.org>
2020-08-27 15:36 ` [PATCH bpf-next 1/6] tools: Factor HOSTCC, HOSTLD, HOSTAR definitions Jean-Philippe Brucker
2020-08-27 17:44 ` Rafael J. Wysocki
2020-08-27 18:35 ` Jiri Olsa
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).