Kernel is using gcc as host compiler with USE="clang" |
||||
Issue descriptionThe kernel ebuilds still use gcc as the host compiler when building with USE="clang". I believe this behavior is not desired since we probably want to maintain a gcc free environment with USE="clang".
,
Oct 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/c1d9d88a06df47ab01821366004ce5da4bfcc08d commit c1d9d88a06df47ab01821366004ce5da4bfcc08d Author: Manoj Gupta <manojgupta@google.com> Date: Fri Oct 06 22:51:13 2017 cros-kernel2: Use clang as the host compiler with USE="clang" cros_use_gcc call forces gcc as the host compiler. There is no need to call this with USE="clang". Before this CL: HOSTCC = x86_64-pc-linux-gnu-gcc with USE="clang" With this CL: HOSTCC = x86_64-pc-linux-gnu-clang with USE="clang" There are some new warnings printed about '-fno-delete-null-pointer-checks' but these should be harmless. Rest of the kernel build logs are identical. BUG= chromium:772182 TEST=Compiled kevin and swanky 4.4 kernels. Change-Id: I25f912850aea1674f9b3e342523269507d03b882 Reviewed-on: https://chromium-review.googlesource.com/703984 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/c1d9d88a06df47ab01821366004ce5da4bfcc08d/eclass/cros-kernel2.eclass
,
Oct 7 2017
,
Oct 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d9c5a616f59b1d5a932282d63ff6897b35774e51 commit d9c5a616f59b1d5a932282d63ff6897b35774e51 Author: Nick Desaulniers <nick.desaulniers@gmail.com> Date: Fri Oct 13 21:44:57 2017 FROMGIT: kbuild: clang: remove crufty HOSTCFLAGS When compiling with `make CC=clang HOSTCC=clang`, I was seeing warnings that clang did not recognize -fno-delete-null-pointer-checks for HOSTCC targets. These were added in commit 61163efae020 ("kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang"). Clang does not support -fno-delete-null-pointer-checks, so adding it to HOSTCFLAGS if HOSTCC is clang does not make sense. It's not clear why the other warnings were disabled, and just for HOSTCFLAGS, but I can remove them, add -Werror to HOSTCFLAGS and compile with clang just fine. Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> (cherry-picked from git-kernel.org masahiroy/linux-kbuild kbuild commit f984e0ccc4d9d05538475b42c18069e6b0a9d774) BUG= chromium:772182 TEST=USE=clang emerge-pyro chromeos-kernel-4_12 => no warnings about -fno-delete-null-pointer-checks Change-Id: I75b0a3b3b4fac17f3870ce1330e583300495c69b Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/716518 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> [modify] https://crrev.com/d9c5a616f59b1d5a932282d63ff6897b35774e51/Makefile
,
Oct 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/29e36e5a4159b012a20e71614b4dcd25742f0fa4 commit 29e36e5a4159b012a20e71614b4dcd25742f0fa4 Author: Matthias Kaehlcke <mka@chromium.org> Date: Fri Oct 13 21:45:05 2017 FROMGIT: kbuild: clang: remove crufty HOSTCFLAGS When compiling with `make CC=clang HOSTCC=clang`, I was seeing warnings that clang did not recognize -fno-delete-null-pointer-checks for HOSTCC targets. These were added in commit 61163efae020 ("kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang"). Clang does not support -fno-delete-null-pointer-checks, so adding it to HOSTCFLAGS if HOSTCC is clang does not make sense. It's not clear why the other warnings were disabled, and just for HOSTCFLAGS, but I can remove them, add -Werror to HOSTCFLAGS and compile with clang just fine. Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> (cherry-picked from git-kernel.org masahiroy/linux-kbuild kbuild commit f984e0ccc4d9d05538475b42c18069e6b0a9d774) BUG= chromium:772182 TEST=USE=clang emerge-pyro chromeos-kernel-4_4 => no warnings about -fno-delete-null-pointer-checks Change-Id: I75b0a3b3b4fac17f3870ce1330e583300495c69b Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/716703 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> [modify] https://crrev.com/29e36e5a4159b012a20e71614b4dcd25742f0fa4/Makefile |
||||
►
Sign in to add a comment |
||||
Comment 1 by diand...@chromium.org
, Oct 6 2017