summaryrefslogtreecommitdiff
path: root/strata/armv7lhf-cross-toolchain/armv7lhf-cross-gcc-nolibc.morph
diff options
context:
space:
mode:
Diffstat (limited to 'strata/armv7lhf-cross-toolchain/armv7lhf-cross-gcc-nolibc.morph')
-rw-r--r--strata/armv7lhf-cross-toolchain/armv7lhf-cross-gcc-nolibc.morph19
1 files changed, 19 insertions, 0 deletions
diff --git a/strata/armv7lhf-cross-toolchain/armv7lhf-cross-gcc-nolibc.morph b/strata/armv7lhf-cross-toolchain/armv7lhf-cross-gcc-nolibc.morph
index 9f993bc0..d164a60b 100644
--- a/strata/armv7lhf-cross-toolchain/armv7lhf-cross-gcc-nolibc.morph
+++ b/strata/armv7lhf-cross-toolchain/armv7lhf-cross-gcc-nolibc.morph
@@ -1,7 +1,20 @@
name: armv7lhf-cross-gcc-nolibc
kind: chunk
+
configure-commands:
- mkdir o
+
+# Configure flag notes:
+# 1. Standard flags. See gcc.morph.
+# 2. Our binutils is for the final $TARGET, rather than the intermediate
+# target our GCC is being built for, so we need to set
+# with-build-time-tools to get it to find our binutils at
+# build-time and with-as and with-ld so our temporary GCC uses
+# the appropriate tools when it compiles our libc, rather than
+# trying to use $TARGET_STAGE1-as when producing binaries.
+# 3. Disable stuff that doesn't work when building a cross compiler
+# without an existing libc, and generally try to keep this build as
+# simple as possible.
- |
export MORPH_ARCH=armv7lhf
export TARGET=armv7lhf-baserock-linux-gnueabi
@@ -25,10 +38,16 @@ configure-commands:
--disable-shared --disable-threads --disable-target-libiberty \
--disable-target-zlib --without-headers --with-newlib \
--with-system-zlib
+
build-commands:
- cd o && make
+
install-commands:
- cd o && make DESTDIR="$DESTDIR" install
+
+# The file libgcc_eh is required during eglibc's build, but is not created
+# because we built GCC with --disable-shared. This is a workaround for
+# eglibc's build system being slightly broken.
- |
export TARGET_STAGE1=armv7lhf-none-linux-gnueabi
libgcc_filename="$("$DESTDIR$PREFIX/bin/$TARGET_STAGE1-gcc" -print-libgcc-file-name)"