Fix packages that use tc-getBUILD-CC (Forces gcc as host compiler) |
||||
Issue description
Some packages need the host compiler and they use tc-getBUILD-CC to find it. This always returns ${CBUILD}"-gcc.
All packages that use this must be evaluated is they really need gcc.
$ grep -r tc-getBUILD -m 1 chromiumos-overlays
./eclass/cros-go.eclass: $(tc-getBUILD_GO) test "$@" || die
./eclass/toolchain-funcs.eclass:tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "${@:2}"; }
./dev-lang/rust/rust-1.16.0.ebuild: --default-linker="$(tc-getBUILD_CC)" \
./app-crypt/nss/nss-3.30.2.ebuild: cc=$(tc-getBUILD_CC)
./chromeos-base/chromeos-chrome/chromeos-chrome-62.0.3165.0_rc-r1.ebuild: host_pkg_config="$(tc-getBUILD_PKG_CONFIG)"
./chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild: host_pkg_config="$(tc-getBUILD_PKG_CONFIG)"
./sys-boot/chromeos-seabios/chromeos-seabios-0.0.1-r71.ebuild: HOSTCC="$(tc-getBUILD_CC)" \
./sys-boot/chromeos-seabios/chromeos-seabios-9999.ebuild: HOSTCC="$(tc-getBUILD_CC)" \
./sys-apps/iproute2/iproute2-4.9.0.ebuild: -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
./sys-libs/glibc/files/eblits/src_configure.eblit: CC="$(tc-getBUILD_CC)" \
./dev-libs/grpc/grpc-1.3.0.ebuild: HOST_CC="$(tc-getBUILD_CC)"
./dev-libs/nss/nss-3.30.2.ebuild: cc=$(tc-getBUILD_CC)
./x11-drivers/nvidia-drivers/nvidia-drivers-260.19.36.ebuild: SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)"
List from portage stable:
$ grep -r tc-getBUILD -m 1 .
./eclass/cros-go.eclass: $(tc-getBUILD_GO) test "$@" || die
./eclass/toolchain-funcs.eclass:tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "${@:2}"; }
./dev-lang/rust/rust-1.16.0.ebuild: --default-linker="$(tc-getBUILD_CC)" \
./app-crypt/nss/nss-3.30.2.ebuild: cc=$(tc-getBUILD_CC)
./chromeos-base/chromeos-chrome/chromeos-chrome-62.0.3165.0_rc-r1.ebuild: host_pkg_config="$(tc-getBUILD_PKG_CONFIG)"
./chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild: host_pkg_config="$(tc-getBUILD_PKG_CONFIG)"
./sys-boot/chromeos-seabios/chromeos-seabios-0.0.1-r71.ebuild: HOSTCC="$(tc-getBUILD_CC)" \
./sys-boot/chromeos-seabios/chromeos-seabios-9999.ebuild: HOSTCC="$(tc-getBUILD_CC)" \
./sys-apps/iproute2/iproute2-4.9.0.ebuild: -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
./sys-libs/glibc/files/eblits/src_configure.eblit: CC="$(tc-getBUILD_CC)" \
./dev-libs/grpc/grpc-1.3.0.ebuild: HOST_CC="$(tc-getBUILD_CC)"
./dev-libs/nss/nss-3.30.2.ebuild: cc=$(tc-getBUILD_CC)
./x11-drivers/nvidia-drivers/nvidia-drivers-260.19.36.ebuild: SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)"
,
Jul 25 2017
This is the portage-stable list:
./eclass/linux-mod.eclass: eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" \
./eclass/toolchain-funcs.eclass:tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "${@:2}"; }
./media-video/mplayer/mplayer-1.0_rc4_p20120405.ebuild: --host-cc="$(tc-getBUILD_CC)" \
./dev-util/ninja/ninja-1.7.1.ebuild: local -x AR=$(tc-getBUILD_AR)
./app-emulation/qemu/qemu-2.6.0.ebuild: --host-cc="$(tc-getBUILD_CC)"
./sys-firmware/seabios/seabios-1.8.2.ebuild: HOST_CC="$(tc-getBUILD_CC)" \
./sys-firmware/ipxe/ipxe-1.0.0_p20130624.ebuild: HOST_CC=$(tc-getBUILD_CC) \
./app-crypt/gnupg/gnupg-1.4.15.ebuild: CC_FOR_BUILD=$(tc-getBUILD_CC) \
./sys-apps/iproute2/iproute2-4.2.0.ebuild: -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
./sys-apps/toybox/toybox-0.7.2.ebuild: export HOSTCC=$(tc-getBUILD_CC)
./sys-apps/busybox/busybox-1.26.2-r1.ebuild: -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
./sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.43.4.ebuild: BUILD_CC="$(tc-getBUILD_CC)" \
./sys-libs/timezone-data/timezone-data-2017b.ebuild: CC="$(tc-getBUILD_CC)" \
./dev-libs/libchewing/libchewing-0.3.2-r1.ebuild: export CC_FOR_BUILD="$(tc-getBUILD_CC)"
,
Jul 27 2017
,
Aug 16 2017
you could try adding a make.defaults file to features/llvm/make.defaults that sets up the BUILD_xxx variables if it causes a problem with the sdk, look at Caroline's CLs: https://chromium-review.googlesource.com/481864 https://chromium-review.googlesource.com/503509
,
Sep 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/ddd28fec8022a674cbc48889d31272fb95cb112e commit ddd28fec8022a674cbc48889d31272fb95cb112e Author: Manoj Gupta <manojgupta@google.com> Date: Sun Sep 17 00:55:10 2017 cros_use_gcc: set BUILD_{CC|CXX} variables to gcc. BUILD_{CC|CXX} must also be set to gcc versions when forcing to gcc is desired for a package. This CL is required to land CL:669301 BUG= chromium:748476 TEST=chromiumos-sdk {daisy/kevin/caroline}-release tryjobs passed. Change-Id: I7f43cf16993844b43bdab01115bf1f35622173c5 Reviewed-on: https://chromium-review.googlesource.com/669864 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> [modify] https://crrev.com/ddd28fec8022a674cbc48889d31272fb95cb112e/profiles/base/profile.bashrc
,
Sep 18 2017
,
Sep 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/7a2cae2e9ee688d7a3b326167a5c7de3e53b1a8a commit 7a2cae2e9ee688d7a3b326167a5c7de3e53b1a8a Author: Manoj Gupta <manojgupta@google.com> Date: Mon Sep 18 19:03:03 2017 glibc: Call cros_use_gcc inside eblit-src_configure-pre. glibc needs to be built with gcc. It also requires that TARGET_CC is also set to gcc. To ensure that, call cros_use_gcc in eblit-src_configure-pre. Alternative to modifying the build is to create config/env/cross-*/glibc files just to create a call to cros-use_gcc which will be a mess to manage. BUG= chromium:748476 TEST=chromiumos-sdk passed. Change-Id: I80dc95266b7bc01c7c43bfa450092b1aae1deaf8 Reviewed-on: https://chromium-review.googlesource.com/669925 Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Trybot-Ready: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Caroline Tice <cmtice@chromium.org> [rename] https://crrev.com/7a2cae2e9ee688d7a3b326167a5c7de3e53b1a8a/sys-libs/glibc/glibc-2.23-r10.ebuild
,
Sep 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/crosutils/+/9f51d2ad382d22c6f2305f57ee7bdfcaf972bacd commit 9f51d2ad382d22c6f2305f57ee7bdfcaf972bacd Author: Manoj Gupta <manojgupta@google.com> Date: Wed Sep 20 10:39:25 2017 Create BUILD_CC/BUILD_CXX variables in SDK. This CL is to enable getting clang as the compiler through tc-getBUILD_CC/CXX calls. Does not impact current chroot. This CL only creates the variables which are unused for now. BUG= chromium:748476 TEST=BUILD_CC variables are created. Change-Id: Ifb485d8a474f34724bb917ac702159c3e155a4d2 Reviewed-on: https://chromium-review.googlesource.com/669301 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@chromium.org> [modify] https://crrev.com/9f51d2ad382d22c6f2305f57ee7bdfcaf972bacd/sdk_lib/make_conf_util.sh
,
Sep 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/a94d501bb423a46cbf72f579b5ac695116294352 commit a94d501bb423a46cbf72f579b5ac695116294352 Author: Manoj Gupta <manojgupta@google.com> Date: Thu Sep 21 08:08:05 2017 Set BUILD_CC to clang as the build compiler in target builds. Currently calling tc-getBUILD_CC in ebuild returns gcc. This created a mixed gcc/clang compilation situation if an ebuild needs some binaries to be built on host. Fix this by setting the BUILD_CC to the host clang compiler. BUG= chromium:748476 TEST=Dumping tc-getBUILD_{CC,CXX} in emerge-caroline chromeos-chrome shows x86_64-pc-linux-gnu-clang. TEST=cros tryjob -g 674725 {daisy,elm,kevin,pyro,eve,peppy,squawks,caroline,whirlwind,lakitu}-release passed. Change-Id: Iab6a4871963e1b5068572db8f60b4e25ed22b08e Reviewed-on: https://chromium-review.googlesource.com/674725 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [add] https://crrev.com/a94d501bb423a46cbf72f579b5ac695116294352/profiles/features/llvm/make.defaults
,
Sep 21 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by vapier@chromium.org
, Jul 25 2017you can set BUILD_CC="${CHOST}-clang" in the build files like we do with CC today