forked from Mirror/pmbootstrap
aportgen: build gcc-x86_64 etc. pkgs for aarch64
Instead of building cross packages for the native architecture, add a new get_cross_packages_arches() function that returns the desired architectures no matter what the current native architecture is. So gcc-x86_64 will always have arch="aarch64", and gcc-aarch64 will always have arch="x86_64". We can tweak the function in the future if e.g. it becomes viable to cross compile from riscv64. Or even better, remove this and the cross compile packages upstreamed into alpine (see pmb#551). Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20231126104823.3723-1-ollieparanoid@postmarketos.org%3E
This commit is contained in:
parent
bcfdc3fb1b
commit
62a05d4fbc
4 changed files with 16 additions and 5 deletions
|
@ -23,12 +23,11 @@ def generate(args, pkgname):
|
|||
" gcc6.")
|
||||
pmb.helpers.run.user(args, ["cp", "-r", upstream, f"{args.work}/aportgen"])
|
||||
|
||||
# Rewrite APKBUILD (only building for native covers most use cases and
|
||||
# saves a lot of build time, can be changed on demand)
|
||||
# Rewrite APKBUILD
|
||||
fields = {
|
||||
"pkgname": pkgname,
|
||||
"pkgdesc": f"Stage2 cross-compiler for {arch}",
|
||||
"arch": pmb.config.arch_native,
|
||||
"arch": pmb.aportgen.get_cross_package_arches(pkgname),
|
||||
"depends": f"binutils-{arch} mpc1",
|
||||
"makedepends_build": "gcc g++ bison flex texinfo gawk zip"
|
||||
" gmp-dev mpfr-dev mpc1-dev zlib-dev",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue