menuconfig: use cross-compiler for configuration (MR 2023)

Not using the cross compiler for kconfig leads to some differences to
the actual compilation later.
This commit is contained in:
Luca Weiss 2021-02-08 18:01:36 +01:00 committed by Clayton Craft
parent 29823eec3e
commit 2406597f3c
No known key found for this signature in database
GPG Key ID: 7A3461CA187CEA54
1 changed files with 8 additions and 2 deletions

View File

@ -91,9 +91,13 @@ def menuconfig(args, pkgname):
aport = pmb.helpers.pmaports.find(args, pkgname)
apkbuild = pmb.parse.apkbuild(args, aport + "/APKBUILD")
arch = args.arch or get_arch(args, apkbuild)
suffix = pmb.build.autodetect.suffix(args, apkbuild, arch)
cross = pmb.build.autodetect.crosscompile(args, apkbuild, arch, suffix)
hostspec = pmb.parse.arch.alpine_to_hostspec(arch)
# Set up build tools and makedepends
pmb.build.init(args)
pmb.build.init(args, suffix)
pmb.build.init_compiler(args, [], cross, arch)
depends = apkbuild["makedepends"]
kopt = "menuconfig"
copy_xauth = False
@ -128,7 +132,9 @@ def menuconfig(args, pkgname):
outputdir, output="tui",
env={"ARCH": pmb.parse.arch.alpine_to_kernel(arch),
"DISPLAY": os.environ.get("DISPLAY"),
"XAUTHORITY": "/home/pmos/.Xauthority"})
"XAUTHORITY": "/home/pmos/.Xauthority",
"CROSS_COMPILE": hostspec + "-",
"CC": hostspec + "-gcc"})
# Find the updated config
source = args.work + "/chroot_native" + outputdir + "/.config"