From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] [RFC] cross-arm-none-eabi rework
Date: Thu, 09 May 2019 19:02:46 +0200 [thread overview]
Message-ID: <20190509170246.Byt-vxahL-uobUTBA0yN94G23_qB74F8UUZ8vQnHcu0@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-11571@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 977 bytes --]
There is an updated pull request by sirikid against master on the void-packages repository
https://github.com/sirikid/void-packages cross-arm-none-eabi
https://github.com/void-linux/void-packages/pull/11571
[WIP] [RFC] cross-arm-none-eabi rework
Why:
- More granular updates â each component of the toolchain can be built and updated separately.
- Extensive use of template system features â less manual work and less mistakes.
Why not:
- Additional points of failure. Possible solution: arm-none-eabi [build helper](https://github.com/void-linux/void-packages/blob/master/Manual.md#build-helper-scripts).
- More packages in the repo with strange prefixes â this can confuse newcomers.
Please write your thoughts if you are interested in this package or in cross compilation in general, because I donât even know if anyone except me needs this rework.
A patch file from https://github.com/void-linux/void-packages/pull/11571.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cross-arm-none-eabi-11571.patch --]
[-- Type: application/text/x-diff, Size: 17939 bytes --]
From f4962cb9911ba7f365562fd8ec8cb86ba3337e8c Mon Sep 17 00:00:00 2001
From: Ivan Sokolov <ivan-p-sokolov@ya.ru>
Date: Tue, 30 Apr 2019 18:25:51 +0300
Subject: [PATCH 1/5] New package: cross-arm-none-eabi-binutils-2.32
---
srcpkgs/cross-arm-none-eabi-binutils/template | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 srcpkgs/cross-arm-none-eabi-binutils/template
diff --git a/srcpkgs/cross-arm-none-eabi-binutils/template b/srcpkgs/cross-arm-none-eabi-binutils/template
new file mode 100644
index 00000000000..bc7da156229
--- /dev/null
+++ b/srcpkgs/cross-arm-none-eabi-binutils/template
@@ -0,0 +1,27 @@
+# Template file for 'cross-${_triplet}-${_pkgname}'
+_triplet=arm-none-eabi
+_pkgname=binutils
+pkgname=cross-${_triplet}-${_pkgname}
+version=2.32
+revision=1
+wrksrc="${_pkgname}-${version}"
+build_style=gnu-configure
+configure_args="
+ --disable-nls
+ --enable-deterministic-archives
+ --enable-interwork
+ --enable-ld=default
+ --enable-multilib
+ --enable-plugins
+ --host=${XBPS_CROSS_TRIPLET}
+ --target=${_triplet}
+ --with-gnu-as
+ --with-gnu-ld
+ --with-sysroot=/usr/${_triplet}
+"
+short_desc="GNU binary utilities"
+maintainer="Ivan Sokolov <ivan-p-sokolov@ya.ru>"
+license="GPL-3.0-or-later"
+homepage="https://www.gnu.org/software/${_pkgname}/"
+distfiles="${GNU_SITE}/${_pkgname}/${_pkgname}-${version}.tar.xz"
+checksum=0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
From 017b5d6aaee5e0ade4f1d7b3ff87e8e8b0403fba Mon Sep 17 00:00:00 2001
From: Ivan Sokolov <ivan-p-sokolov@ya.ru>
Date: Mon, 6 May 2019 04:09:29 +0300
Subject: [PATCH 2/5] New package: cross-arm-none-eabi-gcc-8.3.0
---
srcpkgs/cross-arm-none-eabi-gcc/template | 70 ++++++++++++++++++++++++
1 file changed, 70 insertions(+)
create mode 100644 srcpkgs/cross-arm-none-eabi-gcc/template
diff --git a/srcpkgs/cross-arm-none-eabi-gcc/template b/srcpkgs/cross-arm-none-eabi-gcc/template
new file mode 100644
index 00000000000..d939d902723
--- /dev/null
+++ b/srcpkgs/cross-arm-none-eabi-gcc/template
@@ -0,0 +1,70 @@
+# Template file for 'cross-${_triplet}-${_pkgname}'
+_triplet=arm-none-eabi
+_pkgname=gcc
+pkgname=cross-${_triplet}-${_pkgname}
+version=8.3.0
+revision=1
+wrksrc="${_pkgname}-${version}"
+build_style=gnu-configure
+configure_args="
+ --disable-decimal-float
+ --disable-libffi
+ --disable-libgomp
+ --disable-libmudflap
+ --disable-libquadmath
+ --disable-libssp
+ --disable-libstdcxx-pch
+ --disable-nls
+ --disable-shared
+ --disable-shared
+ --disable-threads
+ --disable-tls
+ --disable-werror
+ --enable-__cxa_atexit
+ --enable-c99
+ --enable-gnu-indirect-function
+ --enable-internetwork
+ --enable-languages=c,c++
+ --enable-long-long
+ --enable-multilib
+ --enable-plugins
+ --host=${XBPS_CROSS_TRIPLET}
+ --libdir=/usr/lib
+ --libexecdir=/usr/lib
+ --prefix=/usr
+ --quiet
+ --target=${_triplet}
+ --with-gmp
+ --with-gnu-as
+ --with-gnu-ld
+ --with-headers=/usr/${_triplet}/include
+ --with-host-libstdcxx='-static-libgcc'
+ --with-isl
+ --with-libelf
+ --with-mpc
+ --with-mpfr
+ --with-multilib-list=rmprofile
+ --with-native-system-header-dir=/include
+ --with-newlib
+ --with-python-dir=share/${pkgname}
+ --with-sysroot=/usr/${_triplet}
+ --with-system-zlib
+"
+make_build_args="INHIBIT_LIBC_CFLAGS=-DUSE_TM_CLONE_REGISTRY=0 -s"
+make_build_target="all-gcc"
+make_install_target="install-gcc"
+hostmakedepends="bison flex perl"
+makedepends="gmp-devel isl16-devel libmpc-devel mpfr-devel zlib-devel"
+short_desc="GNU Compiler Collection"
+maintainer="Ivan Sokolov <ivan-p-sokolov@ya.ru>"
+license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
+homepage="https://gcc.gnu.org"
+distfiles="${GNU_SITE}/${_pkgname}/${_pkgname}-${version}/${_pkgname}-${version}.tar.xz"
+checksum=64baadfe6cc0f4947a84cb12d7f0dfaf45bb58b7e92461639596c21e02d97d2c
+alternatives="arm-none-eabi-cc:/usr/bin/arm-none-eabi-cc:/usr/bin/arm-none-eabi-gcc"
+nopie=yes
+
+post_install() {
+ rm -fr ${DESTDIR}/usr/share/info
+ rm -fr ${DESTDIR}/usr/share/man/man7
+}
From c434104ceb638b9d6af4554d06daa7bacfd69ed9 Mon Sep 17 00:00:00 2001
From: Ivan Sokolov <ivan-p-sokolov@ya.ru>
Date: Wed, 8 May 2019 23:00:16 +0300
Subject: [PATCH 3/5] New package: cross-arm-none-eabi-newlib-3.1.0.20181231
---
srcpkgs/cross-arm-none-eabi-newlib/template | 28 +++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 srcpkgs/cross-arm-none-eabi-newlib/template
diff --git a/srcpkgs/cross-arm-none-eabi-newlib/template b/srcpkgs/cross-arm-none-eabi-newlib/template
new file mode 100644
index 00000000000..076c52c93f3
--- /dev/null
+++ b/srcpkgs/cross-arm-none-eabi-newlib/template
@@ -0,0 +1,28 @@
+# Template file for 'cross-${_triplet}-${_pkgname}'
+_triplet=arm-none-eabi
+_pkgname=newlib
+pkgname=cross-${_triplet}-${_pkgname}
+version=3.1.0.20181231
+revision=1
+wrksrc="${_pkgname}-${version}"
+build_style=gnu-configure
+configure_args="
+ --disable-newlib-supplied-syscalls
+ --disable-nls
+ --enable-interwork
+ --enable-newlib-io-long-long
+ --enable-newlib-register-fini
+ --host=${XBPS_CROSS_TRIPLET}
+ --prefix=/usr
+ --target=${_triplet}
+ --with-gnu-as
+ --with-gnu-ld
+"
+hostmakedepends="cross-arm-none-eabi-binutils cross-arm-none-eabi-gcc"
+short_desc="C library intended for use on embedded systems"
+maintainer="Ivan Sokolov <ivan-p-sokolov@ya.ru>"
+license="GPL-3.0-or-later"
+homepage="https://www.sourceware.org/${_pkgname}/"
+distfiles="ftp://sources.redhat.com/pub/${_pkgname}/${_pkgname}-${version}.tar.gz"
+checksum=9e12fea7297648b114434033ed4458755afe7b9b6c7d58123389e82bd37681c0
+nostrip=yes
From 500510526c41c052e6c46f57b77bc2a3d022d851 Mon Sep 17 00:00:00 2001
From: Ivan Sokolov <ivan-p-sokolov@ya.ru>
Date: Wed, 8 May 2019 23:16:24 +0300
Subject: [PATCH 4/5] New package: cross-arm-none-eabi-gdb-8.2.1
---
srcpkgs/cross-arm-none-eabi-gdb/template | 29 ++++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 srcpkgs/cross-arm-none-eabi-gdb/template
diff --git a/srcpkgs/cross-arm-none-eabi-gdb/template b/srcpkgs/cross-arm-none-eabi-gdb/template
new file mode 100644
index 00000000000..e749f974f1c
--- /dev/null
+++ b/srcpkgs/cross-arm-none-eabi-gdb/template
@@ -0,0 +1,29 @@
+# Template file for 'cross-${_triplet}-${_pkgname}'
+_triplet=arm-none-eabi
+_pkgname=gdb
+pkgname=cross-${_triplet}-${_pkgname}
+version=8.2.1
+revision=1
+wrksrc="${_pkgname}-${version}"
+build_style=gnu-configure
+pycompile_dirs="/usr/share/${_pkgname}"
+configure_args="
+ --target=${_triplet}
+ --with-expat
+ --with-python3
+ --with-system-readline
+ --with-system-zlib
+"
+hostmakedepends="perl python python3-devel"
+makedepends="ncurses-devel zlib-devel readline-devel expat-devel python3-devel gettext-libs"
+short_desc="GNU Debugger"
+maintainer="Ivan Sokolov <ivan-p-sokolov@ya.ru>"
+license="GPL-3.0-or-later"
+homepage="https://www.gnu.org/software/${_pkgname}"
+distfiles="${GNU_SITE}/${_pkgname}/${_pkgname}-${version}.tar.xz"
+checksum=0a6a432907a03c5c8eaad3c3cffd50c00a40c3a5e3c4039440624bae703f2202
+
+post_install() {
+ # resolve conflicts with binutils
+ rm -fr ${DESTDIR}/usr/{include,lib,lib64,share/info}
+}
From ba798d68b496cf5dcccef052fd3901e8a55f084d Mon Sep 17 00:00:00 2001
From: Ivan Sokolov <ivan-p-sokolov@ya.ru>
Date: Wed, 8 May 2019 23:21:59 +0300
Subject: [PATCH 5/5] cross-arm-none-eabi: update to 0.4.
---
srcpkgs/cross-arm-none-eabi/template | 368 +--------------------------
1 file changed, 6 insertions(+), 362 deletions(-)
diff --git a/srcpkgs/cross-arm-none-eabi/template b/srcpkgs/cross-arm-none-eabi/template
index c1c1d674dbb..c1e909efad3 100644
--- a/srcpkgs/cross-arm-none-eabi/template
+++ b/srcpkgs/cross-arm-none-eabi/template
@@ -1,367 +1,11 @@
-# Template file for 'cross-arm-none-eabi'
-_binutils_version=2.32
-_gcc_version=7.3.0
-_newlib_version=2.4.0.20161025
-
+# Template file for 'cross-${_triplet}'
_triplet=arm-none-eabi
-_sysroot="/usr/${_triplet}"
-
pkgname=cross-${_triplet}
-version=0.3
-revision=2
+version=0.4
+revision=1
+build_style=meta
+depends="cross-arm-none-eabi-binutils cross-arm-none-eabi-gcc cross-arm-none-eabi-newlib"
short_desc="GNU cross bare metal toolchain"
maintainer="Thomas Bernard <thomas@famillebernardgouriou.fr>"
+license="metapackage"
homepage="https://www.voidlinux.org/"
-license="GPL-3, GPL-2, LGPL-2.1"
-distfiles="
- ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
- ${GNU_SITE}/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.xz
- ftp://sources.redhat.com/pub/newlib/newlib-${_newlib_version}.tar.gz"
-
-checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c
- cbecbc637496fcec02829c12babf8441c6500eb1933c776d2fa4e0a9a35f081f"
-
-lib32disabled=yes
-nocross=yes
-nopie=yes
-nostrip=yes
-nodebug=yes
-create_wrksrc=yes
-
-hostmakedepends="perl flex bison"
-makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl16-devel"
-
-_apply_patch() {
- local args="$1" pname="$(basename $2)"
-
- if [ ! -f ".${pname}_done" ]; then
- patch -N $args -i $2
- touch .${pname}_done
- fi
-}
-
-pre_build() {
- msg_normal "Preparing gcc source tree\n"
-}
-
-_binutils_build() {
- local _args
-
- [ -f ${wrksrc}/.binutils_build_done ] && return 0
-
- cd ${wrksrc}
- msg_normal "Building cross binutils\n"
- [ ! -d binutils-build ] && mkdir binutils-build
- cd binutils-build
- _args="--prefix=/usr"
- _args+=" --target=${_triplet}"
- _args+=" --host=${XBPS_CROSS_TRIPLET}"
- _args+=" --with-sysroot=${_sysroot}"
- _args+=" --enable-multilib"
- _args+=" --enable-interwork"
- _args+=" --with-gnu-as"
- _args+=" --with-gnu-ld"
- _args+=" --disable-nls"
- _args+=" --enable-ld=default"
- _args+=" --enable-plugins"
- _args+=" --enable-deterministic-archives"
-
- ../binutils-${_binutils_version}/configure ${_args}
-
- make configure-host
- make ${makejobs}
- make DESTDIR= install
-
- touch ${wrksrc}/.binutils_build_done
-}
-
-_gcc_bootstrap() {
- local _args
-
- [ -f ${wrksrc}/.gcc_bootstrap_done ] && return 0
-
- cd ${wrksrc}/gcc-${_gcc_version}
- _apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p1 ${FILESDIR}/enable-with-multilib-list-for-arm.patch
-
- msg_normal "Building cross gcc bootstrap\n"
-
- [ ! -d ../gcc-bootstrap ] && mkdir ../gcc-bootstrap
- cd ../gcc-bootstrap
-
- _args="--prefix=/usr"
- _args+=" --target=${_triplet}"
- _args+=" --host=${XBPS_CROSS_TRIPLET}"
- _args+=" --without-headers"
- _args+=" --enable-internetwork"
- _args+=" --enable-multilib"
- _args+=" --enable-languages=c"
- _args+=" --with-newlib"
- _args+=" --disable-nls"
- _args+=" --disable-shared"
- _args+=" --disable-libquadmath"
- _args+=" --disable-decimal-float"
- _args+=" --disable-libgomp"
- _args+=" --disable-libmpx"
- _args+=" --disable-libmudflap"
- _args+=" --disable-libssp"
- _args+=" --disable-libitm"
- _args+=" --disable-libatomic"
- _args+=" --disable-threads"
- _args+=" --disable-sjlj-exceptions"
- _args+=" --with-gnu-ld"
- _args+=" --with-gnu-as"
-
- CFLAGS="-O0 -g0" CXXFLAGS="-O0 -g0" \
- ../gcc-${_gcc_version}/configure ${_args}
-
- make ${makejobs} -s all-gcc
- make install-gcc
-
- touch ${wrksrc}/.gcc_bootstrap_done
-}
-
-_newlib_build() {
- local _args
-
- [ -f ${wrksrc}/.newlib_build_done ] && return 0
-
- cd ${wrksrc}
- msg_normal "Building cross newlib\n"
-
- [ ! -d newlib-build ] && mkdir newlib-build
- cd newlib-build
-
- export CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections"
-
- _args="--prefix=/usr"
- _args+=" --target=${_triplet}"
- _args+=" --host=${XBPS_CROSS_TRIPLET}"
- _args+=" --enable-interwork"
- _args+=" --with-gnu-as"
- _args+=" --with-gnu-ld"
- _args+=" --disable-nls"
- _args+=" --disable-newlib-supplied-syscalls"
- _args+=" --enable-newlib-io-long-long"
- _args+=" --enable-newlib-register-fini"
-
- ../newlib-${_newlib_version}/configure ${_args}
-
- make ${makejobs}
- make install
-
- touch ${wrksrc}/.newlib_build_done
-}
-
-_newlib_nano_build() {
- local _args
-
- [ -f ${wrksrc}/.newlib_nano_build_done ] && return 0
-
- cd ${wrksrc}
- msg_normal "Building cross newlib nano\n"
-
- [ ! -d newlib-nano-build ] && mkdir newlib-nano-build
- cd newlib-nano-build
-
- export CFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections"
-
- _args="--prefix=/usr"
- _args+=" --target=${_triplet}"
- _args+=" --enable-interwork"
- _args+=" --with-gnu-as"
- _args+=" --with-gnu-ld"
- _args+=" --disable-nls"
- _args+=" --disable-newlib-supplied-syscalls"
- _args+=" --disable-newlib-fvwrite-in-streamio"
- _args+=" --disable-newlib-fseek-optimization"
- _args+=" --disable-newlib-wide-orient"
- _args+=" --enable-newlib-nano-malloc"
- _args+=" --disable-newlib-unbuf-stream-opt"
- _args+=" --enable-lite-exit"
- _args+=" --enable-newlib-global-atexit"
- _args+=" --enable-newlib-nano-formatted-io"
- _args+=" --enable-newlib-reent-small"
-
- ../newlib-${_newlib_version}/configure ${_args}
-
- make ${makejobs}
-
- touch ${wrksrc}/.newlib_nano_build_done
-}
-
-
-_gcc_build() {
-
- [ -f ${wrksrc}/.gcc_build_done ] && return 0
-
- cd ${wrksrc}
- msg_normal "Building cross gcc newlib\n"
-
- [ ! -d gcc-build ] && mkdir gcc-build
- cd gcc-build
-
- export CFLAGS='-g -O2 -pipe -ffunction-sections -fdata-sections'
- export CXXFLAGS='-g -O2 -pipe -ffunction-sections -fdata-sections'
- _do_gcc_build
-
- touch ${wrksrc}/.gcc_build_done
-}
-
-_gcc_nano_build() {
-
- [ -f ${wrksrc}/.gcc_nano_build_done ] && return 0
-
- cd ${wrksrc}
- msg_normal "Building cross gcc newlib nano\n"
-
- [ ! -d gcc-nano-build ] && mkdir gcc-nano-build
- cd gcc-nano-build
-
- export CFLAGS='-g -Os -pipe -ffunction-sections -fdata-sections'
- export CXXFLAGS='-g -Os -pipe -ffunction-sections -fdata-sections'
- _do_gcc_build
-
- touch ${wrksrc}/.gcc_nano_build_done
-}
-
-
-_do_gcc_build() {
- unset LD AS CPP
-
- local _args
-
- export CC="gcc"
- _args="--prefix=/usr"
- _args+=" --host=${XBPS_CROSS_TRIPLET}"
- _args+=" --libdir=/usr/lib"
- _args+=" --libexecdir=/usr/lib"
- _args+=" --target=${_triplet}"
- _args+=" --with-sysroot=${_sysroot}"
- _args+=" --quiet"
- _args+=" --enable-languages=c,c++"
- _args+=" --with-native-system-header-dir=/include"
- _args+=" --libexecdir=/usr/lib"
- _args+=" --enable-plugins"
- _args+=" --with-gmp"
- _args+=" --with-mpfr"
- _args+=" --with-mpc"
- _args+=" --disable-decimal-float"
- _args+=" --disable-libffi"
- _args+=" --disable-libgomp"
- _args+=" --disable-libmudflap"
- _args+=" --disable-libquadmath"
- _args+=" --disable-libssp"
- _args+=" --disable-libstdcxx-pch"
- _args+=" --disable-nls"
- _args+=" --disable-shared"
- _args+=" --disable-threads"
- _args+=" --disable-tls"
- _args+=" --with-gnu-as"
- _args+=" --with-gnu-ld"
- _args+=" --with-system-zlib"
- _args+=" --with-newlib"
- _args+=" --with-headers=${_sysroot}/include"
- _args+=" --with-python-dir=share/gcc-arm-none-eabi"
- _args+=" --with-isl"
- _args+=" --with-libelf"
- _args+=" --enable-gnu-indirect-function"
- _args+=" --with-host-libstdcxx='-static-libgcc'"
- _args+=" --enable-internetwork"
- _args+=" --enable-multilib"
- _args+=" --enable-long-long"
- _args+=" --enable-c99"
- _args+=" --enable-__cxa_atexit"
- _args+=" --disable-shared"
- _args+=" --disable-werror"
- _args+=" --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r"
-
- ../gcc-${_gcc_version}/configure ${_args}
-
- make ${makejobs} INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0'
-
-}
-
-do_build() {
- for f in include lib bin; do
- if [ ! -d ${_sysroot}/usr/${f} ]; then
- mkdir -p ${_sysroot}/usr/${f}
- fi
- if [ ! -h ${_sysroot}/${f} ]; then
- ln -sfr ${_sysroot}/usr/${f} ${_sysroot}/${f}
- fi
- done
-
- # Ensure we use sane environment
- unset CC CXX CPP LD AS AR RANLIB OBJDUMP READELF NM
- unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
- export CFLAGS="-Os" CXXFLAGS="-Os"
-
- _binutils_build
- _gcc_bootstrap
- _newlib_nano_build
- _newlib_build
- _gcc_build
- _gcc_nano_build
-}
-
-do_install() {
- for f in include lib bin; do
- if [ ! -d ${DESTDIR}/${_sysroot}/usr/${f} ]; then
- echo "Creating directory ${f}"
- mkdir -p ${DESTDIR}/${_sysroot}/usr/${f}
- fi
- if [ ! -h ${DESTDIR}/${_sysroot}/${f} ]; then
- echo "Linking directory ${f}"
- ln -sfr ${DESTDIR}/${_sysroot}/usr/${f} \
- ${DESTDIR}/${_sysroot}/${f}
- fi
- done
- # install cross binutils
- cd ${wrksrc}/binutils-build
- make DESTDIR=${DESTDIR} install
-
- # install cross gcc
- cd ${wrksrc}/gcc-build
- make DESTDIR=${DESTDIR} install
-
- cd ${wrksrc}/gcc-nano-build
- make DESTDIR=${DESTDIR}.nano install
-
- # we need only libstdc nano files
- multilibs=( $(${DESTDIR}/usr/bin/${_triplet}-gcc -print-multi-lib 2>/dev/null) )
- for multilib in "${multilibs[@]}"; do
- dir="${multilib%%;*}"
- from_dir=${DESTDIR}.nano/usr/${_triplet}/lib/$dir
- to_dir=${DESTDIR}/${_sysroot}/lib/$dir
- cp -f $from_dir/libstdc++.a $to_dir/libstdc++_nano.a
- cp -f $from_dir/libsupc++.a $to_dir/libsupc++_nano.a
- done
-
- # install newlib for target
- cd ${wrksrc}/newlib-nano-build
- make DESTDIR=${DESTDIR} install
- find "$DESTDIR" -regex ".*/lib\(c\|g\|rdimon\)\.a" -exec rename .a _nano.a '{}' \;
-
- cd ${wrksrc}/newlib-build
- make DESTDIR=${DESTDIR} install
-
- # strip target binaries
- find ${DESTDIR}/${_sysroot}/usr/lib \( -name "*.a" -or -name "*.o" \) -exec ${_triplet}-strip '{}' \;
- find ${DESTDIR}/usr/lib/gcc/${_triplet}/${_gcc_version} \( -name "*.a" -or -name "*.o" \) -exec ${_triplet}-strip '{}' \;
-
- # strip host binaries
- find ${DESTDIR}/usr/lib/gcc/${_triplet}/${_gcc_version} -type f -and \( -executable \) -exec /usr/bin/strip '{}' \;
- find ${DESTDIR}/usr/bin -type f -and \( -executable \) -exec /usr/bin/strip '{}' \;
-
- # Remove unnecessary stuff
- rm -rf ${DESTDIR}.nano
- rm -f ${DESTDIR}/usr/lib*/libiberty.a
- rm -rf ${DESTDIR}/usr/share
- rm -rf ${DESTDIR}/${_sysroot}/{sbin,etc,var}
- rm -rf ${DESTDIR}/${_sysroot}/usr/{sbin,share,libexec}
- rm -rf ${DESTDIR}/${_sysroot}/usr/lib/gconv
- rm -f ${DESTDIR}/usr/lib/libcc1.*
- rm -f ${DESTDIR}/${_sysroot}/libexec
-}
next prev parent reply other threads:[~2019-05-09 17:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 21:51 [PR PATCH] " voidlinux-github
2019-05-09 15:00 ` voidlinux-github
2019-05-09 15:57 ` voidlinux-github
2019-05-09 16:09 ` voidlinux-github
2019-05-09 16:12 ` voidlinux-github
2019-05-09 16:44 ` voidlinux-github
2019-05-09 17:02 ` voidlinux-github [this message]
2019-05-09 17:02 ` [PR PATCH] [Updated] " voidlinux-github
2019-05-09 17:26 ` voidlinux-github
2019-05-09 17:29 ` voidlinux-github
2019-05-09 18:32 ` voidlinux-github
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190509170246.Byt-vxahL-uobUTBA0yN94G23_qB74F8UUZ8vQnHcu0@z \
--to=voidlinux-github@inbox.vuxu.org \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).