diff options
author | Lauri Aarnio <Lauri.Aarnio@iki.fi> | 2008-06-08 06:22:33 +0300 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2008-06-17 10:08:07 +0300 |
commit | a4b7ac04d11b6c173ad698648f8c0f0428d67ca1 (patch) | |
tree | 13c4c6e9ed145d3481270656606de04898f79e72 /utils | |
parent | 9a0798b6b65eee4c4adb56e3a0de22929526b933 (diff) |
More fixes for target architecture settings
- More environment variables can be fine-tuned from the mode-specific settings
file => "dpkg-architecture" can be made to return the similar answers as
what it does in the old scratchbox ("SB1")
- tuned the architecture settings for "maemo" mode
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/sb2 | 2 | ||||
-rwxr-xr-x | utils/sb2-init | 48 |
2 files changed, 32 insertions, 18 deletions
@@ -78,7 +78,7 @@ function sboxify_environment() . ~/.scratchbox2/$SBOX_TARGET/sb2.config - if [ "$SBOX_CONFIG_VERSION" != "5" ]; then + if [ "$SBOX_CONFIG_VERSION" != "6" ]; then echo "Please run sb2-init for your target:" echo "name: $SBOX_TARGET" echo "dir: $SBOX_TARGET_ROOT" diff --git a/utils/sb2-init b/utils/sb2-init index 7016020..aa32730 100755 --- a/utils/sb2-init +++ b/utils/sb2-init @@ -92,7 +92,7 @@ SBOX_INIT_ORIG_ARGS="$SBOX_INIT_ORIG_ARGS" SBOX_INIT_TIME=$SBOX_INIT_TIME SBOX_INIT_ID="$SBOX_INIT_ID" -export SBOX_CONFIG_VERSION=5 +export SBOX_CONFIG_VERSION=6 export SBOX_TARGET_ROOT=$SBOX_TARGET_ROOT export SBOX_CPU=$ARCH export SBOX_GCC_TARGET=$GCC_TARGET @@ -102,7 +102,7 @@ export SBOX_UNAME_MACHINE=$ARCH export SBOX_DEFAULT_GCC_PREFIX=$GCC_PREFIX export SBOX_CROSS_GCC_NAME=cross-gcc -export SBOX_CROSS_GCC_PREFIX_LIST=$GCC_TARGET-:$ARCH-linux-:$GCC_PREFIX +export SBOX_CROSS_GCC_PREFIX_LIST=$GCC_TARGET-:$SB2INIT_CROSS_GCC_PREFIX_LIST:$GCC_PREFIX export SBOX_CROSS_GCC_SUBST_PREFIX=$GCC_PREFIX export SBOX_CROSS_GCC_SPECS_FILE="$SBOX_CROSS_GCC_SPECS_FILE" export SBOX_CROSS_GCC_DIR=$GCC_PATH @@ -111,15 +111,19 @@ export SBOX_EXTRA_CROSS_COMPILER_ARGS="$SBOX_EXTRA_CROSS_COMPILER_ARGS" export SBOX_EXTRA_CROSS_COMPILER_STDINC="$SBOX_EXTRA_CROSS_COMPILER_STDINC" export SBOX_EXTRA_CROSS_LD_ARGS="-rpath-link $SBOX_TARGET_ROOT/usr/lib:$SBOX_TARGET_ROOT/lib" -export DEB_BUILD_ARCH_CPU=$DEBIAN_CPU -export DEB_BUILD_ARCH=$DEBIAN_CPU +export DEB_BUILD_ARCH=$SB2INIT_DEB_BUILD_ARCH +export DEB_BUILD_ARCH_CPU=$SB2INIT_DEB_BUILD_ARCH_CPU export DEB_BUILD_GNU_CPU=$ARCH export DEB_BUILD_GNU_TYPE=$SB2INIT_DEB_BUILD_GNU_TYPE +export DEB_BUILD_GNU_SYSTEM=$SB2INIT_DEB_BUILD_GNU_SYSTEM -export DEB_HOST_ARCH_CPU=$DEBIAN_CPU export DEB_HOST_ARCH=$DEBIAN_CPU +export DEB_HOST_ARCH_OS=$SB2INIT_DEB_HOST_ARCH_OS +export DEB_HOST_ARCH_CPU=$SB2INIT_DEB_HOST_ARCH_CPU + export DEB_HOST_GNU_CPU=$ARCH export DEB_HOST_GNU_TYPE=$SB2INIT_DEB_HOST_GNU_TYPE +export DEB_HOST_GNU_SYSTEM=$SB2INIT_DEB_HOST_GNU_SYSTEM export SBOX_HOST_GCC_NAME=host-gcc export SBOX_HOST_GCC_PREFIX_LIST=host- @@ -284,18 +288,6 @@ else fi fi -# defaults for SB2_INIT_DEB_BUILD_GNU_TYPE and SB2_INIT_DEB_HOST_GNU_TYPE, -# these may be changed by sb2rc.$MAPPING_MODE -SB2INIT_DEB_BUILD_GNU_TYPE=$ARCH-linux-gnu -SB2INIT_DEB_HOST_GNU_TYPE=$ARCH-linux-gnu - -# $ARCH has been set, get mode-specific settings.. -if [ -f $SBOX_DIR/share/scratchbox2/modeconf/sb2rc.$MAPPING_MODE ] -then - echo "Reading mode-specific settings.." - . $SBOX_DIR/share/scratchbox2/modeconf/sb2rc.$MAPPING_MODE -fi - DEBIAN_CPU=$ARCH if [ -z "$CPUTRANSP" ]; then @@ -330,6 +322,28 @@ case "$ARCH" in esac +# defaults for SB2_INIT_DEB_BUILD_GNU_TYPE, SB2_INIT_DEB_HOST_GNU_TYPE, etc, +# and the cross-gcc prefix list: +# these may be changed by sb2rc.$MAPPING_MODE +SB2INIT_DEB_BUILD_ARCH=$DEBIAN_CPU +SB2INIT_DEB_BUILD_GNU_TYPE=$ARCH-linux-gnu +SB2INIT_DEB_BUILD_GNU_SYSTEM="" +SB2INIT_DEB_BUILD_ARCH_CPU=$DEBIAN_CPU + +SB2INIT_DEB_HOST_GNU_TYPE=$ARCH-linux-gnu +SB2INIT_DEB_HOST_GNU_SYSTEM="" +SB2INIT_DEB_HOST_ARCH_OS="linux" +SB2INIT_DEB_HOST_ARCH_CPU=$DEBIAN_CPU + +SB2INIT_CROSS_GCC_PREFIX_LIST=$ARCH-linux- + +# $ARCH has been set, get mode-specific settings.. +if [ -f $SBOX_DIR/share/scratchbox2/modeconf/sb2rc.$MAPPING_MODE ] +then + echo "Reading mode-specific settings.." + . $SBOX_DIR/share/scratchbox2/modeconf/sb2rc.$MAPPING_MODE +fi + if [ -z "$MAPPING_MODE" ]; then MAPPING_MODE="simple" fi |