Skip to content

Commit

Permalink
Add manifest and build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ali1234 committed Dec 30, 2018
1 parent 80d2bf0 commit a10d4f8
Show file tree
Hide file tree
Showing 6 changed files with 234 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/_build
/.idea
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "abe"]
path = abe
url = git://git.linaro.org/toolchain/abe.git
shallow = true
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# rpi-toolchain
A gcc cross toolchain for all Raspberry Pi models with multiarch support

A gcc cross toolchain for all Raspberry Pi models with multiarch support.

Linaro toolchains are built using a tool called ABE. This is similar to
crosstool-ng. After building it produces a manifest which can be used to
reproduce the build.

This toolchain is built by taking the Linaro release manifest and modifying
the compiler configuration to produce armv6 compatible binaries which can
run on all models of Raspberry Pi.

The changes required for this are very small. In the manifest, only the
variables `gcc_stage1_flags` and `gcc_stage2_flags` are modified.

The flags:

--with-fpu=vfpv3-d16 --with-mode=thumb --with-tune=cortex-a9 --with-arch=armv7-a

are replaced by:

--with-fpu=vfp --with-arch=armv6
1 change: 1 addition & 0 deletions abe
Submodule abe added at bb166f
12 changes: 12 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

VERSION=$(git describe --always --dirty)

rm -rf _build/builds _build/sysroots _build/Makefile _build/config.log _build/config.status _build/host.conf
rm -rf _build/snapshots/*arm-linux-gnueabihf.tar.xz*
mkdir _build
cd _build
../abe/configure

../abe/abe.sh --manifest ../gcc-linaro-6.4.1-2018.05+rpi-linux-manifest.txt \
--release 2018.05+rpi$VERSION --build all --tarbin
194 changes: 194 additions & 0 deletions gcc-linaro-6.4.1-2018.05+rpi-linux-manifest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
manifest_format=1.5

# Note that for ABE, these parameters are not used
# Component data for gmp
gmp_url=http://snapshots.linaro.org/components/toolchain/infrastructure
gmp_filespec=gmp-6.1.0.tar.xz
gmp_md5sum=a9868ef2556ad6a2909babcd1428f3c7
gmp_mingw_only="no"
gmp_configure="--enable-cxx --enable-fft"
gmp_staticlink="yes"

# Component data for mpfr
mpfr_url=http://snapshots.linaro.org/components/toolchain/infrastructure
mpfr_filespec=mpfr-3.1.4.tar.xz
mpfr_md5sum=064b2c18185038e404a401b830d59be8
mpfr_mingw_only="no"
mpfr_configure="--with-gmp=${local_builds}/destdir/${host}"
mpfr_staticlink="yes"

# Component data for mpc
mpc_url=http://snapshots.linaro.org/components/toolchain/infrastructure/
mpc_filespec=mpc-1.0.3.tar.gz
mpc_md5sum=d6a1d5f8ddea3abd2cc3e98f58352d26
mpc_mingw_only="no"
mpc_configure="--with-gmp=${local_builds}/destdir/${host} --with-mpfr=${local_builds}/destdir/${host}"
mpc_staticlink="yes"

# Component data for linux
linux_url=http://snapshots.linaro.org/components/toolchain/infrastructure
linux_filespec=linux-4.6.tar.xz
linux_md5sum=d2927020e24a76da4ab482a8bc3e9ef3
linux_mingw_only="no"
linux_staticlink="yes"

# Component data for dejagnu
dejagnu_url=http://git-us.linaro.org/git/toolchain
dejagnu_branch=linaro-local/stable
dejagnu_revision=9c19d3d7473ef731b74f3a48fcce5a168bf701ec
dejagnu_filespec=dejagnu.git
dejagnu_mingw_only="no"
dejagnu_staticlink="yes"

# Component data for expat
expat_url=http://snapshots.linaro.org/components/toolchain/infrastructure/
expat_filespec=expat-2.1.0-1-mingw32-dev.tar.xz
expat_md5sum=1dae54e2670882843d496692154a0e27
expat_mingw_only="yes"
expat_staticlink="yes"

# Component data for python
python_url=http://snapshots.linaro.org/components/toolchain/infrastructure/
python_filespec=python-2.7.4-mingw32.tar.xz
python_md5sum=9b3092eff5508c4802936dfe4f5225ef
python_mingw_only="yes"
python_staticlink="yes"

# Component data for libiconv
libiconv_url=http://snapshots.linaro.org/components/toolchain/infrastructure/
libiconv_filespec=libiconv-1.14-3-mingw32-dev.tar.xz
libiconv_md5sum=7ead614fa3a8bc266e70c6fcdf198219
libiconv_mingw_only="yes"
libiconv_staticlink="yes"

# Component data for binutils
binutils_url=http://git-us.linaro.org/git/toolchain
binutils_branch=users/linaro/binutils-2_27-branch
binutils_revision=f3ae7dbacf5aeb9df207f5dacd778a2f6eab24fc
binutils_filespec=binutils-gdb.git
binutils_mingw_only="no"
binutils_configure="--enable-lto --enable-plugins --enable-gold --disable-werror CPPFLAGS=-UFORTIFY_SOURCE --with-pkgversion=Linaro_Binutils-2018.05 --disable-gdb --disable-sim --disable-libdecnumber --disable-readline --with-sysroot=${sysroots}"
binutils_staticlink="yes"

# Component data for gcc
gcc_url=http://git-us.linaro.org/git/toolchain
gcc_branch=linaro-6.4-2018.05
gcc_revision=7b15d0869c096fe39603ad63dc19ab7cf035eb70
gcc_filespec=gcc.git
gcc_makeflags="MAKEINFOFLAGS=--force"
gcc_mingw_only="no"
gcc_configure=
gcc_mingw_extraconf="--with-libiconv-prefix=${local_builds}/destdir/${host}/usr --with-system-zlib=no"
gcc_staticlink="no"
gcc_stage1_flags="--with-mpc=${local_builds}/destdir/${host} --with-mpfr=${local_builds}/destdir/${host} --with-gmp=${local_builds}/destdir/${host} --with-gnu-as --with-gnu-ld --disable-libmudflap --enable-lto --enable-shared --without-included-gettext --enable-nls --with-system-zlib --disable-sjlj-exceptions --enable-gnu-unique-object --enable-linker-build-id --disable-libstdcxx-pch --enable-c99 --enable-clocale=gnu --enable-libstdcxx-debug --enable-long-long --with-cloog=no --with-ppl=no --with-isl=no --disable-multilib --with-float=hard --with-fpu=vfp --with-arch=armv6 --enable-threads=posix --enable-multiarch --enable-libstdcxx-time=yes --enable-gnu-indirect-function --disable-libssp --disable-libquadmath --disable-threads --without-headers --with-newlib --disable-libmudflap --disable-bootstrap --disable-decimal-float --disable-libgomp --disable-libatomic --disable-libsanitizer --disable-plugins --disable-libitm --enable-languages=c --with-sysroot=${local_builds}/sysroot-arm-linux-gnueabihf --disable-shared --with-glibc-version=2.18"
gcc_stage2_flags="--with-mpc=${local_builds}/destdir/${host} --with-mpfr=${local_builds}/destdir/${host} --with-gmp=${local_builds}/destdir/${host} --with-gnu-as --with-gnu-ld --disable-libmudflap --enable-lto --enable-shared --without-included-gettext --enable-nls --with-system-zlib --disable-sjlj-exceptions --enable-gnu-unique-object --enable-linker-build-id --disable-libstdcxx-pch --enable-c99 --enable-clocale=gnu --enable-libstdcxx-debug --enable-long-long --with-cloog=no --with-ppl=no --with-isl=no --disable-multilib --with-float=hard --with-fpu=vfp --with-arch=armv6 --enable-threads=posix --enable-multiarch --enable-libstdcxx-time=yes --enable-gnu-indirect-function --with-build-sysroot=${sysroots} --with-sysroot=${local_builds}/destdir/${host}/arm-linux-gnueabihf/libc --enable-checking=release --disable-bootstrap --enable-languages=c,c++,fortran,lto"

# Component data for glibc
glibc_url=http://git-us.linaro.org/git/toolchain
glibc_branch=linaro/2.23/master
glibc_revision=ceeb0740ed04c48170f9f6f15fef55637ad84e1b
glibc_filespec=glibc.git
glibc_makeflags="PARALLELMFLAGS=-j32"
glibc_mingw_only="no"
glibc_configure="--disable-profile --without-gd --enable-obsolete-rpc --with-headers=${sysroots}/usr/include libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes --without-selinux --disable-werror"

# Component data for gdb
gdb_url=http://git-us.linaro.org/git/toolchain
gdb_branch=gdb-8.1-branch
gdb_revision=0210ebc959e880ae975ca6064a2376a59cc66ca2
gdb_filespec=binutils-gdb.git
gdb_mingw_only="no"
gdb_configure="--with-gnu-ld --enable-plugins --enable-tui --with-pkgversion=Linaro_GDB-2018.05 --disable-gas --disable-binutils --disable-ld --disable-gold --disable-gprof --with-python=yes"
gdb_mingw_extraconf="--disable-tui --with-python=${local_snapshots}/python-2.7.4-mingw32 CFLAGS=-I${local_builds}/destdir/${host}/usr/include LDFLAGS=-L${local_builds}/destdir/${host}/usr/lib"
gdb_staticlink="yes"

# Component data for gdbserver
gdbserver_url=http://git-us.linaro.org/git/toolchain
gdbserver_branch=gdb-8.1-branch
gdbserver_revision=0210ebc959e880ae975ca6064a2376a59cc66ca2
gdbserver_filespec=binutils-gdb.git
gdbserver_mingw_only="no"
gdbserver_configure="CPPFLAGS=--sysroot=${sysroots} CFLAGS=--sysroot=${sysroots} CXXFLAGS=--sysroot=${sysroots}"
gdbserver_staticlink="yes"


clibrary=glibc
target=arm-linux-gnueabihf
manifestid=efba3df69fb6b1dd239775a67a471267779ba6bd

##############################################################################
# Everything below this line is only for informational purposes for developers
##############################################################################

# Build machine data
build: linux
host: x86_64-unknown-linux-gnu
kernel: 4.4.0-45-generic
hostname: fed6e5906f6d
distribution: trusty
host_gcc: gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.4)

# These aren't used in the repeat build. just a sanity check for developers
build directory: /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabihf/_build/builds
sysroot directory: /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabihf/_build/sysroots/arm-linux-gnueabihf
snapshots directory: /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabihf/snapshots
git reference directory: /home/tcwg-buildslave/snapshots-ref

abe_url=https://git-us.linaro.org/toolchain
abe_branch=branch=
abe_revision=bb166f788ba4180755c8cdbc9c63078446307b85
abe_filespec=abe.git
abe_configure="--with-local-snapshots=${local_snapshots} --with-git-reference-dir=/home/tcwg-buildslave/snapshots-ref"

--------------------- gcc ----------------------
commit 7b15d0869c096fe39603ad63dc19ab7cf035eb70
Author: TCWG Automation <[email protected]>
Date: Wed Jun 6 10:32:36 2018 +0100

Make Linaro GCC Release 6.4-2018.05.

gcc/
* LINARO-VERSION: Update.

--------------------- binutils ----------------------
commit f3ae7dbacf5aeb9df207f5dacd778a2f6eab24fc
Merge: 1d72c74 b5d3ac2
Author: Adhemerval Zanella <[email protected]>
Date: Mon Aug 21 11:34:06 2017 -0300

Merge with binutils-2_27-branch rev b5d3ac20

Change-Id: Iaa5f379bb904c3eb5b6e041c62c24076d2838063

--------------------- glibc ----------------------
commit ceeb0740ed04c48170f9f6f15fef55637ad84e1b
Author: Siddhesh Poyarekar <[email protected]>
Date: Tue Mar 7 20:52:04 2017 +0530

Ignore and remove LD_HWCAP_MASK for AT_SECURE programs (bug #21209)

The LD_HWCAP_MASK environment variable may alter the selection of
function variants for some architectures. For AT_SECURE process it
means that if an outdated routine has a bug that would otherwise not
affect newer platforms by default, LD_HWCAP_MASK will allow that bug
to be exploited.

To be on the safe side, ignore and disable LD_HWCAP_MASK for setuid
binaries.

[BZ #21209]
* elf/rtld.c (process_envvars): Ignore LD_HWCAP_MASK for
AT_SECURE processes.
* sysdeps/generic/unsecvars.h: Add LD_HWCAP_MASK.

(cherry picked from commit 1c1243b6fc33c029488add276e56570a07803bfd)

--------------------- abe ----------------------
commit bb166f788ba4180755c8cdbc9c63078446307b85
Author: Maxim Kuvyrkov <[email protected]>
Date: Fri Jun 1 19:35:36 2018 +0000

Remove stale entries in sources.conf.

Change-Id: I64e4be3e4c828e8296f2ffa258fc2fbe933fa0a6

0 comments on commit a10d4f8

Please sign in to comment.