summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauri Aarnio <Lauri.Aarnio@iki.fi>2008-06-07 07:57:48 +0300
committerLauri Leukkunen <lle@rahina.org>2008-06-17 10:07:42 +0300
commit7153cf31589dcc30b508e84db1dda7baa0d3a034 (patch)
tree2268052d4a21bed8aa30a2d2796343cea050600e
parent9c88943cac56aa7b1cd1124b9ad80ea37b8ef814 (diff)
Changed initialization of target architecture settings (+maemo mode bugfix)
- It is now possible to tune DEB_BUILD_GNU_TYPE and DEB_HOST_GNU_TYPE variables during initialization (=execution of sb2-init) from the mode-specific configuration file - "Maemo" mode used to compile for $ARCH-linux-gnu (e.g. "arm-linux-gnu"), which was wrong; now sb2rc.maemo set those variables to $ARCH-linux-gnueabi, which appears to be far more correct...
-rw-r--r--modeconf/sb2rc.maemo8
-rwxr-xr-xutils/sb2-init17
2 files changed, 23 insertions, 2 deletions
diff --git a/modeconf/sb2rc.maemo b/modeconf/sb2rc.maemo
index 31b9111..b35120d 100644
--- a/modeconf/sb2rc.maemo
+++ b/modeconf/sb2rc.maemo
@@ -29,3 +29,11 @@ SB2_CHECK_PKG_MAPPINGS_IGNORE_LIST=" \
SBOX_DPKG_WRAPPER_DENY_INSTALL=yes
# and a similar setting for "apt-get" wrapper:
SBOX_APT_GET_WRAPPER_DENY_INSTALL=yes
+
+# for sb2-init:
+if [ -n "$ARCH" ]
+then
+ SB2INIT_DEB_BUILD_GNU_TYPE=$ARCH-linux-gnueabi
+ SB2INIT_DEB_HOST_GNU_TYPE=$ARCH-linux-gnueabi
+fi
+
diff --git a/utils/sb2-init b/utils/sb2-init
index 4f6f7cf..5e9ddbb 100755
--- a/utils/sb2-init
+++ b/utils/sb2-init
@@ -114,12 +114,12 @@ export SBOX_EXTRA_CROSS_LD_ARGS="-rpath-link $SBOX_TARGET_ROOT/usr/lib:$SBOX_TAR
export DEB_BUILD_ARCH_CPU=$DEBIAN_CPU
export DEB_BUILD_ARCH=$DEBIAN_CPU
export DEB_BUILD_GNU_CPU=$ARCH
-export DEB_BUILD_GNU_TYPE=$ARCH-linux-gnu
+export DEB_BUILD_GNU_TYPE=$SB2INIT_DEB_BUILD_GNU_TYPE
export DEB_HOST_ARCH_CPU=$DEBIAN_CPU
export DEB_HOST_ARCH=$DEBIAN_CPU
export DEB_HOST_GNU_CPU=$ARCH
-export DEB_HOST_GNU_TYPE=$ARCH-linux-gnu
+export DEB_HOST_GNU_TYPE=$SB2INIT_DEB_HOST_GNU_TYPE
export SBOX_HOST_GCC_NAME=host-gcc
export SBOX_HOST_GCC_PREFIX_LIST=host-
@@ -284,6 +284,19 @@ 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
CPUTRANSP="$(which qemu-$ARCH)"