From f501976babcc283c7d2ae4bea25e5feefc4b98c2 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 22 Mar 2017 09:47:09 +0000 Subject: Moved all elements under the elements directory --- elements/gnu-toolchain/gcc.bst | 67 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 elements/gnu-toolchain/gcc.bst (limited to 'elements/gnu-toolchain/gcc.bst') diff --git a/elements/gnu-toolchain/gcc.bst b/elements/gnu-toolchain/gcc.bst new file mode 100644 index 00000000..b7b17ae6 --- /dev/null +++ b/elements/gnu-toolchain/gcc.bst @@ -0,0 +1,67 @@ +kind: manual + +sources: +- kind: git + url: upstream:gcc-tarball + track: baserock/gnu-toolchain + ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + +depends: +- filename: gnu-toolchain/stage2.bst + type: build +- gnu-toolchain/fhs-dirs.bst +- gnu-toolchain/linux-api-headers.bst +- gnu-toolchain/glibc.bst +- gnu-toolchain/zlib.bst +- gnu-toolchain/m4-tarball.bst + +environment: + PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/sbin + +config: + + configure-commands: + - mkdir o + + # Configure flag notes: + # 1. An attempt to stop anything going in %{prefix}/lib64 (which doesn't + # fully work; we will need to hobble the multilib configuration in + # config/i386/t-linux64 if we really want to kill /lib64). + # 2. Avoid having more than one copy of ZLib in use on the system + # 3. Multilib does not make sense in Baserock. + - | + case "%{bst-arch}" in + armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ + --with-cpu=cortex-a9 \ + --with-tune=cortex-a9 \ + --with-fpu=vfpv3-d16 \ + --with-float=hard" ;; + armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; + esac + + cd o && ../configure \ + $ARCH_FLAGS \ + --prefix="%{prefix}" \ + `# [1]` --libdir=%{prefix}/lib \ + --disable-bootstrap \ + `# [2]` --with-system-zlib \ + `# [3]` --disable-multilib \ + --enable-languages=c,c++,fortran + + build-commands: + - | + case "%{bst-arch}" in + armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile + sed -i "s/--target=none/--target=armv5/" o/Makefile ;; + armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile + sed -i "s/--target=none/--target=armv7a/" o/Makefile ;; + esac + cd o && make + + install-commands: + - cd o && make DESTDIR="%{install-root}" install + - ln -s gcc "%{install-root}%{prefix}/bin/cc" + - | + for fortran_alias in f77 f90 f95; do + ln -s gfortran "%{install-root}%{prefix}/bin/$fortran_alias" + done -- cgit v1.2.1 From aaefeb1e22579deef6a7829d055eee70c8a7a4f0 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 20 Jun 2017 08:58:28 +0000 Subject: Update GCC to 7.1.0, and GLIBC to 2.25 --- elements/gnu-toolchain/gcc.bst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'elements/gnu-toolchain/gcc.bst') diff --git a/elements/gnu-toolchain/gcc.bst b/elements/gnu-toolchain/gcc.bst index b7b17ae6..5815cf01 100644 --- a/elements/gnu-toolchain/gcc.bst +++ b/elements/gnu-toolchain/gcc.bst @@ -3,8 +3,8 @@ kind: manual sources: - kind: git url: upstream:gcc-tarball - track: baserock/gnu-toolchain - ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06 + track: baserock/gcc-7.1.0 + ref: 3b0dbcfa2e5d12bd80cab1b35f08653d61fe7838 depends: - filename: gnu-toolchain/stage2.bst -- cgit v1.2.1 From 23a3a3c746261c3ecb2aa961d91f988f0602a032 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 14 Jun 2017 22:58:52 +0100 Subject: Support cross-building the stage1 and stage2 components This requires a feature recently added to BuildStream (in commit 03906221) that adds a framework for elements to support being cross-compiled. To build an armv8l64 native toolchain and sysroot on an x86_64 build machine, for example, you can do this: bst build --target-arch=armv8l64 gnu-toolchain/stage2.bst You can then run `bst checkout` to get at the resulting binaries and copy them onto an armv8l64 machine where they can be executed. --- elements/gnu-toolchain/gcc.bst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'elements/gnu-toolchain/gcc.bst') diff --git a/elements/gnu-toolchain/gcc.bst b/elements/gnu-toolchain/gcc.bst index 5815cf01..e9a54834 100644 --- a/elements/gnu-toolchain/gcc.bst +++ b/elements/gnu-toolchain/gcc.bst @@ -30,7 +30,7 @@ config: # 2. Avoid having more than one copy of ZLib in use on the system # 3. Multilib does not make sense in Baserock. - | - case "%{bst-arch}" in + case "%{bst-target-arch}" in armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \ --with-cpu=cortex-a9 \ --with-tune=cortex-a9 \ @@ -50,7 +50,7 @@ config: build-commands: - | - case "%{bst-arch}" in + case "%{bst-target-arch}" in armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile sed -i "s/--target=none/--target=armv5/" o/Makefile ;; armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile -- cgit v1.2.1