From 1422b969f72925bc679180c80ac0fa2518b16a03 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Tue, 23 Sep 2014 22:12:12 -0400 Subject: [PATCH] Use bash variable add operator --- stage0/pkg/binutils | 10 ++++------ stage0/pkg/gcc | 7 +++---- stage0/pkg/ncurses | 3 +-- stage1/pkg/binutils | 5 ++--- stage1/pkg/gcc | 3 +-- stage2/pkg/binutils | 5 ++--- stage2/pkg/coreutils | 3 +-- stage2/pkg/dhcp | 3 +-- stage2/pkg/e2fsprogs | 3 +-- stage2/pkg/eglibc | 5 ++--- stage2/pkg/findutils | 3 +-- stage2/pkg/gcc | 3 +-- stage2/pkg/groff | 4 +--- stage2/pkg/gzip | 4 +--- stage2/pkg/inetutils | 3 +-- stage2/pkg/kbd | 4 +--- stage2/pkg/ncurses | 3 +-- stage2/pkg/readline | 6 ++---- stage2/pkg/shadow | 4 +--- stage2/pkg/zlib | 4 +--- 20 files changed, 29 insertions(+), 56 deletions(-) diff --git a/stage0/pkg/binutils b/stage0/pkg/binutils index 443714d..5c80364 100644 --- a/stage0/pkg/binutils +++ b/stage0/pkg/binutils @@ -5,8 +5,7 @@ hvconfig_pre() export AR=ar export AS=as - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --host=${CLFS_HOST} \ --target=${CLFS_TARGET} \ --with-sysroot=${CLFS} \ @@ -16,10 +15,9 @@ hvconfig_pre() --disable-multilib" case "${HVL_TARGET}" in - "x86_64") - # This adds 64 bit support to Binutils. - CONFIGURE_OPTS="${CONFIGURE_OPTS} --enable-64-bit-bfd" - ;; + x86_64*) + CONFIGURE_OPTS+=" --enable-64-bit-bfd" + ;; esac } diff --git a/stage0/pkg/gcc b/stage0/pkg/gcc index d0d37e4..1877e7c 100644 --- a/stage0/pkg/gcc +++ b/stage0/pkg/gcc @@ -6,8 +6,7 @@ hvconfig_pre() export LDFLAGS="-Wl,-rpath,/cross-tools/lib" # Common options for passes 1 & 2 - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --build=${CLFS_HOST} \ --host=${CLFS_HOST} \ --target=${CLFS_TARGET} \ @@ -22,7 +21,7 @@ hvconfig_pre() --disable-multilib" if [ "x${HVLABEL}" = "x${GCC}-pass1" ]; then - CONFIGURE_OPTS="${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --disable-shared \ --without-headers \ --with-newlib \ @@ -33,7 +32,7 @@ hvconfig_pre() --disable-threads \ --enable-languages=c" else - CONFIGURE_OPTS="${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --enable-shared \ --enable-languages=c,c++ \ --enable-__cxa_atexit \ diff --git a/stage0/pkg/ncurses b/stage0/pkg/ncurses index 7d4a680..b2126bc 100644 --- a/stage0/pkg/ncurses +++ b/stage0/pkg/ncurses @@ -2,8 +2,7 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --without-debug \ --without-shared" } diff --git a/stage1/pkg/binutils b/stage1/pkg/binutils index 9ea2aad..83113c3 100644 --- a/stage1/pkg/binutils +++ b/stage1/pkg/binutils @@ -2,8 +2,7 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --target=${CLFS_TARGET} \ --with-lib-path=/tools/lib \ --disable-nls \ @@ -13,7 +12,7 @@ hvconfig_pre() case "${HVL_TARGET}" in "x86_64") # This adds 64 bit support to Binutils. - CONFIGURE_OPTS="${CONFIGURE_OPTS} --enable-64-bit-bfd" + CONFIGURE_OPTS+=" --enable-64-bit-bfd" ;; esac } diff --git a/stage1/pkg/gcc b/stage1/pkg/gcc index ebca3fe..57af140 100644 --- a/stage1/pkg/gcc +++ b/stage1/pkg/gcc @@ -2,8 +2,7 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --target=${CLFS_TARGET} \ --disable-multilib \ --with-local-prefix=/tools \ diff --git a/stage2/pkg/binutils b/stage2/pkg/binutils index c9522c1..e8d8c09 100644 --- a/stage2/pkg/binutils +++ b/stage2/pkg/binutils @@ -5,8 +5,7 @@ hvconfig_pre() export CC="gcc -isystem /usr/include" export LDFLAGS="-Wl,-rpath-link,/lib" - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --libdir=/usr/lib \ --enable-shared \ --disable-multilib" @@ -21,7 +20,7 @@ hvconfig_pre() ${LFS_TMP}/${PACKAGE}/libiberty/Makefile.in # This adds 64 bit support to Binutils. - CONFIGURE_OPTS="${CONFIGURE_OPTS} --enable-64-bit-bfd" + CONFIGURE_OPTS+=" --enable-64-bit-bfd" ;; esac } diff --git a/stage2/pkg/coreutils b/stage2/pkg/coreutils index 53b8f5c..8992716 100644 --- a/stage2/pkg/coreutils +++ b/stage2/pkg/coreutils @@ -2,8 +2,7 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --libexecdir=/usr/lib \ --enable-no-install-program=kill,uptime" } diff --git a/stage2/pkg/dhcp b/stage2/pkg/dhcp index beb7ee6..c4be30c 100644 --- a/stage2/pkg/dhcp +++ b/stage2/pkg/dhcp @@ -5,8 +5,7 @@ hvconfig_pre() cd ${LFS_TMP}/${PACKAGE} sed -i 's%\(^sbindir =\).*%\1 @prefix@@sbindir@%' server/Makefile.in - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --localstatedir=/var \ --sbindir=/sbin \ --with-srv-lease-file=/var/state/dhcp/dhcpd.leases \ diff --git a/stage2/pkg/e2fsprogs b/stage2/pkg/e2fsprogs index 1098c95..ed00a35 100644 --- a/stage2/pkg/e2fsprogs +++ b/stage2/pkg/e2fsprogs @@ -4,8 +4,7 @@ hvconfig_pre() { export PKG_CONFIG=true - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --with-root-prefix=\"\" \ --enable-elf-shlibs \ --disable-libblkid \ diff --git a/stage2/pkg/eglibc b/stage2/pkg/eglibc index d85577e..0d07767 100644 --- a/stage2/pkg/eglibc +++ b/stage2/pkg/eglibc @@ -2,8 +2,7 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --disable-profile \ --enable-add-ons \ --enable-kernel=$(get_pkg_ver ${KERNEL}) \ @@ -33,7 +32,7 @@ hvconfig_pre() "x86_64") # Tell EGLIBC to install its libraries into /lib: echo "slibdir=/lib" >> configparms - CONFIGURE_OPTS="${CONFIGURE_OPTS} --libdir=/usr/lib" + CONFIGURE_OPTS+=" --libdir=/usr/lib" ;; esac } diff --git a/stage2/pkg/findutils b/stage2/pkg/findutils index fcb4b36..715d4d4 100644 --- a/stage2/pkg/findutils +++ b/stage2/pkg/findutils @@ -2,8 +2,7 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --libexecdir=/usr/lib/findutils \ --localstatedir=/var/lib/locate" } diff --git a/stage2/pkg/gcc b/stage2/pkg/gcc index c1c28c3..edcfe46 100644 --- a/stage2/pkg/gcc +++ b/stage2/pkg/gcc @@ -5,8 +5,7 @@ hvconfig_pre() export CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include" export CXX="g++ -Wl,-rpath-link,/lib -isystem /usr/include" - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --libexecdir=/usr/lib \ --enable-shared \ --enable-threads=posix \ diff --git a/stage2/pkg/groff b/stage2/pkg/groff index 2f052fb..4ab82dd 100644 --- a/stage2/pkg/groff +++ b/stage2/pkg/groff @@ -6,9 +6,7 @@ hvconfig_pre() { export PAGE=letter - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ - --enable-multibyte" + CONFIGURE_OPTS+=" --enable-multibyte" } hvconfig_post() diff --git a/stage2/pkg/gzip b/stage2/pkg/gzip index 341a13f..3043737 100644 --- a/stage2/pkg/gzip +++ b/stage2/pkg/gzip @@ -2,9 +2,7 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ - --bindir=/bin" + CONFIGURE_OPTS+=" --bindir=/bin" } hvbuild_post() diff --git a/stage2/pkg/inetutils b/stage2/pkg/inetutils index 82d277f..0fc02e9 100644 --- a/stage2/pkg/inetutils +++ b/stage2/pkg/inetutils @@ -2,8 +2,7 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --libexecdir=/usr/sbin \ --localstatedir=/var \ --disable-ifconfig \ diff --git a/stage2/pkg/kbd b/stage2/pkg/kbd index 9e4dc22..2df1e1e 100644 --- a/stage2/pkg/kbd +++ b/stage2/pkg/kbd @@ -2,9 +2,7 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ - --datadir=/lib/kbd" + CONFIGURE_OPTS+=" --datadir=/lib/kbd" } hvbuild_post() diff --git a/stage2/pkg/ncurses b/stage2/pkg/ncurses index fe8355d..5efb791 100644 --- a/stage2/pkg/ncurses +++ b/stage2/pkg/ncurses @@ -2,8 +2,7 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --libdir=/lib \ --with-shared \ --without-debug \ diff --git a/stage2/pkg/readline b/stage2/pkg/readline index f3bd317..452be2f 100644 --- a/stage2/pkg/readline +++ b/stage2/pkg/readline @@ -2,10 +2,8 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ - --libdir=/lib" - + CONFIGURE_OPTS+=" --libdir=/lib" + cd ${LFS_TMP}/${PACKAGE} # Reinstalling Readline will cause the old libraries to be moved to diff --git a/stage2/pkg/shadow b/stage2/pkg/shadow index d8181d8..a8314a9 100644 --- a/stage2/pkg/shadow +++ b/stage2/pkg/shadow @@ -2,9 +2,7 @@ hvconfig_pre() { - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ - --without-selinux" + CONFIGURE_OPTS+=" --without-selinux" cd ${LFS_TMP}/${PACKAGE} diff --git a/stage2/pkg/zlib b/stage2/pkg/zlib index 1b4a57b..8c40047 100644 --- a/stage2/pkg/zlib +++ b/stage2/pkg/zlib @@ -6,9 +6,7 @@ hvconfig_pre() export CXX="g++ -isystem /usr/include" export LDFLAGS="-Wl,-rpath-link,/lib" - CONFIGURE_OPTS="\ - ${CONFIGURE_OPTS} \ - --shared" + CONFIGURE_OPTS+=" --shared" } hvconfig_post() -- 2.20.1