summaryrefslogtreecommitdiff
path: root/strata/build-essential/gcc.morph
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2015-01-12 15:13:53 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2015-01-23 15:19:29 +0000
commitfe5e9e45bb56bccb6c6ad755b21074ce4df26a02 (patch)
tree487090b1a60e693affaab57fe0e3eea53909481e /strata/build-essential/gcc.morph
parentd022ac34d44616e7c7479a0aa1e81287786f3299 (diff)
downloaddefinitions-fe5e9e45bb56bccb6c6ad755b21074ce4df26a02.tar.gz
Update GCC to 4.9.2
Update the GCC compiler to the 4.9.2 version. It turns out that a C++ compiler is required to build the latest GCC releases, so build one in stages 1 and 2 as well. The updated list of GCC configuration options that either don't work in a cross compiler or are not needed in a temporary compiler, were based on the latest instructions from Linux From Scratch. The inclusion of /lib64 in the lib path for the stage 1 linker is an attempt to turn things more robust rather than to just symlink in /lib stuff that ends up installed in /lib64 (as it is already being done for libgcc_s.so). Ideally, we should configure every chunk to install to /lib, however GCC seems to not honour the `--with-libdir` configuration flag. With this version of GCC, it looks like a sysroot needs to be given at configure time so that `--with-native-system-header-dir` does what it claims to do. Unfortunately, this has the side effect of making GCC not passing to the linker the linker sysroot flag: `-Wl,--sysroot=$SYSROOT`. The workaround is to modify LDFLAGS to give a sysroot directly to GCC, `--sysroot=$SYSROOT`, which will then be further passed down to the linker. As the newest version of GCC finds more warnings than the previous one, `-Werror` was disabled for the coreutils, GDB and Syslinux projects. Syslinux's Makefile had to be patched, as it is not possible to disable `-Werror` for all targets through the NO_WERROR variable. The hack to handle libgcc_eh being required during eglibc's build was removed, as it doesn't seem to be the case anymore.
Diffstat (limited to 'strata/build-essential/gcc.morph')
-rw-r--r--strata/build-essential/gcc.morph29
1 files changed, 11 insertions, 18 deletions
diff --git a/strata/build-essential/gcc.morph b/strata/build-essential/gcc.morph
index 63d4ad4c..3b4b5ece 100644
--- a/strata/build-essential/gcc.morph
+++ b/strata/build-essential/gcc.morph
@@ -8,32 +8,25 @@ configure-commands:
# 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. MPFR is built in the GCC tree, we need to locate it.
-# 3. Avoid having more than one copy of ZLib in use on the system
-# 4. Optimisation libraries which for now we do without.
-# 5. Multilib does not make sense in Baserock.
-# 6. Recommended by Linux From Scratch; required for C++ ABI
-# compatibility with other Linux distributions.
+# 2. Avoid having more than one copy of ZLib in use on the system
+# 3. Multilib does not make sense in Baserock.
- |
cd o && ../configure \
$(../morph-arch-config) \
--prefix="$PREFIX" \
`# [1]` --libdir=$PREFIX/lib \
- `# [2]` --with-mpfr-include="$(pwd)/../mpfr/src" \
- `# [2]` --with-mpfr-lib="$(pwd)/mpfr/src/.libs" \
- `# [3]` --with-system-zlib \
- `# [4]` --without-cloog \
- `# [4]` --without-ppl \
- --disable-nls \
- `# [5]` --disable-multilib \
- --disable-libgomp \
- `# [6]` --enable-__cxa_atexit \
- --enable-shared \
- --enable-threads=posix \
+ --disable-bootstrap \
+ `# [2]` --with-system-zlib \
+ `# [3]` --disable-multilib \
--enable-languages=c,c++,fortran
build-commands:
-- cd o && make
+- |
+ case "$MORPH_ARCH" in
+ 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="$DESTDIR" install