summaryrefslogtreecommitdiff
path: root/build-essential/gcc.bst
diff options
context:
space:
mode:
Diffstat (limited to 'build-essential/gcc.bst')
-rw-r--r--build-essential/gcc.bst66
1 files changed, 66 insertions, 0 deletions
diff --git a/build-essential/gcc.bst b/build-essential/gcc.bst
new file mode 100644
index 00000000..56ca5d86
--- /dev/null
+++ b/build-essential/gcc.bst
@@ -0,0 +1,66 @@
+kind: manual
+
+sources:
+- kind: git
+ url: upstream:gcc-tarball
+ track: baserock/build-essential
+ ref: b3c9b176c1f10ebeff5700eb3760e9511f23fa06
+
+depends:
+- filename: build-essential/stage2.bst
+ type: build
+- build-essential/linux-api-headers.bst
+- build-essential/glibc.bst
+- build-essential/zlib.bst
+- build-essential/m4-tarball.bst
+
+environment:
+ PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/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