cross-aarch64-linux-musl: use shared cross musl template.
With this I can now build xbps statically for aarch64.
This commit is contained in:
parent
1b65f4ea1c
commit
c03e5b0beb
1 changed files with 17 additions and 33 deletions
|
@ -11,8 +11,8 @@ _sysroot="/usr/${_triplet}"
|
|||
|
||||
pkgname=cross-${_triplet}
|
||||
version=0.17
|
||||
revision=1
|
||||
short_desc="Cross toolchain for ${_triplet} LE Hard Float target (musl)"
|
||||
revision=2
|
||||
short_desc="Cross toolchain for ARM64 LE target (musl)"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
homepage="http://www.voidlinux.eu"
|
||||
license="Public Domain"
|
||||
|
@ -21,7 +21,8 @@ distfiles="
|
|||
http://ftp.gnu.org/pub/gnu/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.bz2
|
||||
http://www.kernel.org/pub/linux/kernel/v3.x/linux-${_linux_version}.tar.xz
|
||||
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz"
|
||||
checksum="22defc65cfa3ef2a3395faaea75d6331c6e62ea5dfacfed3e2ec17b08c882923
|
||||
checksum="
|
||||
22defc65cfa3ef2a3395faaea75d6331c6e62ea5dfacfed3e2ec17b08c882923
|
||||
2020c98295856aa13fda0f2f3a4794490757fc24bcca918d52cc8b4917b972dd
|
||||
e4442436e59c74169e98d38d2e2a434c7b73f8eda0aa8f20e454eaf52270fc90
|
||||
fa928506415b9c555977daaf874c190eaf7fbbd16028cc5c5f33a00a83227813"
|
||||
|
@ -57,7 +58,7 @@ _binutils_build() {
|
|||
../binutils-${_binutils_version}/configure \
|
||||
--prefix=/usr --target=${_triplet} --with-sysroot=${_sysroot} \
|
||||
--disable-nls --disable-multilib --disable-werror \
|
||||
--disable-shared --enable-gold
|
||||
--disable-shared
|
||||
|
||||
make configure-host && make ${makejobs}
|
||||
make install
|
||||
|
@ -94,7 +95,7 @@ _linux_headers() {
|
|||
[ -f ${wrksrc}/.linux_build_done ] && return 0
|
||||
|
||||
cd ${wrksrc}
|
||||
msg_normal "Building Linux API headers for ARM\n"
|
||||
msg_normal "Building Linux API headers\n"
|
||||
|
||||
cd linux-${_linux_version}
|
||||
|
||||
|
@ -110,7 +111,9 @@ _musl_build() {
|
|||
cd ${wrksrc}/musl-${_musl_version}
|
||||
msg_normal "Building cross musl libc\n"
|
||||
|
||||
CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
|
||||
CC="${_triplet}-gcc" LD="${_triplet}-ld" AR="${_triplet}-ar" \
|
||||
AS="${_triplet}-as" RANLIB="${_triplet}-ranlib" \
|
||||
CFLAGS="-Os -pipe ${_archflags}" \
|
||||
./configure --prefix=/usr \
|
||||
|
||||
make ${makejobs}
|
||||
|
@ -130,19 +133,10 @@ _gcc_build() {
|
|||
|
||||
../gcc-${_gcc_version}/configure \
|
||||
--target=${_triplet} --with-sysroot=${_sysroot} --prefix=/usr \
|
||||
--enable-languages=c,c++,lto --enable-lto --disable-libsanitizer \
|
||||
--libexecdir=/usr/lib --enable-languages=c,c++,lto \
|
||||
--enable-lto --disable-libsanitizer \
|
||||
--disable-multilib --disable-nls --disable-libquadmath \
|
||||
--disable-libmudflap --enable-shared \
|
||||
--with-gnu-as --with-gnu-ld --disable-multilib \
|
||||
--disable-nls --disable-sjlj-exceptions \
|
||||
--enable-threads=posix --enable-long-longx \
|
||||
--enable-shared --enable-linker-build-id \
|
||||
--enable-gnu-unique-object --enable-lto \
|
||||
--disable-libquadmath --disable-libatomic \
|
||||
--disable-libssp --disable-libmudflap \
|
||||
--disable-libsanitizer --disable-libcilkrts \
|
||||
--disable-libitm --disable-libvtv --disable-libstdcxx-pch \
|
||||
--enable-libstdcxx-time --with-linker-hash-style=gnu
|
||||
--disable-libmudflap --enable-shared
|
||||
|
||||
make ${makejobs}
|
||||
|
||||
|
@ -204,8 +198,8 @@ do_install() {
|
|||
rm -rf ${DESTDIR}/usr/lib/gcc/${_triplet}/*/include-fixed/ \
|
||||
${DESTDIR}/usr/lib/gcc/${_triplet}/*/include/stddef.h
|
||||
|
||||
# Make ld-musl-armhf.so.1 symlink relative.
|
||||
#ln -sf libc.so ${DESTDIR}/${_sysroot}/usr/lib/ld-musl-armhf.so.1
|
||||
# Make ld-musl.so symlinks relative.
|
||||
ln -sf libc.so ${DESTDIR}/${_sysroot}/usr/lib/ld-musl-aarch64.so.1
|
||||
|
||||
# Remove unnecessary stuff
|
||||
rm -f ${DESTDIR}/usr/lib*/libiberty.a
|
||||
|
@ -214,24 +208,14 @@ do_install() {
|
|||
rm -rf ${DESTDIR}/${_sysroot}/usr/{sbin,share,libexec}
|
||||
rm -f ${DESTDIR}/${_sysroot}/libexec
|
||||
rm -f ${DESTDIR}/${_sysroot}/lib/*.py
|
||||
}
|
||||
|
||||
do_clean() {
|
||||
# Remove temporary stuff from masterdir
|
||||
rm -rf ${_sysroot}
|
||||
rm -f /usr/bin/${_triplet}*
|
||||
rm -rf /usr/lib/gcc/${_triplet}
|
||||
rm -rf /usr/libexec/gcc/${_triplet}
|
||||
rm -f ${DESTDIR}/${_sysroot}/{bin,sbin,lib}
|
||||
}
|
||||
|
||||
cross-aarch64-linux-musl-libc_package() {
|
||||
short_desc+=" - libc files"
|
||||
noarch=yes
|
||||
noverifydeps=yes
|
||||
noshlibprovides=yes
|
||||
pkg_install() {
|
||||
vmove usr/${_triplet}
|
||||
mkdir -p ${DESTDIR}/usr/${_triplet}/usr/
|
||||
mv ${PKGDESTDIR}/usr/${_triplet}/usr/bin ${DESTDIR}/usr/${_triplet}/usr
|
||||
|
||||
vmove ${_sysroot}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue