[google/gcc-4_8] Fix libatomic testsuite for when GCC_UNDER_TEST is not plain xgcc

Simon Baldwin simonb@google.com
Tue May 21 19:00:00 GMT 2013


Ping.  Also, any thoughts on suitability of this (or otherwise) for trunk?


On 1 May 2013 16:04, Simon Baldwin <simonb@google.com> wrote:
> Fix libatomic testsuite for when GCC_UNDER_TEST is not plain xgcc.
>
> Libatomic tests fail if GCC_UNDER_TEST is set to something other than a plain
> xgcc invocation (for example, when $CC requires a special -sysroot).  Fix
> testsuite files so that it uniformly uses CC_UNDER_TEST rather than any result
> from libgloss find_gcc.
>
> Okay for google/gcc-4_8?  google/main?
>
> 2013-05-01    <simonb@google.com>
>
>         * libatomic/configure: Regenerate.
>         * libatomic/configure.ac: Add testsuite/atomicconfig.exp config file.
>         * libatomic/testsuite/atomicconfig.exp.in: New.
>         * libatomic/testsuite/config/default.exp: Load atomicconfig.exp.
>         * libatomic/testsuite/lib/libatomic.exp: Print multi-lib using
>         the full value of $GCC_UNDER_TEST.
>
>
> Index: libatomic/configure
> ===================================================================
> --- libatomic/configure (revision 198464)
> +++ libatomic/configure (working copy)
> @@ -655,6 +655,7 @@ CCAS
>  am__fastdepCC_FALSE
>  am__fastdepCC_TRUE
>  CCDEPMODE
> +am__nodep
>  AMDEPBACKSLASH
>  AMDEP_FALSE
>  AMDEP_TRUE
> @@ -3044,11 +3045,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}ma
>
>  # We need awk for the "check" target.  The system "awk" is bad on
>  # some platforms.
> -# Always define AMTAR for backward compatibility.
> +# Always define AMTAR for backward compatibility.  Yes, it's still used
> +# in the wild :-(  We should find a proper way to deprecate it ...
> +AMTAR='$${TAR-tar}'
>
> -AMTAR=${AMTAR-"${am_missing_run}tar"}
> -
> -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
> +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
>
>
>
> @@ -3946,6 +3947,7 @@ fi
>  if test "x$enable_dependency_tracking" != xno; then
>    am_depcomp="$ac_aux_dir/depcomp"
>    AMDEPBACKSLASH='\'
> +  am__nodep='_no'
>  fi
>   if test "x$enable_dependency_tracking" != xno; then
>    AMDEP_TRUE=
> @@ -3970,6 +3972,7 @@ else
>    # instance it was reported that on HP-UX the gcc test will end up
>    # making a dummy file named `D' -- because `-MD' means `put the output
>    # in D'.
> +  rm -rf conftest.dir
>    mkdir conftest.dir
>    # Copy depcomp to subdir because otherwise we won't find it if we're
>    # using a relative directory.
> @@ -4029,7 +4032,7 @@ else
>         break
>        fi
>        ;;
> -    msvisualcpp | msvcmsys)
> +    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
>        # This compiler won't grok `-c -o', but also, the minuso test has
>        # not run yet.  These depmodes are late enough in the game, and
>        # so weak that their functioning should not be impacted.
> @@ -4104,6 +4107,7 @@ else
>    # instance it was reported that on HP-UX the gcc test will end up
>    # making a dummy file named `D' -- because `-MD' means `put the output
>    # in D'.
> +  rm -rf conftest.dir
>    mkdir conftest.dir
>    # Copy depcomp to subdir because otherwise we won't find it if we're
>    # using a relative directory.
> @@ -4161,7 +4165,7 @@ else
>         break
>        fi
>        ;;
> -    msvisualcpp | msvcmsys)
> +    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
>        # This compiler won't grok `-c -o', but also, the minuso test has
>        # not run yet.  These depmodes are late enough in the game, and
>        # so weak that their functioning should not be impacted.
> @@ -7614,7 +7618,22 @@ fi
>
>  # Check whether --with-pic was given.
>  if test "${with_pic+set}" = set; then :
> -  withval=$with_pic; pic_mode="$withval"
> +  withval=$with_pic; p=${PACKAGE-default}
> +    case "$withval" in
> +    yes|no) pic_mode="$withval" ;;
> +    *)
> +      pic_mode=default
> +      # Look at the argument we got.  We use all the common list separators.
> +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
> +      for pkg in $withval; do
> +       IFS="$lt_save_ifs"
> +       if test "X$pkg" = "X$p"; then
> +         pic_mode=yes
> +       fi
> +      done
> +      IFS="$lt_save_ifs"
> +      ;;
> +    esac
>  else
>    pic_mode=default
>  fi
> @@ -11013,7 +11032,7 @@ else
>    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
>    lt_status=$lt_dlunknown
>    cat > conftest.$ac_ext <<_LT_EOF
> -#line 11016 "configure"
> +#line 11035 "configure"
>  #include "confdefs.h"
>
>  #if HAVE_DLFCN_H
> @@ -11119,7 +11138,7 @@ else
>    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
>    lt_status=$lt_dlunknown
>    cat > conftest.$ac_ext <<_LT_EOF
> -#line 11122 "configure"
> +#line 11141 "configure"
>  #include "confdefs.h"
>
>  #if HAVE_DLFCN_H
> @@ -15125,6 +15144,8 @@ fi
>
>  ac_config_files="$ac_config_files Makefile testsuite/Makefile"
>
> +ac_config_files="$ac_config_files testsuite/atomicconfig.exp"
> +
>  cat >confcache <<\_ACEOF
>  # This file is a shell script that caches the results of configure
>  # tests run on this system so they can be shared between configure
> @@ -16173,6 +16194,7 @@ do
>      "gstdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gstdint.h" ;;
>      "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
>      "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
> +    "testsuite/atomicconfig.exp") CONFIG_FILES="$CONFIG_FILES testsuite/atomicconfig.exp" ;;
>
>    *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
>    esac
> Index: libatomic/configure.ac
> ===================================================================
> --- libatomic/configure.ac      (revision 198464)
> +++ libatomic/configure.ac      (working copy)
> @@ -254,4 +254,5 @@ else
>  fi
>
>  AC_CONFIG_FILES(Makefile testsuite/Makefile)
> +AC_CONFIG_FILES(testsuite/atomicconfig.exp)
>  AC_OUTPUT
> Index: libatomic/testsuite/atomicconfig.exp.in
> ===================================================================
> --- libatomic/testsuite/atomicconfig.exp.in     (revision 0)
> +++ libatomic/testsuite/atomicconfig.exp.in     (revision 0)
> @@ -0,0 +1,2 @@
> +global GCC_UNDER_TEST
> +set GCC_UNDER_TEST "@CC@"
> Index: libatomic/testsuite/config/default.exp
> ===================================================================
> --- libatomic/testsuite/config/default.exp      (revision 198464)
> +++ libatomic/testsuite/config/default.exp      (working copy)
> @@ -15,3 +15,4 @@
>  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
>
>  load_lib "standard.exp"
> +load_lib "atomicconfig.exp"
> Index: libatomic/testsuite/lib/libatomic.exp
> ===================================================================
> --- libatomic/testsuite/lib/libatomic.exp       (revision 198464)
> +++ libatomic/testsuite/lib/libatomic.exp       (working copy)
> @@ -120,7 +120,7 @@ proc libatomic_init { args } {
>         set compiler [lindex $GCC_UNDER_TEST 0]
>
>         if { [is_remote host] == 0 && [which $compiler] != 0 } {
> -         foreach i "[exec $compiler --print-multi-lib]" {
> +         foreach i "[eval "exec $GCC_UNDER_TEST --print-multi-lib"]" {
>             set mldir ""
>             regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
>             set mldir [string trimright $mldir "\;@"]



-- 
Google UK Limited | Registered Office: Belgrave House, 76 Buckingham
Palace Road, London SW1W 9TQ | Registered in England Number: 3977902



More information about the Gcc-patches mailing list