* [PATCH v5 0/4] powerpc patches for new Kconfig language
@ 2018-05-30 12:19 Nicholas Piggin
2018-05-30 12:19 ` [PATCH v5 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile Nicholas Piggin
` (4 more replies)
0 siblings, 5 replies; 25+ messages in thread
From: Nicholas Piggin @ 2018-05-30 12:19 UTC (permalink / raw)
To: linux-kbuild
Cc: Nicholas Piggin, linuxppc-dev, Masahiro Yamada, Segher Boessenkool
This series of patches improves th powerpc kbuild system. The
motivation was to to be compatible with the new Kconfig scripting
language that Yamada-san has implemented here for merge:
https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=kconfig
I have tested on top of that tree, powerpc now builds there.
To avoid build breakage, the first 3 patches must go before the
kconfig change, and the 4th patch must go after it.
v5 changes:
- Patch 4 update to syntax changed since kconfig-shell-v3 release.
- Patch 4 suggestions from Masahiro Yamada, remove unnecessary "OK"
output from check mprofile script, and fold CC_USING_MPROFILE_KERNEL
into CONFIG_MPROFILE_KERNEL.
- Reduce whitespace disturbance in patch 1.
Thanks,
Nick
Nicholas Piggin (4):
powerpc/kbuild: set default generic machine type for 32-bit compile
powerpc/kbuild: remove CROSS32 defines from top level powerpc Makefile
powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS
powerpc/kbuild: move -mprofile-kernel check to Kconfig
arch/powerpc/Kconfig | 16 +------
arch/powerpc/Makefile | 44 ++++++++-----------
arch/powerpc/boot/Makefile | 16 ++++---
arch/powerpc/include/asm/module.h | 2 +-
arch/powerpc/kernel/module_64.c | 4 +-
arch/powerpc/kernel/trace/ftrace.c | 6 +--
arch/powerpc/kernel/vdso32/Makefile | 15 +++++--
.../tools/gcc-check-mprofile-kernel.sh | 13 +++---
scripts/recordmcount.pl | 18 +++++++-
9 files changed, 72 insertions(+), 62 deletions(-)
--
2.17.0
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v5 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile
2018-05-30 12:19 [PATCH v5 0/4] powerpc patches for new Kconfig language Nicholas Piggin
@ 2018-05-30 12:19 ` Nicholas Piggin
2018-05-30 14:30 ` Masahiro Yamada
` (2 more replies)
2018-05-30 12:19 ` [PATCH v5 2/4] powerpc/kbuild: remove CROSS32 defines from top level powerpc Makefile Nicholas Piggin
` (3 subsequent siblings)
4 siblings, 3 replies; 25+ messages in thread
From: Nicholas Piggin @ 2018-05-30 12:19 UTC (permalink / raw)
To: linux-kbuild
Cc: Nicholas Piggin, linuxppc-dev, Masahiro Yamada, Segher Boessenkool
Some 64-bit toolchains uses the wrong ISA variant for compiling 32-bit
kernels, even with -m32. Debian's powerpc64le is one such case, and
that is because it is built with --with-cpu=power8.
So when cross compiling a 32-bit kernel with a 64-bit toolchain, set
-mcpu=powerpc initially, which is the generic 32-bit powerpc machine
type and scheduling model. CPU and platform code can override this
with subsequent -mcpu flags if necessary.
This is not done for 32-bit toolchains otherwise it would override
their defaults, which are presumably set appropriately for the
environment (moreso than a 64-bit cross compiler).
This fixes a lot of build failures due to incompatible assembly when
compiling 32-bit kernel with th Debian powerpc64le 64-bit toolchain.
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Since v1: reworded changelog to explain the cause of the problem (thanks
Segher) and moved the flags into the 64-32 cross compile case.
---
arch/powerpc/Makefile | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 95813df90801..d628724087c6 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -24,6 +24,14 @@ ifeq ($(HAS_BIARCH),y)
ifeq ($(CROSS32_COMPILE),)
CROSS32CC := $(CC) -m32
KBUILD_ARFLAGS += --target=elf32-powerpc
+ifdef CONFIG_PPC32
+# These options will be overridden by any -mcpu option that the CPU
+# or platform code sets later on the command line, but they are needed
+# to set a sane 32-bit cpu target for the 64-bit cross compiler which
+# may default to the wrong ISA.
+KBUILD_CFLAGS += -mcpu=powerpc
+KBUILD_AFLAGS += -mcpu=powerpc
+endif
endif
endif
--
2.17.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v5 2/4] powerpc/kbuild: remove CROSS32 defines from top level powerpc Makefile
2018-05-30 12:19 [PATCH v5 0/4] powerpc patches for new Kconfig language Nicholas Piggin
2018-05-30 12:19 ` [PATCH v5 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile Nicholas Piggin
@ 2018-05-30 12:19 ` Nicholas Piggin
2018-06-04 14:11 ` Michael Ellerman
2018-05-30 12:19 ` [PATCH v5 3/4] powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS Nicholas Piggin
` (2 subsequent siblings)
4 siblings, 1 reply; 25+ messages in thread
From: Nicholas Piggin @ 2018-05-30 12:19 UTC (permalink / raw)
To: linux-kbuild
Cc: Nicholas Piggin, linuxppc-dev, Masahiro Yamada, Segher Boessenkool
Switch VDSO32 build over to use CROSS32_COMPILE directly, and have
it pass in -m32 after the standard c_flags. This allows endianness
overrides to be removed and the endian and bitness flags moved into
standard flags variables.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/Makefile | 7 -------
arch/powerpc/boot/Makefile | 16 +++++++++++-----
arch/powerpc/kernel/vdso32/Makefile | 15 +++++++++++----
3 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index d628724087c6..167b26a0780c 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -17,13 +17,8 @@ HAS_BIARCH := $(call cc-option-yn, -m32)
# Set default 32 bits cross compilers for vdso and boot wrapper
CROSS32_COMPILE ?=
-CROSS32CC := $(CROSS32_COMPILE)gcc
-CROSS32AR := $(CROSS32_COMPILE)ar
-
ifeq ($(HAS_BIARCH),y)
ifeq ($(CROSS32_COMPILE),)
-CROSS32CC := $(CC) -m32
-KBUILD_ARFLAGS += --target=elf32-powerpc
ifdef CONFIG_PPC32
# These options will be overridden by any -mcpu option that the CPU
# or platform code sets later on the command line, but they are needed
@@ -35,8 +30,6 @@ endif
endif
endif
-export CROSS32CC CROSS32AR
-
ifeq ($(CROSS_COMPILE),)
KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
else
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 26d5d2a5b8e9..49767e06202c 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -23,19 +23,23 @@ all: $(obj)/zImage
compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP
compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ
+ifdef CROSS32_COMPILE
+ BOOTCC := $(CROSS32_COMPILE)gcc
+ BOOTAR := $(CROSS32_COMPILE)ar
+else
+ BOOTCC := $(CC)
+ BOOTAR := $(AR)
+endif
+
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -Os -msoft-float -pipe \
-fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
-D$(compress-y)
-BOOTCC := $(CC)
ifdef CONFIG_PPC64_BOOT_WRAPPER
BOOTCFLAGS += -m64
else
BOOTCFLAGS += -m32
-ifdef CROSS32_COMPILE
- BOOTCC := $(CROSS32_COMPILE)gcc
-endif
endif
BOOTCFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include)
@@ -49,6 +53,8 @@ endif
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
+BOOTARFLAGS := -cr$(KBUILD_ARFLAGS)
+
ifdef CONFIG_DEBUG_INFO
BOOTCFLAGS += -g
endif
@@ -202,7 +208,7 @@ quiet_cmd_bootas = BOOTAS $@
cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $<
quiet_cmd_bootar = BOOTAR $@
- cmd_bootar = $(CROSS32AR) -cr$(KBUILD_ARFLAGS) $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
+ cmd_bootar = $(BOOTAR) $(BOOTARFLAGS) $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
$(obj-libfdt): $(obj)/%.o: $(srctree)/scripts/dtc/libfdt/%.c FORCE
$(call if_changed_dep,bootcc)
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile
index b8c434d1d459..50112d4473bb 100644
--- a/arch/powerpc/kernel/vdso32/Makefile
+++ b/arch/powerpc/kernel/vdso32/Makefile
@@ -8,8 +8,15 @@ obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o \
# Build rules
-ifeq ($(CONFIG_PPC32),y)
-CROSS32CC := $(CC)
+ifdef CROSS32_COMPILE
+ VDSOCC := $(CROSS32_COMPILE)gcc
+else
+ VDSOCC := $(CC)
+endif
+
+CC32FLAGS :=
+ifdef CONFIG_PPC64
+CC32FLAGS += -m32
endif
targets := $(obj-vdso32) vdso32.so vdso32.so.dbg
@@ -45,9 +52,9 @@ $(obj-vdso32): %.o: %.S FORCE
# actual build commands
quiet_cmd_vdso32ld = VDSO32L $@
- cmd_vdso32ld = $(CROSS32CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^)
+ cmd_vdso32ld = $(VDSOCC) $(c_flags) $(CC32FLAGS) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^)
quiet_cmd_vdso32as = VDSO32A $@
- cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $<
+ cmd_vdso32as = $(VDSOCC) $(a_flags) $(CC32FLAGS) -c -o $@ $<
# install commands for the unstripped file
quiet_cmd_vdso_install = INSTALL $@
--
2.17.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v5 3/4] powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS
2018-05-30 12:19 [PATCH v5 0/4] powerpc patches for new Kconfig language Nicholas Piggin
2018-05-30 12:19 ` [PATCH v5 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile Nicholas Piggin
2018-05-30 12:19 ` [PATCH v5 2/4] powerpc/kbuild: remove CROSS32 defines from top level powerpc Makefile Nicholas Piggin
@ 2018-05-30 12:19 ` Nicholas Piggin
2018-05-30 14:34 ` Masahiro Yamada
2018-06-04 14:11 ` Michael Ellerman
2018-05-30 12:19 ` [PATCH v5 4/4] powerpc/kbuild: move -mprofile-kernel check to Kconfig Nicholas Piggin
2018-05-30 14:39 ` Michael Ellerman
4 siblings, 2 replies; 25+ messages in thread
From: Nicholas Piggin @ 2018-05-30 12:19 UTC (permalink / raw)
To: linux-kbuild
Cc: Nicholas Piggin, linuxppc-dev, Masahiro Yamada, Segher Boessenkool
The powerpc toolchain can compile combinations of 32/64 bit and
big/little endian, so it's convenient to consider, e.g.,
`CC -m64 -mbig-endian`
To be the C compiler for the purpose of invoking it to build target
artifacts. So overriding the the CC variable to include thse flags
works for this purpose.
Unfortunately that is not compatible with the way the proposed new
Kconfig macro language will work.
After previous patches in this series, these flags can be carefully
passed in using flags instead.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Since v1: removed extra -EB in the recordmcount script (thanks mpe)
---
arch/powerpc/Makefile | 16 +++++++++-------
.../powerpc/tools/gcc-check-mprofile-kernel.sh | 12 ++++++++----
scripts/recordmcount.pl | 18 +++++++++++++++++-
3 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 167b26a0780c..6faf1d6ad9dd 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -75,13 +75,15 @@ endif
endif
ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
-override LD += -EL
+KBUILD_CFLAGS += -mlittle-endian
+LDFLAGS += -EL
LDEMULATION := lppc
GNUTARGET := powerpcle
MULTIPLEWORD := -mno-multiple
KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-save-toc-indirect)
else
-override LD += -EB
+KBUILD_CFLAGS += $(call cc-option,-mbig-endian)
+LDFLAGS += -EB
LDEMULATION := ppc
GNUTARGET := powerpc
MULTIPLEWORD := -mmultiple
@@ -94,19 +96,19 @@ aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1)
aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mabi=elfv2
endif
-cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
-cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian)
ifneq ($(cc-name),clang)
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mno-strict-align
endif
+cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian)
+cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian)
aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
ifeq ($(HAS_BIARCH),y)
-override AS += -a$(BITS)
-override LD += -m elf$(BITS)$(LDEMULATION)
-override CC += -m$(BITS)
+KBUILD_CFLAGS += -m$(BITS)
+KBUILD_AFLAGS += -m$(BITS) -Wl,-a$(BITS)
+LDFLAGS += -m elf$(BITS)$(LDEMULATION)
KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET)
endif
diff --git a/arch/powerpc/tools/gcc-check-mprofile-kernel.sh b/arch/powerpc/tools/gcc-check-mprofile-kernel.sh
index 061f8035bdbe..a7dd0e5d9f98 100755
--- a/arch/powerpc/tools/gcc-check-mprofile-kernel.sh
+++ b/arch/powerpc/tools/gcc-check-mprofile-kernel.sh
@@ -7,17 +7,21 @@ set -o pipefail
# To debug, uncomment the following line
# set -x
+# -mprofile-kernel is only supported on 64le, so this should not be invoked
+# for other targets. Therefore we can pass in -m64 and -mlittle-endian
+# explicitly, to take care of toolchains defaulting to other targets.
+
# Test whether the compile option -mprofile-kernel exists and generates
# profiling code (ie. a call to _mcount()).
echo "int func() { return 0; }" | \
- $* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \
- grep -q "_mcount"
+ $* -m64 -mlittle-endian -S -x c -O2 -p -mprofile-kernel - -o - \
+ 2> /dev/null | grep -q "_mcount"
# Test whether the notrace attribute correctly suppresses calls to _mcount().
echo -e "#include <linux/compiler.h>\nnotrace int func() { return 0; }" | \
- $* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \
- grep -q "_mcount" && \
+ $* -m64 -mlittle-endian -S -x c -O2 -p -mprofile-kernel - -o - \
+ 2> /dev/null | grep -q "_mcount" && \
exit 1
echo "OK"
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 191eb949d52c..fe06e77c15eb 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -266,13 +266,29 @@ if ($arch eq "x86_64") {
$objcopy .= " -O elf32-sh-linux";
} elsif ($arch eq "powerpc") {
+ my $ldemulation;
+
$local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\.?\\S+)";
# See comment in the sparc64 section for why we use '\w'.
$function_regex = "^([0-9a-fA-F]+)\\s+<(\\.?\\w*?)>:";
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s\\.?_mcount\$";
+ if ($endian eq "big") {
+ $cc .= " -mbig-endian ";
+ $ld .= " -EB ";
+ $ldemulation = "ppc"
+ } else {
+ $cc .= " -mlittle-endian ";
+ $ld .= " -EL ";
+ $ldemulation = "lppc"
+ }
if ($bits == 64) {
- $type = ".quad";
+ $type = ".quad";
+ $cc .= " -m64 ";
+ $ld .= " -m elf64".$ldemulation." ";
+ } else {
+ $cc .= " -m32 ";
+ $ld .= " -m elf32".$ldemulation." ";
}
} elsif ($arch eq "arm") {
--
2.17.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v5 4/4] powerpc/kbuild: move -mprofile-kernel check to Kconfig
2018-05-30 12:19 [PATCH v5 0/4] powerpc patches for new Kconfig language Nicholas Piggin
` (2 preceding siblings ...)
2018-05-30 12:19 ` [PATCH v5 3/4] powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS Nicholas Piggin
@ 2018-05-30 12:19 ` Nicholas Piggin
2018-05-30 14:39 ` Michael Ellerman
4 siblings, 0 replies; 25+ messages in thread
From: Nicholas Piggin @ 2018-05-30 12:19 UTC (permalink / raw)
To: linux-kbuild
Cc: Nicholas Piggin, linuxppc-dev, Masahiro Yamada, Segher Boessenkool
This eliminates the workaround that requires disabling
-mprofile-kernel by default in Kconfig.
[ Note: this depends on https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kconfig-shell-v3 ]
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/Kconfig | 16 +---------------
arch/powerpc/Makefile | 13 +------------
arch/powerpc/include/asm/module.h | 2 +-
arch/powerpc/kernel/module_64.c | 4 ++--
arch/powerpc/kernel/trace/ftrace.c | 6 +++---
arch/powerpc/tools/gcc-check-mprofile-kernel.sh | 1 -
6 files changed, 8 insertions(+), 34 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 0cc41146bc51..736fe35a657d 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -461,23 +461,9 @@ config LD_HEAD_STUB_CATCH
If unsure, say "N".
-config DISABLE_MPROFILE_KERNEL
- bool "Disable use of mprofile-kernel for kernel tracing"
- depends on PPC64 && CPU_LITTLE_ENDIAN
- default y
- help
- Selecting this options disables use of the mprofile-kernel ABI for
- kernel tracing. That will cause options such as live patching
- (CONFIG_LIVEPATCH) which depend on CONFIG_DYNAMIC_FTRACE_WITH_REGS to
- be disabled also.
-
- If you have a toolchain which supports mprofile-kernel, then you can
- disable this. Otherwise leave it enabled. If you're not sure, say
- "Y".
-
config MPROFILE_KERNEL
depends on PPC64 && CPU_LITTLE_ENDIAN
- def_bool !DISABLE_MPROFILE_KERNEL
+ def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -I$(srctree)/include -D__KERNEL__)
config IOMMU_HELPER
def_bool PPC64
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 6faf1d6ad9dd..8eda91e0b8df 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -161,18 +161,7 @@ CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
endif
ifdef CONFIG_MPROFILE_KERNEL
- ifeq ($(shell $(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -I$(srctree)/include -D__KERNEL__),OK)
- CC_FLAGS_FTRACE := -pg -mprofile-kernel
- KBUILD_CPPFLAGS += -DCC_USING_MPROFILE_KERNEL
- else
- # If the user asked for mprofile-kernel but the toolchain doesn't
- # support it, emit a warning and deliberately break the build later
- # with mprofile-kernel-not-supported. We would prefer to make this an
- # error right here, but then the user would never be able to run
- # oldconfig to change their configuration.
- $(warning Compiler does not support mprofile-kernel, set CONFIG_DISABLE_MPROFILE_KERNEL)
- CC_FLAGS_FTRACE := -mprofile-kernel-not-supported
- endif
+ CC_FLAGS_FTRACE := -pg -mprofile-kernel
endif
CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell)
diff --git a/arch/powerpc/include/asm/module.h b/arch/powerpc/include/asm/module.h
index 4f6573934792..c38b125b7a57 100644
--- a/arch/powerpc/include/asm/module.h
+++ b/arch/powerpc/include/asm/module.h
@@ -14,7 +14,7 @@
#include <asm-generic/module.h>
-#ifdef CC_USING_MPROFILE_KERNEL
+#ifdef CONFIG_MPROFILE_KERNEL
#define MODULE_ARCH_VERMAGIC_FTRACE "mprofile-kernel "
#else
#define MODULE_ARCH_VERMAGIC_FTRACE ""
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index a2636c250b7b..55bccc315e1a 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -462,7 +462,7 @@ static unsigned long stub_for_addr(const Elf64_Shdr *sechdrs,
return (unsigned long)&stubs[i];
}
-#ifdef CC_USING_MPROFILE_KERNEL
+#ifdef CONFIG_MPROFILE_KERNEL
static bool is_early_mcount_callsite(u32 *instruction)
{
/*
@@ -746,7 +746,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
#ifdef CONFIG_DYNAMIC_FTRACE
-#ifdef CC_USING_MPROFILE_KERNEL
+#ifdef CONFIG_MPROFILE_KERNEL
#define PACATOC offsetof(struct paca_struct, kernel_toc)
diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/trace/ftrace.c
index 4741fe112f05..b2272308225a 100644
--- a/arch/powerpc/kernel/trace/ftrace.c
+++ b/arch/powerpc/kernel/trace/ftrace.c
@@ -144,7 +144,7 @@ __ftrace_make_nop(struct module *mod,
return -EINVAL;
}
-#ifdef CC_USING_MPROFILE_KERNEL
+#ifdef CONFIG_MPROFILE_KERNEL
/* When using -mkernel_profile there is no load to jump over */
pop = PPC_INST_NOP;
@@ -188,7 +188,7 @@ __ftrace_make_nop(struct module *mod,
pr_err("Expected %08x found %08x\n", PPC_INST_LD_TOC, op);
return -EINVAL;
}
-#endif /* CC_USING_MPROFILE_KERNEL */
+#endif /* CONFIG_MPROFILE_KERNEL */
if (patch_instruction((unsigned int *)ip, pop)) {
pr_err("Patching NOP failed.\n");
@@ -324,7 +324,7 @@ int ftrace_make_nop(struct module *mod,
* They should effectively be a NOP, and follow formal constraints,
* depending on the ABI. Return false if they don't.
*/
-#ifndef CC_USING_MPROFILE_KERNEL
+#ifndef CONFIG_MPROFILE_KERNEL
static int
expected_nop_sequence(void *ip, unsigned int op0, unsigned int op1)
{
diff --git a/arch/powerpc/tools/gcc-check-mprofile-kernel.sh b/arch/powerpc/tools/gcc-check-mprofile-kernel.sh
index a7dd0e5d9f98..137f3376ac2b 100755
--- a/arch/powerpc/tools/gcc-check-mprofile-kernel.sh
+++ b/arch/powerpc/tools/gcc-check-mprofile-kernel.sh
@@ -24,5 +24,4 @@ echo -e "#include <linux/compiler.h>\nnotrace int func() { return 0; }" | \
2> /dev/null | grep -q "_mcount" && \
exit 1
-echo "OK"
exit 0
--
2.17.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH v5 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile
2018-05-30 12:19 ` [PATCH v5 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile Nicholas Piggin
@ 2018-05-30 14:30 ` Masahiro Yamada
2018-05-30 14:32 ` Masahiro Yamada
2018-06-04 14:11 ` Michael Ellerman
2 siblings, 0 replies; 25+ messages in thread
From: Masahiro Yamada @ 2018-05-30 14:30 UTC (permalink / raw)
To: Nicholas Piggin
Cc: Linux Kbuild mailing list, linuxppc-dev, Segher Boessenkool
2018-05-30 21:19 GMT+09:00 Nicholas Piggin <npiggin@gmail.com>:
> Some 64-bit toolchains uses the wrong ISA variant for compiling 32-bit
> kernels, even with -m32. Debian's powerpc64le is one such case, and
> that is because it is built with --with-cpu=power8.
>
> So when cross compiling a 32-bit kernel with a 64-bit toolchain, set
> -mcpu=powerpc initially, which is the generic 32-bit powerpc machine
> type and scheduling model. CPU and platform code can override this
> with subsequent -mcpu flags if necessary.
>
> This is not done for 32-bit toolchains otherwise it would override
> their defaults, which are presumably set appropriately for the
> environment (moreso than a 64-bit cross compiler).
>
> This fixes a lot of build failures due to incompatible assembly when
> compiling 32-bit kernel with th Debian powerpc64le 64-bit toolchain.
>
> Cc: Segher Boessenkool <segher@kernel.crashing.org>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>
> Since v1: reworded changelog to explain the cause of the problem (thanks
> Segher) and moved the flags into the 64-32 cross compile case.
> ---
> arch/powerpc/Makefile | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 95813df90801..d628724087c6 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -24,6 +24,14 @@ ifeq ($(HAS_BIARCH),y)
> ifeq ($(CROSS32_COMPILE),)
> CROSS32CC := $(CC) -m32
> KBUILD_ARFLAGS += --target=elf32-powerpc
> +ifdef CONFIG_PPC32
> +# These options will be overridden by any -mcpu option that the CPU
> +# or platform code sets later on the command line, but they are needed
> +# to set a sane 32-bit cpu target for the 64-bit cross compiler which
> +# may default to the wrong ISA.
> +KBUILD_CFLAGS += -mcpu=powerpc
> +KBUILD_AFLAGS += -mcpu=powerpc
> +endif
> endif
> endif
>
> --
> 2.17.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
All applied to linux-kbuild/kconfig.
Thanks!
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile
2018-05-30 12:19 ` [PATCH v5 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile Nicholas Piggin
2018-05-30 14:30 ` Masahiro Yamada
@ 2018-05-30 14:32 ` Masahiro Yamada
2018-06-04 14:11 ` Michael Ellerman
2 siblings, 0 replies; 25+ messages in thread
From: Masahiro Yamada @ 2018-05-30 14:32 UTC (permalink / raw)
To: Nicholas Piggin
Cc: Linux Kbuild mailing list, linuxppc-dev, Segher Boessenkool
2018-05-30 21:19 GMT+09:00 Nicholas Piggin <npiggin@gmail.com>:
> Some 64-bit toolchains uses the wrong ISA variant for compiling 32-bit
> kernels, even with -m32. Debian's powerpc64le is one such case, and
> that is because it is built with --with-cpu=power8.
>
> So when cross compiling a 32-bit kernel with a 64-bit toolchain, set
> -mcpu=powerpc initially, which is the generic 32-bit powerpc machine
> type and scheduling model. CPU and platform code can override this
> with subsequent -mcpu flags if necessary.
>
> This is not done for 32-bit toolchains otherwise it would override
> their defaults, which are presumably set appropriately for the
> environment (moreso than a 64-bit cross compiler).
>
> This fixes a lot of build failures due to incompatible assembly when
> compiling 32-bit kernel with th Debian powerpc64le 64-bit toolchain.
When I applied this patch, I changed the following.
"th" -> "the"
Please let me know if my fix-up is bad.
> Cc: Segher Boessenkool <segher@kernel.crashing.org>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>
> Since v1: reworded changelog to explain the cause of the problem (thanks
> Segher) and moved the flags into the 64-32 cross compile case.
> ---
> arch/powerpc/Makefile | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 95813df90801..d628724087c6 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -24,6 +24,14 @@ ifeq ($(HAS_BIARCH),y)
> ifeq ($(CROSS32_COMPILE),)
> CROSS32CC := $(CC) -m32
> KBUILD_ARFLAGS += --target=elf32-powerpc
> +ifdef CONFIG_PPC32
> +# These options will be overridden by any -mcpu option that the CPU
> +# or platform code sets later on the command line, but they are needed
> +# to set a sane 32-bit cpu target for the 64-bit cross compiler which
> +# may default to the wrong ISA.
> +KBUILD_CFLAGS += -mcpu=powerpc
> +KBUILD_AFLAGS += -mcpu=powerpc
> +endif
> endif
> endif
>
> --
> 2.17.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 3/4] powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS
2018-05-30 12:19 ` [PATCH v5 3/4] powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS Nicholas Piggin
@ 2018-05-30 14:34 ` Masahiro Yamada
2018-06-04 14:11 ` Michael Ellerman
1 sibling, 0 replies; 25+ messages in thread
From: Masahiro Yamada @ 2018-05-30 14:34 UTC (permalink / raw)
To: Nicholas Piggin
Cc: Linux Kbuild mailing list, linuxppc-dev, Segher Boessenkool
2018-05-30 21:19 GMT+09:00 Nicholas Piggin <npiggin@gmail.com>:
> The powerpc toolchain can compile combinations of 32/64 bit and
> big/little endian, so it's convenient to consider, e.g.,
>
> `CC -m64 -mbig-endian`
>
> To be the C compiler for the purpose of invoking it to build target
> artifacts. So overriding the the CC variable to include thse flags
> works for this purpose.
When I applied this patch, I changed the following.
"the the" -> "the"
"thse" -> "these"
Please let me know if my fix-up is bad.
> Unfortunately that is not compatible with the way the proposed new
> Kconfig macro language will work.
>
> After previous patches in this series, these flags can be carefully
> passed in using flags instead.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>
> Since v1: removed extra -EB in the recordmcount script (thanks mpe)
> ---
> arch/powerpc/Makefile | 16 +++++++++-------
> .../powerpc/tools/gcc-check-mprofile-kernel.sh | 12 ++++++++----
> scripts/recordmcount.pl | 18 +++++++++++++++++-
> 3 files changed, 34 insertions(+), 12 deletions(-)
>
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 167b26a0780c..6faf1d6ad9dd 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -75,13 +75,15 @@ endif
> endif
>
> ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
> -override LD += -EL
> +KBUILD_CFLAGS += -mlittle-endian
> +LDFLAGS += -EL
> LDEMULATION := lppc
> GNUTARGET := powerpcle
> MULTIPLEWORD := -mno-multiple
> KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-save-toc-indirect)
> else
> -override LD += -EB
> +KBUILD_CFLAGS += $(call cc-option,-mbig-endian)
> +LDFLAGS += -EB
> LDEMULATION := ppc
> GNUTARGET := powerpc
> MULTIPLEWORD := -mmultiple
> @@ -94,19 +96,19 @@ aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1)
> aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mabi=elfv2
> endif
>
> -cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
> -cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian)
> ifneq ($(cc-name),clang)
> cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mno-strict-align
> endif
>
> +cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian)
> +cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
> aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian)
> aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
>
> ifeq ($(HAS_BIARCH),y)
> -override AS += -a$(BITS)
> -override LD += -m elf$(BITS)$(LDEMULATION)
> -override CC += -m$(BITS)
> +KBUILD_CFLAGS += -m$(BITS)
> +KBUILD_AFLAGS += -m$(BITS) -Wl,-a$(BITS)
> +LDFLAGS += -m elf$(BITS)$(LDEMULATION)
> KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET)
> endif
>
> diff --git a/arch/powerpc/tools/gcc-check-mprofile-kernel.sh b/arch/powerpc/tools/gcc-check-mprofile-kernel.sh
> index 061f8035bdbe..a7dd0e5d9f98 100755
> --- a/arch/powerpc/tools/gcc-check-mprofile-kernel.sh
> +++ b/arch/powerpc/tools/gcc-check-mprofile-kernel.sh
> @@ -7,17 +7,21 @@ set -o pipefail
> # To debug, uncomment the following line
> # set -x
>
> +# -mprofile-kernel is only supported on 64le, so this should not be invoked
> +# for other targets. Therefore we can pass in -m64 and -mlittle-endian
> +# explicitly, to take care of toolchains defaulting to other targets.
> +
> # Test whether the compile option -mprofile-kernel exists and generates
> # profiling code (ie. a call to _mcount()).
> echo "int func() { return 0; }" | \
> - $* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \
> - grep -q "_mcount"
> + $* -m64 -mlittle-endian -S -x c -O2 -p -mprofile-kernel - -o - \
> + 2> /dev/null | grep -q "_mcount"
>
> # Test whether the notrace attribute correctly suppresses calls to _mcount().
>
> echo -e "#include <linux/compiler.h>\nnotrace int func() { return 0; }" | \
> - $* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \
> - grep -q "_mcount" && \
> + $* -m64 -mlittle-endian -S -x c -O2 -p -mprofile-kernel - -o - \
> + 2> /dev/null | grep -q "_mcount" && \
> exit 1
>
> echo "OK"
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index 191eb949d52c..fe06e77c15eb 100755
> --- a/scripts/recordmcount.pl
> +++ b/scripts/recordmcount.pl
> @@ -266,13 +266,29 @@ if ($arch eq "x86_64") {
> $objcopy .= " -O elf32-sh-linux";
>
> } elsif ($arch eq "powerpc") {
> + my $ldemulation;
> +
> $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\.?\\S+)";
> # See comment in the sparc64 section for why we use '\w'.
> $function_regex = "^([0-9a-fA-F]+)\\s+<(\\.?\\w*?)>:";
> $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s\\.?_mcount\$";
>
> + if ($endian eq "big") {
> + $cc .= " -mbig-endian ";
> + $ld .= " -EB ";
> + $ldemulation = "ppc"
> + } else {
> + $cc .= " -mlittle-endian ";
> + $ld .= " -EL ";
> + $ldemulation = "lppc"
> + }
> if ($bits == 64) {
> - $type = ".quad";
> + $type = ".quad";
> + $cc .= " -m64 ";
> + $ld .= " -m elf64".$ldemulation." ";
> + } else {
> + $cc .= " -m32 ";
> + $ld .= " -m elf32".$ldemulation." ";
> }
>
> } elsif ($arch eq "arm") {
> --
> 2.17.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 0/4] powerpc patches for new Kconfig language
2018-05-30 12:19 [PATCH v5 0/4] powerpc patches for new Kconfig language Nicholas Piggin
@ 2018-05-30 14:39 ` Michael Ellerman
2018-05-30 12:19 ` [PATCH v5 2/4] powerpc/kbuild: remove CROSS32 defines from top level powerpc Makefile Nicholas Piggin
` (3 subsequent siblings)
4 siblings, 0 replies; 25+ messages in thread
From: Michael Ellerman @ 2018-05-30 14:39 UTC (permalink / raw)
To: Nicholas Piggin, linux-kbuild; +Cc: Masahiro Yamada, linuxppc-dev
Nicholas Piggin <npiggin@gmail.com> writes:
> This series of patches improves th powerpc kbuild system. The
> motivation was to to be compatible with the new Kconfig scripting
> language that Yamada-san has implemented here for merge:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=kconfig
>
> I have tested on top of that tree, powerpc now builds there.
>
> To avoid build breakage, the first 3 patches must go before the
> kconfig change, and the 4th patch must go after it.
>
> v5 changes:
> - Patch 4 update to syntax changed since kconfig-shell-v3 release.
> - Patch 4 suggestions from Masahiro Yamada, remove unnecessary "OK"
> output from check mprofile script, and fold CC_USING_MPROFILE_KERNEL
> into CONFIG_MPROFILE_KERNEL.
> - Reduce whitespace disturbance in patch 1.
I've put this series in a topic branch.
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/log/?h=topic/kbuild
I'll plan to merge the first three into the powerpc tree.
Masahiro, are you planning to merge your kconfig changes for 4.18? If so
you could merge the whole branch and everything should merge nicely.
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 0/4] powerpc patches for new Kconfig language
@ 2018-05-30 14:39 ` Michael Ellerman
0 siblings, 0 replies; 25+ messages in thread
From: Michael Ellerman @ 2018-05-30 14:39 UTC (permalink / raw)
To: Nicholas Piggin, linux-kbuild
Cc: Masahiro Yamada, linuxppc-dev, Nicholas Piggin
Nicholas Piggin <npiggin@gmail.com> writes:
> This series of patches improves th powerpc kbuild system. The
> motivation was to to be compatible with the new Kconfig scripting
> language that Yamada-san has implemented here for merge:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=kconfig
>
> I have tested on top of that tree, powerpc now builds there.
>
> To avoid build breakage, the first 3 patches must go before the
> kconfig change, and the 4th patch must go after it.
>
> v5 changes:
> - Patch 4 update to syntax changed since kconfig-shell-v3 release.
> - Patch 4 suggestions from Masahiro Yamada, remove unnecessary "OK"
> output from check mprofile script, and fold CC_USING_MPROFILE_KERNEL
> into CONFIG_MPROFILE_KERNEL.
> - Reduce whitespace disturbance in patch 1.
I've put this series in a topic branch.
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/log/?h=topic/kbuild
I'll plan to merge the first three into the powerpc tree.
Masahiro, are you planning to merge your kconfig changes for 4.18? If so
you could merge the whole branch and everything should merge nicely.
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 0/4] powerpc patches for new Kconfig language
2018-05-30 14:39 ` Michael Ellerman
(?)
@ 2018-05-30 14:57 ` Masahiro Yamada
2018-05-31 4:31 ` Michael Ellerman
-1 siblings, 1 reply; 25+ messages in thread
From: Masahiro Yamada @ 2018-05-30 14:57 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Nicholas Piggin, Linux Kbuild mailing list, linuxppc-dev
2018-05-30 23:39 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
> Nicholas Piggin <npiggin@gmail.com> writes:
>
>> This series of patches improves th powerpc kbuild system. The
>> motivation was to to be compatible with the new Kconfig scripting
>> language that Yamada-san has implemented here for merge:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=kconfig
>>
>> I have tested on top of that tree, powerpc now builds there.
>>
>> To avoid build breakage, the first 3 patches must go before the
>> kconfig change, and the 4th patch must go after it.
>>
>> v5 changes:
>> - Patch 4 update to syntax changed since kconfig-shell-v3 release.
>> - Patch 4 suggestions from Masahiro Yamada, remove unnecessary "OK"
>> output from check mprofile script, and fold CC_USING_MPROFILE_KERNEL
>> into CONFIG_MPROFILE_KERNEL.
>> - Reduce whitespace disturbance in patch 1.
>
> I've put this series in a topic branch.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/log/?h=topic/kbuild
No, you can't.
This series depends on my Kconfig work.
You queued it up on v4.17-rc3,
but necessary patches are not there.
You will get build errors.
>
> I'll plan to merge the first three into the powerpc tree.
Please do not do this.
You can issue Acked-by instead.
I need all the 4 patches to my tree.
Otherwise, the git-bisect'ability breaks for PowerPC.
See, the PPC breakage report from Stephen Rothwell
https://lkml.org/lkml/2018/5/29/1296
> Masahiro, are you planning to merge your kconfig changes for 4.18? If so
> you could merge the whole branch and everything should merge nicely.
Yes.
I already queued my and Nicholas' patches.
git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild kconfig
Nicholas,
Please check if the patch order is correct.
I need to insert 'powerpc/kbuild' patches between.
> cheers
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 0/4] powerpc patches for new Kconfig language
2018-05-30 14:57 ` Masahiro Yamada
@ 2018-05-31 4:31 ` Michael Ellerman
2018-05-31 5:00 ` Masahiro Yamada
0 siblings, 1 reply; 25+ messages in thread
From: Michael Ellerman @ 2018-05-31 4:31 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Nicholas Piggin, Linux Kbuild mailing list, linuxppc-dev
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> 2018-05-30 23:39 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
>> Nicholas Piggin <npiggin@gmail.com> writes:
>>
>>> This series of patches improves th powerpc kbuild system. The
>>> motivation was to to be compatible with the new Kconfig scripting
>>> language that Yamada-san has implemented here for merge:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=kconfig
>>>
>>> I have tested on top of that tree, powerpc now builds there.
>>>
>>> To avoid build breakage, the first 3 patches must go before the
>>> kconfig change, and the 4th patch must go after it.
>>>
>>> v5 changes:
>>> - Patch 4 update to syntax changed since kconfig-shell-v3 release.
>>> - Patch 4 suggestions from Masahiro Yamada, remove unnecessary "OK"
>>> output from check mprofile script, and fold CC_USING_MPROFILE_KERNEL
>>> into CONFIG_MPROFILE_KERNEL.
>>> - Reduce whitespace disturbance in patch 1.
>>
>> I've put this series in a topic branch.
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/log/?h=topic/kbuild
>
>
> No, you can't.
>
> This series depends on my Kconfig work.
The *last* commit depends on your work, the rest do not.
> You queued it up on v4.17-rc3,
> but necessary patches are not there.
>
> You will get build errors.
I do not get any build errors for the first three commits.
>> I'll plan to merge the first three into the powerpc tree.
>
> Please do not do this.
>
> You can issue Acked-by instead.
I'd prefer the first three commits were in my tree so they're tested
properly.
> I need all the 4 patches to my tree.
> Otherwise, the git-bisect'ability breaks for PowerPC.
You should merge all 4 into your tree, ie. all of my topic/kbuild
branch.
And, I'll merge the first 3 into my tree.
There should be no bisection breakage as a result.
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 0/4] powerpc patches for new Kconfig language
2018-05-31 4:31 ` Michael Ellerman
@ 2018-05-31 5:00 ` Masahiro Yamada
2018-05-31 11:51 ` Michael Ellerman
0 siblings, 1 reply; 25+ messages in thread
From: Masahiro Yamada @ 2018-05-31 5:00 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Nicholas Piggin, Linux Kbuild mailing list, linuxppc-dev
2018-05-31 13:31 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>> 2018-05-30 23:39 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
>>> Nicholas Piggin <npiggin@gmail.com> writes:
>>>
>>>> This series of patches improves th powerpc kbuild system. The
>>>> motivation was to to be compatible with the new Kconfig scripting
>>>> language that Yamada-san has implemented here for merge:
>>>>
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=kconfig
>>>>
>>>> I have tested on top of that tree, powerpc now builds there.
>>>>
>>>> To avoid build breakage, the first 3 patches must go before the
>>>> kconfig change, and the 4th patch must go after it.
>>>>
>>>> v5 changes:
>>>> - Patch 4 update to syntax changed since kconfig-shell-v3 release.
>>>> - Patch 4 suggestions from Masahiro Yamada, remove unnecessary "OK"
>>>> output from check mprofile script, and fold CC_USING_MPROFILE_KERNEL
>>>> into CONFIG_MPROFILE_KERNEL.
>>>> - Reduce whitespace disturbance in patch 1.
>>>
>>> I've put this series in a topic branch.
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/log/?h=topic/kbuild
>>
>>
>> No, you can't.
>>
>> This series depends on my Kconfig work.
>
> The *last* commit depends on your work, the rest do not.
>
>> You queued it up on v4.17-rc3,
>> but necessary patches are not there.
>>
>> You will get build errors.
>
> I do not get any build errors for the first three commits.
Right, the first three are fine.
If we make sure commit cfff26c2dc7a1
does not appear in Linus' tree,
we are good.
>>> I'll plan to merge the first three into the powerpc tree.
>>
>> Please do not do this.
>>
>> You can issue Acked-by instead.
>
> I'd prefer the first three commits were in my tree so they're tested
> properly.
>
>> I need all the 4 patches to my tree.
>> Otherwise, the git-bisect'ability breaks for PowerPC.
>
> You should merge all 4 into your tree, ie. all of my topic/kbuild
> branch.
This depends on what "merge" means.
If it means "git pull", I cannot pull your topic/kbuild branch
since it is broken.
masahiro@pug:~/ref/linux-ppc$ git log -1
commit cfff26c2dc7a18a4d10366896a68fb0ef9c793cb
Author: Nicholas Piggin <npiggin@gmail.com>
Date: Wed May 30 22:19:22 2018 +1000
powerpc/kbuild: move -mprofile-kernel check to Kconfig
This eliminates the workaround that requires disabling
-mprofile-kernel by default in Kconfig.
[ Note: this depends on
https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
kconfig-shell-v3 ]
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
masahiro@pug:~/ref/linux-ppc$ make ARCH=powerpc ppc64_defconfig
arch/powerpc/Kconfig:465:warning: ignoring unsupported character '$'
arch/powerpc/Kconfig:465:warning: ignoring unsupported character ','
arch/powerpc/Kconfig:465:warning: ignoring unsupported character '$'
arch/powerpc/Kconfig:466: syntax error
arch/powerpc/Kconfig:465:warning: ignoring unsupported character '$'
arch/powerpc/Kconfig:465:warning: ignoring unsupported character '$'
arch/powerpc/Kconfig:465: invalid option
scripts/kconfig/Makefile:122: recipe for target 'ppc64_defconfig' failed
make[1]: *** [ppc64_defconfig] Error 1
Makefile:525: recipe for target 'ppc64_defconfig' failed
make: *** [ppc64_defconfig] Error 2
So, how do you want me to handle the last patch?
I can pull the first three from your branch,
then I can cherry-pick the last one on top of my kconfig tree.
Is this what you mean?
> And, I'll merge the first 3 into my tree.
>
> There should be no bisection breakage as a result.
>
> cheers
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 0/4] powerpc patches for new Kconfig language
2018-05-31 5:00 ` Masahiro Yamada
@ 2018-05-31 11:51 ` Michael Ellerman
2018-05-31 13:08 ` Masahiro Yamada
0 siblings, 1 reply; 25+ messages in thread
From: Michael Ellerman @ 2018-05-31 11:51 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Nicholas Piggin, Linux Kbuild mailing list, linuxppc-dev
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> 2018-05-31 13:31 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
>> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>>> 2018-05-30 23:39 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
>>>> Nicholas Piggin <npiggin@gmail.com> writes:
>>>>
>>>>> This series of patches improves th powerpc kbuild system. The
>>>>> motivation was to to be compatible with the new Kconfig scripting
>>>>> language that Yamada-san has implemented here for merge:
>>>>>
>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=kconfig
>>>>>
>>>>> I have tested on top of that tree, powerpc now builds there.
>>>>>
>>>>> To avoid build breakage, the first 3 patches must go before the
>>>>> kconfig change, and the 4th patch must go after it.
>>>>>
>>>>> v5 changes:
>>>>> - Patch 4 update to syntax changed since kconfig-shell-v3 release.
>>>>> - Patch 4 suggestions from Masahiro Yamada, remove unnecessary "OK"
>>>>> output from check mprofile script, and fold CC_USING_MPROFILE_KERNEL
>>>>> into CONFIG_MPROFILE_KERNEL.
>>>>> - Reduce whitespace disturbance in patch 1.
>>>>
>>>> I've put this series in a topic branch.
>>>>
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/log/?h=topic/kbuild
>>>
>>>
>>> No, you can't.
>>>
>>> This series depends on my Kconfig work.
>>
>> The *last* commit depends on your work, the rest do not.
>>
>>> You queued it up on v4.17-rc3,
>>> but necessary patches are not there.
>>>
>>> You will get build errors.
>>
>> I do not get any build errors for the first three commits.
>
>
> Right, the first three are fine.
>
> If we make sure commit cfff26c2dc7a1
> does not appear in Linus' tree,
> we are good.
Yep agreed.
>>>> I'll plan to merge the first three into the powerpc tree.
>>>
>>> Please do not do this.
>>>
>>> You can issue Acked-by instead.
>>
>> I'd prefer the first three commits were in my tree so they're tested
>> properly.
>>
>>> I need all the 4 patches to my tree.
>>> Otherwise, the git-bisect'ability breaks for PowerPC.
>>
>> You should merge all 4 into your tree, ie. all of my topic/kbuild
>> branch.
>
> This depends on what "merge" means.
>
> If it means "git pull", I cannot pull your topic/kbuild branch
> since it is broken.
Yeah OK I understand what you mean now.
> So, how do you want me to handle the last patch?
>
> I can pull the first three from your branch,
> then I can cherry-pick the last one on top of my kconfig tree.
Yes, please do that.
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 0/4] powerpc patches for new Kconfig language
2018-05-31 11:51 ` Michael Ellerman
@ 2018-05-31 13:08 ` Masahiro Yamada
2018-06-01 10:34 ` Michael Ellerman
0 siblings, 1 reply; 25+ messages in thread
From: Masahiro Yamada @ 2018-05-31 13:08 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Nicholas Piggin, Linux Kbuild mailing list, linuxppc-dev
2018-05-31 20:51 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>> 2018-05-31 13:31 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
>>> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>>>> 2018-05-30 23:39 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
>>>>> Nicholas Piggin <npiggin@gmail.com> writes:
>>>>>
>>>>>> This series of patches improves th powerpc kbuild system. The
>>>>>> motivation was to to be compatible with the new Kconfig scripting
>>>>>> language that Yamada-san has implemented here for merge:
>>>>>>
>>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=kconfig
>>>>>>
>>>>>> I have tested on top of that tree, powerpc now builds there.
>>>>>>
>>>>>> To avoid build breakage, the first 3 patches must go before the
>>>>>> kconfig change, and the 4th patch must go after it.
>>>>>>
>>>>>> v5 changes:
>>>>>> - Patch 4 update to syntax changed since kconfig-shell-v3 release.
>>>>>> - Patch 4 suggestions from Masahiro Yamada, remove unnecessary "OK"
>>>>>> output from check mprofile script, and fold CC_USING_MPROFILE_KERNEL
>>>>>> into CONFIG_MPROFILE_KERNEL.
>>>>>> - Reduce whitespace disturbance in patch 1.
>>>>>
>>>>> I've put this series in a topic branch.
>>>>>
>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/log/?h=topic/kbuild
>>>>
>>>>
>>>> No, you can't.
>>>>
>>>> This series depends on my Kconfig work.
>>>
>>> The *last* commit depends on your work, the rest do not.
>>>
>>>> You queued it up on v4.17-rc3,
>>>> but necessary patches are not there.
>>>>
>>>> You will get build errors.
>>>
>>> I do not get any build errors for the first three commits.
>>
>>
>> Right, the first three are fine.
>>
>> If we make sure commit cfff26c2dc7a1
>> does not appear in Linus' tree,
>> we are good.
>
> Yep agreed.
>
>>>>> I'll plan to merge the first three into the powerpc tree.
>>>>
>>>> Please do not do this.
>>>>
>>>> You can issue Acked-by instead.
>>>
>>> I'd prefer the first three commits were in my tree so they're tested
>>> properly.
>>>
>>>> I need all the 4 patches to my tree.
>>>> Otherwise, the git-bisect'ability breaks for PowerPC.
>>>
>>> You should merge all 4 into your tree, ie. all of my topic/kbuild
>>> branch.
>>
>> This depends on what "merge" means.
>>
>> If it means "git pull", I cannot pull your topic/kbuild branch
>> since it is broken.
>
> Yeah OK I understand what you mean now.
>
>> So, how do you want me to handle the last patch?
>>
>> I can pull the first three from your branch,
>> then I can cherry-pick the last one on top of my kconfig tree.
>
> Yes, please do that.
OK. I will.
BTW, if you try to offer a little more kindness,
you may want to check some typos in the commit description.
I suspect some.
https://patchwork.kernel.org/patch/10438869/
https://patchwork.kernel.org/patch/10438873/
Also, the change logs could be dropped.
I see
Since v1: reworded changelog to explain the cause of the problem (thanks
Segher) and moved the flags into the 64-32 cross compile case.
or
Since v1: removed extra -EB in the recordmcount script (thanks mpe)
above your signed-off-by.
Of course, this is your call,
and you do not need to disturb the git history if it is too late.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 0/4] powerpc patches for new Kconfig language
2018-05-31 13:08 ` Masahiro Yamada
@ 2018-06-01 10:34 ` Michael Ellerman
2018-06-01 10:51 ` Masahiro Yamada
0 siblings, 1 reply; 25+ messages in thread
From: Michael Ellerman @ 2018-06-01 10:34 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Nicholas Piggin, Linux Kbuild mailing list, linuxppc-dev
Hi Masahiro,
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
...
>
> Also, the change logs could be dropped.
>
> I see
>
> Since v1: reworded changelog to explain the cause of the problem (thanks
> Segher) and moved the flags into the 64-32 cross compile case.
>
> or
>
> Since v1: removed extra -EB in the recordmcount script (thanks mpe)
>
>
> above your signed-off-by.
>
>
> Of course, this is your call,
> and you do not need to disturb the git history if it is too late.
You're right, sorry those are bit messy.
I'm happy to update them, I haven't merged them yet, but I see you have
them in your tree.
So I won't change them unless you confirm you're OK with it. Let me
know.
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 0/4] powerpc patches for new Kconfig language
2018-06-01 10:34 ` Michael Ellerman
@ 2018-06-01 10:51 ` Masahiro Yamada
2018-06-01 13:22 ` Michael Ellerman
0 siblings, 1 reply; 25+ messages in thread
From: Masahiro Yamada @ 2018-06-01 10:51 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Nicholas Piggin, Linux Kbuild mailing list, linuxppc-dev
Hi.
2018-06-01 19:34 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
> Hi Masahiro,
>
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> ...
>>
>> Also, the change logs could be dropped.
>>
>> I see
>>
>> Since v1: reworded changelog to explain the cause of the problem (thanks
>> Segher) and moved the flags into the 64-32 cross compile case.
>>
>> or
>>
>> Since v1: removed extra -EB in the recordmcount script (thanks mpe)
>>
>>
>> above your signed-off-by.
>>
>>
>> Of course, this is your call,
>> and you do not need to disturb the git history if it is too late.
>
> You're right, sorry those are bit messy.
>
> I'm happy to update them, I haven't merged them yet, but I see you have
> them in your tree.
>
> So I won't change them unless you confirm you're OK with it. Let me
> know.
Could you update your branch, please?
Then, I will re-pull the new one.
Thanks!
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 0/4] powerpc patches for new Kconfig language
2018-06-01 10:51 ` Masahiro Yamada
@ 2018-06-01 13:22 ` Michael Ellerman
2018-06-02 4:53 ` Nicholas Piggin
0 siblings, 1 reply; 25+ messages in thread
From: Michael Ellerman @ 2018-06-01 13:22 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Nicholas Piggin, Linux Kbuild mailing list, linuxppc-dev
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> 2018-06-01 19:34 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
...
>
> Could you update your branch, please?
Done.
I've only pushed the first three patches this time, to avoid any
confusion. Hopefully :)
The top commit is:
1421dc6d4829 ("powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS")
For the fourth one you're welcome to add my ack when you apply it:
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
> Then, I will re-pull the new one.
Thanks! Sorry this took a while to get right, next time we'll be much
better at it ;)
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v5 0/4] powerpc patches for new Kconfig language
2018-06-01 13:22 ` Michael Ellerman
@ 2018-06-02 4:53 ` Nicholas Piggin
0 siblings, 0 replies; 25+ messages in thread
From: Nicholas Piggin @ 2018-06-02 4:53 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Masahiro Yamada, Linux Kbuild mailing list, linuxppc-dev
On Fri, 01 Jun 2018 23:22:27 +1000
Michael Ellerman <mpe@ellerman.id.au> wrote:
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> > 2018-06-01 19:34 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
> ...
> >
> > Could you update your branch, please?
>
> Done.
>
> I've only pushed the first three patches this time, to avoid any
> confusion. Hopefully :)
>
> The top commit is:
>
> 1421dc6d4829 ("powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS")
>
>
> For the fourth one you're welcome to add my ack when you apply it:
>
> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
>
> > Then, I will re-pull the new one.
>
> Thanks! Sorry this took a while to get right, next time we'll be much
> better at it ;)
Thank you both for sorting out my mess.
Thanks,
Nick
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [v5, 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile
2018-05-30 12:19 ` [PATCH v5 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile Nicholas Piggin
@ 2018-06-04 14:11 ` Michael Ellerman
2018-05-30 14:32 ` Masahiro Yamada
2018-06-04 14:11 ` Michael Ellerman
2 siblings, 0 replies; 25+ messages in thread
From: Michael Ellerman @ 2018-06-04 14:11 UTC (permalink / raw)
To: Nicholas Piggin, linux-kbuild; +Cc: Masahiro Yamada, linuxppc-dev
On Wed, 2018-05-30 at 12:19:19 UTC, Nicholas Piggin wrote:
> Some 64-bit toolchains uses the wrong ISA variant for compiling 32-bit
> kernels, even with -m32. Debian's powerpc64le is one such case, and
> that is because it is built with --with-cpu=power8.
>
> So when cross compiling a 32-bit kernel with a 64-bit toolchain, set
> -mcpu=powerpc initially, which is the generic 32-bit powerpc machine
> type and scheduling model. CPU and platform code can override this
> with subsequent -mcpu flags if necessary.
>
> This is not done for 32-bit toolchains otherwise it would override
> their defaults, which are presumably set appropriately for the
> environment (moreso than a 64-bit cross compiler).
>
> This fixes a lot of build failures due to incompatible assembly when
> compiling 32-bit kernel with th Debian powerpc64le 64-bit toolchain.
>
> Cc: Segher Boessenkool <segher@kernel.crashing.org>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/4bf4f42a2febb449a5cc5d79e7c58e
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [v5, 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile
@ 2018-06-04 14:11 ` Michael Ellerman
0 siblings, 0 replies; 25+ messages in thread
From: Michael Ellerman @ 2018-06-04 14:11 UTC (permalink / raw)
To: Nicholas Piggin, linux-kbuild
Cc: Masahiro Yamada, linuxppc-dev, Nicholas Piggin
On Wed, 2018-05-30 at 12:19:19 UTC, Nicholas Piggin wrote:
> Some 64-bit toolchains uses the wrong ISA variant for compiling 32-bit
> kernels, even with -m32. Debian's powerpc64le is one such case, and
> that is because it is built with --with-cpu=power8.
>
> So when cross compiling a 32-bit kernel with a 64-bit toolchain, set
> -mcpu=powerpc initially, which is the generic 32-bit powerpc machine
> type and scheduling model. CPU and platform code can override this
> with subsequent -mcpu flags if necessary.
>
> This is not done for 32-bit toolchains otherwise it would override
> their defaults, which are presumably set appropriately for the
> environment (moreso than a 64-bit cross compiler).
>
> This fixes a lot of build failures due to incompatible assembly when
> compiling 32-bit kernel with th Debian powerpc64le 64-bit toolchain.
>
> Cc: Segher Boessenkool <segher@kernel.crashing.org>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/4bf4f42a2febb449a5cc5d79e7c58e
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [v5, 2/4] powerpc/kbuild: remove CROSS32 defines from top level powerpc Makefile
2018-05-30 12:19 ` [PATCH v5 2/4] powerpc/kbuild: remove CROSS32 defines from top level powerpc Makefile Nicholas Piggin
@ 2018-06-04 14:11 ` Michael Ellerman
0 siblings, 0 replies; 25+ messages in thread
From: Michael Ellerman @ 2018-06-04 14:11 UTC (permalink / raw)
To: Nicholas Piggin, linux-kbuild; +Cc: Masahiro Yamada, linuxppc-dev
On Wed, 2018-05-30 at 12:19:20 UTC, Nicholas Piggin wrote:
> Switch VDSO32 build over to use CROSS32_COMPILE directly, and have
> it pass in -m32 after the standard c_flags. This allows endianness
> overrides to be removed and the endian and bitness flags moved into
> standard flags variables.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/af3901cbbd3de182aafb8ee553c825
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [v5, 2/4] powerpc/kbuild: remove CROSS32 defines from top level powerpc Makefile
@ 2018-06-04 14:11 ` Michael Ellerman
0 siblings, 0 replies; 25+ messages in thread
From: Michael Ellerman @ 2018-06-04 14:11 UTC (permalink / raw)
To: Nicholas Piggin, linux-kbuild
Cc: Masahiro Yamada, linuxppc-dev, Nicholas Piggin
On Wed, 2018-05-30 at 12:19:20 UTC, Nicholas Piggin wrote:
> Switch VDSO32 build over to use CROSS32_COMPILE directly, and have
> it pass in -m32 after the standard c_flags. This allows endianness
> overrides to be removed and the endian and bitness flags moved into
> standard flags variables.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/af3901cbbd3de182aafb8ee553c825
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [v5, 3/4] powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS
2018-05-30 12:19 ` [PATCH v5 3/4] powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS Nicholas Piggin
@ 2018-06-04 14:11 ` Michael Ellerman
2018-06-04 14:11 ` Michael Ellerman
1 sibling, 0 replies; 25+ messages in thread
From: Michael Ellerman @ 2018-06-04 14:11 UTC (permalink / raw)
To: Nicholas Piggin, linux-kbuild; +Cc: Masahiro Yamada, linuxppc-dev
On Wed, 2018-05-30 at 12:19:21 UTC, Nicholas Piggin wrote:
> The powerpc toolchain can compile combinations of 32/64 bit and
> big/little endian, so it's convenient to consider, e.g.,
>
> `CC -m64 -mbig-endian`
>
> To be the C compiler for the purpose of invoking it to build target
> artifacts. So overriding the the CC variable to include thse flags
> works for this purpose.
>
> Unfortunately that is not compatible with the way the proposed new
> Kconfig macro language will work.
>
> After previous patches in this series, these flags can be carefully
> passed in using flags instead.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/1421dc6d48296a9e91702743b31458
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [v5, 3/4] powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS
@ 2018-06-04 14:11 ` Michael Ellerman
0 siblings, 0 replies; 25+ messages in thread
From: Michael Ellerman @ 2018-06-04 14:11 UTC (permalink / raw)
To: Nicholas Piggin, linux-kbuild
Cc: Masahiro Yamada, linuxppc-dev, Nicholas Piggin
On Wed, 2018-05-30 at 12:19:21 UTC, Nicholas Piggin wrote:
> The powerpc toolchain can compile combinations of 32/64 bit and
> big/little endian, so it's convenient to consider, e.g.,
>
> `CC -m64 -mbig-endian`
>
> To be the C compiler for the purpose of invoking it to build target
> artifacts. So overriding the the CC variable to include thse flags
> works for this purpose.
>
> Unfortunately that is not compatible with the way the proposed new
> Kconfig macro language will work.
>
> After previous patches in this series, these flags can be carefully
> passed in using flags instead.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/1421dc6d48296a9e91702743b31458
cheers
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2018-06-04 14:11 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-30 12:19 [PATCH v5 0/4] powerpc patches for new Kconfig language Nicholas Piggin
2018-05-30 12:19 ` [PATCH v5 1/4] powerpc/kbuild: set default generic machine type for 32-bit compile Nicholas Piggin
2018-05-30 14:30 ` Masahiro Yamada
2018-05-30 14:32 ` Masahiro Yamada
2018-06-04 14:11 ` [v5, " Michael Ellerman
2018-06-04 14:11 ` Michael Ellerman
2018-05-30 12:19 ` [PATCH v5 2/4] powerpc/kbuild: remove CROSS32 defines from top level powerpc Makefile Nicholas Piggin
2018-06-04 14:11 ` [v5, " Michael Ellerman
2018-06-04 14:11 ` Michael Ellerman
2018-05-30 12:19 ` [PATCH v5 3/4] powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS Nicholas Piggin
2018-05-30 14:34 ` Masahiro Yamada
2018-06-04 14:11 ` [v5, " Michael Ellerman
2018-06-04 14:11 ` Michael Ellerman
2018-05-30 12:19 ` [PATCH v5 4/4] powerpc/kbuild: move -mprofile-kernel check to Kconfig Nicholas Piggin
2018-05-30 14:39 ` [PATCH v5 0/4] powerpc patches for new Kconfig language Michael Ellerman
2018-05-30 14:39 ` Michael Ellerman
2018-05-30 14:57 ` Masahiro Yamada
2018-05-31 4:31 ` Michael Ellerman
2018-05-31 5:00 ` Masahiro Yamada
2018-05-31 11:51 ` Michael Ellerman
2018-05-31 13:08 ` Masahiro Yamada
2018-06-01 10:34 ` Michael Ellerman
2018-06-01 10:51 ` Masahiro Yamada
2018-06-01 13:22 ` Michael Ellerman
2018-06-02 4:53 ` Nicholas Piggin
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.