From 5c2f6d09822ce8db011743940cc4362909072956 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 23 Nov 2009 02:21:32 +0000 Subject: [PATCH] xbps-src: remove cross-compiler stuff, won't work. --HG-- extra : convert_revision : b1cb584d15bceca0b84adfc5f688facf6fe978a2 --- xbps-src/etc/xbps-src.conf.in | 6 --- xbps-src/shutils/build_funcs.sh | 11 ----- xbps-src/shutils/chroot.sh | 15 +----- xbps-src/shutils/configure_funcs.sh | 10 ---- xbps-src/shutils/cross-compilation.sh | 70 --------------------------- xbps-src/shutils/install_funcs.sh | 9 ---- xbps-src/shutils/tmpl_funcs.sh | 2 +- 7 files changed, 2 insertions(+), 121 deletions(-) delete mode 100644 xbps-src/shutils/cross-compilation.sh diff --git a/xbps-src/etc/xbps-src.conf.in b/xbps-src/etc/xbps-src.conf.in index 93733843649..74438606197 100644 --- a/xbps-src/etc/xbps-src.conf.in +++ b/xbps-src/etc/xbps-src.conf.in @@ -64,9 +64,3 @@ XBPS_COMPRESS_CMD=xz # by the command will be used. # #XBPS_COMPRESS_LEVEL=9 - -# -# Cross compilation stuff. -# -#XBPS_CROSS_TARGET=i686-pc-linux-gnu -#XBPS_CROSS_DIR=/storage/mktoolchain/$XBPS_CROSS_TARGET diff --git a/xbps-src/shutils/build_funcs.sh b/xbps-src/shutils/build_funcs.sh index 2d2ef020d2f..08b47d156f4 100644 --- a/xbps-src/shutils/build_funcs.sh +++ b/xbps-src/shutils/build_funcs.sh @@ -47,13 +47,6 @@ build_src_phase() cd $wrksrc || exit 1 [ -n "$revision" ] && pkg="${pkg}_${revision}" - - # cross compilation vars. - if [ -n "$cross_compiler" ]; then - . $XBPS_SHUTILSDIR/cross-compilation.sh - cross_compile_setvars - fi - [ -z "$make_cmd" ] && make_cmd=/usr/bin/make # Run pre_build func. @@ -78,9 +71,5 @@ build_src_phase() unset makejobs - # unset cross compiler vars. - [ -n "$cross_compiler" ] && cross_compile_unsetvars - unset_build_vars - touch -f $XBPS_BUILD_DONE } diff --git a/xbps-src/shutils/chroot.sh b/xbps-src/shutils/chroot.sh index 2fa33c44abe..e007bc167c7 100644 --- a/xbps-src/shutils/chroot.sh +++ b/xbps-src/shutils/chroot.sh @@ -202,10 +202,6 @@ mount_chroot_fs() REQFS="sys proc dev xbps xbps_builddir xbps_destdir \ xbps_packagesdir xbps_srcdistdir" - if [ -d "$XBPS_CROSS_DIR" ]; then - local cross=yes - REQFS="$REQFS xbps_crossdir" - fi for f in ${REQFS}; do if [ ! -f $XBPS_MASTERDIR/.${f}_mount_bind_done ]; then @@ -217,9 +213,6 @@ mount_chroot_fs() xbps_destdir) blah=$XBPS_DESTDIR;; xbps_srcdistdir) blah=$XBPS_SRCDISTDIR;; xbps_packagesdir) blah=$XBPS_PACKAGESDIR;; - xbps_crossdir) - [ -n $cross ] && blah=$XBPS_CROSS_DIR - ;; *) blah=/$f;; esac [ ! -d $blah ] && echo "failed." && continue @@ -289,7 +282,7 @@ fi msg_normal "Entering into the chroot on $XBPS_MASTERDIR." EXTDIRS="xbps xbps_builddir xbps_destdir xbps_packagesdir \ - xbps_srcdistdir xbps_crossdir" + xbps_srcdistdir" REQDIRS="bin sbin tmp var sys proc dev usr/local/etc ${EXTDIRS}" for f in ${REQDIRS}; do [ ! -d $XBPS_MASTERDIR/$f ] && mkdir -p $XBPS_MASTERDIR/$f @@ -310,9 +303,3 @@ echo "XBPS_FETCH_CMD=$XBPS_FETCH_CMD" >> $XBPSSRC_CF if [ -n "$XBPS_MAKEJOBS" ]; then echo "XBPS_MAKEJOBS=$XBPS_MAKEJOBS" >> $XBPSSRC_CF fi -if [ -n "$XBPS_CROSS_TARGET" -a -d "$XBPS_CROSS_DIR" ]; then - echo "XBPS_CROSS_TARGET=$XBPS_CROSS_TARGET" >> $XBPSSRC_CF - echo "XBPS_CROSS_DIR=/xbps_crossdir" >> $XBPSSRC_CF -fi - - diff --git a/xbps-src/shutils/configure_funcs.sh b/xbps-src/shutils/configure_funcs.sh index 581214524d5..1949389636b 100644 --- a/xbps-src/shutils/configure_funcs.sh +++ b/xbps-src/shutils/configure_funcs.sh @@ -57,12 +57,6 @@ configure_src_phase() cd $wrksrc || msg_error "unexistent build directory [$wrksrc]." - # cross compilation vars. - if [ -n "$cross_compiler" ]; then - . $XBPS_SHUTILSDIR/cross-compilation.sh - cross_compile_setvars - fi - # Run pre_configure func. run_func pre_configure || msg_error "pre_configure stage failed!" @@ -124,9 +118,5 @@ configure_src_phase() unset eval ${f%=*} done - # unset cross compiler vars. - [ -n "$cross_compiler" ] && cross_compile_unsetvars - unset_build_vars - touch -f $XBPS_CONFIGURE_DONE } diff --git a/xbps-src/shutils/cross-compilation.sh b/xbps-src/shutils/cross-compilation.sh deleted file mode 100644 index 8f8741af2b9..00000000000 --- a/xbps-src/shutils/cross-compilation.sh +++ /dev/null @@ -1,70 +0,0 @@ -#- -# Copyright (c) 2008 Juan Romero Pardines. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#- - -# -# This helper sets some required vars to be able to cross build -# packages on xbps. The target is specified in the configuration file -# and will be read any time the cross compilation flag is used. -# -[ -z "$XBPS_CROSS_TARGET" -o ! -d $XBPS_CROSS_DIR/bin ] && return 1 - -# Check if all required bins are there. -for bin in gcc g++ cpp ar as ranlib ld strip; do - if [ ! -x $XBPS_CROSS_DIR/bin/$XBPS_CROSS_TARGET-${bin} ]; then - msg_error "cross-compilation: cannot find ${bin}, aborting." - fi -done - -SAVE_PATH="$PATH" -if [ "$xbps_machine" = "x86_64" ]; then - XBPS_CROSS_HOST="x86_64-unknown-linux-gnu" -else - XBPS_CROSS_HOST="$xbps_machine-pc-linux-gnu" -fi - -cross_compile_setvars() -{ - export GCC=$XBPS_CROSS_TARGET-gcc - export CC=$XBPS_CROSS_TARGET-gcc - export CXX=$XBPS_CROSS_TARGET-g++ - export CPP=$XBPS_CROSS_TARGET-cpp - export AR=$XBPS_CROSS_TARGET-ar - export AS=$XBPS_CROSS_TARGET-as - export RANLIB=$XBPS_CROSS_TARGET-ranlib - export LD=$XBPS_CROSS_TARGET-ld - export STRIP=$XBPS_CROSS_TARGET-strip - export PATH="$XBPS_CROSS_DIR/bin:$PATH" -} - -cross_compile_unsetvars() -{ - unset GCC CC CXX CPP AR AS RANLIB LD STRIP PATH - export PATH="$SAVE_PATH" -} - -if [ "$build_style" = "gnu_configure" ]; then - configure_args="--build=$XBPS_CROSS_HOST --host=$XBPS_CROSS_TARGET" - configure_args="$configure_args --target=$XBPS_CROSS_TARGET" -fi diff --git a/xbps-src/shutils/install_funcs.sh b/xbps-src/shutils/install_funcs.sh index 1b7279dd2cb..c39ee064dd9 100644 --- a/xbps-src/shutils/install_funcs.sh +++ b/xbps-src/shutils/install_funcs.sh @@ -77,12 +77,6 @@ install_src_phase() msg_normal "Running install phase for $pkgname-$lver." - # cross compilation vars. - if [ -n "$cross_compiler" ]; then - . $XBPS_SHUTILSDIR/cross-compilation.sh - cross_compile_setvars - fi - # Type of installation: custom, make or python. case "$build_style" in custom-install) @@ -118,9 +112,6 @@ install_src_phase() strip_files fi - # unset cross compiler vars. - [ -n "$cross_compiler" ] && cross_compile_unsetvars - msg_normal "Installed $pkgname-$lver into $XBPS_DESTDIR." if [ "$build_style" != "custom-install" -a -z "$distfiles" ]; then diff --git a/xbps-src/shutils/tmpl_funcs.sh b/xbps-src/shutils/tmpl_funcs.sh index 0ce3c04c912..9850398e923 100644 --- a/xbps-src/shutils/tmpl_funcs.sh +++ b/xbps-src/shutils/tmpl_funcs.sh @@ -71,7 +71,7 @@ reset_tmpl_vars() post_configure post_build post_install nostrip \ make_install_target version revision essential \ sgml_catalogs xml_catalogs xml_entries sgml_entries \ - disable_parallel_build run_depends cross_compiler \ + disable_parallel_build run_depends \ only_for_archs conf_files keep_libtool_archives \ noarch subpackages sourcepkg gtk_iconcache_dirs \ abi_depends api_depends triggers openrc_services \