Second ping: Re: Add a configure option to disable system header canonicalizations (issue6495088)

2012-10-01 Thread Simon Baldwin
Ping, again.


On 21 September 2012 12:45, Simon Baldwin  wrote:
>
> Ping.
>
> http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00459.html
>
> Full text of previous message and context at URL above.  No comments
> or code changes since.  Patch description left below for convenience.
>
> >
> > Add flags to disable system header canonicalizations.
> >
> > Libcpp may canonicalize system header paths with lrealpath() for 
> > diagnostics,
> > dependency output, and similar.  If gcc is held in a symlink farm the
> > canonicalized paths may be meaningless to users, and will also conflict with
> > build frameworks that (for example) disallow absolute paths to header files.
> >
> > This change adds -f[no-]canonical-system-headers to the gcc command line, 
> > and
> > a configure option --[en/dis]able-canonical-system-headers to set default
> > behaviour, allowing the user to select whether or not to implement r186991.
> > Default is enabled.  See also PR c++/52974.
> >
> > Tested for regressions with bootstrap builds of C and C++, both with and
> > without configure --disable-canonical-system-headers.
>
> --
> Google UK Limited | Registered Office: Belgrave House, 76 Buckingham
> Palace Road, London SW1W 9TQ | Registered in England Number: 3977902




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


Third ping: Re: Add a configure option to disable system header canonicalizations (issue6495088)

2012-10-08 Thread Simon Baldwin
Ping, again.

On 1 October 2012 16:56, Simon Baldwin  wrote:
>
> Ping, again.
>
>
> On 21 September 2012 12:45, Simon Baldwin  wrote:
> >
> > Ping.
> >
> > http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00459.html
> >
> > Full text of previous message and context at URL above.  No comments
> > or code changes since.  Patch description left below for convenience.
> >
> > >
> > > Add flags to disable system header canonicalizations.
> > >
> > > Libcpp may canonicalize system header paths with lrealpath() for
> > > diagnostics,
> > > dependency output, and similar.  If gcc is held in a symlink farm the
> > > canonicalized paths may be meaningless to users, and will also
> > > conflict with
> > > build frameworks that (for example) disallow absolute paths to header
> > > files.
> > >
> > > This change adds -f[no-]canonical-system-headers to the gcc command
> > > line, and
> > > a configure option --[en/dis]able-canonical-system-headers to set
> > > default
> > > behaviour, allowing the user to select whether or not to implement
> > > r186991.
> > > Default is enabled.  See also PR c++/52974.
> > >
> > > Tested for regressions with bootstrap builds of C and C++, both with
> > > and
> > > without configure --disable-canonical-system-headers.

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


Fourth ping: Re: Add a configure option to disable system header canonicalizations (issue6495088)

2012-10-16 Thread Simon Baldwin
Ping, again

http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00459.html

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


[google/integration] Selectively disable system header canonicalizations (issue6851077)

2012-11-19 Thread Simon Baldwin
Selectively disable system header canonicalizations.

Backport trunk r193569.  Adds command line and configure flags so that libcpp
system file header path canonicalization is conditional.

Trunk patch details: http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00459.html

Okay for google/integrate branch?


Index: gcc/doc/cppopts.texi
===
--- gcc/doc/cppopts.texi(revision 193618)
+++ gcc/doc/cppopts.texi(working copy)
@@ -564,6 +564,10 @@ Accept universal character names in iden
 experimental; in a future version of GCC, it will be enabled by
 default for C99 and C++.
 
+@item -fno-canonical-system-headers
+@opindex fno-canonical-system-headers
+When preprocessing, do not shorten system header paths with canonicalization.
+
 @item -fpreprocessed
 @opindex fpreprocessed
 Indicate to the preprocessor that the input file has already been
Index: gcc/doc/install.texi
===
--- gcc/doc/install.texi(revision 193618)
+++ gcc/doc/install.texi(working copy)
@@ -1747,6 +1747,14 @@ and may be disabled using @option{--disa
 See @option{-canonical-prefixes} or @option{-no-canonical-prefixes} for
 more details, including how to override this configuration option when
 compiling.
+
+@item --enable-canonical-system-headers
+@itemx --disable-canonical-system-headers
+Enable system header path canonicalization for @file{libcpp}.  This can
+produce shorter header file paths in diagnostics and dependency output
+files, but these changed header paths may conflict with some compilation
+environments.  Enabled by default, and may be disabled using
+@option{--disable-canonical-system-headers}.
 @end table
 
 @subheading Cross-Compiler-Specific Options
Index: gcc/c-family/ChangeLog.google-integration
===
--- gcc/c-family/ChangeLog.google-integration   (revision 0)
+++ gcc/c-family/ChangeLog.google-integration   (revision 0)
@@ -0,0 +1,13 @@
+2012-11-16  Simon Baldwin  
+
+   Backport trunk revision 193569.
+
+   * c.opt: Add f[no-]canonical-system-headers.
+   * c-opts.c (c_common_handle_option): Handle
+   OPT_fcanonical_system_headers.
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
Index: gcc/c-family/c.opt
===
--- gcc/c-family/c.opt  (revision 193618)
+++ gcc/c-family/c.opt  (working copy)
@@ -755,6 +755,10 @@ Recognize built-in functions
 fbuiltin-
 C ObjC C++ ObjC++ Joined
 
+fcanonical-system-headers
+C ObjC C++ ObjC++
+Where shorter, use canonicalized paths to systems headers.
+
 fcheck-new
 C++ ObjC++ Var(flag_check_new)
 Check the return value of new
Index: gcc/c-family/c-opts.c
===
--- gcc/c-family/c-opts.c   (revision 193618)
+++ gcc/c-family/c-opts.c   (working copy)
@@ -565,6 +565,10 @@ c_common_handle_option (size_t scode, co
   handle_OPT_d (arg);
   break;
 
+case OPT_fcanonical_system_headers:
+  cpp_opts->canonical_system_headers = value;
+  break;
+
 case OPT_fcond_mismatch:
   if (!c_dialect_cxx ())
{
Index: gcc/ChangeLog.google-integration
===
--- gcc/ChangeLog.google-integration(revision 193618)
+++ gcc/ChangeLog.google-integration(working copy)
@@ -1,3 +1,10 @@
+2012-11-19  Simon Baldwin  
+
+   Backport trunk revision 193569.
+
+   * doc/cppopts.texi: Document -f[no-]canonical-system-headers.
+   * doc/install.texi: Document --enable-canonical-system-headers.
+
 2012-10-16   DeLesley Hutchins  
 
* common.opt:
Index: libcpp/configure
===
--- libcpp/configure(revision 193618)
+++ libcpp/configure(working copy)
@@ -703,6 +703,7 @@ enable_rpath
 with_libiconv_prefix
 enable_maintainer_mode
 enable_checking
+enable_canonical_system_headers
 '
   ac_precious_vars='build_alias
 host_alias
@@ -1337,6 +1338,8 @@ Optional Features:
   --disable-rpath do not hardcode runtime library paths
   --enable-maintainer-mode enable rules only needed by maintainers
   --enable-checking  enable expensive run-time checks
+  --enable-canonical-system-headers
+  enable or disable system headers canonicalization
 
 Optional Packages:
   --with-PACKAGE[=ARG]use PACKAGE [ARG=yes]
@@ -7366,6 +7369,19 @@ $as_echo "#define ENABLE_CHECKING 1" >>c
 
 fi
 
+# Check whether --enable-canonical-system-headers was given.
+if test "${enable_canonical_system_headers+set}" = set; then :
+  enableval=

[patch][google/gcc-4_7] Extend expiration date for pr54127 and Google ref b/6983319 (issue6858082)

2012-11-27 Thread Simon Baldwin
Extend expiration date for pr54127 and Google ref b/6983319.

Okay for google/gcc-4_7 branch?  Thanks.


ChangeLog.google-4_7
2012-11-27  Simon Baldwin  

* contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail:
Extend expiration date for pr54127 and Google ref b/6983319.


Index: contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail
===
--- contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail (revision 
193854)
+++ contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail (working copy)
@@ -1,9 +1,9 @@
 # Temporarily ignore gcc pr54127.
-expire=20121231 | FAIL: gcc.dg/torture/pr53589.c -O3 -g  (test for excess 
errors)
-expire=20121231 | FAIL: gcc.dg/torture/pr53589.c  -O3 -g  (internal compiler 
error)
+expire=20151231 | FAIL: gcc.dg/torture/pr53589.c -O3 -g  (test for excess 
errors)
+expire=20151231 | FAIL: gcc.dg/torture/pr53589.c  -O3 -g  (internal compiler 
error)
 # Temporarily ignore Google ref b/6983319.
-expire=20121231 | FAIL: gcc.target/powerpc/regnames-1.c (test for excess 
errors)
-expire=20121231 | FAIL: gcc.target/powerpc/regnames-1.c (internal compiler 
error)
+expire=20151231 | FAIL: gcc.target/powerpc/regnames-1.c (test for excess 
errors)
+expire=20151231 | FAIL: gcc.target/powerpc/regnames-1.c (internal compiler 
error)
 
 FAIL: gfortran.dg/bessel_6.f90  -O0  execution test
 FAIL: gfortran.dg/bessel_6.f90  -O1  execution test

--
This patch is available for review at http://codereview.appspot.com/6858082


[patch][google/gcc-4_7] Permanently ignore pr54127 and Google ref b/6983319 (issue6856104)

2012-11-27 Thread Simon Baldwin
Permanently ignore pr54127 and Google ref b/6983319.

Okay for google/gcc-4_7 branch?  Thanks.


ChangeLog.google-4_7
2012-11-27  Simon Baldwin  

* contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail:
Permanently ignore pr54127 and Google ref b/6983319.


Index: contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail
===
--- contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail (revision 
193860)
+++ contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail (working copy)
@@ -1,9 +1,9 @@
-# Temporarily ignore gcc pr54127.
-expire=20151231 | FAIL: gcc.dg/torture/pr53589.c -O3 -g  (test for excess 
errors)
-expire=20151231 | FAIL: gcc.dg/torture/pr53589.c  -O3 -g  (internal compiler 
error)
-# Temporarily ignore Google ref b/6983319.
-expire=20151231 | FAIL: gcc.target/powerpc/regnames-1.c (test for excess 
errors)
-expire=20151231 | FAIL: gcc.target/powerpc/regnames-1.c (internal compiler 
error)
+# Ignore gcc pr54127.
+FAIL: gcc.dg/torture/pr53589.c -O3 -g  (test for excess errors)
+FAIL: gcc.dg/torture/pr53589.c  -O3 -g  (internal compiler error)
+# Ignore Google ref b/6983319.
+FAIL: gcc.target/powerpc/regnames-1.c (test for excess errors)
+FAIL: gcc.target/powerpc/regnames-1.c (internal compiler error)
 
 FAIL: gfortran.dg/bessel_6.f90  -O0  execution test
 FAIL: gfortran.dg/bessel_6.f90  -O1  execution test

--
This patch is available for review at http://codereview.appspot.com/6856104


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

2013-05-01 Thread Simon Baldwin
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

* 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
@@ -9,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_co

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

2013-05-21 Thread Simon Baldwin
Ping.  Also, any thoughts on suitability of this (or otherwise) for trunk?


On 1 May 2013 16:04, Simon Baldwin  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
>
> * 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 <<_

[google/gcc-4_8] Add new libitm failures to x86_64-grtev3-linux-gnu.xfail

2013-06-06 Thread Simon Baldwin
Add new libitm failures to x86_64-grtev3-linux-gnu.xfail.

Okay for google/gcc-4_8?  google/main?  Thanks.


Index: contrib/testsuite-management/x86_64-grtev3-linux-gnu.xfail
===
--- contrib/testsuite-management/x86_64-grtev3-linux-gnu.xfail  (revision 
199736)
+++ contrib/testsuite-management/x86_64-grtev3-linux-gnu.xfail  (working copy)
@@ -66,6 +66,7 @@ flaky|FAIL: libmudflap.c/fail37-frag.c (
 FAIL: libatomic.c/atomic-generic.c (test for excess errors)
 FAIL: libatomic.c/generic-2.c (test for excess errors)
 FAIL: libitm.c++/dropref.C (test for excess errors)
+FAIL: libitm.c++/eh-1.C (test for excess errors)
 FAIL: libitm.c++/throwdown.C (test for excess errors)
 FAIL: libitm.c/cancel.c (test for excess errors)
 FAIL: libitm.c/clone-1.c (test for excess errors)
@@ -77,10 +78,12 @@ FAIL: libitm.c/notx.c (test for excess e
 FAIL: libitm.c/reentrant.c (test for excess errors)
 FAIL: libitm.c/simple-1.c (test for excess errors)
 FAIL: libitm.c/simple-2.c (test for excess errors)
+FAIL: libitm.c/stackundo.c (test for excess errors)
 FAIL: libitm.c/txrelease.c (test for excess errors)
 UNRESOLVED: libatomic.c/atomic-generic.c compilation failed to produce 
executable
 UNRESOLVED: libatomic.c/generic-2.c compilation failed to produce executable
 UNRESOLVED: libitm.c++/dropref.C compilation failed to produce executable
+UNRESOLVED: libitm.c++/eh-1.C compilation failed to produce executable
 UNRESOLVED: libitm.c/cancel.c compilation failed to produce executable
 UNRESOLVED: libitm.c/clone-1.c compilation failed to produce executable
 UNRESOLVED: libitm.c/dropref-2.c compilation failed to produce executable
@@ -91,6 +94,7 @@ UNRESOLVED: libitm.c/notx.c compilation
 UNRESOLVED: libitm.c/reentrant.c compilation failed to produce executable
 UNRESOLVED: libitm.c/simple-1.c compilation failed to produce executable
 UNRESOLVED: libitm.c/simple-2.c compilation failed to produce executable
+UNRESOLVED: libitm.c/stackundo.c compilation failed to produce executable
 UNRESOLVED: libitm.c/txrelease.c compilation failed to produce executable
 
 # These failures are likely due to misconfiguration during the


[PATCH] Set $ac_aux_dir before use in libdecnumber/configure

2013-06-20 Thread Simon Baldwin
Set $ac_aux_dir before use in libdecnumber/configure.

libdecnumber/configure uses $ac_aux_dir before it is set, causing incorrect
MISSING value.  Fix with explicit AC_CONFIG_AUX_DIR.

Bootstrapped for c/c++.  Okay for trunk?


libdecnumber/ChangeLog
2013-06-20  Simon Baldwin  

* configure.ac: Add AC_CONFIG_AUX_DIR.
* configure: Regenerated.


Index: libdecnumber/configure.ac
===
--- libdecnumber/configure.ac   (revision 200246)
+++ libdecnumber/configure.ac   (working copy)
@@ -23,6 +23,7 @@ AC_PREREQ(2.64)
 AC_INIT(libdecnumber, [ ], gcc-b...@gcc.gnu.org, libdecnumber)
 AC_CONFIG_SRCDIR(decNumber.h)
 AC_CONFIG_MACRO_DIR(../config)
+AC_CONFIG_AUX_DIR(..)
 
 # Checks for programs.
 AC_PROG_MAKE_SET
Index: libdecnumber/configure
===
--- libdecnumber/configure  (revision 200246)
+++ libdecnumber/configure  (working copy)
@@ -2220,6 +2220,29 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+ac_aux_dir=
+for ac_dir in .. "$srcdir"/..; do
+  for ac_t in install-sh install.sh shtool; do
+if test -f "$ac_dir/$ac_t"; then
+  ac_aux_dir=$ac_dir
+  ac_install_sh="$ac_aux_dir/$ac_t -c"
+  break 2
+fi
+  done
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error "cannot find install-sh, install.sh, or shtool in .. 
\"$srcdir\"/.." "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
 
 # Checks for programs.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets 
\$(MAKE)" >&5
@@ -4458,29 +4481,6 @@ else
 fi
 
 
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  for ac_t in install-sh install.sh shtool; do
-if test -f "$ac_dir/$ac_t"; then
-  ac_aux_dir=$ac_dir
-  ac_install_sh="$ac_aux_dir/$ac_t -c"
-  break 2
-fi
-  done
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" 
\"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5


Ping: [PATCH] Set $ac_aux_dir before use in libdecnumber/configure

2013-07-04 Thread Simon Baldwin
Ping.


On 20 June 2013 20:19, Simon Baldwin  wrote:
> Set $ac_aux_dir before use in libdecnumber/configure.
>
> libdecnumber/configure uses $ac_aux_dir before it is set, causing incorrect
> MISSING value.  Fix with explicit AC_CONFIG_AUX_DIR.
>
> Bootstrapped for c/c++.  Okay for trunk?
>
>
> libdecnumber/ChangeLog
> 2013-06-20  Simon Baldwin  
>
> * configure.ac: Add AC_CONFIG_AUX_DIR.
> * configure: Regenerated.
>
>
> Index: libdecnumber/configure.ac
> ===
> --- libdecnumber/configure.ac   (revision 200246)
> +++ libdecnumber/configure.ac   (working copy)
> @@ -23,6 +23,7 @@ AC_PREREQ(2.64)
>  AC_INIT(libdecnumber, [ ], gcc-b...@gcc.gnu.org, libdecnumber)
>  AC_CONFIG_SRCDIR(decNumber.h)
>  AC_CONFIG_MACRO_DIR(../config)
> +AC_CONFIG_AUX_DIR(..)
>
>  # Checks for programs.
>  AC_PROG_MAKE_SET
> Index: libdecnumber/configure
> ===
> --- libdecnumber/configure  (revision 200246)
> +++ libdecnumber/configure  (working copy)
> @@ -2220,6 +2220,29 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
>
>
>
> +ac_aux_dir=
> +for ac_dir in .. "$srcdir"/..; do
> +  for ac_t in install-sh install.sh shtool; do
> +if test -f "$ac_dir/$ac_t"; then
> +  ac_aux_dir=$ac_dir
> +  ac_install_sh="$ac_aux_dir/$ac_t -c"
> +  break 2
> +fi
> +  done
> +done
> +if test -z "$ac_aux_dir"; then
> +  as_fn_error "cannot find install-sh, install.sh, or shtool in .. 
> \"$srcdir\"/.." "$LINENO" 5
> +fi
> +
> +# These three variables are undocumented and unsupported,
> +# and are intended to be withdrawn in a future Autoconf release.
> +# They can cause serious problems if a builder's source tree is in a 
> directory
> +# whose full name contains unusual characters.
> +ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this 
> var.
> +ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
> +ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
> +
> +
>
>  # Checks for programs.
>  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets 
> \$(MAKE)" >&5
> @@ -4458,29 +4481,6 @@ else
>  fi
>
>
> -ac_aux_dir=
> -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
> -  for ac_t in install-sh install.sh shtool; do
> -if test -f "$ac_dir/$ac_t"; then
> -  ac_aux_dir=$ac_dir
> -  ac_install_sh="$ac_aux_dir/$ac_t -c"
> -  break 2
> -fi
> -  done
> -done
> -if test -z "$ac_aux_dir"; then
> -  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" 
> \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
> -fi
> -
> -# These three variables are undocumented and unsupported,
> -# and are intended to be withdrawn in a future Autoconf release.
> -# They can cause serious problems if a builder's source tree is in a 
> directory
> -# whose full name contains unusual characters.
> -ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this 
> var.
> -ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
> -ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
> -
> -
>  # Make sure we can run config.sub.
>  $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
>as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5



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


[patch][google/gcc-4_8] Fix powerpc64-grtev3-linux-gnu.xfail

2013-04-22 Thread Simon Baldwin
Fix contrib/testsuite-management/powerpc64-grtev3-linux-gnu.xfail

Add empty attributes to "FAIL: gcc.dg/pr44194-1.c" entry to eliminate
confusion with '|' appearing in the error message.  Fix two other comment
lines.

Okay?


contrib/ChangeLog
2013-04-22  Simon Baldwin  

* testsuite-management/powerpc64-unknown-linux-gnu.xfail: Fix.


Index: contrib/testsuite-management/powerpc64-grtev3-linux-gnu.xfail
===
--- contrib/testsuite-management/powerpc64-grtev3-linux-gnu.xfail   
(revision 198126)
+++ contrib/testsuite-management/powerpc64-grtev3-linux-gnu.xfail   
(working copy)
@@ -20,7 +20,7 @@ FAIL: gcc.dg/cleanup-10.c execution test
 FAIL: gcc.dg/cleanup-11.c execution test
 FAIL: gcc.dg/cleanup-8.c execution test
 FAIL: gcc.dg/cleanup-9.c execution test
-FAIL: gcc.dg/pr44194-1.c scan-rtl-dump dse1 "global deletions = (2|3)"
+| FAIL: gcc.dg/pr44194-1.c scan-rtl-dump dse1 "global deletions = (2|3)"
 FAIL: gcc.dg/pr44194-1.c scan-rtl-dump-not final "set \\(mem"
 FAIL: gcc.dg/pr46728-6.c scan-assembler-not pow
 
@@ -115,7 +115,7 @@ FAIL: gcc.target/powerpc/pr46728-4.c sca
 FAIL: gcc.target/powerpc/pr46728-7.c scan-assembler-not pow
 FAIL: gcc.target/powerpc/pr46728-8.c scan-assembler-not pow
 
-*** g++:
+# *** g++:
 FAIL: g++.dg/abi/forced.C -std=gnu++98 execution test
 FAIL: g++.dg/abi/forced.C -std=gnu++11 execution test
 FAIL: g++.dg/ext/cleanup-10.C -std=gnu++98 execution test
@@ -136,7 +136,7 @@ UNRESOLVED: g++.dg/tree-prof/mversn15a.C
 UNRESOLVED: g++.dg/tree-prof/mversn15a.C execution,-fprofile-use
 
 # Fortran failures are not important to us so far.
-*** gfortran:
+# *** gfortran:
 FAIL: gfortran.dg/bessel_6.f90  -O0  execution test
 FAIL: gfortran.dg/bessel_6.f90  -O1  execution test
 FAIL: gfortran.dg/bessel_6.f90  -O2  execution test


[google gcc-4_7] Committed revision 195435, cherry picks branches/gcc-4_7-branch revision 194864

2013-01-24 Thread Simon Baldwin
FYI.

$ svn merge -c 194864
svn+ssh://sim...@gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch
...test, passes dejagnu
$ svn commit gcc/testsuite/g++.dg/cpp0x/constexpr-ctor11.C
gcc/cp/ChangeLog gcc/cp/semantics.c
Sendinggcc/cp/ChangeLog
Sendinggcc/cp/semantics.c
Adding gcc/testsuite/g++.dg/cpp0x/constexpr-ctor11.C
Transmitting file data ..
Committed revision 195435.

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


[patch][google/gcc-4_7] Ignore r194995 for gcc pr55852 (issue7304054)

2013-02-06 Thread Simon Baldwin
Ignore r194995 for gcc pr55852.

Okay for google/gcc-4_7 branch?  Thanks.


Index: contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail
===
--- contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail (revision 
195808)
+++ contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail (working copy)
@@ -1,3 +1,5 @@
+# Ignore r194995 for gcc pr55852.
+FAIL: gfortran.dg/intrinsic_size_3.f90 -O   scan-tree-dump-times original 
"iszs = \\(integer\\(kind=2\\)\\) MAX_EXPR <\\(D.->dim.0..ubound - 
D.->dim.0..lbound\\) \\+ 1, 0>;" 1
 # Ignore gcc pr54127.
 FAIL: gcc.dg/torture/pr53589.c -O3 -g  (test for excess errors)
 FAIL: gcc.dg/torture/pr53589.c  -O3 -g  (internal compiler error)

--
This patch is available for review at http://codereview.appspot.com/7304054


[google] Omit another TARGET_LIB_PATH from RPATH_ENVVAR set on bootstrap builds (issue6446102)

2012-08-08 Thread Simon Baldwin
Omit another TARGET_LIB_PATH from RPATH_ENVVAR set on bootstrap builds.

A second occurrence of adding TARGET_LIB_PATH to LD_LIBRARY_PATH on gcc
bootstrap builds.  This one also needs removing to enable full test coverage.

Discussion and rationale at: http://gcc.gnu.org/ml/gcc/2012-06/msg00314.html

For google/main, google/gcc-4_7 and google/gcc-4_7-integration.  Tested for
bootstrap and regression.

2012-08-08  Simon Baldwin  

* Makefile.tpl: Omit another TARGET_LIB_PATH from RPATH_ENVVAR set
on bootstrap builds.
* Makefile.in: Regenerate.


Index: Makefile.in
===
--- Makefile.in (revision 190231)
+++ Makefile.in (working copy)
@@ -288,9 +288,6 @@ BASE_TARGET_EXPORTS = \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
-@if gcc-bootstrap
-   $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
-@endif gcc-bootstrap
$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
TARGET_CONFIGDIRS="$(TARGET_CONFIGDIRS)"; export TARGET_CONFIGDIRS;
 
Index: Makefile.tpl
===
--- Makefile.tpl(revision 190231)
+++ Makefile.tpl(working copy)
@@ -291,9 +291,6 @@ BASE_TARGET_EXPORTS = \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
-@if gcc-bootstrap
-   $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
-@endif gcc-bootstrap
$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
TARGET_CONFIGDIRS="$(TARGET_CONFIGDIRS)"; export TARGET_CONFIGDIRS;
 

--
This patch is available for review at http://codereview.appspot.com/6446102


[google] Update contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail (issue6454147)

2012-08-14 Thread Simon Baldwin
Update contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail.

Tested with build followed by validate_failures.py.  Okay for all applicable
branches?

2012-08-14  Simon Baldwin  

* testsuite-management/powerpc-grtev3-linux-gnu.xfail: Add new entries
for soft-float.


Index: contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail
===
--- contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail (revision 
190382)
+++ contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail (working copy)
@@ -1,6 +1,9 @@
 # Temporarily ignore gcc pr54127.
 expire=20121031 | FAIL: gcc.dg/torture/pr53589.c -O3 -g  (test for excess 
errors)
 expire=20121031 | FAIL: gcc.dg/torture/pr53589.c  -O3 -g  (internal compiler 
error)
+# Temporarily ignore Google ref b/6983319.
+expire=20121031 | FAIL: gcc.target/powerpc/regnames-1.c (test for excess 
errors)
+expire=20121031 | FAIL: gcc.target/powerpc/regnames-1.c (internal compiler 
error)
 
 FAIL: gfortran.dg/bessel_6.f90  -O0  execution test
 FAIL: gfortran.dg/bessel_6.f90  -O1  execution test
@@ -171,6 +174,43 @@ FAIL: gcc.target/powerpc/pr46728-4.c sca
 FAIL: gcc.target/powerpc/pr46728-7.c scan-assembler-not pow
 FAIL: gcc.target/powerpc/pr46728-8.c scan-assembler-not pow
 
+# Entries due to soft-float.
+FAIL: g++.dg/cdce3.C -std=gnu++98 execution test
+FAIL: g++.dg/cdce3.C -std=gnu++11 execution test
+FAIL: g++.dg/tree-prof/mversn15.C execution,-fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/mversn15.C execution,-fprofile-use
+UNRESOLVED: g++.dg/tree-prof/mversn15.C compilation,  -fprofile-use
+FAIL: g++.dg/tree-prof/mversn15a.C execution,-fprofile-generate
+UNRESOLVED: g++.dg/tree-prof/mversn15a.C execution,-fprofile-use
+UNRESOLVED: g++.dg/tree-prof/mversn15a.C compilation,  -fprofile-use
+FAIL: gcc.dg/torture/fp-int-convert-long-double.c -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects  execution test
+FAIL: gcc.target/powerpc/lhs-1.c scan-assembler-times nop 3
+FAIL: gcc.target/powerpc/lhs-2.c scan-assembler ori 1,1,0
+FAIL: gcc.target/powerpc/lhs-3.c scan-assembler ori 2,2,0
+FAIL: gcc.target/powerpc/loop_align.c scan-assembler .p2align 5,,31
+FAIL: gcc.target/powerpc/pr46728-1.c scan-assembler-times fsqrt 2
+FAIL: gcc.target/powerpc/pr46728-16.c scan-assembler fmadd
+FAIL: gcc.target/powerpc/pr46728-2.c scan-assembler-times fsqrt 4
+FAIL: gcc.target/powerpc/pr46728-3.c scan-assembler-times sqrt 4
+FAIL: gcc.target/powerpc/pr46728-5.c scan-assembler-times cbrt 2
+FAIL: gcc.target/powerpc/pr52775.c scan-assembler-times fcfid 2
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer 
-funroll-loops  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -g  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O2  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer  
execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O1  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer 
-funroll-all-loops -finline-functions  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -Os  execution test
+FAIL: gfortran.dg/actual_array_constructor_3.f90 -O0  execution test
+FAIL: gfortran.dg/norm2_3.f90 -O3 -fomit-frame-pointer -funroll-loops  
execution test
+FAIL: gfortran.dg/norm2_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops 
-finline-functions  execution test
+FAIL: gfortran.dg/norm2_3.f90 -O0  execution test
+FAIL: gfortran.dg/norm2_3.f90 -Os  execution test
+FAIL: gfortran.dg/norm2_3.f90 -O2  execution test
+FAIL: gfortran.dg/norm2_3.f90 -O3 -g  execution test
+FAIL: gfortran.dg/norm2_3.f90 -O3 -fomit-frame-pointer  execution test
+FAIL: gfortran.dg/norm2_3.f90 -O1  execution test
+
 # See http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00141.html.  Revert once
 # that is resolved.
 UNRESOLVED: 23_containers/map/element_access/2.cc compilation failed to 
produce executable

--
This patch is available for review at http://codereview.appspot.com/6454147


Re: Reproducible gcc builds, gfortran, and -grecord-gcc-switches

2012-08-16 Thread Simon Baldwin
On 16 August 2012 16:40, Michael Matz  wrote:
>
> ,,,
>
> Do you have considered to use a new option flag (usable in the .opt files)
> instead of a langhook?  I.e. add a flag cl_dont_record to cl_option, a
> string Norecord for the .opt files, some handling for it in
> opt-functions.awk and the like?
>
> Adding lang-hooks used by debug producers make me twitch :)

Okay.  Below is an alternative approach.

I've moved discussion to gcc-patches, since it's now more concrete
than abstract.

--

Omit OPT_cpp_ from the DWARF producer string in gfortran.

Gfortran uses -cpp= internally, and with -grecord_gcc_switches
this command line switch is stored by default in object files.  This causes
problems with build and packaging systems that care about gcc binary
reproducibility and file checksums; the temporary file is different on each
compiler invocation.

Fixed by adding a new opt marker NoDwarfRecord and associated flag, filtering
options for this this setting when writing the producer string, and setting
this flag for fortran -cpp=

Tested for fortran (suppresses -cpp=...) and c (no effect).

gcc/ChangeLog
2012-08-16  Simon Baldwin  

* dwarf2out.c (gen_producer_string): Omit command line switch if
CL_NO_DWARF_RECORD flag set.
* opts.c (print_specific_help): Add CL_NO_DWARF_RECORD handling.
* opts.h (CL_NO_DWARF_RECORD): New.
* opt-functions.awk (switch_flags): Add NoDwarfRecord.

gcc/fortran/ChangeLog
2012-08-16  Simon Baldwin  

* lang.opt (-cpp=): Mark flag NoDwarfRecord.


Index: gcc/dwarf2out.c
===
--- gcc/dwarf2out.c (revision 190442)
+++ gcc/dwarf2out.c (working copy)
@@ -18101,6 +18101,9 @@ gen_producer_string (void)
/* Ignore these.  */
continue;
   default:
+if (cl_options[save_decoded_options[j].opt_index].flags
+   & CL_NO_DWARF_RECORD)
+ continue;
 gcc_checking_assert (save_decoded_options[j].canonical_option[0][0]
 == '-');
 switch (save_decoded_options[j].canonical_option[0][1])
Index: gcc/opts.c
===
--- gcc/opts.c  (revision 190442)
+++ gcc/opts.c  (working copy)
@@ -1186,7 +1186,9 @@ print_specific_help (unsigned int includ
 {
   if (any_flags == 0)
{
- if (include_flags & CL_UNDOCUMENTED)
+ if (include_flags & CL_NO_DWARF_RECORD)
+   description = _("The following options are not recorded by DWARF");
+  else if (include_flags & CL_UNDOCUMENTED)
description = _("The following options are not documented");
  else if (include_flags & CL_SEPARATE)
description = _("The following options take separate arguments");
@@ -1292,7 +1294,7 @@ common_handle_option (struct gcc_options
/* Walk along the argument string, parsing each word in turn.
   The format is:
   arg = [^]{word}[,{arg}]
-  word = {optimizers|target|warnings|undocumented|
+  word = {optimizers|target|warnings|undocumented|nodwarfrecord|
   params|common|}  */
while (* a != 0)
  {
@@ -1307,6 +1309,7 @@ common_handle_option (struct gcc_options
  { "target", CL_TARGET },
  { "warnings", CL_WARNING },
  { "undocumented", CL_UNDOCUMENTED },
+ { "nodwarfrecord", CL_NO_DWARF_RECORD },
  { "params", CL_PARAMS },
  { "joined", CL_JOINED },
  { "separate", CL_SEPARATE },
Index: gcc/opts.h
===
--- gcc/opts.h  (revision 190442)
+++ gcc/opts.h  (working copy)
@@ -145,6 +145,7 @@ extern const unsigned int cl_lang_count;
 #define CL_JOINED  (1U << 22) /* If takes joined argument.  */
 #define CL_SEPARATE(1U << 23) /* If takes a separate argument.  */
 #define CL_UNDOCUMENTED(1U << 24) /* Do not output with 
--help.  */
+#define CL_NO_DWARF_RECORD (1U << 25) /* Do not add to producer string.  */

 /* Flags for an enumerated option argument.  */
 #define CL_ENUM_CANONICAL  (1 << 0) /* Canonical for this value.  */
Index: gcc/fortran/lang.opt
===
--- gcc/fortran/lang.opt(revision 190442)
+++ gcc/fortran/lang.opt(working copy)
@@ -287,7 +287,7 @@ Fortran Negative(nocpp)
 Enable preprocessing

 cpp=
-Fortran Joined Negative(nocpp) Undocumented
+Fortran Joined Negative(nocpp) Undocumented NoDwarfRecord
 ; Internal option generated by specs from -cpp.

 nocpp
Index: gcc/opt-functions.awk
===
--- gcc/o

Re: Reproducible gcc builds, gfortran, and -grecord-gcc-switches

2012-08-17 Thread Simon Baldwin
On 16 August 2012 21:28, Jakub Jelinek  wrote:
>
> On Thu, Aug 16, 2012 at 06:59:09PM +0200, Simon Baldwin wrote:
> > On 16 August 2012 16:40, Michael Matz  wrote:
> > >
> > > ,,,
> > >
> > > Do you have considered to use a new option flag (usable in the .opt files)
> > > instead of a langhook?  I.e. add a flag cl_dont_record to cl_option, a
> > > string Norecord for the .opt files, some handling for it in
> > > opt-functions.awk and the like?
> > >
> > > Adding lang-hooks used by debug producers make me twitch :)
> >
> > Okay.  Below is an alternative approach.
> >
> > I've moved discussion to gcc-patches, since it's now more concrete
> > than abstract.
>
> You could have just added
>   case OPT_cpp_:
> to the switch in gen_producer_string, instead of all this.

Thanks.  I was under the impression, apparently mistaken, that
OPT_cpp_ exists only if fortran is enabled.

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


Re: Reproducible gcc builds, gfortran, and -grecord-gcc-switches

2012-08-20 Thread Simon Baldwin
On 17 August 2012 16:55, Joseph S. Myers  wrote:
>
> On Fri, 17 Aug 2012, Simon Baldwin wrote:
>
> > > You could have just added
> > >   case OPT_cpp_:
> > > to the switch in gen_producer_string, instead of all this.
> >
> > Thanks.  I was under the impression, apparently mistaken, that
> > OPT_cpp_ exists only if fortran is enabled.
>
> OPT_* for Fortran options only exist when the Fortran front-end is in the
> source tree (whether or not enabled).  I think we try to avoid knowingly
> breaking use cases where people remove some front ends from the source
> tree, although we don't actively test them and no longer provide split-up
> source tarballs.

Thanks for the update.  Which fix should move forwards?

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


Re: Reproducible gcc builds, gfortran, and -grecord-gcc-switches

2012-08-21 Thread Simon Baldwin
On 20 August 2012 16:45, Joseph S. Myers  wrote:
>
> On Mon, 20 Aug 2012, Simon Baldwin wrote:
>
> > > OPT_* for Fortran options only exist when the Fortran front-end is in the
> > > source tree (whether or not enabled).  I think we try to avoid knowingly
> > > breaking use cases where people remove some front ends from the source
> > > tree, although we don't actively test them and no longer provide split-up
> > > source tarballs.
> >
> > Thanks for the update.  Which fix should move forwards?
>
> I think the approach using a new option flag is the way to go, though the
> patch needs (at least) documentation for the new flag in options.texi.
>

Updated version appended below.  Okay for 4.8 trunk?

--

Omit OPT_cpp_ from the DWARF producer string in gfortran.

Gfortran uses -cpp= internally, and with -grecord_gcc_switches
this command line switch is stored by default in object files.  This causes
problems with build and packaging systems that care about gcc binary
reproducibility and file checksums; the temporary file is different on each
compiler invocation.

Fixed by adding a new opt marker NoDWARFRecord and associated flag, filtering
options for this this setting when writing the producer string, and setting
this flag for fortran -cpp=

Tested for fortran (suppresses -cpp=...) and c (no effect).

gcc/ChangeLog
2012-08-21  Simon Baldwin  

* dwarf2out.c (gen_producer_string): Omit command line switch if
CL_NO_DWARF_RECORD flag set.
* opts.c (print_specific_help): Add CL_NO_DWARF_RECORD handling.
* opts.h (CL_NO_DWARF_RECORD): New.
* opt-functions.awk (switch_flags): Add NoDWARFRecord.
* doc/options.texi: Document NoDWARFRecord option flag.
* doc/invoke.texi: Document --help=nodwarfrecord.

gcc/fortran/ChangeLog
2012-08-21  Simon Baldwin  

* lang.opt (-cpp=): Mark flag NoDWARFRecord.


Index: gcc/doc/options.texi
===
--- gcc/doc/options.texi(revision 190535)
+++ gcc/doc/options.texi(working copy)
@@ -468,4 +468,8 @@ of @option{-@var{opt}}, if not explicitl
 specify several different languages.  Each @var{language} must have
 been declared by an earlier @code{Language} record.  @xref{Option file
 format}.
+
+@item NoDWARFRecord
+The option is added to the list of those omitted from the producer string
+written by @option{-grecord-gcc-switches}.
 @end table
Index: gcc/doc/invoke.texi
===
--- gcc/doc/invoke.texi (revision 190535)
+++ gcc/doc/invoke.texi (working copy)
@@ -1330,6 +1330,10 @@ sign in the same continuous piece of tex
 @item @samp{separate}
 Display options taking an argument that appears as a separate word
 following the original option, such as: @samp{-o output-file}.
+
+@item @samp{nodwarfrecord}
+Display only those options that are marked for addition to the list of
+options omitted from @option{-grecord-gcc-switches}.
 @end table

 Thus for example to display all the undocumented target-specific
Index: gcc/dwarf2out.c
===
--- gcc/dwarf2out.c (revision 190535)
+++ gcc/dwarf2out.c (working copy)
@@ -18101,6 +18101,9 @@ gen_producer_string (void)
/* Ignore these.  */
continue;
   default:
+if (cl_options[save_decoded_options[j].opt_index].flags
+   & CL_NO_DWARF_RECORD)
+ continue;
 gcc_checking_assert (save_decoded_options[j].canonical_option[0][0]
 == '-');
 switch (save_decoded_options[j].canonical_option[0][1])
Index: gcc/opts.c
===
--- gcc/opts.c  (revision 190535)
+++ gcc/opts.c  (working copy)
@@ -1186,7 +1186,9 @@ print_specific_help (unsigned int includ
 {
   if (any_flags == 0)
{
- if (include_flags & CL_UNDOCUMENTED)
+ if (include_flags & CL_NO_DWARF_RECORD)
+   description = _("The following options are not recorded by DWARF");
+  else if (include_flags & CL_UNDOCUMENTED)
description = _("The following options are not documented");
  else if (include_flags & CL_SEPARATE)
description = _("The following options take separate arguments");
@@ -1292,7 +1294,7 @@ common_handle_option (struct gcc_options
/* Walk along the argument string, parsing each word in turn.
   The format is:
   arg = [^]{word}[,{arg}]
-  word = {optimizers|target|warnings|undocumented|
+  word = {optimizers|target|warnings|undocumented|nodwarfrecord|
   params|common|}  */
while (* a != 0)
  {
@@ -1307,6 +1309,7 @@ common_handle_option (struct gcc_options
  { &qu

Re: Reproducible gcc builds, gfortran, and -grecord-gcc-switches

2012-08-24 Thread Simon Baldwin
On 21 August 2012 17:18, Joseph S. Myers  wrote:
>
> On Tue, 21 Aug 2012, Simon Baldwin wrote:
>
> > Index: gcc/doc/options.texi
> > ===
> > --- gcc/doc/options.texi  (revision 190535)
> > +++ gcc/doc/options.texi  (working copy)
> > @@ -468,4 +468,8 @@ of @option{-@var{opt}}, if not explicitl
> >  specify several different languages.  Each @var{language} must have
> >  been declared by an earlier @code{Language} record.  @xref{Option file
> >  format}.
> > +
> > +@item NoDWARFRecord
> > +The option is added to the list of those omitted from the producer
> > string
> > +written by @option{-grecord-gcc-switches}.
>
> Remove "added to the list of those" (which seems unnecessarily verbose).
>
> > +@item @samp{nodwarfrecord}
> > +Display only those options that are marked for addition to the list of
> > +options omitted from @option{-grecord-gcc-switches}.
>
> I don't think there's any need for special --help support for options with
> this flag; this flag is really an implementation detail.  (Thus, I think
> all the opts.c changes are unnecessary.)

Thanks, revised and shorter version below.  Please take another look when ready.

--
Omit OPT_cpp_ from the DWARF producer string in gfortran.

Gfortran uses -cpp= internally, and with -grecord_gcc_switches
this command line switch is stored by default in object files.  This causes
problems with build and packaging systems that care about gcc binary
reproducibility and file checksums; the temporary file is different on each
compiler invocation.

Fixed by adding a new opt marker NoDWARFRecord and associated flag, filtering
options for this this setting when writing the producer string, and setting
this flag for fortran -cpp=

Tested for fortran (suppresses -cpp=...) and c (no effect).

gcc/ChangeLog
2012-08-24  Simon Baldwin  

* dwarf2out.c (gen_producer_string): Omit command line switch if
CL_NO_DWARF_RECORD flag set.
* opts.h (CL_NO_DWARF_RECORD): New.
* opt-functions.awk (switch_flags): Add NoDWARFRecord.
* doc/options.texi: Document NoDWARFRecord option flag.

gcc/fortran/ChangeLog
2012-08-24  Simon Baldwin  

* lang.opt (-cpp=): Mark flag NoDWARFRecord.


Index: gcc/doc/options.texi
===
--- gcc/doc/options.texi(revision 190642)
+++ gcc/doc/options.texi(working copy)
@@ -468,4 +468,8 @@ of @option{-@var{opt}}, if not explicitl
 specify several different languages.  Each @var{language} must have
 been declared by an earlier @code{Language} record.  @xref{Option file
 format}.
+
+@item NoDWARFRecord
+The option is omitted from the producer string written by
+@option{-grecord-gcc-switches}.
 @end table
Index: gcc/dwarf2out.c
===
--- gcc/dwarf2out.c (revision 190642)
+++ gcc/dwarf2out.c (working copy)
@@ -18138,6 +18138,9 @@ gen_producer_string (void)
/* Ignore these.  */
continue;
   default:
+if (cl_options[save_decoded_options[j].opt_index].flags
+   & CL_NO_DWARF_RECORD)
+ continue;
 gcc_checking_assert (save_decoded_options[j].canonical_option[0][0]
 == '-');
 switch (save_decoded_options[j].canonical_option[0][1])
Index: gcc/opts.h
===
--- gcc/opts.h  (revision 190642)
+++ gcc/opts.h  (working copy)
@@ -145,6 +145,7 @@ extern const unsigned int cl_lang_count;
 #define CL_JOINED  (1U << 22) /* If takes joined argument.  */
 #define CL_SEPARATE(1U << 23) /* If takes a separate argument.  */
 #define CL_UNDOCUMENTED(1U << 24) /* Do not output with 
--help.  */
+#define CL_NO_DWARF_RECORD (1U << 25) /* Do not add to producer string.  */

 /* Flags for an enumerated option argument.  */
 #define CL_ENUM_CANONICAL  (1 << 0) /* Canonical for this value.  */
Index: gcc/fortran/lang.opt
===
--- gcc/fortran/lang.opt(revision 190642)
+++ gcc/fortran/lang.opt(working copy)
@@ -295,7 +295,7 @@ Fortran Negative(nocpp)
 Enable preprocessing

 cpp=
-Fortran Joined Negative(nocpp) Undocumented
+Fortran Joined Negative(nocpp) Undocumented NoDWARFRecord
 ; Internal option generated by specs from -cpp.

 nocpp
Index: gcc/opt-functions.awk
===
--- gcc/opt-functions.awk   (revision 190642)
+++ gcc/opt-functions.awk   (working copy)
@@ -103,6 +103,7 @@ function switch_flags (flags)
  test_flag("JoinedOrMissing", flags, " | CL_JOINED") \

[google/integration] Add a configure option to disable system header canonicalizations (issue6489063)

2012-08-31 Thread Simon Baldwin
Add a configure option to disable system header canonicalizations.

Libcpp may canonicalize system header paths with lrealpath() for diagnostics,
dependency output, and similar.  If gcc is held in a symlink farm the
canonicalized paths may be meaningless to users, and will also conflict with
build frameworks that (for example) disallow absolute paths to header files.

Tested with bootstrap builds of C and C++, both with and without configure
--disable-canonical-system-headers.  Okay for google/integration?

libcpp/ChangeLog.google-integration
2012-08-31  Simon Baldwin  

* files.c (maybe_shorter_path): Suppress function definition if
ENABLE_CANONICAL_SYSTEM_HEADERS is not defined.
* (find_file_in_dir): Call maybe_shorter_path() only if
ENABLE_CANONICAL_SYSTEM_HEADERS is defined.
* configure.ac: Add new --enable-canonical-system-headers.
* configure: Regenerate.
* config.in: Regenerate.

gcc/ChangeLog.google-integration
2012-08-31  Simon Baldwin  

* doc/install.texi: Document --enable-canonical-system-headers.


Index: gcc/doc/install.texi
===
--- gcc/doc/install.texi(revision 190830)
+++ gcc/doc/install.texi(working copy)
@@ -1747,6 +1747,14 @@ and may be disabled using @option{--disa
 See @option{-canonical-prefixes} or @option{-no-canonical-prefixes} for
 more details, including how to override this configuration option when
 compiling.
+
+@item --enable-canonical-system-headers
+@itemx --disable-canonical-system-headers
+Enable system header path canonicalization for @file{libcpp}.  This can
+produce shorter header file paths in diagnostics and dependency output
+files, but these changed header paths may conflict with some compilation
+environments.  Enabled by default, and may be disabled using
+@option{--disable-canonical-system-headers}.
 @end table
 
 @subheading Cross-Compiler-Specific Options
Index: libcpp/configure
===
--- libcpp/configure(revision 190830)
+++ libcpp/configure(working copy)
@@ -703,6 +703,7 @@ enable_rpath
 with_libiconv_prefix
 enable_maintainer_mode
 enable_checking
+enable_canonical_system_headers
 '
   ac_precious_vars='build_alias
 host_alias
@@ -1337,6 +1338,8 @@ Optional Features:
   --disable-rpath do not hardcode runtime library paths
   --enable-maintainer-mode enable rules only needed by maintainers
   --enable-checking  enable expensive run-time checks
+  --enable-canonical-system-headers
+  enable or disable system headers canonicalization
 
 Optional Packages:
   --with-PACKAGE[=ARG]use PACKAGE [ARG=yes]
@@ -7366,6 +7369,19 @@ $as_echo "#define ENABLE_CHECKING 1" >>c
 
 fi
 
+# Check whether --enable-canonical-system-headers was given.
+if test "${enable_canonical_system_headers+set}" = set; then :
+  enableval=$enable_canonical_system_headers;
+else
+  enable_canonical_system_headers=yes
+fi
+
+if test $enable_canonical_system_headers != no; then
+
+$as_echo "#define ENABLE_CANONICAL_SYSTEM_HEADERS 1" >>confdefs.h
+
+fi
+
 
 case $target in
alpha*-*-* | \
Index: libcpp/files.c
===
--- libcpp/files.c  (revision 190830)
+++ libcpp/files.c  (working copy)
@@ -345,6 +345,7 @@ pch_open_file (cpp_reader *pfile, _cpp_f
shorter, otherwise return NULL.  This function does NOT free the
memory pointed by FILE.  */
 
+#ifdef ENABLE_CANONICAL_SYSTEM_HEADERS
 static char *
 maybe_shorter_path (const char * file)
 {
@@ -359,6 +360,7 @@ maybe_shorter_path (const char * file)
   return NULL;
 }
 }
+#endif
 
 /* Try to open the path FILE->name appended to FILE->dir.  This is
where remap and PCH intercept the file lookup process.  Return true
@@ -384,6 +386,7 @@ find_file_in_dir (cpp_reader *pfile, _cp
   char *copy;
   void **pp;
 
+#ifdef ENABLE_CANONICAL_SYSTEM_HEADERS
   /* We try to canonicalize system headers.  */
   if (file->dir->sysp)
{
@@ -396,6 +399,7 @@ find_file_in_dir (cpp_reader *pfile, _cp
  path = canonical_path;
}
}
+#endif
 
   hv = htab_hash_string (path);
   if (htab_find_with_hash (pfile->nonexistent_file_hash, path, hv) != NULL)
Index: libcpp/configure.ac
===
--- libcpp/configure.ac (revision 190830)
+++ libcpp/configure.ac (working copy)
@@ -146,6 +146,16 @@ if test $enable_checking != no ; then
 [Define if you want more run-time sanity checks.])
 fi
 
+AC_ARG_ENABLE(canonical-system-headers,
+[  --enable-canonical-system-headers
+  enable or disable system headers canonicalization],
+[],
+enable_canonical_system_headers=yes)
+if test $enable_canonical_system_headers != no; then
+  AC

Re: [google/integration] Add a configure option to disable system header canonicalizations (issue6489063)

2012-08-31 Thread Simon Baldwin
On 31 August 2012 16:31, Ollie Wild  wrote:
>
> On Fri, Aug 31, 2012 at 7:20 AM, Simon Baldwin  wrote:
> > Add a configure option to disable system header canonicalizations.
> >
> > Libcpp may canonicalize system header paths with lrealpath() for
> > diagnostics,
> > dependency output, and similar.  If gcc is held in a symlink farm the
> > canonicalized paths may be meaningless to users, and will also conflict
> > with
> > build frameworks that (for example) disallow absolute paths to header
> > files.
> >
> > Tested with bootstrap builds of C and C++, both with and without
> > configure
> > --disable-canonical-system-headers.  Okay for google/integration?
>
> Seems like a reasonable candidate for trunk, and I'd rather have fewer
> patches in google/integration than more.  Can you send a copy of this
> patch for inclusion there?  Let's at least see what people say.

The patch exactly meets the definition of google/integration only,
which is that it fixes up something that affects only Google's use of
gcc.  --no-canonical-prefixes is similar.  That too is only in our
branches and not in trunk, for the same reason.

I'd rather keep this out of trunk unless there are known external use
cases where it's beneficial.  That keeps both the review and the
testing load to acceptable -- though still extremely high -- levels.

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


Re: [google/integration] Add a configure option to disable system header canonicalizations (issue6489063)

2012-08-31 Thread Simon Baldwin
On 31 August 2012 17:25, Ollie Wild  wrote:
>
> On Fri, Aug 31, 2012 at 10:01 AM, Simon Baldwin  wrote:
> > On 31 August 2012 16:31, Ollie Wild  wrote:
> >>
> >
> > The patch exactly meets the definition of google/integration only,
> > which is that it fixes up something that affects only Google's use of
> > gcc.
>
> The criterion is more subtle than that.  The google/integration branch
> is for things which: (a) cannot be submitted to trunk, and (b) are
> required for inter-operability with our build/test systems.  The goal
> is to keep any changes relative to trunk as minimal as possible, and
> frankly, much of the stuff that's there now should be cleaned up and
> submitted upstream.
>
> >  --no-canonical-prefixes is similar.  That too is only in our
> > branches and not in trunk, for the same reason.
>
> But -no-canonical-prefixes *is* in trunk.  Presumably the same people
> who benefit from that will also benefit from this.  In fact, I think a
> reasonable case could be made that header canonicalization should be
> gated on the same flag.

Yes.  I meant --disable-canonical-prefixes.  That is a gcc configure
flag that we use to control the default setting for
-[no-]canonical-prefixes where neither flag is supplied on the gcc
command line.  --disable/enable-canonical-prefixes is only in google
branches.


>
> >
> > I'd rather keep this out of trunk unless there are known external use
> > cases where it's beneficial.  That keeps both the review and the
> > testing load to acceptable -- though still extremely high -- levels.
>
> The same argument could be made about *any* patch we submit.  Pushing
> upstream is always more work, but if we don't do it, we end up paying
> for it later.

Not at all.  An ICE that only occurred with Google code as gcc input
is a perfect counterexample.

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


Add a configure option to disable system header canonicalizations (issue6495088)

2012-09-05 Thread Simon Baldwin
Add a configure option to disable system header canonicalizations.

Libcpp may canonicalize system header paths with lrealpath() for diagnostics,
dependency output, and similar.  If gcc is held in a symlink farm the
canonicalized paths may be meaningless to users, and will also conflict with
build frameworks that (for example) disallow absolute paths to header files.

This change adds --[en/dis]able-canonical-system-headers, allowing configure
to select whether or not to implement r186991.  See also PR c++/52974.

Tested for regressions with bootstrap builds of C and C++, both with and
without configure --disable-canonical-system-headers.

Okay for trunk?

libcpp/ChangeLog.google-integration
2012-09-05  Simon Baldwin  

* files.c (maybe_shorter_path): Suppress function definition if
ENABLE_CANONICAL_SYSTEM_HEADERS is not defined.
* (find_file_in_dir): Call maybe_shorter_path() only if
ENABLE_CANONICAL_SYSTEM_HEADERS is defined.
* configure.ac: Add new --enable-canonical-system-headers.
* configure: Regenerate.
* config.in: Regenerate.

gcc/ChangeLog.google-integration
2012-09-05  Simon Baldwin  

* doc/install.texi: Document --enable-canonical-system-headers.


Index: gcc/doc/install.texi
===
--- gcc/doc/install.texi(revision 190968)
+++ gcc/doc/install.texi(working copy)
@@ -1710,6 +1710,14 @@ link time when @option{-fuse-linker-plug
 This linker should have plugin support such as gold starting with
 version 2.20 or GNU ld starting with version 2.21.
 See @option{-fuse-linker-plugin} for details.
+
+@item --enable-canonical-system-headers
+@itemx --disable-canonical-system-headers
+Enable system header path canonicalization for @file{libcpp}.  This can
+produce shorter header file paths in diagnostics and dependency output
+files, but these changed header paths may conflict with some compilation
+environments.  Enabled by default, and may be disabled using
+@option{--disable-canonical-system-headers}.
 @end table
 
 @subheading Cross-Compiler-Specific Options
Index: libcpp/configure
===
--- libcpp/configure(revision 190968)
+++ libcpp/configure(working copy)
@@ -700,6 +700,7 @@ enable_rpath
 with_libiconv_prefix
 enable_maintainer_mode
 enable_checking
+enable_canonical_system_headers
 '
   ac_precious_vars='build_alias
 host_alias
@@ -1333,6 +1334,8 @@ Optional Features:
   --disable-rpath do not hardcode runtime library paths
   --enable-maintainer-mode enable rules only needed by maintainers
   --enable-checking  enable expensive run-time checks
+  --enable-canonical-system-headers
+  enable or disable system headers canonicalization
 
 Optional Packages:
   --with-PACKAGE[=ARG]use PACKAGE [ARG=yes]
@@ -7094,6 +7097,19 @@ $as_echo "#define ENABLE_CHECKING 1" >>c
 
 fi
 
+# Check whether --enable-canonical-system-headers was given.
+if test "${enable_canonical_system_headers+set}" = set; then :
+  enableval=$enable_canonical_system_headers;
+else
+  enable_canonical_system_headers=yes
+fi
+
+if test $enable_canonical_system_headers != no; then
+
+$as_echo "#define ENABLE_CANONICAL_SYSTEM_HEADERS 1" >>confdefs.h
+
+fi
+
 
 case $target in
alpha*-*-* | \
Index: libcpp/files.c
===
--- libcpp/files.c  (revision 190968)
+++ libcpp/files.c  (working copy)
@@ -345,6 +345,7 @@ pch_open_file (cpp_reader *pfile, _cpp_f
shorter, otherwise return NULL.  This function does NOT free the
memory pointed by FILE.  */
 
+#ifdef ENABLE_CANONICAL_SYSTEM_HEADERS
 static char *
 maybe_shorter_path (const char * file)
 {
@@ -359,6 +360,7 @@ maybe_shorter_path (const char * file)
   return NULL;
 }
 }
+#endif
 
 /* Try to open the path FILE->name appended to FILE->dir.  This is
where remap and PCH intercept the file lookup process.  Return true
@@ -384,6 +386,7 @@ find_file_in_dir (cpp_reader *pfile, _cp
   char *copy;
   void **pp;
 
+#ifdef ENABLE_CANONICAL_SYSTEM_HEADERS
   /* We try to canonicalize system headers.  */
   if (file->dir->sysp)
{
@@ -396,6 +399,7 @@ find_file_in_dir (cpp_reader *pfile, _cp
  path = canonical_path;
}
}
+#endif
 
   hv = htab_hash_string (path);
   if (htab_find_with_hash (pfile->nonexistent_file_hash, path, hv) != NULL)
Index: libcpp/configure.ac
===
--- libcpp/configure.ac (revision 190968)
+++ libcpp/configure.ac (working copy)
@@ -132,6 +132,16 @@ if test $enable_checking != no ; then
 [Define if you want more run-time sanity checks.])
 fi
 
+AC_ARG_ENABLE(canonical-system-headers,
+[  --enable-canonical-system-headers
+

Re: Add a configure option to disable system header canonicalizations (issue6495088)

2012-09-05 Thread Simon Baldwin
On 5 September 2012 16:03, Ian Lance Taylor  wrote:
> On Wed, Sep 5, 2012 at 6:56 AM, Simon Baldwin  wrote:
>> Add a configure option to disable system header canonicalizations.
>
> Why should this be a configure option rather than a command-line option?

The underlying problem is a niche one, likely to affect a
(vanishingly?) small number of users.  It is hard in widely
distributed build systems that combine make and non-make schemes to
ensure that a given flag is passed to every compiler invocation every
time.  A configure option is a relatively non-invasive libcpp change.
Gcc already has too many command line flags.

Do you have a strong reason for why this should be a command line
option and not a configure flag?


>
>
>
>> Libcpp may canonicalize system header paths with lrealpath() for diagnostics,
>> dependency output, and similar.  If gcc is held in a symlink farm the
>> canonicalized paths may be meaningless to users, and will also conflict with
>> build frameworks that (for example) disallow absolute paths to header files.
>>
>> This change adds --[en/dis]able-canonical-system-headers, allowing configure
>> to select whether or not to implement r186991.  See also PR c++/52974.
>>
>> Tested for regressions with bootstrap builds of C and C++, both with and
>> without configure --disable-canonical-system-headers.
>>
>> Okay for trunk?
>>
>> libcpp/ChangeLog.google-integration
>> 2012-09-05  Simon Baldwin  
>>
>> * files.c (maybe_shorter_path): Suppress function definition if
>> ENABLE_CANONICAL_SYSTEM_HEADERS is not defined.
>> * (find_file_in_dir): Call maybe_shorter_path() only if
>> ENABLE_CANONICAL_SYSTEM_HEADERS is defined.
>> * configure.ac: Add new --enable-canonical-system-headers.
>> * configure: Regenerate.
>> * config.in: Regenerate.
>>
>> gcc/ChangeLog.google-integration
>> 2012-09-05  Simon Baldwin  
>>
>> * doc/install.texi: Document --enable-canonical-system-headers.
>>
>>
>> Index: gcc/doc/install.texi
>> ===
>> --- gcc/doc/install.texi(revision 190968)
>> +++ gcc/doc/install.texi(working copy)
>> @@ -1710,6 +1710,14 @@ link time when @option{-fuse-linker-plug
>>  This linker should have plugin support such as gold starting with
>>  version 2.20 or GNU ld starting with version 2.21.
>>  See @option{-fuse-linker-plugin} for details.
>> +
>> +@item --enable-canonical-system-headers
>> +@itemx --disable-canonical-system-headers
>> +Enable system header path canonicalization for @file{libcpp}.  This can
>> +produce shorter header file paths in diagnostics and dependency output
>> +files, but these changed header paths may conflict with some compilation
>> +environments.  Enabled by default, and may be disabled using
>> +@option{--disable-canonical-system-headers}.
>>  @end table
>>
>>  @subheading Cross-Compiler-Specific Options
>> Index: libcpp/configure
>> ===
>> --- libcpp/configure(revision 190968)
>> +++ libcpp/configure(working copy)
>> @@ -700,6 +700,7 @@ enable_rpath
>>  with_libiconv_prefix
>>  enable_maintainer_mode
>>  enable_checking
>> +enable_canonical_system_headers
>>  '
>>ac_precious_vars='build_alias
>>  host_alias
>> @@ -1333,6 +1334,8 @@ Optional Features:
>>--disable-rpath do not hardcode runtime library paths
>>--enable-maintainer-mode enable rules only needed by maintainers
>>--enable-checking  enable expensive run-time checks
>> +  --enable-canonical-system-headers
>> +  enable or disable system headers canonicalization
>>
>>  Optional Packages:
>>--with-PACKAGE[=ARG]use PACKAGE [ARG=yes]
>> @@ -7094,6 +7097,19 @@ $as_echo "#define ENABLE_CHECKING 1" >>c
>>
>>  fi
>>
>> +# Check whether --enable-canonical-system-headers was given.
>> +if test "${enable_canonical_system_headers+set}" = set; then :
>> +  enableval=$enable_canonical_system_headers;
>> +else
>> +  enable_canonical_system_headers=yes
>> +fi
>> +
>> +if test $enable_canonical_system_headers != no; then
>> +
>> +$as_echo "#define ENABLE_CANONICAL_SYSTEM_HEADERS 1" >>confdefs.h
>> +
>> +fi
>> +
>>
>>  case $target in
>> alpha*-*-* | \
>> Index: libcpp/files.c
>> ==

Re: Add a configure option to disable system header canonicalizations (issue6495088)

2012-09-07 Thread Simon Baldwin
On 5 September 2012 16:01, Ian Lance Taylor  wrote:
>...
>
> I don't know if it's a strong reason, but the problem seems to be one
> that is characteristic of a specific invocation of a compiler, rather
> than characteristic of the compiler in general.  The same compiler may
> be invoked in multiple ways.  In only some of those ways is it
> appropriate to avoid canonicalizing paths.

Revised version below.  Adds new gcc command line flags to override
any default set by configure.  Please take another look when ready.

--

Add flags to disable system header canonicalizations.

Libcpp may canonicalize system header paths with lrealpath() for diagnostics,
dependency output, and similar.  If gcc is held in a symlink farm the
canonicalized paths may be meaningless to users, and will also conflict with
build frameworks that (for example) disallow absolute paths to header files.

This change adds -f[no-]canonical-system-headers to the gcc command line, and
a configure option --[en/dis]able-canonical-system-headers to set default
behaviour, allowing the user to select whether or not to implement r186991.
Default is enabled.  See also PR c++/52974.

Tested for regressions with bootstrap builds of C and C++, both with and
without configure --disable-canonical-system-headers.

Okay for trunk?

libcpp/ChangeLog
2012-09-07  Simon Baldwin  

* include/cpplib.h (struct cpp_options): Add canonical_system_headers.
* files.c (find_file_in_dir): Call maybe_shorter_path() only if
canonical_system_headers is set.
* init.c (cpp_create_reader): Initialize canonical_system_headers.
* configure.ac: Add new --enable-canonical-system-headers.
* configure: Regenerate.
* config.in: Regenerate.

gcc/ChangeLog
2012-09-07  Simon Baldwin  

* doc/cppopts.texi: Document -f[no-]canonical-system-headers.
* doc/install.texi: Document --enable-canonical-system-headers.

gcc/c-family/ChangeLog
2012-09-07  Simon Baldwin  

* c.opt: Add f[no-]canonical-system-headers.
* c-opts.c (c_common_handle_option): Handle
OPT_fcanonical_system_headers.


Index: gcc/doc/cppopts.texi
===
--- gcc/doc/cppopts.texi(revision 191054)
+++ gcc/doc/cppopts.texi(working copy)
@@ -564,6 +564,10 @@ Accept universal character names in iden
 experimental; in a future version of GCC, it will be enabled by
 default for C99 and C++.

+@item -fno-canonical-system-headers
+@opindex fno-canonical-system-headers
+When preprocessing, do not shorten system header paths with canonicalization.
+
 @item -fpreprocessed
 @opindex fpreprocessed
 Indicate to the preprocessor that the input file has already been
Index: gcc/doc/install.texi
===
--- gcc/doc/install.texi(revision 191054)
+++ gcc/doc/install.texi(working copy)
@@ -1710,6 +1710,14 @@ link time when @option{-fuse-linker-plug
 This linker should have plugin support such as gold starting with
 version 2.20 or GNU ld starting with version 2.21.
 See @option{-fuse-linker-plugin} for details.
+
+@item --enable-canonical-system-headers
+@itemx --disable-canonical-system-headers
+Enable system header path canonicalization for @file{libcpp}.  This can
+produce shorter header file paths in diagnostics and dependency output
+files, but these changed header paths may conflict with some compilation
+environments.  Enabled by default, and may be disabled using
+@option{--disable-canonical-system-headers}.
 @end table

 @subheading Cross-Compiler-Specific Options
Index: gcc/c-family/c.opt
===
--- gcc/c-family/c.opt(revision 191054)
+++ gcc/c-family/c.opt(working copy)
@@ -755,6 +755,10 @@ Recognize built-in functions
 fbuiltin-
 C ObjC C++ ObjC++ Joined

+fcanonical-system-headers
+C ObjC C++ ObjC++
+Where shorter, use canonicalized paths to systems headers.
+
 fcheck-new
 C++ ObjC++ Var(flag_check_new)
 Check the return value of new
Index: gcc/c-family/c-opts.c
===
--- gcc/c-family/c-opts.c(revision 191054)
+++ gcc/c-family/c-opts.c(working copy)
@@ -552,6 +552,10 @@ c_common_handle_option (size_t scode, co
   handle_OPT_d (arg);
   break;

+case OPT_fcanonical_system_headers:
+  cpp_opts->canonical_system_headers = value;
+  break;
+
 case OPT_fcond_mismatch:
   if (!c_dialect_cxx ())
 {
Index: libcpp/configure
===
--- libcpp/configure(revision 191054)
+++ libcpp/configure(working copy)
@@ -700,6 +700,7 @@ enable_rpath
 with_libiconv_prefix
 enable_maintainer_mode
 enable_checking
+enable_canonical_system_headers
 '
   ac_precious_vars='build_alias
 host_alias
@@ -1333,6 +1334,8 @@ Optional Features:
   --disable-rpath do not hardcode runti

Ping: Re: Add a configure option to disable system header canonicalizations (issue6495088)

2012-09-21 Thread Simon Baldwin
Ping.

http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00459.html

Full text of previous message and context at URL above.  No comments
or code changes since.  Patch description left below for convenience.

>
> Add flags to disable system header canonicalizations.
>
> Libcpp may canonicalize system header paths with lrealpath() for diagnostics,
> dependency output, and similar.  If gcc is held in a symlink farm the
> canonicalized paths may be meaningless to users, and will also conflict with
> build frameworks that (for example) disallow absolute paths to header files.
>
> This change adds -f[no-]canonical-system-headers to the gcc command line, and
> a configure option --[en/dis]able-canonical-system-headers to set default
> behaviour, allowing the user to select whether or not to implement r186991.
> Default is enabled.  See also PR c++/52974.
>
> Tested for regressions with bootstrap builds of C and C++, both with and
> without configure --disable-canonical-system-headers.

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


[google/main] Add -fno-section-anchors for powerpc, workround for Google ref b/6663281 (issue6443071)

2012-08-01 Thread Simon Baldwin
Workround for Google ref b/6663281

Appends -fno-section-anchors to -fprofile-{generate,use} -fripa, for powerpc
targets only.  No-op for other targets.

For google/main.  Tested for bootstrap and regression.

2012-08-01  Simon Baldwin  

* gcc/testsuite/gcc.dg/tree-prof/lipo/lipo.exp: Append
-fno-section-anchors to profile_option and feedback_option for
powerpc targets.  Workround for Google ref b/6663281.
* gcc/testsuite/g++.dg/tree-prof/lipo/lipo.exp: Likewise


Index: gcc/testsuite/gcc.dg/tree-prof/lipo/lipo.exp
===
--- gcc/testsuite/gcc.dg/tree-prof/lipo/lipo.exp(revision 190013)
+++ gcc/testsuite/gcc.dg/tree-prof/lipo/lipo.exp(working copy)
@@ -45,6 +45,12 @@ load_lib profopt.exp
 set profile_option "-fprofile-generate -fripa -D_PROFILE_GENERATE"
 set feedback_option "-fprofile-use -fripa -D_PROFILE_USE"
 
+# Add -fno-section-anchors for powerpc.  Workround for Google ref b/6663281
+if {[istarget powerpc*-*-*]} {
+set profile_option "$profile_option -fno-section-anchors"
+set feedback_option "$feedback_option -fno-section-anchors"
+}
+
 foreach src [lsort [glob -nocomplain $srcdir/$subdir/*_0.c]] {
 # If we're only testing specific files and this isn't one of them, skip it.
 if ![runtest_file_p $runtests $src] then {
Index: gcc/testsuite/g++.dg/tree-prof/lipo/lipo.exp
===
--- gcc/testsuite/g++.dg/tree-prof/lipo/lipo.exp(revision 190013)
+++ gcc/testsuite/g++.dg/tree-prof/lipo/lipo.exp(working copy)
@@ -45,6 +45,12 @@ load_lib profopt.exp
 set profile_option "-fprofile-generate -fripa"
 set feedback_option "-fprofile-use -fripa"
 
+# Add -fno-section-anchors for powerpc.  Workround for Google ref b/6663281
+if {[istarget powerpc*-*-*]} {
+set profile_option "$profile_option -fno-section-anchors"
+set feedback_option "$feedback_option -fno-section-anchors"
+}
+
 foreach src [lsort [glob -nocomplain $srcdir/$subdir/*_0.C]] {
 # If we're only testing specific files and this isn't one of them, skip it.
 if ![runtest_file_p $runtests $src] then {

--
This patch is available for review at http://codereview.appspot.com/6443071


[google/main] Omit TARGET_LIB_PATH from RPATH_ENVVAR in HOST_EXPORTS on bootstrap builds (issue6441093)

2012-08-02 Thread Simon Baldwin
Omit TARGET_LIB_PATH from RPATH_ENVVAR in HOST_EXPORTS on bootstrap builds.

Discussion and rationale at: http://gcc.gnu.org/ml/gcc/2012-06/msg00314.html

For google/main.  Tested for bootstrap and regression.

2012-08-02  Simon Baldwin  

* Makefile.tpl: Omit TARGET_LIB_PATH from RPATH_ENVVAR set in
HOST_EXPORTS on bootstrap builds.
* Makefile.in: Regenerate.


Index: Makefile.in
===
--- Makefile.in (revision 190013)
+++ Makefile.in (working copy)
@@ -225,9 +225,6 @@ HOST_EXPORTS = \
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
LIBELFINC="$(HOST_LIBELFINC)" ; export LIBELFINC; \
-@if gcc-bootstrap
-   $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
-@endif gcc-bootstrap
$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
 
 POSTSTAGE1_CXX_EXPORT = \
Index: Makefile.tpl
===
--- Makefile.tpl(revision 190013)
+++ Makefile.tpl(working copy)
@@ -228,9 +228,6 @@ HOST_EXPORTS = \
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
LIBELFINC="$(HOST_LIBELFINC)" ; export LIBELFINC; \
-@if gcc-bootstrap
-   $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
-@endif gcc-bootstrap
$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
 
 POSTSTAGE1_CXX_EXPORT = \

--
This patch is available for review at http://codereview.appspot.com/6441093


[google/main] Add powerpc-grtev3-linux-gnu.xfail to contrib/testsuite-management (issue6447087)

2012-08-03 Thread Simon Baldwin
Add powerpc-grtev3-linux-gnu.xfail to contrib/testsuite-management.

Tested with build followed by validate_failures.py.

2012-08-03  Simon Baldwin  

* testsuite-management/powerpc-grtev3-linux-gnu.xfail: New.


Index: contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail
===
--- contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail (revision 0)
+++ contrib/testsuite-management/powerpc-grtev3-linux-gnu.xfail (revision 0)
@@ -0,0 +1,172 @@
+# Temporarily ignore gcc pr54127.
+expire=20121031 | FAIL: gcc.dg/torture/pr53589.c -O3 -g  (test for excess 
errors)
+expire=20121031 | FAIL: gcc.dg/torture/pr53589.c  -O3 -g  (internal compiler 
error)
+
+FAIL: gfortran.dg/bessel_6.f90  -O0  execution test
+FAIL: gfortran.dg/bessel_6.f90  -O1  execution test
+FAIL: gfortran.dg/bessel_6.f90  -O2  execution test
+FAIL: gfortran.dg/bessel_6.f90  -O3 -fomit-frame-pointer  execution test
+FAIL: gfortran.dg/bessel_6.f90  -O3 -fomit-frame-pointer -funroll-loops  
execution test
+FAIL: gfortran.dg/bessel_6.f90  -O3 -fomit-frame-pointer -funroll-all-loops 
-finline-functions  execution test
+FAIL: gfortran.dg/bessel_6.f90  -O3 -g  execution test
+FAIL: gfortran.dg/bessel_6.f90  -Os  execution test
+XPASS: gfortran.dg/nint_2.f90  -O0  execution test
+FAIL: gfortran.dg/unf_io_convert_3.f90  -O0  execution test
+FAIL: gfortran.dg/unf_io_convert_3.f90  -O1  execution test
+FAIL: gfortran.dg/unf_io_convert_3.f90  -O2  execution test
+FAIL: gfortran.dg/unf_io_convert_3.f90  -O3 -fomit-frame-pointer  execution 
test
+FAIL: gfortran.dg/unf_io_convert_3.f90  -O3 -fomit-frame-pointer 
-funroll-loops  execution test
+FAIL: gfortran.dg/unf_io_convert_3.f90  -O3 -fomit-frame-pointer 
-funroll-all-loops -finline-functions  execution test
+FAIL: gfortran.dg/unf_io_convert_3.f90  -O3 -g  execution test
+FAIL: gfortran.dg/unf_io_convert_3.f90  -Os  execution test
+FAIL: gfortran.dg/x_slash_2.f  -O0  execution test
+FAIL: g++.dg/abi/forced.C -std=gnu++98 execution test
+FAIL: g++.dg/abi/forced.C -std=gnu++11 execution test
+FAIL: g++.dg/ext/cleanup-10.C -std=gnu++98 execution test
+FAIL: g++.dg/ext/cleanup-10.C -std=gnu++11 execution test
+FAIL: g++.dg/ext/cleanup-11.C -std=gnu++98 execution test
+FAIL: g++.dg/ext/cleanup-11.C -std=gnu++11 execution test
+FAIL: g++.dg/ext/cleanup-8.C -std=gnu++98 execution test
+FAIL: g++.dg/ext/cleanup-8.C -std=gnu++11 execution test
+FAIL: g++.dg/ext/cleanup-9.C -std=gnu++98 execution test
+FAIL: g++.dg/ext/cleanup-9.C -std=gnu++11 execution test
+FAIL: g++.dg/warn/Wself-assign-2.C -std=gnu++11  (test for warnings, line 12)
+FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect 
call -> direct call" 2
+FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect 
call -> direct call" 2
+FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect 
call -> direct call" 2
+FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect 
call -> direct call" 2
+FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect 
call -> direct call" 2
+FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect 
call -> direct call" 2
+FAIL: g++.dg/tree-prof/lipo/vcall1_0.C scan-ipa-dump-times profile "Indirect 
call -> direct call" 2
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : 
main _Z3barv _Z3foov\n
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file 
.text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : 
main _Z3barv _Z3foov\n
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file 
.text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : 
main _Z3barv _Z3foov\n
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file 
.text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : 
main _Z3barv _Z3foov\n
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file 
.text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : 
main _Z3barv _Z3foov\n
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file 
.text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : 
main _Z3barv _Z3foov\n
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file 
.text.*.main\n.text.*._Z3barv\n.text.*._Z3foov\n.text.*._Z9notcalledv
+UNRESOLVED: g++.dg/tree-prof/callgraph-profiles.C scan-file Callgraph group : 
main _Z3barv _Z3foov\n
+UNRESOLVED: g++.dg/tree

[google] Hide all uses of __float128 from Clang (issue6195066)

2012-05-09 Thread Simon Baldwin
Hide all uses of __float128 from Clang.

Brackets _GLIBCXX_USE_FLOAT128 with #ifndef __clang__.  Clang does not
currently support the __float128 builtin, and so will fail to process
libstdc++ headers that use it.

Tested for full bootstrap and dejagnu testsuite.

Okay for google/integration and google/gcc-4_7-integration branches?

Thanks.


2012-05-09   Simon Baldwin  

* libstdc++-v3/acinclude.m4: Bracket _GLIBCXX_USE_FLOAT128
definition with ifndef __clang__.
* libstdc++-v3/config.h.in: Rebuild.

Index: libstdc++-v3/config.h.in
===
--- libstdc++-v3/config.h.in(revision 187148)
+++ libstdc++-v3/config.h.in(working copy)
@@ -799,8 +799,11 @@
this host. */
 #undef _GLIBCXX_USE_DECIMAL_FLOAT
 
-/* Define if __float128 is supported on this host. */
+/* Define if __float128 is supported on this host.
+   Hide all uses of __float128 from Clang.  Google ref b/6422845  */
+#ifndef __clang__
 #undef _GLIBCXX_USE_FLOAT128
+#endif
 
 /* Defined if gettimeofday is available. */
 #undef _GLIBCXX_USE_GETTIMEOFDAY
Index: libstdc++-v3/acinclude.m4
===
--- libstdc++-v3/acinclude.m4   (revision 187148)
+++ libstdc++-v3/acinclude.m4   (working copy)
@@ -2529,10 +2529,16 @@ int main()
 }
 EOF
 
+AH_VERBATIM([_GLIBCXX_USE_FLOAT128,],
+[/* Define if __float128 is supported on this host.
+   Hide all uses of __float128 from Clang.  Google ref b/6422845  */
+#ifndef __clang__
+#undef _GLIBCXX_USE_FLOAT128
+#endif])
+
 AC_MSG_CHECKING([for __float128])
 if AC_TRY_EVAL(ac_compile); then
-  AC_DEFINE(_GLIBCXX_USE_FLOAT128, 1,
-  [Define if __float128 is supported on this host.])
+  AC_DEFINE(_GLIBCXX_USE_FLOAT128, 1)
   enable_float128=yes
 else
   enable_float128=no

--
This patch is available for review at http://codereview.appspot.com/6195066


Port r184840 from gcc-4_6. (issue6259049)

2012-05-28 Thread Simon Baldwin
Port r184840 from gcc-4_6.

Forward-port r184840, contrib/testsuite-management/validate_failures.py fix
for cross-compilers, from gcc-4_6 to gcc-4_7.

Okay for google/integration and google/gcc-4_7-integration branches?


2012-05-28  Simon Baldwin  

Port r184840 from gcc-4_6.

2012-03-02   Doug Kwan  

Backport r184357 from trunk

2012-02-17   Doug Kwan  

* contrib/testsuite-management/validate_failures.py
(GetMakefileValue): Check for cross compilers.


Index: contrib/testsuite-management/validate_failures.py
===
--- contrib/testsuite-management/validate_failures.py   (revision 187932)
+++ contrib/testsuite-management/validate_failures.py   (working copy)
@@ -146,7 +146,8 @@ def GetMakefileValue(makefile_name, valu
 def ValidBuildDirectory(builddir, target):
   if (not os.path.exists(builddir) or
   not os.path.exists('%s/Makefile' % builddir) or
-  not os.path.exists('%s/build-%s' % (builddir, target))):
+  (not os.path.exists('%s/build-%s' % (builddir, target)) and
+   not os.path.exists('%s/%s' % (builddir, target:
 return False
   return True
 

--
This patch is available for review at http://codereview.appspot.com/6259049


Re: Port r184840 from gcc-4_6. (issue6259049)

2012-05-28 Thread Simon Baldwin
On 28 May 2012 18:40, Simon Baldwin  wrote:
>
> Port r184840 from gcc-4_6.
>
> Forward-port r184840, contrib/testsuite-management/validate_failures.py fix
> for cross-compilers, from gcc-4_6 to gcc-4_7.
>
> Okay for google/integration and google/gcc-4_7-integration branches?

That should have read "Okay for google/gcc-4_7?".  Turns out it's
already in the others.


>
>
> 2012-05-28  Simon Baldwin  
>
>        Port r184840 from gcc-4_6.
>
>        2012-03-02   Doug Kwan  
>
>        Backport r184357 from trunk
>
>                2012-02-17   Doug Kwan  
>
>                * contrib/testsuite-management/validate_failures.py
>                (GetMakefileValue): Check for cross compilers.
>
>
> Index: contrib/testsuite-management/validate_failures.py
> ===
> --- contrib/testsuite-management/validate_failures.py   (revision 187932)
> +++ contrib/testsuite-management/validate_failures.py   (working copy)
> @@ -146,7 +146,8 @@ def GetMakefileValue(makefile_name, valu
>  def ValidBuildDirectory(builddir, target):
>   if (not os.path.exists(builddir) or
>       not os.path.exists('%s/Makefile' % builddir) or
> -      not os.path.exists('%s/build-%s' % (builddir, target))):
> +      (not os.path.exists('%s/build-%s' % (builddir, target)) and
> +       not os.path.exists('%s/%s' % (builddir, target:
>     return False
>   return True
>
>
> --
> This patch is available for review at http://codereview.appspot.com/6259049




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


[google] Remove timestamped line from gengtype state file comment headers

2011-08-23 Thread Simon Baldwin
Remove the timestamped line from gengtype state file comment headers.

Gcc builds after r177358 include a file .../plugin/gtype.state as part of
their binary installation.  The file contains a comment line that includes
the current date and time.  Variations in the file contents due to only
changes in the timestamp can be an issue for build and packaging systems
that prefer or insist on binary compatibility.

This patch removes the comment line, to provide binary reproducibility for
any generated gtype.state files.

Tested for x86 and PowerPC, no bootstrap in both cases.

OK for google/integration?  Also, OK for trunk?

libstdc++-v3/ChangeLog:
2011-05-20  Simon Baldwin  

* scripts/extract_symvers.in: Handle processor/OS specific or
unknown symbol binding strings from readelf.


Index: gcc/gengtype-state.c
===
--- gcc/gengtype-state.c(revision 177984)
+++ gcc/gengtype-state.c(working copy)
@@ -1194,8 +1194,6 @@ write_state (const char *state_path)
   fprintf (state_file,
   " This file should be parsed by the same %s which wrote it.\n",
   progname);
-  fprintf (state_file, " file %s generated on %s\n", state_path,
-  ctime (&now));
   /* The first non-comment significant line gives the version string.  */
   write_state_version (version_string);
   write_state_srcdir ();


Re: [google] Remove timestamped line from gengtype state file comment headers

2011-08-23 Thread Simon Baldwin
On 23 August 2011 15:34, Michael Matz  wrote:
>
> Hi,
>
> On Tue, 23 Aug 2011, Richard Guenther wrote:
>
> > > This patch removes the comment line, to provide binary reproducibility for
> > > any generated gtype.state files.
> > >
> > > Tested for x86 and PowerPC, no bootstrap in both cases.
> > >
> > > OK for google/integration?  Also, OK for trunk?
> >
> > Ok for trunk.
>
> But perhaps with a different ChangeLog entry :)

Heh!  Thanks, yes.  Plainly I'm out of practice with gcc patches.
Corrected version below, for completeness.

--
Remove the timestamped line from gengtype state file comment headers.

Gcc builds after r177358 include a file .../plugin/gtype.state as part of
their binary installation.  The file contains a comment line that includes
the current date and time.  Variations in the file contents due to only
changes in the timestamp can be an issue for build and packaging systems
that prefer or insist on binary compatibility.

This patch removes the comment line, to provide binary reproducibility for
any generated gtype.state files.

Tested for x86 and PowerPC, no bootstrap in both cases.

OK for google/integration?  Also, OK for trunk?

gcc/ChangeLog:
2011-08-23  Simon Baldwin  

* gengtype-state.c (write_state): Remove timestamped header line.


Index: gcc/gengtype-state.c
===
--- gcc/gengtype-state.c(revision 177984)
+++ gcc/gengtype-state.c(working copy)
@@ -1194,8 +1194,6 @@ write_state (const char *state_path)
   fprintf (state_file,
   " This file should be parsed by the same %s which wrote it.\n",
   progname);
-  fprintf (state_file, " file %s generated on %s\n", state_path,
-  ctime (&now));
   /* The first non-comment significant line gives the version string.  */
   write_state_version (version_string);
   write_state_srcdir ();

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


[google/integration] Add placeholder -Wself-assign flag for compatibility with other branches

2011-05-24 Thread Simon Baldwin
Add placeholder -Wself-assign flag for compatibility with other branches.

Add -Wself-assign to common.opts so that invocations of gcc with the flag
do not cause compilation to fail.  The flag is silently ignored.

OK for google/integration?

gcc/ChangeLog.google-integration:
2011-05-24  Simon Baldwin  

* common.opt (-Wself-assign): New placeholder flag.


Index: gcc/common.opt
===
--- gcc/common.opt  (revision 174116)
+++ gcc/common.opt  (working copy)
@@ -561,6 +561,13 @@ Wpadded
 Common Var(warn_padded) Warning
 Warn when padding is required to align structure members
 
+; FIXME.  The following -Wself-assign flag is a placeholder to prevent
+; confusing the compiler when applications are built with these flags.
+; Actual support for this flag is found in the google/main branch.
+Wself-assign
+Common Var(warn_self_assign) Init(0) Warning
+Warn when a variable is assigned to itself
+
 Wshadow
 Common Var(warn_shadow) Warning
 Warn when one local variable shadows another


[google/integration] Fix testsuite error introduced in r174121

2011-05-27 Thread Simon Baldwin
Fix testsuite error introduced in r174121.

r174121 introduces a new warn_self_assign options variable that conflicts
with a static function in gcc/testsuite/g{cc,++}.dg/plugin/selfassign.c.
Import a small portion of r172992 to avoid the problem.

Okay for google/integration?

gcc/testsuite/ChangeLog.google-integration:
2011-05-27  Simon Baldwin  

* testsuite/gcc.dg/plugin/selfassign.c (check_self_assign): Renamed
from warn_self_assign.
(execute_warn_self_assign): Call a function by its new name.
* testsuite/g++.dg/plugin/selfassign.c (check_self_assign): Renamed
from warn_self_assign.
(execute_warn_self_assign): Call a function by its new name.


Index: gcc/testsuite/gcc.dg/plugin/selfassign.c
===
--- gcc/testsuite/gcc.dg/plugin/selfassign.c(revision 174121)
+++ gcc/testsuite/gcc.dg/plugin/selfassign.c(working copy)
@@ -194,7 +194,7 @@ compare_and_warn (gimple stmt, tree lhs,
 /* Check and warn if STMT is a self-assign statement.  */
 
 static void
-warn_self_assign (gimple stmt)
+check_self_assign (gimple stmt)
 {
   tree rhs, lhs;
 
@@ -247,7 +247,7 @@ execute_warn_self_assign (void)
   FOR_EACH_BB (bb)
 {
   for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
-warn_self_assign (gsi_stmt (gsi));
+check_self_assign (gsi_stmt (gsi));
 }
 
   return 0;
Index: gcc/testsuite/g++.dg/plugin/selfassign.c
===
--- gcc/testsuite/g++.dg/plugin/selfassign.c(revision 174121)
+++ gcc/testsuite/g++.dg/plugin/selfassign.c(working copy)
@@ -194,7 +194,7 @@ compare_and_warn (gimple stmt, tree lhs,
 /* Check and warn if STMT is a self-assign statement.  */
 
 static void
-warn_self_assign (gimple stmt)
+check_self_assign (gimple stmt)
 {
   tree rhs, lhs;
 
@@ -247,7 +247,7 @@ execute_warn_self_assign (void)
   FOR_EACH_BB (bb)
 {
   for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
-warn_self_assign (gsi_stmt (gsi));
+check_self_assign (gsi_stmt (gsi));
 }
 
   return 0;


Ping: [Patch] Make libstdc++'s abi_check more robust against readelf output format

2011-06-02 Thread Simon Baldwin
Ping.


On 20 May 2011 17:05, Simon Baldwin  wrote:
>
> Make libstdc++'s abi_check more robust against readelf output format.
>
> libstdc++-abi/abi_check in the libstdc++-v3 testsuite relies on a fixed
> number of space separated fields in readelf output.  However, the field
> count for readelf output can vary where the library contains OS or processor
> specific bindings, or other unknown bindings.
>
> This patch replaces the strings that readelf outputs for such bindings
> with alternative strings that use underscores in place of space.  It
> preserves the count of fields for such cases, and allows the awk statement
> that follows to find the desired field correctly with $n.
>
> OK for trunk?
>
> libstdc++-v3/ChangeLog:
> 2011-05-20  Simon Baldwin  
>
>        * scripts/extract_symvers.in: Handle processor/OS specific or
>        unknown symbol binding strings from readelf.
>
>
> Index: libstdc++-v3/scripts/extract_symvers.in
> ===
> --- libstdc++-v3/scripts/extract_symvers.in     (revision 173951)
> +++ libstdc++-v3/scripts/extract_symvers.in     (working copy)
> @@ -52,6 +52,9 @@ SunOS)
>   ${readelf} ${lib} |\
>   sed -e 's/ \[: [A-Fa-f0-9]*\] //' -e '/\.dynsym/,/^$/p;d' |\
>   egrep -v ' (LOCAL|UND) ' |\
> +  sed -e 's/ : / :_/g' |\
> +  sed -e 's/ : / :_/g' |\
> +  sed -e 's/ : / :_/g' |\
>   awk '{ if ($4 == "FUNC" || $4 == "NOTYPE")
>            printf "%s:%s\n", $4, $8;
>          else if ($4 == "OBJECT" || $4 == "TLS")



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


[Patch] Make libstdc++'s abi_check more robust against readelf output format

2011-05-20 Thread Simon Baldwin
Make libstdc++'s abi_check more robust against readelf output format.

libstdc++-abi/abi_check in the libstdc++-v3 testsuite relies on a fixed
number of space separated fields in readelf output.  However, the field
count for readelf output can vary where the library contains OS or processor
specific bindings, or other unknown bindings.

This patch replaces the strings that readelf outputs for such bindings
with alternative strings that use underscores in place of space.  It
preserves the count of fields for such cases, and allows the awk statement
that follows to find the desired field correctly with $n.

OK for trunk?

libstdc++-v3/ChangeLog:
2011-05-20  Simon Baldwin  

* scripts/extract_symvers.in: Handle processor/OS specific or
unknown symbol binding strings from readelf.


Index: libstdc++-v3/scripts/extract_symvers.in
===
--- libstdc++-v3/scripts/extract_symvers.in (revision 173951)
+++ libstdc++-v3/scripts/extract_symvers.in (working copy)
@@ -52,6 +52,9 @@ SunOS)
   ${readelf} ${lib} |\
   sed -e 's/ \[: [A-Fa-f0-9]*\] //' -e '/\.dynsym/,/^$/p;d' |\
   egrep -v ' (LOCAL|UND) ' |\
+  sed -e 's/ : / :_/g' |\
+  sed -e 's/ : / :_/g' |\
+  sed -e 's/ : / :_/g' |\
   awk '{ if ($4 == "FUNC" || $4 == "NOTYPE")
printf "%s:%s\n", $4, $8;
  else if ($4 == "OBJECT" || $4 == "TLS")


Re: [4.7][google] Use sysroot from --with-build-sysroot during 'make check' (issue4248059)

2011-03-07 Thread Simon Baldwin
On 4 March 2011 22:50, Diego Novillo  wrote:
> ...
> I forgot to add.  Simon, this still shows up some failures in
> google/integration, but these failures are the same we have in trunk.
>
> For our builds, we have been XFAILing these failures, right?  Do you
> want me to mark them XFAIL to avoid problems with the auto builds?


No, it's okay to leave them failing for now.  I'll go through and
address each individually once the overall framework is settled.

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