]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
authorJakub Jelinek <jakub@redhat.com>
Tue, 17 Jan 2017 09:38:48 +0000 (10:38 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 17 Jan 2017 09:38:48 +0000 (10:38 +0100)
PR other/79046
* configure: Regenerated.
config/
* acx.m4 (GCC_BASE_VER): New m4 function.
(ACX_TOOL_DIRS): Require GCC_BASE_VER, for
--with-gcc-major-version-only use just major number from BASE-VER.
gcc/
* configure.ac: Add GCC_BASE_VER.
* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
version from BASE-VER file.
(CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
(gcc.o): Depend on $(BASEVER).
* common.opt (dumpfullversion): New option.
* gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
* doc/invoke.texi: Document -dumpfullversion.
* doc/install.texi: Document --with-gcc-major-version-only.
* configure: Regenerated.
libatomic/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* testsuite/Makefile.in: Regenerated.
* configure: Regenerated.
* Makefile.in: Regenerated.
libgomp/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* testsuite/Makefile.in: Regenerated.
* configure: Regenerated.
* Makefile.in: Regenerated.
libgcc/
* configure.ac: Add GCC_BASE_VER.
* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
version from BASE-VER file.
* configure: Regenerated.
libssp/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* configure: Regenerated.
* Makefile.in: Regenerated.
liboffloadmic/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* aclocal.m4: Include ../config/acx.m4.
* configure: Regenerated.
* Makefile.in: Regenerated.
libquadmath/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* configure: Regenerated.
* Makefile.in: Regenerated.
libmpx/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* configure: Regenerated.
* Makefile.in: Regenerated.
libada/
* configure.ac: Add GCC_BASE_VER.
* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
version from BASE-VER file.
* configure: Regenerated.
lto-plugin/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* configure: Regenerated.
* Makefile.in: Regenerated.
libitm/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* testsuite/Makefile.in: Regenerated.
* configure: Regenerated.
* Makefile.in: Regenerated.
fixincludes/
* configure.ac: Add GCC_BASE_VER.
* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* configure: Regenerated.
libcilkrts/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* aclocal.m4: Include ../config/acx.m4.
* configure: Regenerated.
* Makefile.in: Regenerated.
libcc1/
* configure.ac: Add GCC_BASE_VER.  For --with-gcc-major-version-only
use just major number from BASE-VER.
* configure: Regenerated.
* Makefile.in: Regenerated.
libobjc/
* configure.ac: Add GCC_BASE_VER.
* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* configure: Regenerated.
libstdc++-v3/
* configure.ac: Add GCC_BASE_VER.
* fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* po/Makefile.in: Regenerated.
* libsupc++/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* src/Makefile.in: Regenerated.
* configure: Regenerated.
* Makefile.in: Regenerated.
* include/Makefile.in: Regenerated.
* doc/Makefile.in: Regenerated.
* python/Makefile.in: Regenerated.
* src/c++11/Makefile.in: Regenerated.
* src/c++98/Makefile.in: Regenerated.
* src/filesystem/Makefile.in: Regenerated.
libvtv/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* testsuite/Makefile.in: Regenerated.
* configure: Regenerated.
* Makefile.in: Regenerated.
libsanitizer/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* libbacktrace/Makefile.in: Regenerated.
* interception/Makefile.in: Regenerated.
* asan/Makefile.in: Regenerated.
* ubsan/Makefile.in: Regenerated.
* configure: Regenerated.
* sanitizer_common/Makefile.in: Regenerated.
* lsan/Makefile.in: Regenerated.
* Makefile.in: Regenerated.
* tsan/Makefile.in: Regenerated.
libgfortran/
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
* configure: Regenerated.
* Makefile.in: Regenerated.

From-SVN: r244521

120 files changed:
ChangeLog
config/ChangeLog
config/acx.m4
configure
fixincludes/ChangeLog
fixincludes/Makefile.in
fixincludes/configure
fixincludes/configure.ac
gcc/ChangeLog
gcc/Makefile.in
gcc/common.opt
gcc/configure
gcc/configure.ac
gcc/doc/install.texi
gcc/doc/invoke.texi
gcc/gcc.c
libada/ChangeLog
libada/Makefile.in
libada/configure
libada/configure.ac
libatomic/ChangeLog
libatomic/Makefile.am
libatomic/Makefile.in
libatomic/configure
libatomic/configure.ac
libatomic/testsuite/Makefile.in
libcc1/ChangeLog
libcc1/Makefile.in
libcc1/configure
libcc1/configure.ac
libcilkrts/ChangeLog
libcilkrts/Makefile.am
libcilkrts/Makefile.in
libcilkrts/aclocal.m4
libcilkrts/configure
libcilkrts/configure.ac
libgcc/ChangeLog
libgcc/Makefile.in
libgcc/configure
libgcc/configure.ac
libgfortran/ChangeLog
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/configure
libgfortran/configure.ac
libgomp/ChangeLog
libgomp/Makefile.am
libgomp/Makefile.in
libgomp/configure
libgomp/configure.ac
libgomp/testsuite/Makefile.in
libitm/ChangeLog
libitm/Makefile.am
libitm/Makefile.in
libitm/configure
libitm/configure.ac
libitm/testsuite/Makefile.in
libmpx/ChangeLog
libmpx/Makefile.am
libmpx/Makefile.in
libmpx/configure
libmpx/configure.ac
libobjc/ChangeLog
libobjc/Makefile.in
libobjc/configure
libobjc/configure.ac
liboffloadmic/ChangeLog
liboffloadmic/Makefile.am
liboffloadmic/Makefile.in
liboffloadmic/aclocal.m4
liboffloadmic/configure
liboffloadmic/configure.ac
libquadmath/ChangeLog
libquadmath/Makefile.am
libquadmath/Makefile.in
libquadmath/configure
libquadmath/configure.ac
libsanitizer/ChangeLog
libsanitizer/Makefile.am
libsanitizer/Makefile.in
libsanitizer/asan/Makefile.in
libsanitizer/configure
libsanitizer/configure.ac
libsanitizer/interception/Makefile.in
libsanitizer/libbacktrace/Makefile.in
libsanitizer/lsan/Makefile.in
libsanitizer/sanitizer_common/Makefile.in
libsanitizer/tsan/Makefile.in
libsanitizer/ubsan/Makefile.in
libssp/ChangeLog
libssp/Makefile.am
libssp/Makefile.in
libssp/configure
libssp/configure.ac
libstdc++-v3/ChangeLog
libstdc++-v3/Makefile.in
libstdc++-v3/configure
libstdc++-v3/configure.ac
libstdc++-v3/doc/Makefile.in
libstdc++-v3/fragment.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/libsupc++/Makefile.in
libstdc++-v3/po/Makefile.in
libstdc++-v3/python/Makefile.in
libstdc++-v3/src/Makefile.in
libstdc++-v3/src/c++11/Makefile.in
libstdc++-v3/src/c++98/Makefile.in
libstdc++-v3/src/filesystem/Makefile.in
libstdc++-v3/testsuite/Makefile.in
libvtv/ChangeLog
libvtv/Makefile.am
libvtv/Makefile.in
libvtv/configure
libvtv/configure.ac
libvtv/testsuite/Makefile.in
lto-plugin/ChangeLog
lto-plugin/Makefile.am
lto-plugin/Makefile.in
lto-plugin/configure
lto-plugin/configure.ac

index db4125af14aab4388c641a43989d646e630e8671..92919938217efebfd46f3e84c08f1106e942d5b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure: Regenerated.
+
 2017-01-04  Alan Modra  <amodra@gmail.com>
 
        * configure: Regenerate.
index 625319a3651bb15987d06e972f5e5aaf241d08fd..0ad1a300d48463c6f692c08f483ebc0ec2f5439f 100644 (file)
@@ -1,3 +1,10 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * acx.m4 (GCC_BASE_VER): New m4 function.
+       (ACX_TOOL_DIRS): Require GCC_BASE_VER, for
+       --with-gcc-major-version-only use just major number from BASE-VER.
+
 2017-01-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        PR go/78978
index ab42972f4a0ff09f0e8344e356f2e0bb43e7a4ac..aa1d34b2b4962abe22cddd6b65ff05446056986f 100644 (file)
@@ -235,8 +235,28 @@ fi
 ])
 
 
+dnl ####
+dnl # GCC_BASE_VER
+dnl # Determine GCC version number to use in compiler directories.
+
+AC_DEFUN([GCC_BASE_VER],
+[
+  get_gcc_base_ver="cat"
+  AC_ARG_WITH(gcc-major-version-only,
+  [AS_HELP_STRING([--with-gcc-major-version-only], [use only GCC major number in filesystem paths])],
+  [if test x$with_gcc_major_version_only = xyes ; then
+    changequote(,)dnl
+    get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+    changequote([,])dnl
+  fi
+  ])
+  AC_SUBST(get_gcc_base_ver)
+])
+
+
 AC_DEFUN([ACX_TOOL_DIRS], [
 AC_REQUIRE([ACX_PATH_SEP])
+AC_REQUIRE([GCC_BASE_VER])
 if test "x$exec_prefix" = xNONE; then
         if test "x$prefix" = xNONE; then
                 gcc_cv_tool_prefix=$ac_default_prefix
@@ -251,7 +271,13 @@ fi
 # case, if there is no compiler in the tree nobody should use
 # AS_FOR_TARGET and LD_FOR_TARGET.
 if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
-    gcc_version=`cat $srcdir/gcc/BASE-VER`
+    if test x$with_gcc_major_version_only = xyes ; then
+        changequote(,)dnl
+        gcc_version=`sed -e 's/^\([0-9]*\).*$/\1/' $srcdir/gcc/BASE-VER`
+        changequote([,])dnl
+    else
+        gcc_version=`cat $srcdir/gcc/BASE-VER`
+    fi
     gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
     gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
     gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
index ba5f8bf180fed44bdf8e136739632f0101b6638f..60532fe4c1bca97e6ce77c95678fa07fa8313b1b 100755 (executable)
--- a/configure
+++ b/configure
@@ -641,6 +641,7 @@ CXXFLAGS_FOR_TARGET
 CFLAGS_FOR_TARGET
 DEBUG_PREFIX_CFLAGS_FOR_TARGET
 SYSROOT_CFLAGS_FOR_TARGET
+get_gcc_base_ver
 extra_host_zlib_configure_flags
 extra_host_libiberty_configure_flags
 stage1_languages
@@ -786,6 +787,7 @@ enable_objc_gc
 with_target_bdw_gc
 with_target_bdw_gc_include
 with_target_bdw_gc_lib
+with_gcc_major_version_only
 with_build_sysroot
 with_debug_prefix_map
 with_build_config
@@ -1562,6 +1564,8 @@ Optional Packages:
                           files
   --with-target-bdw-gc-lib=PATHLIST
                           specify directories for installed bdw-gc library
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
   --with-build-sysroot=SYSROOT
                           use sysroot as the system root during the build
   --with-debug-prefix-map='A=B C=D ...'
@@ -6619,6 +6623,20 @@ if test "${PATH_SEPARATOR+set}" != set; then
 fi
 
 
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
+
 
 if test "x$exec_prefix" = xNONE; then
         if test "x$prefix" = xNONE; then
@@ -6634,7 +6652,11 @@ fi
 # case, if there is no compiler in the tree nobody should use
 # AS_FOR_TARGET and LD_FOR_TARGET.
 if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
-    gcc_version=`cat $srcdir/gcc/BASE-VER`
+    if test x$with_gcc_major_version_only = xyes ; then
+                gcc_version=`sed -e 's/^\([0-9]*\).*$/\1/' $srcdir/gcc/BASE-VER`
+            else
+        gcc_version=`cat $srcdir/gcc/BASE-VER`
+    fi
     gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
     gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
     gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
index 2e6dd11ba9b9c119a60aa6b909c733da1a68aabd..60ee208b4efc495bc517d786cd00e4679d86762f 100644 (file)
@@ -1,3 +1,11 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * configure: Regenerated.
+
 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        PR libstdc++/78979
index 5dc1b23bc868c9bc16f3b8d5b3764c166dd7a203..1937dcaa32d5f53b8f811d84f8836b7d5b2bce1c 100644 (file)
@@ -49,7 +49,7 @@ target = @target@
 target_noncanonical:=@target_noncanonical@
 
 # The version of GCC in this tree
-gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
 
 # Directory in which the compiler finds libraries etc.
 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
index 4836cd886537e9cdf73ef2bb064bfa581fc1068a..ab97983f327d487bb87e0e4130706dd54c4fc769 100755 (executable)
@@ -590,6 +590,7 @@ ac_includes_default="\
 
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 MAINT
 TARGET
 target_noncanonical
@@ -664,6 +665,7 @@ enable_werror_always
 with_local_prefix
 enable_twoprocess
 enable_maintainer_mode
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1298,6 +1300,8 @@ Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-local-prefix=DIR specifies directory to put local include
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -4561,6 +4565,12 @@ $as_echo "$ac_cv_path_SED" >&6; }
 # Figure out what compiler warnings we can enable.
 # See config/warnings.m4 for details.
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 WARN_CFLAGS=
 save_CFLAGS="$CFLAGS"
 for real_option in -W -Wall -Wwrite-strings -Wstrict-prototypes \
@@ -4607,6 +4617,18 @@ $as_echo "$ac_res" >&6; }
 fi
   done
 CFLAGS="$save_CFLAGS"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 WARN_PEDANTIC=
 # Do the check with the no- prefix removed from the warning options
@@ -4645,10 +4667,22 @@ if test $acx_cv_prog_cc_pedantic__Wlong_long = yes; then :
 fi
 
 fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 
 
 # Only enable with --enable-werror-always until existing warnings are
 # corrected.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 WERROR=
 # Check whether --enable-werror-always was given.
 if test "${enable_werror_always+set}" = set; then :
@@ -4661,6 +4695,12 @@ if test $enable_werror_always = yes; then :
   WERROR="$WERROR${WERROR:+ }-Werror"
 fi
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 
 
 # Determine the noncanonical target name, for directory use.
@@ -5354,6 +5394,21 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 ac_config_headers="$ac_config_headers config.h"
 
 ac_config_files="$ac_config_files Makefile mkheaders.almost:mkheaders.in"
index f8f352fb7153445782727eb3311d4305f33fa260..190f53828744dca8589636325ba6812d80032bea 100644 (file)
@@ -114,6 +114,9 @@ AC_SUBST(MAINT)
 AC_DEFINE_UNQUOTED([SED_PROGRAM], "${SED}",
    [Defined to the best working sed program on the host system])
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 AC_CONFIG_HEADERS(config.h, [echo timestamp > stamp-h])
 AC_CONFIG_FILES(Makefile mkheaders.almost:mkheaders.in)
 AC_OUTPUT
index 6d443fc29970ea889f0a627d846f00e335eca85b..bef211cbd3e80bdd26c2c790018ec51ae937943c 100644 (file)
@@ -1,3 +1,17 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
+       version from BASE-VER file.
+       (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
+       (gcc.o): Depend on $(BASEVER).
+       * common.opt (dumpfullversion): New option.
+       * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
+       * doc/invoke.texi: Document -dumpfullversion.
+       * doc/install.texi: Document --with-gcc-major-version-only.
+       * configure: Regenerated.
+
 2017-01-17  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/71433
index 59fe4aa28364981339373252c01f81e509175c9d..7a7e27ac2955c227dfc0914c959d06a2ebf7aef6 100644 (file)
@@ -856,7 +856,7 @@ else
 REVISION_c  := $(shell cat $(REVISION))
 endif
 
-version     := $(BASEVER_c)
+version     := $(shell @get_gcc_base_ver@ $(BASEVER))
 
 PATCHLEVEL_c := \
   $(shell echo $(BASEVER_c) | sed -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\)$$/\1/')
@@ -2124,7 +2124,8 @@ DRIVER_DEFINES = \
   $(if $(SHLIB),$(if $(filter yes,@enable_shared@),-DENABLE_SHARED_LIBGCC)) \
   -DCONFIGURE_SPECS="\"@CONFIGURE_SPECS@\""
 
-CFLAGS-gcc.o += $(DRIVER_DEFINES)
+CFLAGS-gcc.o += $(DRIVER_DEFINES) -DBASEVER=$(BASEVER_s)
+gcc.o: $(BASEVER)
 
 specs.h : s-specs ; @true
 s-specs : Makefile
index 693b743f5d54508338cfa417483108ca5263e718..ad6baa3db68202bbe7a1cdc3487bc930d592ea05 100644 (file)
@@ -849,6 +849,9 @@ Driver
 dumpversion
 Driver
 
+dumpfullversion
+Driver
+
 e
 Driver Joined Separate
 
index 60cb979b558431949a20fc83482b198a091c5efe..c9e43fb80e3ba32b9e1921498cc9f0e3cc8fb5dd 100755 (executable)
@@ -734,6 +734,7 @@ INCINTL
 LIBINTL_DEP
 LIBINTL
 USE_NLS
+get_gcc_base_ver
 extra_opt_files
 extra_modes_file
 NATIVE_SYSTEM_HEADER_DIR
@@ -918,6 +919,7 @@ with_multilib_list
 enable_rpath
 with_libiconv_prefix
 enable_sjlj_exceptions
+with_gcc_major_version_only
 enable_secureplt
 enable_leading_mingw64_underscores
 enable_cld
@@ -1721,6 +1723,8 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
@@ -11860,6 +11864,21 @@ static struct plugin_gcc_version gcc_version = {basever, datestamp,
                                                configuration_arguments};
 EOF
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 # Internationalization
 # If we haven't got the data from the intl directory,
 # assume NLS is disabled.
@@ -18414,7 +18433,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18417 "configure"
+#line 18436 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18520,7 +18539,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18523 "configure"
+#line 18542 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index b73a807ed14b5aafa51570a2449d9ac6e3c1f446..33f9a0ecdc677b92b0b2e059070742232c8314cc 100644 (file)
@@ -1794,6 +1794,9 @@ static struct plugin_gcc_version gcc_version = {basever, datestamp,
 EOF
 changequote([,])dnl
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 # Internationalization
 ZW_GNU_GETTEXT_SISTER_DIR
 
index 4958773818bba3318a20e555e9f00ea1c9b116fc..713d22536b54ced2924bb9e06eefb12edb9ee5b4 100644 (file)
@@ -894,6 +894,10 @@ ideas of what it is for.  People use it as if it specified where to
 install part of GCC@.  Perhaps they make this assumption because
 installing GCC creates the directory.
 
+@item --with-gcc-major-version-only
+Specifies that GCC should use only the major number rather than
+@var{major}.@var{minor}.@var{patchlevel} in filesystem paths.
+
 @item --with-native-system-header-dir=@var{dirname}
 Specifies that @var{dirname} is the directory that contains native system
 header files, rather than @file{/usr/include}.  This option is most useful
index 99f193e7b2dee17c53b0ae8c6009f975ccd5d20f..e0624dac0d77f0f10df1206717f16c710026b192 100644 (file)
@@ -529,7 +529,7 @@ Objective-C and Objective-C++ Dialects}.
 @item Developer Options
 @xref{Developer Options,,GCC Developer Options}.
 @gccoptlist{-d@var{letters}  -dumpspecs  -dumpmachine  -dumpversion @gol
--fchecking  -fchecking=@var{n}  -fdbg-cnt-list @gol
+-dumpfullversion  -fchecking  -fchecking=@var{n}  -fdbg-cnt-list @gol
 -fdbg-cnt=@var{counter-value-list} @gol
 -fdisable-ipa-@var{pass_name} @gol
 -fdisable-rtl-@var{pass_name} @gol
@@ -13772,8 +13772,17 @@ Print the compiler's target machine (for example,
 
 @item -dumpversion
 @opindex dumpversion
-Print the compiler version (for example, @code{3.0})---and don't do
-anything else.
+Print the compiler version (for example, @code{3.0}, @code{6.3.0} or @code{7})---and don't do
+anything else.  This is the compiler version used in filesystem paths,
+specs, can be depending on how the compiler has been configured just
+a single number (major version), two numbers separated by dot (major and
+minor version) or three numbers separated by dots (major, minor and patchlevel
+version).
+
+@item -dumpfullversion
+@opindex dumpfullversion
+Print the full compiler version, always 3 numbers separated by dots,
+major, minor and patchlevel version.
 
 @item -dumpspecs
 @opindex dumpspecs
index 0ed7da94f17aac8e31757f1a6c496580c32d61e8..826b012cd77384031e2cdef49fd314fe7879decd 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3778,6 +3778,10 @@ driver_handle_option (struct gcc_options *opts,
       printf ("%s\n", spec_machine);
       exit (0);
 
+    case OPT_dumpfullversion:
+      printf ("%s\n", BASEVER);
+      exit (0);
+
     case OPT__version:
       print_version = 1;
 
index 245c796f8668a6fd728ec07645cbd61256384521..de1dfa09fb09c93e5499defeac4882bf965b7c52 100644 (file)
@@ -1,3 +1,11 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
+       version from BASE-VER file.
+       * configure: Regenerated.
+
 2017-01-04  Alan Modra  <amodra@gmail.com>
 
        * Makefile.in (configure_deps): Update and order as per
index c61dfcf06a8bcd51fff6a866ffa7cb2eabca799d..328c067c4cda6ca19b9bdf6e340f466ad0adc1ce 100644 (file)
@@ -67,7 +67,7 @@ host_subdir = @host_subdir@
 GCC_DIR=$(MULTIBUILDTOP)../../$(host_subdir)/gcc
 
 target_noncanonical:=@target_noncanonical@
-version := $(shell cat $(srcdir)/../gcc/BASE-VER)
+version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
 libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
 ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
index 3b9f4ae3c5b8df61d611d466b154369d9032a9eb..5ab0e211aa0e515f16c88cba55a6dc84ae5a910f 100755 (executable)
@@ -553,6 +553,7 @@ PACKAGE_URL=
 ac_unique_file="Makefile.in"
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 have_getipinfo
 default_gnatlib_target
 LN_S
@@ -633,6 +634,7 @@ enable_maintainer_mode
 enable_multilib
 enable_shared
 with_system_libunwind
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1261,6 +1263,8 @@ Optional Packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-build-libsubdir=DIR  Directory where to find libraries for build system
   --with-system-libunwind use installed libunwind
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -3008,6 +3012,21 @@ if test x$have_unwind_getipinfo = xyes; then
 fi
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 # Output: create a Makefile.
 ac_config_files="$ac_config_files Makefile"
 
index 389e2bb6c6b4d3f7b78dcecb0c5dc58e49874446..3e0f0a35210440073e708bfc1eb906b6a40defcb 100644 (file)
@@ -144,6 +144,9 @@ if test x$have_unwind_getipinfo = xyes; then
 fi
 AC_SUBST(have_getipinfo)
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 # Output: create a Makefile.
 AC_CONFIG_FILES([Makefile])
 
index def6f3eab3ecd114e7a3c4d752c6a30ec73aa4ac..9e0c02f5c0e967b04425643468476d5c810c7909 100644 (file)
@@ -1,3 +1,13 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * testsuite/Makefile.in: Regenerated.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
 
        Update copyright years.
index 08699b9fb7e1d424f6ebae922314a8b4bba688ae..d731406fdbd4b87df7e7dbddd886b008c2b84cf3 100644 (file)
@@ -26,7 +26,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config
 SUBDIRS = testsuite
 
 ## May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 config_path= @config_path@
 search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) \
index a083d8702e44b3c3622db87828dac86cb622f5cf..f6eeab312ea2ada447e85c8f563f53f35dcbcc86 100644 (file)
@@ -259,6 +259,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -298,7 +299,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I .. -I ../config
 SUBDIRS = testsuite
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) \
        $(top_srcdir) $(top_builddir)
 
index 8f9a5f18c65a432f6356ef6ac94b7dffa8d17bf0..c05fc9d11418539ae7267541469ddb16c1097f0b 100755 (executable)
@@ -601,6 +601,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 ARCH_X86_64_FALSE
 ARCH_X86_64_TRUE
 ARCH_I386_FALSE
@@ -763,6 +764,7 @@ with_gnu_ld
 enable_libtool_lock
 enable_maintainer_mode
 enable_symvers
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1415,6 +1417,8 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -11111,7 +11115,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11114 "configure"
+#line 11118 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11217,7 +11221,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11220 "configure"
+#line 11224 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15256,6 +15260,21 @@ else
 fi
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 if test ${multilib} = yes; then
   multilib_arg="--enable-multilib"
 else
index 7d4e16d9229e748835138f83e8b4123e5e469575..023f1727b1e9b64f99a43a4ce83574974e43a3d1 100644 (file)
@@ -254,6 +254,9 @@ AM_CONDITIONAL(ARCH_I386,
 AM_CONDITIONAL(ARCH_X86_64,
               [test "$ARCH" = x86 && test x$libat_cv_wordsize = x8])
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 if test ${multilib} = yes; then
   multilib_arg="--enable-multilib"
 else
index 34f83e0c915c224725171c74e2ca20a0d21e3205..f0928b2f3dcc702e8569c03440d627032ce40f54 100644 (file)
@@ -174,6 +174,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index 32892dc954d30f4f01a3c0b3a6cac751c601dc9d..47cc2883f9a9503b0889bd4cf48ac812b2d0b7b0 100644 (file)
@@ -1,3 +1,11 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.  For --with-gcc-major-version-only
+       use just major number from BASE-VER.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
 
        Update copyright years.
index 79d39d3f46a2ea54f78138165bb0b9f88fc6b4cc..21fb1536d89b41baca7ce4b582eae9827febb600 100644 (file)
@@ -236,6 +236,7 @@ docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 gcc_version = @gcc_version@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index bf112bb4671ca9657c85e9ca8148747e16598c07..d6f480fe930d384bb3baa532930b840780d997c7 100755 (executable)
@@ -610,6 +610,7 @@ WERROR
 WARN_FLAGS
 CONFIG_STATUS_DEPENDENCIES
 gcc_version
+get_gcc_base_ver
 visibility
 CXXCPP
 am__fastdepCXX_FALSE
@@ -747,6 +748,7 @@ with_pic
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
+with_gcc_major_version_only
 enable_werror_always
 enable_plugin
 '
@@ -1403,6 +1405,8 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -10540,7 +10544,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10543 "configure"
+#line 10547 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10646,7 +10650,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10649 "configure"
+#line 10653 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14305,7 +14309,25 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-gcc_version=`cat $srcdir/../gcc/BASE-VER`
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
+if test x$with_gcc_major_version_only = xyes ; then
+    gcc_version=`sed -e 's/^\([0-9]*\).*$/\1/' $srcdir/../gcc/BASE-VER`
+  else
+  gcc_version=`cat $srcdir/../gcc/BASE-VER`
+fi
 
 CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/../gcc/BASE-VER'
 
index af4336bed671d585c42541baba6f208171d6a0a3..82bde4a0042cecbadb68af04bd379bcd760e2e02 100644 (file)
@@ -48,7 +48,15 @@ AC_SUBST(visibility)
 
 AC_CHECK_DECLS([basename])
 
-gcc_version=`cat $srcdir/../gcc/BASE-VER`
+GCC_BASE_VER
+
+if test x$with_gcc_major_version_only = xyes ; then
+  changequote(,)dnl
+  gcc_version=`sed -e 's/^\([0-9]*\).*$/\1/' $srcdir/../gcc/BASE-VER`
+  changequote([,])dnl
+else
+  gcc_version=`cat $srcdir/../gcc/BASE-VER`
+fi
 AC_SUBST(gcc_version)
 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/../gcc/BASE-VER'])
 
index 443f0a2e2a903afe45de577da292e329a88cc924..9dcff74830d170a99c1eecb4b9b0d14d195e7e7b 100644 (file)
@@ -1,3 +1,13 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * aclocal.m4: Include ../config/acx.m4.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2016-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        PR target/68945
index 1dec6aa25a16e0e9f8ea38c46a8ad18e95a12390..2a0fcad4c896c01568d6d50dffd06aaa3ca11fd6 100644 (file)
@@ -62,7 +62,7 @@ AM_CPPFLAGS = $(GENERAL_FLAGS)
 AM_LDFLAGS = $(XLDFLAGS)
 
 # May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 # Target list.
 nodist_toolexeclib_HEADERS = libcilkrts.spec
index 6520b16012c18b24166e1555cdf8d534617bba9a..551a360ea2fad2068bc637e20e1479afb5663eff 100644 (file)
@@ -165,9 +165,10 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/override.m4 \
-       $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../libtool.m4 \
+       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -349,6 +350,7 @@ datarootdir = @datarootdir@
 docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -406,7 +408,7 @@ AM_CPPFLAGS = $(GENERAL_FLAGS)
 AM_LDFLAGS = $(XLDFLAGS)
 
 # May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 # Target list.
 nodist_toolexeclib_HEADERS = libcilkrts.spec
index a46868106bae2af64dc07ec16b80096bd573041c..71023b2c723e076ec25f4bed307f10569ef6e3d2 100644 (file)
@@ -992,6 +992,7 @@ m4_include([../config/depstand.m4])
 m4_include([../config/lead-dot.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/override.m4])
+m4_include([../config/acx.m4])
 m4_include([../libtool.m4])
 m4_include([../ltoptions.m4])
 m4_include([../ltsugar.m4])
index ecf88eee2a9bec9ca3fe6dfe69d1e9c03f2d2edc..3cc8c999733c3df495a68c355539a8db60ec10e8 100644 (file)
@@ -604,6 +604,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 link_cilkrts
 XLDFLAGS
 XCFLAGS
@@ -749,6 +750,7 @@ with_pic
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1404,6 +1406,8 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -11937,7 +11941,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11940 "configure"
+#line 11944 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12043,7 +12047,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12046 "configure"
+#line 12050 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15402,6 +15406,20 @@ else
 fi
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
 
 # Must be last
 cat >confcache <<\_ACEOF
index 8270e0b8bd9d025c50e3fac2209ca4aa76da4614..9cf9052f340bf99af2680a33ac45ad3e304cc5b3 100644 (file)
@@ -253,6 +253,8 @@ else
 fi
 AC_SUBST(link_cilkrts)
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
 
 # Must be last
 AC_OUTPUT
index 4d29385f92ba65bc995e1c682affaacd75204cd4..256dc24a2510add0e6c014011cbe0483292ac39b 100644 (file)
@@ -1,3 +1,11 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
+       version from BASE-VER file.
+       * configure: Regenerated.
+
 2017-01-13  Joe Seymour  <joe.s@somniumtech.com>
 
        * config/msp430/t-msp430 (libmul_none.a, libmul_16.a, libmul_32.a,
index ff48b68497cd194e20df4a02d7e396d7d0cfb237..f71d3203f20c60c10b355d109f48cd5aace607ca 100644 (file)
@@ -224,7 +224,7 @@ export slibdir
 export toolexecdir
 export toolexeclibdir
 
-version := $(shell cat $(srcdir)/../gcc/BASE-VER)
+version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
 
 ifeq ($(decimal_float),yes)
 ifeq ($(enable_decimal_float),bid)
index 3c0af1c4907dfb9da52dfceb07d2be2e28d49438..5c900cc1325116337371aa71fdcdfb3485b94217 100644 (file)
@@ -561,6 +561,7 @@ enable_execute_stack
 asm_hidden_op
 extra_parts
 cpu_type
+get_gcc_base_ver
 thread_header
 tm_defines
 tm_file
@@ -676,6 +677,7 @@ with_system_libunwind
 enable_explicit_exception_frame_registration
 with_glibc_version
 enable_tls
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1330,6 +1332,8 @@ Optional Packages:
   --with-system-libunwind use installed libunwind
   --with-glibc-version=M.N
                           assume GCC used with glibc version M.N or later
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -5084,6 +5088,21 @@ esac
 
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 # Substitute configuration variables
 
 
index 927507e34371cfa804328d990b968443cafcbbc2..ea2030fa06d5ec562b4b2b8d57d71eb1474dea9c 100644 (file)
@@ -544,6 +544,9 @@ AC_SUBST(tm_defines)
 # Map from thread model to thread header.
 GCC_AC_THREAD_HEADER([$target_thread_file])
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 # Substitute configuration variables
 AC_SUBST(cpu_type)
 AC_SUBST(extra_parts)
index 1a687300a78faa70b0b828cc62bdc9168f67dc9a..3335177eebe66b454cf1e76bb4fa40eb253df589 100644 (file)
@@ -1,3 +1,12 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>
 
        PR fortran/70696
index fed875e1493e62afa5c48e44d6bb0f17c9e29b5d..2857af5943f980973b766f46b5c13787104a069e 100644 (file)
@@ -4,7 +4,7 @@
 ACLOCAL_AMFLAGS = -I .. -I ../config
 
 ## May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 ## Symbol versioning (copied from libssp).
 if LIBGFOR_USE_SYMVER
index b3b5611e25aea33ea20816d3b9cfcbcbc7040c55..05b183dcadb0763498bef04adb92c15b9c50ca07 100644 (file)
@@ -525,6 +525,7 @@ enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
 extra_ldflags_libgfortran = @extra_ldflags_libgfortran@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -566,7 +567,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I .. -I ../config
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 @LIBGFOR_USE_SYMVER_FALSE@version_arg = 
 @LIBGFOR_USE_SYMVER_GNU_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_arg = -Wl,--version-script=$(srcdir)/gfortran.map
 @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_arg = -Wl,-M,gfortran.map-sun
index 4cc247e55b43c09874aab26f0027b209ea33b46e..f975e2abc50fae692bdd32579defe0bea4a4eccf 100755 (executable)
@@ -605,6 +605,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 IEEE_FLAGS
 IEEE_SUPPORT
 IEEE_SUPPORT_FALSE
@@ -779,6 +780,7 @@ enable_fast_install
 enable_libtool_lock
 enable_largefile
 enable_libquadmath_support
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1437,6 +1439,8 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -12417,7 +12421,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12420 "configure"
+#line 12424 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12523,7 +12527,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12526 "configure"
+#line 12530 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -26315,6 +26319,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   CFLAGS="$ac_save_CFLAGS"
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 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
index 628f75d0367b9ee68ba57b7d05dbf25702721794..66a84625e525c8f388c70a02cd7ad37b14b66b72 100644 (file)
@@ -621,6 +621,9 @@ LIBGFOR_CHECK_AVX2
 # Check wether we support AVX512f extensions
 LIBGFOR_CHECK_AVX512F
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 AC_CACHE_SAVE
 
 if test ${multilib} = yes; then
index 94bcedf489460de948ca1ec9663f4ca044fb1fa6..7e40e2456484096eef23364951a6dc173027a782 100644 (file)
@@ -1,3 +1,13 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * testsuite/Makefile.in: Regenerated.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2017-01-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
        PR libgomp/60670
index 042ed6f890fb7847ce800f668f0c78a618964148..17af7d71d7de1a83331c7672bd7fa8a48e44a2bf 100644 (file)
@@ -4,7 +4,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config
 SUBDIRS = testsuite
 
 ## May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 config_path = @config_path@
 search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir) \
index 9fb2d007cb0156f2f35fb344bcabd0394f9edd08..920d29d1c4c088f6bd6768679635b3ba9c5ff704 100644 (file)
@@ -17,7 +17,7 @@
 
 # Plugins for offload execution, Makefile.am fragment.
 #
-# Copyright (C) 2014-2016 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # Contributed by Mentor Embedded.
 #
@@ -358,6 +358,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -401,7 +402,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I .. -I ../config
 SUBDIRS = testsuite
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir) \
              $(top_srcdir)/../include
 
index 6355ad90ba42e3eb4a607065a199a03b51087887..6a4b3b2a6e0649a097772746b5e07ef919e54795 100755 (executable)
@@ -603,6 +603,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 OMP_NEST_LOCK_25_KIND
 OMP_LOCK_25_KIND
 OMP_NEST_LOCK_25_ALIGN
@@ -798,6 +799,7 @@ with_hsa_runtime_lib
 enable_linux_futex
 enable_tls
 enable_symvers
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1476,6 +1478,8 @@ Optional Packages:
   --with-hsa-runtime-lib=PATH
                           specify directory for the installed HSA run-time
                           library
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -11151,7 +11155,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11154 "configure"
+#line 11158 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11257,7 +11261,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11260 "configure"
+#line 11264 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15135,7 +15139,7 @@ fi
 
 # Plugins for offload execution, configure.ac fragment.  -*- mode: autoconf -*-
 #
-# Copyright (C) 2014-2016 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 Free Software Foundation, Inc.
 #
 # Contributed by Mentor Embedded.
 #
 
 CFLAGS="$save_CFLAGS"
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 ac_config_files="$ac_config_files omp.h omp_lib.h omp_lib.f90 libgomp_f.h"
 
 ac_config_files="$ac_config_files Makefile testsuite/Makefile libgomp.spec"
index 4086d3f8263effde489e16e6a0fff3cc05102f1e..a42d4f08b4bcd877665253eb35b5e6330ace87e4 100644 (file)
@@ -379,6 +379,9 @@ AC_SUBST(OMP_LOCK_25_KIND)
 AC_SUBST(OMP_NEST_LOCK_25_KIND)
 CFLAGS="$save_CFLAGS"
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 AC_CONFIG_FILES(omp.h omp_lib.h omp_lib.f90 libgomp_f.h)
 AC_CONFIG_FILES(Makefile testsuite/Makefile libgomp.spec)
 AC_CONFIG_FILES([testsuite/libgomp-test-support.pt.exp:testsuite/libgomp-test-support.exp.in])
index 1fae9e8cdcbe3677ab2b0fcff4f915cd886a9591..9a1305016c9b5a09fb950cddba9a0b69d4e1c2b3 100644 (file)
@@ -201,6 +201,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index 0677c6dbd60c3c28defeef22e211ae9fd1651e1f..13e5e91a54eee90ce75bf2fc8c92ffa5bfe64117 100644 (file)
@@ -1,3 +1,13 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * testsuite/Makefile.in: Regenerated.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2017-01-04  Alan Modra  <amodra@gmail.com>
 
        * Makefile.in: Regenerate.
index 1dce82d62f13c4c4fe156cd32199d820ce7fa691..5b4aad8836b08793d9738a8665ba4c6920427532 100644 (file)
@@ -4,7 +4,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config
 SUBDIRS = testsuite
 
 ## May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 abi_version = -fabi-version=4
 
index e87499723aa24c8d806e9eaf4e6a5dddea9ba423..bd16ce0cfb816ba939d68cebe4dd849bf94e9bcc 100644 (file)
@@ -293,6 +293,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -332,7 +333,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I .. -I ../config
 SUBDIRS = testsuite
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 abi_version = -fabi-version=4
 search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir)
 fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude
index 019a72bec0e362829c416da523cb3f629a77d7dc..775f370fbb5dc75197d62bd395f92cbd67c92210 100644 (file)
@@ -601,6 +601,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 ARCH_FUTEX_FALSE
 ARCH_FUTEX_TRUE
 ARCH_X86_AVX_FALSE
@@ -776,6 +777,7 @@ enable_maintainer_mode
 enable_linux_futex
 enable_tls
 enable_symvers
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1431,6 +1433,8 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -11790,7 +11794,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11793 "configure"
+#line 11797 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11896,7 +11900,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11899 "configure"
+#line 11903 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17636,6 +17640,21 @@ else
 fi
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 ac_config_files="$ac_config_files Makefile testsuite/Makefile libitm.spec"
 
 cat >confcache <<\_ACEOF
index 215123421e7478aae5841ee360fee062aec11d34..c5ecd394a4305ec5350d7032eb792f162dca9ce5 100644 (file)
@@ -286,5 +286,8 @@ AM_CONDITIONAL([ARCH_X86], [test "$ARCH" = x86])
 AM_CONDITIONAL([ARCH_X86_AVX], [test "$libitm_cv_as_avx" = yes])
 AM_CONDITIONAL([ARCH_FUTEX], [test $enable_linux_futex = yes])
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 AC_CONFIG_FILES(Makefile testsuite/Makefile libitm.spec)
 AC_OUTPUT
index 1d6001f8b88c678358f5a56d84a22dc8d5f76abe..04c4d8abe103e0bcfe096c4acf8cc5f4a3746454 100644 (file)
@@ -185,6 +185,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index 67ae96a352e5e2adf6866a3c5863cc3807384541..3bf0376aea6960942a4df7d2cf7624a4dc3e4ea2 100644 (file)
@@ -1,3 +1,12 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2016-12-27  H.J. Lu  <hongjiu.lu@intel.com>
            Alexander Ivchenko  <alexander.ivchenko@intel.com>
 
index bd0a8b6f93ccddf627b863fe6107aae99b98ad8e..9ec6ec7db61c893b6bfcbe98d93aa10e7067a7a2 100644 (file)
@@ -9,7 +9,7 @@ nodist_toolexeclib_HEADERS = libmpx.spec
 endif
 
 ## May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 # Work around what appears to be a GNU make bug handling MAKEFLAGS
 # values defined in terms of make variables, as is the case for CC and
index d644af365269bccbaef24f05c6c74c736ad4458d..9b1d7a6c31f449b3e0099c6f3660a5e4faaa90f5 100644 (file)
@@ -255,7 +255,7 @@ top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I .. -I ../config
 @LIBMPX_SUPPORTED_TRUE@SUBDIRS = mpxrt $(am__append_1)
 @LIBMPX_SUPPORTED_TRUE@nodist_toolexeclib_HEADERS = libmpx.spec
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 # Work around what appears to be a GNU make bug handling MAKEFLAGS
 # values defined in terms of make variables, as is the case for CC and
index 56461fca23d52b23ea4d64c2e0a457d20c257115..115f53e475cbc1281d348e7a62cf66c5825f3df6 100644 (file)
@@ -11585,6 +11585,9 @@ else
   multilib_arg=
 fi
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 ac_config_files="$ac_config_files Makefile libmpx.spec"
 
 ac_config_headers="$ac_config_headers config.h"
index 18ba6872035b13786e67f0de2e625e2335d0efca..baa882b16b0484c03181de1c5c6126dea9dbe44b 100644 (file)
@@ -125,6 +125,9 @@ else
   multilib_arg=
 fi
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 AC_CONFIG_FILES([Makefile libmpx.spec])
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_FILES(AC_FOREACH([DIR], [mpxrt mpxwrap], [DIR/Makefile ]),
index 97b57379aa7920e82c972645284eb6dfa73776e3..c3d1ba259da24615088b30277372920eb3388e65 100644 (file)
@@ -1,3 +1,12 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure: Regenerated.
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * configure: Regenerated.
+
 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
 
        Update copyright years.
index 33cad1a6fc0752b516d8b83092cd058f1980d1eb..febc92d4b3cc449a71156af57ad1aa051f559d0c 100644 (file)
@@ -31,7 +31,7 @@ VPATH = @glibcpp_srcdir@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 target_noncanonical = @target_noncanonical@
-gcc_version := $(shell cat $(srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
 host_subdir = @host_subdir@
 top_srcdir = @top_srcdir@
 multi_basedir = @multi_basedir@
index 62bdc2b408f8bddba3e296c431b83ccecf3ff163..72645fddfb4a81d404b58090a70cfd6b75bff70f 100755 (executable)
@@ -600,6 +600,7 @@ ac_includes_default="\
 
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 OBJC_BOEHM_GC_LIBS
 OBJC_BOEHM_GC_INCLUDES
 OBJC_BOEHM_GC
@@ -725,6 +726,7 @@ enable_objc_gc
 with_target_bdw_gc
 with_target_bdw_gc_include
 with_target_bdw_gc_lib
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1379,6 +1381,8 @@ Optional Packages:
                           files
   --with-target-bdw-gc-lib=PATHLIST
                           specify directories for installed bdw-gc library
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -10590,7 +10594,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10593 "configure"
+#line 10597 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10696,7 +10700,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10699 "configure"
+#line 10703 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 # ------
 # Output
 # ------
index 5265d92d4343e5b52704efea7ae0d8de04ec933b..046e56894359a93a97633665ec9e2471195fe7b7 100644 (file)
@@ -347,6 +347,9 @@ AC_SUBST(OBJC_BOEHM_GC)
 AC_SUBST(OBJC_BOEHM_GC_INCLUDES)
 AC_SUBST(OBJC_BOEHM_GC_LIBS)
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 # ------
 # Output
 # ------
index 3323bd6535db100a0e617bf77431a68f3e333b66..4960f5637e84ef80e87a6fd89301b65bb6ebaa6d 100644 (file)
@@ -1,3 +1,13 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * aclocal.m4: Include ../config/acx.m4.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2016-11-15  Matthias Klose  <doko@ubuntu.com>
 
        * configure: Regenerate.
index c0cf645fdd7a65915b596e83e634d93435410e08..b9a0bdee37eeffc17814b5eadf3d13db4edf8e3d 100644 (file)
@@ -41,7 +41,7 @@ libgomp_dir = $(build_dir)/../libgomp
 source_dir = $(top_srcdir)/runtime
 
 # May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
 
 # Target list.
index 07727d27331e5877050cbf53e016942c8ed2dd46..591b3c90ebb3486e9b54302d1182a434e0cf8298 100644 (file)
@@ -93,9 +93,10 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/override.m4 \
-       $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../libtool.m4 \
+       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -336,6 +337,7 @@ datarootdir = @datarootdir@
 docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -388,7 +390,7 @@ libgomp_dir = $(build_dir)/../libgomp
 source_dir = $(top_srcdir)/runtime
 
 # May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
 @LIBOFFLOADMIC_HOST_FALSE@nodist_toolexeclib_HEADERS = liboffloadmic_target.spec
 
index a46868106bae2af64dc07ec16b80096bd573041c..71023b2c723e076ec25f4bed307f10569ef6e3d2 100644 (file)
@@ -992,6 +992,7 @@ m4_include([../config/depstand.m4])
 m4_include([../config/lead-dot.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/override.m4])
+m4_include([../config/acx.m4])
 m4_include([../libtool.m4])
 m4_include([../ltoptions.m4])
 m4_include([../ltsugar.m4])
index ebb60f6cffbc8460ec0ab0796b4bbcac512e5969..e22b214ddbce37ff6ed8c075c7367ea0af292c7e 100644 (file)
@@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 link_offloadmic_target
 link_offloadmic_host
 lt_cv_dlopen_libs
@@ -744,6 +745,7 @@ with_pic
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1398,6 +1400,8 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -11104,7 +11108,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11107 "configure"
+#line 11111 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11210,7 +11214,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11213 "configure"
+#line 11217 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 # Must be last
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -17075,7 +17094,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
       ac_sub_configure=$ac_srcdir/configure.gnu
     elif test -f "$ac_srcdir/configure"; then
       ac_sub_configure=$ac_srcdir/configure
-    elif test -f "$ac_srcdir/configure.ac"; then
+    elif test -f "$ac_srcdir/configure.in"; then
       # This should be Cygnus configure.
       ac_sub_configure=$ac_aux_dir/configure
     else
index 81fae8f9441c071b161015f126fd04a99de21b0f..64728f1a1a7fb7cc59a956005f56c3ab388d6105 100644 (file)
@@ -128,5 +128,8 @@ fi
 AC_SUBST(link_offloadmic_host)
 AC_SUBST(link_offloadmic_target)
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 # Must be last
 AC_OUTPUT
index 8c598eccf8f0cf6605afe9ad1fb18aa7710aa42c..e0cfc3aad9dd1fd4bc431a15c7ec75e590e274fb 100644 (file)
@@ -1,3 +1,12 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
 
        * libquadmath.texi: Bump @copying's copyright year.
index 5c4d3e2ece1e9825c82952c71b8d8e082dd05617..ec23c66f6b19ca4d4cc8a35a8e7488f945756ed4 100644 (file)
@@ -9,7 +9,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config
 AM_CPPFLAGS = -I $(top_srcdir)/../include
 
 ## May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 ## Symbol versioning (copied from libssp).
 if LIBQUAD_USE_SYMVER
index 94e8014d175a5d5801c83e33cc6f824b7f2c027d..428e0158aca306f773b5700429153b53b304a513 100644 (file)
@@ -300,6 +300,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -340,7 +341,7 @@ top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = 1.8 foreign
 @BUILD_LIBQUADMATH_TRUE@ACLOCAL_AMFLAGS = -I .. -I ../config
 @BUILD_LIBQUADMATH_TRUE@AM_CPPFLAGS = -I $(top_srcdir)/../include
-@BUILD_LIBQUADMATH_TRUE@gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+@BUILD_LIBQUADMATH_TRUE@gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_FALSE@version_arg = 
 @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_GNU_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_arg = -Wl,--version-script=$(srcdir)/quadmath.map
 @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_arg = -Wl,-M,quadmath.map-sun
index a67939bc822d6e9df4df780069f1eb225c1d2260..5091627a7c3a4c31b0c883c8b2931486df217793 100755 (executable)
@@ -601,6 +601,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 GENINSRC_FALSE
 GENINSRC_TRUE
 BUILD_LIBQUADMATH_FALSE
@@ -750,6 +751,7 @@ enable_libtool_lock
 enable_maintainer_mode
 enable_symvers
 enable_generated_files_in_srcdir
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1406,6 +1408,8 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -10568,7 +10572,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10571 "configure"
+#line 10575 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10674,7 +10678,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10677 "configure"
+#line 10681 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12918,6 +12922,20 @@ else
 fi
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
 
 ac_config_files="$ac_config_files Makefile"
 
index eb4fe8c8dfce174fb2f30c331abf5c98bca52509..6d03c78f7985c573ce9607a6b4cefd3bd9f0682d 100644 (file)
@@ -364,6 +364,8 @@ AS_HELP_STRING([--enable-generated-files-in-srcdir],
 AC_MSG_RESULT($enable_generated_files_in_srcdir)
 AM_CONDITIONAL(GENINSRC, test "$enable_generated_files_in_srcdir" = yes)
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
 
 AC_CONFIG_FILES(Makefile)
 AC_OUTPUT
index db9221c138470b408f6d0979ac46ae0c9678faef..1e0d0f09d310bbbaebe121f4d7937092a00b8389 100644 (file)
@@ -1,3 +1,19 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * libbacktrace/Makefile.in: Regenerated.
+       * interception/Makefile.in: Regenerated.
+       * asan/Makefile.in: Regenerated.
+       * ubsan/Makefile.in: Regenerated.
+       * configure: Regenerated.
+       * sanitizer_common/Makefile.in: Regenerated.
+       * lsan/Makefile.in: Regenerated.
+       * Makefile.in: Regenerated.
+       * tsan/Makefile.in: Regenerated.
+
 2017-01-10  James Clarke  <jrtc27@jrtc27.com>
 
        PR sanitizer/78992
index 6b0c571c46efabde39d74e2efc2ce978c8087a18..6afb2b0e048ebf90b05bb0d041549812df65dc59 100644 (file)
@@ -24,7 +24,7 @@ endif
 endif
 
 ## May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 # Work around what appears to be a GNU make bug handling MAKEFLAGS
 # values defined in terms of make variables, as is the case for CC and
index 28ba4b8e46a1d118e56dfdf3872e07e314197e50..1f4bb8cd6bb7c326f92361dc87a41c2241a509d8 100644 (file)
@@ -244,6 +244,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -290,7 +291,7 @@ nodist_saninclude_HEADERS = $(am__append_1)
 @SANITIZER_SUPPORTED_TRUE@SUBDIRS = sanitizer_common $(am__append_2) \
 @SANITIZER_SUPPORTED_TRUE@     $(am__append_3) lsan asan ubsan \
 @SANITIZER_SUPPORTED_TRUE@     $(am__append_4)
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 # Work around what appears to be a GNU make bug handling MAKEFLAGS
 # values defined in terms of make variables, as is the case for CC and
index 2d9f4a7b815e6a763cfce6edf419e1d81692ba7f..9fe24166dd3053f5311d54be12cf4a5acba1d8e3 100644 (file)
@@ -254,6 +254,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index e6153f1d7a901834b3f5478335d1508ab99046a5..8e0c47ea8384882b25fd664d41555a383d7fb3b8 100755 (executable)
@@ -604,6 +604,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS
 TSAN_TARGET_DEPENDENT_OBJECTS
 LIBBACKTRACE_SUPPORTED_FALSE
@@ -772,6 +773,7 @@ with_pic
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1426,6 +1428,8 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -12028,7 +12032,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12031 "configure"
+#line 12035 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12134,7 +12138,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12137 "configure"
+#line 12141 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 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
index e901849807435c0965a5676e0cbf825f579df83b..b0c485b0f7bcf98dcffa98a98ec5eeee884f3e26 100644 (file)
@@ -377,4 +377,7 @@ fi
 AC_SUBST([TSAN_TARGET_DEPENDENT_OBJECTS])
 AC_SUBST([SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS])
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 AC_OUTPUT
index 550c8f5c3f98bc34b820c4c7348a464e2fa141d7..cf06a831152dfc6dc5e0faa16b318f3df404735e 100644 (file)
@@ -203,6 +203,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index 3a618ecb838e5ab4d8a8a92e2f4526f7063ea369..dff04cfa3ea1caa3929136ff0ecd66681b077827 100644 (file)
@@ -245,6 +245,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index a0c8ae9b7c67e04389583f49b109c7e0a50cb679..fdc1a059fb367f3503c969376e6120bf7809729d 100644 (file)
@@ -244,6 +244,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index 052802e176a6845559cc72a1442f1d094854d8d2..b015a624237c751fd52a8b39ada05b618544f4d7 100644 (file)
@@ -247,6 +247,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index 4d4ec47becc28497c99cde24bf4730391abe2404..7a58323ff2f7ae1daeafe9d814a73192b86fe90b 100644 (file)
@@ -263,6 +263,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index a816d095f6a29aac804633592c8c61c43b37ea21..23939f0bf68c7dda120fdac287ccdc8ec1ef0014 100644 (file)
@@ -242,6 +242,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index 8246e984abbff25c271762f23ddd661407de3148..d851d4bf24d19977384dfb953998479abb967a2a 100644 (file)
@@ -1,3 +1,12 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
 
        Update copyright years.
index f8f3153e7f5ec90b0d3e070494e85fe6b9741df3..72df8e791297a48f3662b0674c28921cd3f3f5d7 100644 (file)
@@ -8,7 +8,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config
 MAINT_CHARSET = latin1
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 if LIBSSP_USE_SYMVER
 if LIBSSP_USE_SYMVER_GNU
index 4509e301ebee1b4c61d3fe4ec3da00b411fd6b7e..96b03ae124812d1b09e28b923cf9a9d171aab1ed 100644 (file)
@@ -235,6 +235,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -278,7 +279,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config
 MAINT_CHARSET = latin1
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 @LIBSSP_USE_SYMVER_FALSE@version_arg = 
 @LIBSSP_USE_SYMVER_GNU_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_arg = -Wl,--version-script=$(srcdir)/ssp.map
 @LIBSSP_USE_SYMVER_SUN_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_arg = -Wl,-M,ssp.map-sun
index a02eff4475104551e9c67243b5027528f9cafa96..b14e922e6f158a419b7dd7e8bef1fddbf063b6bb 100755 (executable)
@@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 toolexeclibdir
 toolexecdir
 enable_static
@@ -742,6 +743,7 @@ with_pic
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1387,6 +1389,8 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -10667,7 +10671,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10670 "configure"
+#line 10674 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10773,7 +10777,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10776 "configure"
+#line 10780 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11071,6 +11075,21 @@ else
   multilib_arg=
 fi
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 ac_config_files="$ac_config_files Makefile ssp/ssp.h"
 
 cat >confcache <<\_ACEOF
index 93dfa8da470423a939529d94151a3a8d10a022a7..9e4a22a24d47e9b8467ffa2dc45b445d5e636f45 100644 (file)
@@ -195,5 +195,8 @@ else
   multilib_arg=
 fi
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 AC_CONFIG_FILES([Makefile ssp/ssp.h])
 AC_OUTPUT
index 17c716a948ed683c60196498343a6c8a7cc2a41d..fc798faa5a6858e3de5cc1c28fe55a7d37f8e2e6 100644 (file)
@@ -1,3 +1,22 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * po/Makefile.in: Regenerated.
+       * libsupc++/Makefile.in: Regenerated.
+       * testsuite/Makefile.in: Regenerated.
+       * src/Makefile.in: Regenerated.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+       * include/Makefile.in: Regenerated.
+       * doc/Makefile.in: Regenerated.
+       * python/Makefile.in: Regenerated.
+       * src/c++11/Makefile.in: Regenerated.
+       * src/c++98/Makefile.in: Regenerated.
+       * src/filesystem/Makefile.in: Regenerated.
+
 2017-01-16  Jonathan Wakely  <jwakely@redhat.com>
 
        PR libstdc++/66145
index 0456801f73c37d75adfccc05e356f79685105f02..0ed59a43405c1795c226617d511d5b35fe7a3fd4 100644 (file)
@@ -262,6 +262,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 glibcxx_MOFILES = @glibcxx_MOFILES@
 glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
 glibcxx_POFILES = @glibcxx_POFILES@
@@ -318,7 +319,7 @@ toplevel_builddir = @toplevel_builddir@
 toplevel_srcdir = @toplevel_srcdir@
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 PWD_COMMAND = $${PWDCMD-pwd}
index 64d893344b8355e7474e0b5e51ccf37633928d54..df81425fe51190e1dfd5199e8597951cd7be29cb 100755 (executable)
@@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 WARN_FLAGS
 OPTIMIZE_CXXFLAGS
 TOPLEVEL_INCLUDES
@@ -897,6 +898,7 @@ enable_libstdcxx_threads
 enable_libstdcxx_filesystem_ts
 with_gxx_include_dir
 enable_version_specific_runtime_libs
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1616,6 +1618,8 @@ Optional Packages:
                           set the std::string ABI to use by default
   --with-gxx-include-dir=DIR
                           installation directory for include files
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -11597,7 +11601,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11600 "configure"
+#line 11604 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11703,7 +11707,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11706 "configure"
+#line 11710 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15389,7 +15393,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15392 "configure"
+#line 15396 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15424,7 +15428,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15427 "configure"
+#line 15431 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15459,7 +15463,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15462 "configure"
+#line 15466 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15495,7 +15499,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15498 "configure"
+#line 15502 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -15576,7 +15580,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15579 "configure"
+#line 15583 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -15618,7 +15622,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15621 "configure"
+#line 15625 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -15652,7 +15656,7 @@ $as_echo "$enable_int128" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15655 "configure"
+#line 15659 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -81621,6 +81625,21 @@ $as_echo "$gxx_include_dir" >&6; }
 
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 ac_config_files="$ac_config_files Makefile"
 
 ac_config_files="$ac_config_files scripts/testsuite_flags"
index ce0e6a130a9a1db05f3476b71c651625a77f75ad..8e973503be01d1f4bc3591559f4a1da0710b2e48 100644 (file)
@@ -509,6 +509,9 @@ GLIBCXX_EXPORT_INSTALL_INFO
 GLIBCXX_EXPORT_INCLUDES
 GLIBCXX_EXPORT_FLAGS
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 dnl In autoconf 2.5x, AC_OUTPUT is replaced by four AC_CONFIG_* macros,
 dnl which can all be called multiple times as needed, plus one (different)
 dnl AC_OUTPUT macro.  This one lists the files to be created:
index e9b0a3ae376f9f4772a51642ffd980395dc04e41..9db08555785255ac8eea96fece3ff19820913b2e 100644 (file)
@@ -236,6 +236,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 glibcxx_MOFILES = @glibcxx_MOFILES@
 glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
 glibcxx_POFILES = @glibcxx_POFILES@
@@ -300,7 +301,7 @@ toplevel_builddir = @toplevel_builddir@
 toplevel_srcdir = @toplevel_srcdir@
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 PWD_COMMAND = $${PWDCMD-pwd}
index f29811a1f3b939e0741cc92b8dd648a5a6226580..898569520b9918bef1c8565f0c6acdff1ec029f6 100644 (file)
@@ -2,7 +2,7 @@
 ## This is used in all Makefile.am's.  Set defaults here.
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 MAINT_CHARSET = latin1
 
index cfe9febb5a54de3131f06dcce789897b08c8c5a0..4e78aaa3bdc7b4c7d3eb33c7b9a5eb2b4d6b2d8b 100644 (file)
@@ -234,6 +234,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 glibcxx_MOFILES = @glibcxx_MOFILES@
 glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
 glibcxx_POFILES = @glibcxx_POFILES@
@@ -290,7 +291,7 @@ toplevel_builddir = @toplevel_builddir@
 toplevel_srcdir = @toplevel_srcdir@
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 PWD_COMMAND = $${PWDCMD-pwd}
index 6edd79261f34df88b76c56b00fe3a278ce379b86..4c46eeccb96b4e2fa701fb4d15aa98829568ee1b 100644 (file)
@@ -307,6 +307,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 glibcxx_MOFILES = @glibcxx_MOFILES@
 glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
 glibcxx_POFILES = @glibcxx_POFILES@
@@ -363,7 +364,7 @@ toplevel_builddir = @toplevel_builddir@
 toplevel_srcdir = @toplevel_srcdir@
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 PWD_COMMAND = $${PWDCMD-pwd}
index 3eeb26270459dd6a2f7fdea609f811e6c1cee92e..2d4c8b86ec6383fca663b09aea49ed86fa0cd016 100644 (file)
@@ -234,6 +234,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 glibcxx_MOFILES = @glibcxx_MOFILES@
 glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
 glibcxx_POFILES = @glibcxx_POFILES@
@@ -290,7 +291,7 @@ toplevel_builddir = @toplevel_builddir@
 toplevel_srcdir = @toplevel_srcdir@
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 PWD_COMMAND = $${PWDCMD-pwd}
index ef19f0c3bd2a92daec696d51c72dd00d15572d6b..a8122aacc05c44160122d93fce219d081bab7a20 100644 (file)
@@ -264,6 +264,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 glibcxx_MOFILES = @glibcxx_MOFILES@
 glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
 glibcxx_POFILES = @glibcxx_POFILES@
@@ -320,7 +321,7 @@ toplevel_builddir = @toplevel_builddir@
 toplevel_srcdir = @toplevel_srcdir@
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 PWD_COMMAND = $${PWDCMD-pwd}
index 182d2c5c5ef920d5ea5d8b91e6ad69e1e39e815d..7594c3fe62ec8a526ee1513171b9612e0c3b7a76 100644 (file)
@@ -297,6 +297,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 glibcxx_MOFILES = @glibcxx_MOFILES@
 glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
 glibcxx_POFILES = @glibcxx_POFILES@
@@ -353,7 +354,7 @@ toplevel_builddir = @toplevel_builddir@
 toplevel_srcdir = @toplevel_srcdir@
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 PWD_COMMAND = $${PWDCMD-pwd}
index f50ba5bccbf49684988866824393feb700657ad9..cd18b82ed28eee2df08c71791de1aaceeebfd36d 100644 (file)
@@ -267,6 +267,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 glibcxx_MOFILES = @glibcxx_MOFILES@
 glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
 glibcxx_POFILES = @glibcxx_POFILES@
@@ -323,7 +324,7 @@ toplevel_builddir = @toplevel_builddir@
 toplevel_srcdir = @toplevel_srcdir@
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 PWD_COMMAND = $${PWDCMD-pwd}
index 52ec9b39cbcf3cd6fc64ed7306a092d3f983fbed..704a04698c805b9555e0605ff41c679f281191de 100644 (file)
@@ -268,6 +268,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 glibcxx_MOFILES = @glibcxx_MOFILES@
 glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
 glibcxx_POFILES = @glibcxx_POFILES@
@@ -324,7 +325,7 @@ toplevel_builddir = @toplevel_builddir@
 toplevel_srcdir = @toplevel_srcdir@
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 PWD_COMMAND = $${PWDCMD-pwd}
index f36b8e199c6cefc9904e4a5bcc65aaed8a124562..a4fdf790ae26c530ed80931b915d30f3810a0711 100644 (file)
@@ -276,6 +276,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 glibcxx_MOFILES = @glibcxx_MOFILES@
 glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
 glibcxx_POFILES = @glibcxx_POFILES@
@@ -332,7 +333,7 @@ toplevel_builddir = @toplevel_builddir@
 toplevel_srcdir = @toplevel_srcdir@
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 PWD_COMMAND = $${PWDCMD-pwd}
index 4fcafd54c64ab86b4a3855a377469a4a548322b0..da51c0fc3c78d99c0c20119bf14a7109fd6503a3 100644 (file)
@@ -234,6 +234,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 glibcxx_MOFILES = @glibcxx_MOFILES@
 glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
 glibcxx_POFILES = @glibcxx_POFILES@
@@ -293,7 +294,7 @@ RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
 EXPECT = expect
 
 # May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 MAINT_CHARSET = latin1
 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 PWD_COMMAND = $${PWDCMD-pwd}
index 1e6e66ca810666d37720474f7463dc4047e6d4a0..45b24c8431c9f53e7dadf8f3995331ad52326fa4 100644 (file)
@@ -1,3 +1,13 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * testsuite/Makefile.in: Regenerated.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
 
        Update copyright years.
index cceb176ea57db04d9cb2b5cc12d0ef2b68f0b918..a44e779c277a27dff3044bc45d14e2475fb13a25 100644 (file)
@@ -28,7 +28,7 @@ endif
 ACLOCAL_AMFLAGS = -I .. -I ../config
 
 # May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 
 DEFS = @DEFS@
 AM_CPPFLAGS = -I$(top_srcdir)/../include
index 05539277d920ef970931f32fe34a363a7071a53a..59d0b11bdd0620d1cd624918f8d10433ef6d34ba 100644 (file)
@@ -273,6 +273,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -320,7 +321,7 @@ toplevel_srcdir = @toplevel_srcdir@
 ACLOCAL_AMFLAGS = -I .. -I ../config
 
 # May be used by toolexeclibdir.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 AM_CPPFLAGS = -I$(top_srcdir)/../include
 AM_CFLAGS = $(XCFLAGS)
 AM_CCASFLAGS = $(XCFLAGS)
index b9768fef48347bc0294a08449324e1585a04a03c..c3bed2dfc708431b672fb4d46e52aecfee96396d 100755 (executable)
@@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+get_gcc_base_ver
 VTV_NO_OBSTACK_FALSE
 VTV_NO_OBSTACK_TRUE
 VTV_CYGMIN_FALSE
@@ -759,6 +760,7 @@ with_pic
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
+with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1409,6 +1411,8 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -12062,7 +12066,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12065 "configure"
+#line 12069 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12168,7 +12172,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12171 "configure"
+#line 12175 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15505,6 +15509,21 @@ else
 fi
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 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
index 19c65083ee1e880a4d9935b4a59976f21f689eae..33b1e7913c64894fc30b52805ebc688b5cdf7ee5 100644 (file)
@@ -190,4 +190,7 @@ AM_CONDITIONAL(VTV_CYGMIN, test $vtv_cygmin = yes)
 AC_CHECK_FUNCS([_obstack_begin])
 AM_CONDITIONAL(VTV_NO_OBSTACK, test $ac_cv_func__obstack_begin = no)
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 AC_OUTPUT
index e19e13e7e5ff1bfdb9872d3294c4a68c89ec7f5e..7688f3c88c8df1521d057b234ec5e4ed84b9b3f3 100644 (file)
@@ -174,6 +174,7 @@ dvidir = @dvidir@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index b0051b6bc1ffad6e2c3f9496c18178a5b2bce948..c1859e2bbee1023afdf551dff7f3e06fcabc82cc 100644 (file)
@@ -1,3 +1,12 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR other/79046
+       * configure.ac: Add GCC_BASE_VER.
+       * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
+       get version from BASE-VER file.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
 
        Update copyright years.
index a90a5da23bd7a578c2aa82468807d8483505003d..28dc21014b2e86988fa88adabd63ce6092e18e02 100644 (file)
@@ -3,7 +3,7 @@
 ACLOCAL_AMFLAGS = -I .. -I ../config
 AUTOMAKE_OPTIONS = no-dependencies
 
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 target_noncanonical := @target_noncanonical@
 libexecsubdir := $(libexecdir)/gcc/$(real_target_noncanonical)/$(gcc_version)$(accel_dir_suffix)
 
index 06ef5f30ca47e6aa21b7aaa5ef937e6e91a7d90a..c69cc32bc5381cd8f6e9b4150076f091d3bd2bc8 100644 (file)
@@ -214,6 +214,7 @@ docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 gcc_build_dir = @gcc_build_dir@
+get_gcc_base_ver = @get_gcc_base_ver@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -254,7 +255,7 @@ top_srcdir = @top_srcdir@
 with_libiberty = @with_libiberty@
 ACLOCAL_AMFLAGS = -I .. -I ../config
 AUTOMAKE_OPTIONS = no-dependencies
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 libexecsubdir := $(libexecdir)/gcc/$(real_target_noncanonical)/$(gcc_version)$(accel_dir_suffix)
 AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
 AM_CFLAGS = @ac_lto_plugin_warn_cflags@
index 18b3b3f53b065b0e0b67e4a2f469e325d390713e..cdea9eac3eeb87d2b64605ac80d50a7d0e28d377 100755 (executable)
@@ -619,6 +619,7 @@ LD
 FGREP
 SED
 LIBTOOL
+get_gcc_base_ver
 real_target_noncanonical
 accel_dir_suffix
 gcc_build_dir
@@ -733,6 +734,7 @@ enable_maintainer_mode
 with_libiberty
 enable_dependency_tracking
 enable_largefile
+with_gcc_major_version_only
 enable_shared
 enable_static
 with_pic
@@ -1386,6 +1388,8 @@ Optional Packages:
   --with-build-libsubdir=DIR  Directory where to find libraries for build system
   --with-libiberty=PATH   specify the directory where to find libiberty
                           [../libiberty]
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
@@ -5376,6 +5380,21 @@ fi
 
 
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 case `pwd` in
   *\ * | *\    *)
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
@@ -11450,7 +11469,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11453 "configure"
+#line 11472 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11556,7 +11575,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11559 "configure"
+#line 11578 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index b6dc5343b067a49dd70ae4b64ac2f71d33cad7cb..aa68632a66ff4167f5ffc3d486d51e866ef41142 100644 (file)
@@ -45,6 +45,9 @@ fi
 AC_SUBST(accel_dir_suffix)
 AC_SUBST(real_target_noncanonical)
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 AM_PROG_LIBTOOL
 ACX_LT_HOST_FLAGS
 AC_SUBST(target_noncanonical)