mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-15 04:15:13 +03:00
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:
parent
29823eec3e
commit
2406597f3c
1 changed files with 8 additions and 2 deletions
|
@ -91,9 +91,13 @@ def menuconfig(args, pkgname):
|
||||||
aport = pmb.helpers.pmaports.find(args, pkgname)
|
aport = pmb.helpers.pmaports.find(args, pkgname)
|
||||||
apkbuild = pmb.parse.apkbuild(args, aport + "/APKBUILD")
|
apkbuild = pmb.parse.apkbuild(args, aport + "/APKBUILD")
|
||||||
arch = args.arch or get_arch(args, 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
|
# 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"]
|
depends = apkbuild["makedepends"]
|
||||||
kopt = "menuconfig"
|
kopt = "menuconfig"
|
||||||
copy_xauth = False
|
copy_xauth = False
|
||||||
|
@ -128,7 +132,9 @@ def menuconfig(args, pkgname):
|
||||||
outputdir, output="tui",
|
outputdir, output="tui",
|
||||||
env={"ARCH": pmb.parse.arch.alpine_to_kernel(arch),
|
env={"ARCH": pmb.parse.arch.alpine_to_kernel(arch),
|
||||||
"DISPLAY": os.environ.get("DISPLAY"),
|
"DISPLAY": os.environ.get("DISPLAY"),
|
||||||
"XAUTHORITY": "/home/pmos/.Xauthority"})
|
"XAUTHORITY": "/home/pmos/.Xauthority",
|
||||||
|
"CROSS_COMPILE": hostspec + "-",
|
||||||
|
"CC": hostspec + "-gcc"})
|
||||||
|
|
||||||
# Find the updated config
|
# Find the updated config
|
||||||
source = args.work + "/chroot_native" + outputdir + "/.config"
|
source = args.work + "/chroot_native" + outputdir + "/.config"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue