vapier      14/09/10 18:15:55

  Modified:             common.eblit src_test.eblit src_compile.eblit
                        src_install.eblit
  Log:
  Combine ABI for loops into one helper.
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
D2E96200)

Revision  Changes    Path
1.40                 sys-libs/glibc/files/eblits/common.eblit

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?rev=1.40&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?rev=1.40&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?r1=1.39&r2=1.40

Index: common.eblit
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- common.eblit        21 Aug 2014 14:41:39 -0000      1.39
+++ common.eblit        10 Sep 2014 18:15:55 -0000      1.40
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 
1.39 2014/08/21 14:41:39 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 
1.40 2014/09/10 18:15:55 vapier Exp $
 
 alt_prefix() {
        is_crosscompile && echo /usr/${CTARGET}
@@ -302,6 +302,28 @@
        export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}"
 }
 
+foreach_abi() {
+       setup_env
+
+       local ret=0
+       local abilist=""
+       if has_multilib_profile ; then
+               abilist=$(get_install_abis)
+       elif is_crosscompile || tc-is-cross-compiler ; then
+               abilist=${DEFAULT_ABI}
+       fi
+       evar_push ABI
+       export ABI
+       for ABI in ${abilist:-default} ; do
+               setup_env
+               einfo "Running $1 for ABI ${ABI}"
+               $1
+               : $(( ret |= $? ))
+       done
+       evar_pop
+       return ${ret}
+}
+
 just_headers() {
        is_crosscompile && use crosscompile_opts_headers-only
 }



1.8                  sys-libs/glibc/files/eblits/src_test.eblit

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_test.eblit?rev=1.8&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_test.eblit?rev=1.8&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_test.eblit?r1=1.7&r2=1.8

Index: src_test.eblit
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_test.eblit,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- src_test.eblit      10 Sep 2014 08:16:30 -0000      1.7
+++ src_test.eblit      10 Sep 2014 18:15:55 -0000      1.8
@@ -1,8 +1,8 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: 
/var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_test.eblit,v 1.7 
2014/09/10 08:16:30 vapier Exp $
+# $Header: 
/var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_test.eblit,v 1.8 
2014/09/10 18:15:55 vapier Exp $
 
-toolchain-glibc_src_test() {
+glibc_src_test() {
        cd "$(builddir $1)"
        emake -j1 check && return 0
        einfo "make check failed - re-running with --keep-going to get the rest 
of the results"
@@ -11,45 +11,20 @@
        return 1
 }
 
-eblit-glibc-src_test() {
-       local ret=0
-
-       setup_env
-
-       _maybe_die() {
-               if [[ -n ${OABI} ]] ; then
-                       return ${ret}
-               elif [[ ${ret} -ne 0 ]] ; then
-                       die "tests failed"
-               fi
-       }
-
-       # give tests more time to complete
-       export TIMEOUTFACTOR=5
-
-       if [[ -z ${OABI} ]] && has_multilib_profile ; then
-               OABI=${ABI}
-               einfo "Testing multilib glibc for ABIs: $(get_install_abis)"
-               for ABI in $(get_install_abis) ; do
-                       export ABI
-                       einfo "   Testing ${ABI} glibc"
-                       eblit-glibc-src_test
-                       : $(( ret += $? ))
-               done
-               ABI=${OABI}
-               unset OABI
-
-               _maybe_die
-               return
-       fi
-
-       local t
+toolchain-glibc_src_test() {
+       local ret=0 t
        for t in linuxthreads nptl ; do
                if want_${t} ; then
-                       toolchain-glibc_src_test ${t}
-                       : $(( ret += $? ))
+                       glibc_src_test ${t}
+                       : $(( ret |= $? ))
                fi
        done
-       _maybe_die
-       return
+       return ${ret}
+}
+
+eblit-glibc-src_test() {
+       # Give tests more time to complete.
+       export TIMEOUTFACTOR=5
+
+       foreach_abi toolchain-glibc_src_test || die "tests failed"
 }



1.44                 sys-libs/glibc/files/eblits/src_compile.eblit

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit?rev=1.44&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit?rev=1.44&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit?r1=1.43&r2=1.44

Index: src_compile.eblit
===================================================================
RCS file: 
/var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- src_compile.eblit   10 Sep 2014 07:46:43 -0000      1.43
+++ src_compile.eblit   10 Sep 2014 18:15:55 -0000      1.44
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: 
/var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v 1.43 
2014/09/10 07:46:43 vapier Exp $
+# $Header: 
/var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v 1.44 
2014/09/10 18:15:55 vapier Exp $
 
 dump_toolchain_settings() {
        echo
@@ -250,27 +250,5 @@
                        libc_cv_forced_unwind=yes
        fi
 
-       setup_env
-
-       if [[ -z ${OABI} ]] ; then
-               local abilist=""
-               if has_multilib_profile ; then
-                       abilist=$(get_install_abis)
-               elif is_crosscompile || tc-is-cross-compiler ; then
-                       abilist=${DEFAULT_ABI}
-               fi
-               einfo "Building glibc for ABIs: ${abilist}"
-               if [[ -n ${abilist} ]] ; then
-                       OABI=${ABI}
-                       for ABI in ${abilist} ; do
-                               export ABI
-                               src_compile
-                       done
-                       ABI=${OABI}
-                       unset OABI
-                       return 0
-               fi
-       fi
-
-       toolchain-glibc_src_compile
+       foreach_abi toolchain-glibc_src_compile
 }



1.38                 sys-libs/glibc/files/eblits/src_install.eblit

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit?rev=1.38&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit?rev=1.38&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit?r1=1.37&r2=1.38

Index: src_install.eblit
===================================================================
RCS file: 
/var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- src_install.eblit   10 Sep 2014 08:16:30 -0000      1.37
+++ src_install.eblit   10 Sep 2014 18:15:55 -0000      1.38
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: 
/var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.37 
2014/09/10 08:16:30 vapier Exp $
+# $Header: 
/var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.38 
2014/09/10 18:15:55 vapier Exp $
 
 toolchain-glibc_src_install() {
        local builddir=$(builddir $(want_linuxthreads && echo linuxthreads || 
echo nptl))
@@ -239,29 +239,6 @@
                return
        fi
 
-       setup_env
-
-       if [[ -z ${OABI} ]] ; then
-               local abilist=""
-               if has_multilib_profile ; then
-                       abilist=$(get_install_abis)
-                       einfo "Installing multilib glibc for ABIs: ${abilist}"
-               elif is_crosscompile || tc-is-cross-compiler ; then
-                       abilist=${DEFAULT_ABI}
-               fi
-               if [[ -n ${abilist} ]] ; then
-                       OABI=${ABI}
-                       for ABI in ${abilist} ; do
-                               export ABI
-                               eblit-glibc-src_install
-                       done
-                       ABI=${OABI}
-                       unset OABI
-                       src_strip
-                       return 0
-               fi
-       fi
-
-       toolchain-glibc_src_install
-       [[ -z ${OABI} ]] && src_strip
+       foreach_abi toolchain-glibc_src_install
+       src_strip
 }




Reply via email to