view cross-compiler.sh @ 1786:0787ceb820bf draft 1.4.2

When x86-64 switched on NPTL in uClibc, distcc broke, and it turns out fully native compiles under qemu never worked due to qemu not quite emulating floating point right and confusing the perl build with zero not comparing equal to zero. As long as it's broken anyway, switch it over to musl and fix it up on that side. It's no longer worth trying to fix anything broken in uClibc, the project is dead. (I'm aware of uClibc-ng, and am treating it exactly the same way I treated the ecommstation reboot of OS/2.)
author Rob Landley <rob@landley.net>
date Fri, 11 Sep 2015 13:25:14 -0500
parents 7eabfa815c90
children
line wrap: on
line source

#!/bin/bash

# Build a more advanced cross compiler, including thread support and uClibc++,
# built --with-shared (which produces libgcc_s.so), statically linked
# against uClibc on the host (for portability), and including the $TARGET-ldd
# and $TARGET-ldconfig utilities.

# Building this requires two existing (simple) cross compilers: one for
# the host (to build the executables) and one for the target (to build
# the libraries).

# This is a simple wrapper for native-compiler.sh, we re-use the canadian
# cross infrastructure in there to build a very similar compiler.

. sources/include.sh || exit 1

# Unless told otherwise, create statically linked i686 host binaries (which
# should run on an x86-64 host just fine, even if it hasn't got 32-bit
# libraries installed).

BUILD_STATIC=${BUILD_STATIC:-all} HOST_ARCH="${CROSS_COMPILER_HOST:-i686}" \
  TOOLCHAIN_PREFIX="${1}-" STAGE_NAME=cross-compiler \
  ./native-compiler.sh "$1" || exit 1

# Run the cross compiler smoke test if requested.

if [ ! -z "$CROSS_SMOKE_TEST" ]
then
  more/cross-smoke-test.sh "$ARCH" || exit 1
fi