diff options
Diffstat (limited to 'strata/build-essential')
-rw-r--r-- | strata/build-essential/gcc.morph | 11 | ||||
-rw-r--r-- | strata/build-essential/linux-api-headers.morph | 16 | ||||
-rw-r--r-- | strata/build-essential/stage1-gcc.morph | 11 | ||||
-rw-r--r-- | strata/build-essential/stage2-gcc.morph | 10 | ||||
-rw-r--r-- | strata/build-essential/stage2-linux-api-headers.morph | 16 |
5 files changed, 58 insertions, 6 deletions
diff --git a/strata/build-essential/gcc.morph b/strata/build-essential/gcc.morph index 3b4b5ece..02be4dda 100644 --- a/strata/build-essential/gcc.morph +++ b/strata/build-essential/gcc.morph @@ -11,8 +11,17 @@ configure-commands: # 2. Avoid having more than one copy of ZLib in use on the system # 3. Multilib does not make sense in Baserock. - | + case "$MORPH_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 \ - $(../morph-arch-config) \ + $ARCH_FLAGS \ --prefix="$PREFIX" \ `# [1]` --libdir=$PREFIX/lib \ --disable-bootstrap \ diff --git a/strata/build-essential/linux-api-headers.morph b/strata/build-essential/linux-api-headers.morph index e1ff2638..0f7ce171 100644 --- a/strata/build-essential/linux-api-headers.morph +++ b/strata/build-essential/linux-api-headers.morph @@ -1,6 +1,20 @@ name: linux-api-headers kind: chunk install-commands: -- ARCH=$(./morph-arch) make INSTALL_HDR_PATH=dest headers_install +- | + case "$MORPH_ARCH" in + armv7b|armv7l|armv7lhf) + ARCH="arm" ;; + x86_32) + ARCH="i386" ;; + x86_64) + ARCH="x86_64" ;; + ppc64) + ARCH="powerpc" ;; + *) + echo "Error: unsupported Morph architecture: $MORPH_ARCH" >&2 + exit 1 + esac + ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install - install -d "$DESTDIR${PREFIX-/usr}/include" - cp -r dest/include/* "$DESTDIR/${PREFIX-/usr}/include" diff --git a/strata/build-essential/stage1-gcc.morph b/strata/build-essential/stage1-gcc.morph index 1bf6dfb2..ed85b684 100644 --- a/strata/build-essential/stage1-gcc.morph +++ b/strata/build-essential/stage1-gcc.morph @@ -23,8 +23,17 @@ configure-commands: # without an existing libc, and generally try to keep this build as # simple as possible. - | + case "$MORPH_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 \ - $(../morph-arch-config) \ + $ARCH_FLAGS \ --build=$(sh ../config.guess) \ --host=$(sh ../config.guess) \ --target=$TARGET_STAGE1 \ diff --git a/strata/build-essential/stage2-gcc.morph b/strata/build-essential/stage2-gcc.morph index d48e236f..98f9cfe7 100644 --- a/strata/build-essential/stage2-gcc.morph +++ b/strata/build-essential/stage2-gcc.morph @@ -20,13 +20,21 @@ configure-commands: # 4. This flag causes the correct --sysroot flag to be passed when # calling stage 1 GCC. - | + case "$MORPH_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 export STAGE2_SYSROOT="$(dirname $(pwd))" export CC="$TARGET_STAGE1-gcc --sysroot=$STAGE2_SYSROOT" export CXX="$TARGET_STAGE1-g++ --sysroot=$STAGE2_SYSROOT" export AR="$TARGET_STAGE1-ar" export RANLIB="$TARGET_STAGE1-ranlib" cd o && ../configure \ - $(../morph-arch-config) \ + $ARCH_FLAGS \ --build=$(sh ../config.guess) \ `# [1]` --host=$TARGET_STAGE1 \ `# [1]` --target=$TARGET_STAGE1 \ diff --git a/strata/build-essential/stage2-linux-api-headers.morph b/strata/build-essential/stage2-linux-api-headers.morph index 5cbf2f05..50e1aaa5 100644 --- a/strata/build-essential/stage2-linux-api-headers.morph +++ b/strata/build-essential/stage2-linux-api-headers.morph @@ -2,7 +2,19 @@ name: stage2-linux-api-headers kind: chunk install-commands: - | - export ARCH=$(./morph-arch) - make INSTALL_HDR_PATH=dest headers_install + case "$MORPH_ARCH" in + armv7b|armv7l|armv7lhf) + ARCH="arm" ;; + x86_32) + ARCH="i386" ;; + x86_64) + ARCH="x86_64" ;; + ppc64) + ARCH="powerpc" ;; + *) + echo "Error: unsupported Morph architecture: $MORPH_ARCH" >&2 + exit 1 + esac + ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install - install -d "$DESTDIR${PREFIX-/usr}/include" - cp -r dest/include/* "$DESTDIR/${PREFIX-/usr}/include" |