Don't compile cross-compiler packages for the host arch
Example: Building gcc-armhf for armhf does not make sense, so this commit changes arch="all" to arch="aarch64 x86_64". This helps to simplify the repository scripts (#970).
This commit is contained in:
parent
17122cf242
commit
9f674675eb
|
@ -12,8 +12,8 @@ depends=""
|
|||
makedepends_build=""
|
||||
makedepends_host=""
|
||||
makedepends="gettext libtool autoconf automake bison"
|
||||
arch="all"
|
||||
license="GPL2 GPL3+ LGPL2 BSD"
|
||||
arch="armhf x86_64"
|
||||
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
|
||||
subpackages=""
|
||||
source="http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2
|
||||
binutils-ld-fix-static-linking.patch
|
||||
|
|
|
@ -12,8 +12,8 @@ depends=""
|
|||
makedepends_build=""
|
||||
makedepends_host=""
|
||||
makedepends="gettext libtool autoconf automake bison"
|
||||
arch="all"
|
||||
license="GPL2 GPL3+ LGPL2 BSD"
|
||||
arch="aarch64 x86_64"
|
||||
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
|
||||
subpackages=""
|
||||
source="http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2
|
||||
binutils-ld-fix-static-linking.patch
|
||||
|
|
|
@ -12,7 +12,7 @@ depends=""
|
|||
makedepends_build=""
|
||||
makedepends_host=""
|
||||
makedepends="gettext libtool autoconf automake bison"
|
||||
arch="all"
|
||||
arch="armhf aarch64"
|
||||
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
|
||||
subpackages=""
|
||||
source="http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2
|
||||
|
|
|
@ -57,7 +57,7 @@ pkgname="gcc-aarch64"
|
|||
pkgrel=6
|
||||
pkgdesc="Stage2 cross-compiler for aarch64"
|
||||
url="http://gcc.gnu.org"
|
||||
arch="all"
|
||||
arch="armhf x86_64"
|
||||
license="GPL LGPL"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="isl binutils-aarch64"
|
||||
|
|
|
@ -57,7 +57,7 @@ pkgname="gcc-armhf"
|
|||
pkgrel=6
|
||||
pkgdesc="Stage2 cross-compiler for armhf"
|
||||
url="http://gcc.gnu.org"
|
||||
arch="all"
|
||||
arch="aarch64 x86_64"
|
||||
license="GPL LGPL"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="isl binutils-armhf"
|
||||
|
|
|
@ -57,7 +57,7 @@ pkgname="gcc-x86_64"
|
|||
pkgrel=6
|
||||
pkgdesc="Stage2 cross-compiler for x86_64"
|
||||
url="http://gcc.gnu.org"
|
||||
arch="all"
|
||||
arch="armhf aarch64"
|
||||
license="GPL LGPL"
|
||||
_gccrel=$pkgver-r$pkgrel
|
||||
depends="isl binutils-x86_64"
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen musl-aarch64
|
||||
|
||||
pkgname=musl-aarch64
|
||||
pkgver=1.1.18
|
||||
pkgname="musl-aarch64"
|
||||
pkgver="1.1.18"
|
||||
pkgrel=5
|
||||
arch="armhf x86_64"
|
||||
subpackages="musl-dev-aarch64:package_dev"
|
||||
|
||||
_arch="aarch64"
|
||||
|
@ -11,7 +12,6 @@ _mirror="https://nl.alpinelinux.org/alpine/"
|
|||
|
||||
url="https://musl-libc.org"
|
||||
license="MIT"
|
||||
arch="all"
|
||||
options="!check !strip"
|
||||
pkgdesc="the musl library (lib c) implementation for $_arch"
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen musl-armhf
|
||||
|
||||
pkgname=musl-armhf
|
||||
pkgver=1.1.18
|
||||
pkgname="musl-armhf"
|
||||
pkgver="1.1.18"
|
||||
pkgrel=5
|
||||
arch="aarch64 x86_64"
|
||||
subpackages="musl-dev-armhf:package_dev"
|
||||
|
||||
_arch="armhf"
|
||||
|
@ -11,7 +12,6 @@ _mirror="https://nl.alpinelinux.org/alpine/"
|
|||
|
||||
url="https://musl-libc.org"
|
||||
license="MIT"
|
||||
arch="all"
|
||||
options="!check !strip"
|
||||
pkgdesc="the musl library (lib c) implementation for $_arch"
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen musl-x86_64
|
||||
|
||||
pkgname=musl-x86_64
|
||||
pkgver=1.1.18
|
||||
pkgname="musl-x86_64"
|
||||
pkgver="1.1.18"
|
||||
pkgrel=5
|
||||
arch="armhf aarch64"
|
||||
subpackages="musl-dev-x86_64:package_dev"
|
||||
|
||||
_arch="x86_64"
|
||||
|
@ -11,7 +12,6 @@ _mirror="http://dl-cdn.alpinelinux.org/alpine/"
|
|||
|
||||
url="https://musl-libc.org"
|
||||
license="MIT"
|
||||
arch="all"
|
||||
options="!check !strip"
|
||||
pkgdesc="the musl library (lib c) implementation for $_arch"
|
||||
|
||||
|
|
|
@ -29,10 +29,15 @@ def generate(args, pkgname):
|
|||
pmb.helpers.git.clone(args, "aports_upstream")
|
||||
pmb.helpers.run.user(args, ["cp", "-r", upstream, args.work + "/aportgen"])
|
||||
|
||||
# Architectures to build this package for
|
||||
arches = list(pmb.config.build_device_architectures)
|
||||
arches.remove(arch)
|
||||
|
||||
# Rewrite APKBUILD
|
||||
fields = {
|
||||
"pkgname": pkgname,
|
||||
"pkgdesc": "Tools necessary to build programs for " + arch + " targets",
|
||||
"arch": " ".join(arches),
|
||||
"makedepends_build": "",
|
||||
"makedepends_host": "",
|
||||
"makedepends": "gettext libtool autoconf automake bison",
|
||||
|
|
|
@ -29,10 +29,15 @@ def generate(args, pkgname):
|
|||
pmb.helpers.git.clone(args, "aports_upstream")
|
||||
pmb.helpers.run.user(args, ["cp", "-r", upstream, args.work + "/aportgen"])
|
||||
|
||||
# Architectures to build this package for
|
||||
arches = list(pmb.config.build_device_architectures)
|
||||
arches.remove(arch)
|
||||
|
||||
# Rewrite APKBUILD
|
||||
fields = {
|
||||
"pkgname": pkgname,
|
||||
"pkgdesc": "Stage2 cross-compiler for " + arch,
|
||||
"arch": " ".join(arches),
|
||||
"depends": "isl binutils-" + arch,
|
||||
"makedepends_build": "gcc g++ paxmark bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev",
|
||||
"makedepends_host": "linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-" + arch + " binutils-" + arch,
|
||||
|
|
|
@ -37,6 +37,10 @@ def generate(args, pkgname):
|
|||
pkgver = version.split("-r")[0]
|
||||
pkgrel = version.split("-r")[1]
|
||||
|
||||
# Architectures to build this package for
|
||||
arches = list(pmb.config.build_device_architectures)
|
||||
arches.remove(arch)
|
||||
|
||||
# Copy the apk files to the distfiles cache
|
||||
for subpkgname in ["musl", "musl-dev"]:
|
||||
pattern = (args.work + "/cache_apk_" + arch + "/" + subpkgname +
|
||||
|
@ -66,9 +70,10 @@ def generate(args, pkgname):
|
|||
handle.write("# Automatically generated aport, do not edit!\n"
|
||||
"# Generator: pmbootstrap aportgen " + pkgname + "\n"
|
||||
"\n"
|
||||
"pkgname=" + pkgname + "\n"
|
||||
"pkgver=" + pkgver + "\n"
|
||||
"pkgname=\"" + pkgname + "\"\n"
|
||||
"pkgver=\"" + pkgver + "\"\n"
|
||||
"pkgrel=" + pkgrel + "\n"
|
||||
"arch=\"" + " ".join(arches) + "\"\n"
|
||||
"subpackages=\"musl-dev-" + arch + ":package_dev\"\n"
|
||||
"\n"
|
||||
"_arch=\"" + arch + "\"\n"
|
||||
|
@ -78,7 +83,6 @@ def generate(args, pkgname):
|
|||
static = """
|
||||
url="https://musl-libc.org"
|
||||
license="MIT"
|
||||
arch="all"
|
||||
options="!check !strip"
|
||||
pkgdesc="the musl library (lib c) implementation for $_arch"
|
||||
|
||||
|
|
Loading…
Reference in New Issue