Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch/powerpc/boot/ missing clang target information when cross compiling #259

Closed
shenki opened this issue Nov 1, 2018 · 8 comments
Closed
Assignees
Labels
[ARCH] powerpc This bug impacts ARCH=powerpc [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.0 This bug was fixed in Linux 5.0

Comments

@shenki
Copy link
Member

shenki commented Nov 1, 2018

  BOOTAS  arch/powerpc/boot/crt0.o
  BOOTCC  arch/powerpc/boot/decompress.o
  BOOTAS  arch/powerpc/boot/div64.o
  BOOTCC  arch/powerpc/boot/fdt.o
clang: warning: argument unused during compilation: '-mno-altivec' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mno-vsx' [-Wunused-command-line-argument]
clang:   BOOTCC  arch/powerpc/boot/fdt_ro.o
clang: warning: argument unused during compilation: '-mno-altivec' [-Wunused-command-line-argument]
clangwarning: : warning: argument unused during compilation: '-mno-vsx' [-Wunused-command-line-argument]
argument unused during compilation: '-mno-altivec' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mno-vsx' [-Wunused-command-line-argument]
  BOOTCC  arch/powerpc/boot/fdt_rw.o
clang: warning: argument unused during compilation: '-mno-altivec' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mno-vsx' [-Wunused-command-line-argument]
  BOOTCC  arch/powerpc/boot/fdt_strerror.o
clang: warning: argument unused during compilation: '-mno-altivec' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mno-vsx' [-Wunused-command-line-argument]
In file included from arch/powerpc/boot/decompress.c:17:
./arch/powerpc/boot/reg.h:27:36: error: unknown register name 'r1' in asm
register void *__stack_pointer asm("r1");
                                   ^
  BOOTCC  arch/powerpc/boot/fdt_sw.o
arch/powerpc/boot/div64.S:20:10: error: unexpected token in memory operand
        lwz     5,0(3)  # get the dividend into 5/6
                    ^

Building with V=1, the command line is:

  clang-8 -Wp,-MD,arch/powerpc/boot/.opal-calls.o.d -D__ASSEMBLY__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx -pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc -DCONFIG_KERNEL_XZ -m64 -isystem /usr/lib/llvm-8/lib/clang/8.0.0/include -mlittle-endian -mabi=elfv2 -traditional -nostdinc -c -o arch/powerpc/boot/opal-calls.o arch/powerpc/boot/opal-calls.S

We are missing --target=powerpc64le-linux-gnu --gcc-toolchain=/usr --prefix=/usr/bin/ -no-integrated-as which is added to the KBUILD_CFLAGS in the top level makefile.

@shenki shenki added [BUG] linux A bug that should be fixed in the mainline kernel. [ARCH] powerpc This bug impacts ARCH=powerpc labels Nov 1, 2018
@shenki shenki self-assigned this Nov 1, 2018
@nickdesaulniers
Copy link
Member

nickdesaulniers commented Nov 2, 2018 via email

@shenki
Copy link
Member Author

shenki commented Nov 2, 2018

You're right that we're missing that. We don't need it though once we're building for the correct target:

  clang-8 -Wp,-MD,arch/powerpc/boot/.pseries-head.o.d -D__ASSEMBLY__ -Wall -Wundef 
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -O2 -msoft-float -mno-altivec 
-mno-vsx -pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc -DCONFIG_KERNEL_XZ 
-m64 -isystem /usr/lib/llvm-8/lib/clang/8.0.0/include -mlittle-endian -mabi=elfv2 -traditional
-nostdinc --target=powerpc64le-linux-gnu --gcc-toolchain=/usr --prefix=/usr/bin/  
-no-integrated-as -c -o arch/powerpc/boot/pseries-head.o arch/powerpc/boot/pseries-head.S

That's powernv_defconfig with these two applied to Linus' tree and make CC=clang-8 ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu-:
http://ozlabs.org/~joel/0001-Makefile-Export-clang-toolchain-variables.patch
http://ozlabs.org/~joel/0002-powerpc-boot-Set-target-when-cross-compiling-for-cla.patch

We could add it just in case, but given we are able to construct a set of flags that doesn't need it I think I'll leave it out.

@shenki
Copy link
Member Author

shenki commented Nov 2, 2018

Comparing it to a normal kernel file, we're missing these flags too.

  clang-8 -Wp,-MD,init/.do_mounts.o.d  -nostdinc -isystem /usr/lib/llvm-8/lib/clang/8.0.0/include -I./arch/powerpc/include -I./arch/powerpc/include/generated  -I./include -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Iarch/powerpc -DHAVE_AS_ATHIGH=1 -Qunused-arguments -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 --target=powerpc64le-linux-gnu --gcc-toolchain=/usr --prefix=/usr/bin/ -no-integrated-as -fno-PIE -mlittle-endian -m64 -msoft-float -pipe -Iarch/powerpc -mabi=elfv2 -mcmodel=medium -mcpu=power8 -mtune=power9 -mno-altivec -mno-vsx -funit-at-a-time -fno-dwarf2-cfi-asm -Wa,-maltivec -Wa,-mpower4 -Wa,-many -mlittle-endian -fno-delete-null-pointer-checks -Oz -Wframe-larger-than=2048 -fno-stack-protector -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -mno-global-merge -Wno-unused-const-variable -fomit-frame-pointer -g -gdwarf-4 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fno-stack-check -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -fno-function-sections -fno-data-sections    -DKBUILD_BASENAME='"do_mounts"' -DKBUILD_MODNAME='"mounts"' -c -o init/do_mounts.o init/do_mounts.c

Here's the list of f flags:

  • -fno-strict-aliasing
  • -fno-common
  • -fshort-wchar
  • -fno-PIE
  • -msoft-float
  • -funit-at-a-time
  • -fno-dwarf2-cfi-asm
  • -fno-delete-null-pointer-checks
  • -fno-stack-protector
  • -fomit-frame-pointer
  • -fno-strict-overflow
  • -fno-merge-all-constants
  • -fno-stack-check
  • -fno-function-sections
  • -fno-data-sections

vs the boot wrapper:

  • -fno-strict-aliasing
  • -msoft-float
  • -fomit-frame-pointer
  • -fno-builtin
  • -fPIC

AIUI some of these are required to make clang behave the way kernel code expects.

@nickdesaulniers
Copy link
Member

nickdesaulniers commented Nov 2, 2018 via email

@daxtens
Copy link

daxtens commented Nov 3, 2018

These patches fix a build issue I had with arch/powerpc/boot as well.

@shenki
Copy link
Member Author

shenki commented Nov 4, 2018

Patch series sent:

https://lore.kernel.org/lkml/20181104231133.30848-1-joel@jms.id.au/T/#t

@nickdesaulniers powerpc doesn't so much overwrite the existing flags as not include them at at all. This is fragile and makes for a complicated makefile and testing matrix. I've got it on my TODO list to rework the boot wrapper so we don't need to do that.

@shenki shenki added the [PATCH] Submitted A patch has been submitted for review label Nov 4, 2018
masahir0y pushed a commit to masahir0y/linux that referenced this issue Dec 3, 2018
Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
@shenki
Copy link
Member Author

shenki commented Dec 14, 2018

This is in linux-next (via the kbuild tree) as 813af51

@shenki shenki added [PATCH] Accepted A submitted patch has been accepted upstream and removed [PATCH] Submitted A patch has been submitted for review labels Dec 14, 2018
@nathanchance nathanchance added [FIXED][LINUX] 5.0 This bug was fixed in Linux 5.0 and removed [PATCH] Accepted A submitted patch has been accepted upstream labels Jan 1, 2019
Whissi pushed a commit to Whissi/linux-stable that referenced this issue Jan 13, 2019
commit 813af51 upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
woodsts pushed a commit to woodsts/linux-stable that referenced this issue Jan 13, 2019
commit 813af51 upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
isjerryxiao pushed a commit to isjerryxiao/Amlogic_s905-kernel that referenced this issue Jan 14, 2019
commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
isjerryxiao pushed a commit to isjerryxiao/Amlogic_s905-kernel that referenced this issue Jan 20, 2019
commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Emerald-Phoenix pushed a commit to Emerald-Phoenix/linux that referenced this issue Jan 21, 2019
commit 813af51 upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
masahir0y pushed a commit to masahir0y/linux that referenced this issue Jan 24, 2019
Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/linux-mvista-2.4 that referenced this issue Feb 4, 2019
Source: linux-mvista-2.4
MR: 96580, 00000
Type: Integration
Disposition: Merged from linux-mvista-2.4
ChangeID: d75c8c0afd357e66b55b4548919bb6d5a5a8e8fb
Description:

commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/linux-mvista-2.4 that referenced this issue Feb 7, 2019
Source: Kernel.org
MR: 96580
Type: Security Fix
Disposition: Backport from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable linux-4.14.y
ChangeID: d75c8c0afd357e66b55b4548919bb6d5a5a8e8fb
Description:

commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/linux-mvista-2.4 that referenced this issue Mar 5, 2019
Source: Kernel.org
MR: 96580
Type: Security Fix
Disposition: Backport from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable linux-4.14.y
ChangeID: d75c8c0afd357e66b55b4548919bb6d5a5a8e8fb
Description:

commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
randomblame pushed a commit to randomblame/android_kernel_xiaomi_sm8150 that referenced this issue Apr 20, 2019
commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
randomblame pushed a commit to randomblame/android_kernel_xiaomi_sm8150 that referenced this issue Apr 27, 2019
commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mdeejay pushed a commit to BeastRoms-Devices/kernel_xiaomi_raphael that referenced this issue Aug 15, 2019
commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mdeejay pushed a commit to BeastRoms-Devices/kernel_xiaomi_raphael that referenced this issue Aug 17, 2019
commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mdeejay pushed a commit to BeastRoms-Devices/kernel_xiaomi_cepheus that referenced this issue Aug 22, 2019
commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Flatty11 pushed a commit to Flatty11/SM-G9750 that referenced this issue Oct 10, 2019
commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
freeza-inc pushed a commit to freeza-inc/bm-galaxy-note10-sd855-pie that referenced this issue Dec 24, 2019
commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Inkypen79 pushed a commit to Inkypen79/kernel_xiaomi_andromeda_old that referenced this issue Jan 15, 2020
commit 813af51 upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Inkypen79 pushed a commit to Inkypen79/kernel_xiaomi_andromeda_old that referenced this issue Jan 15, 2020
commit 813af51 upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
krazey pushed a commit to krazey/android_kernel_motorola_exynos9610 that referenced this issue Apr 23, 2022
commit 813af51f5d30a2da6a2523c08465f9726e51772e upstream.

Clang needs to be told which target it is building for when cross
compiling.

Link: ClangBuiltLinux/linux#259
Signed-off-by: Joel Stanley <joel@jms.id.au>
Tested-by: Daniel Axtens <dja@axtens.net> # powerpc 64-bit BE
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[nc: Use 'ifeq ($(cc-name),clang)' instead of 'ifdef CONFIG_CC_IS_CLANG'
     because that config does not exist in 4.14; the Kconfig rewrite
     that added that config happened in 4.18]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[ARCH] powerpc This bug impacts ARCH=powerpc [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.0 This bug was fixed in Linux 5.0
Projects
None yet
Development

No branches or pull requests

4 participants