aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-01-17 10:38:48 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2017-01-17 10:38:48 +0100
commit3c36aa6ba2be894d4092a6ce8129d39ef846c964 (patch)
treecc0e0034b0345bc500f0910812bc430e4df80e30
parent12314dc98976f0dc987ec8081e4672b76507e46e (diff)
downloadgcc-3c36aa6ba2be894d4092a6ce8129d39ef846c964.zip
gcc-3c36aa6ba2be894d4092a6ce8129d39ef846c964.tar.gz
gcc-3c36aa6ba2be894d4092a6ce8129d39ef846c964.tar.bz2
re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
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
-rw-r--r--ChangeLog5
-rw-r--r--config/ChangeLog7
-rw-r--r--config/acx.m428
-rwxr-xr-xconfigure24
-rw-r--r--fixincludes/ChangeLog8
-rw-r--r--fixincludes/Makefile.in2
-rwxr-xr-xfixincludes/configure55
-rw-r--r--fixincludes/configure.ac3
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/Makefile.in5
-rw-r--r--gcc/common.opt3
-rwxr-xr-xgcc/configure23
-rw-r--r--gcc/configure.ac3
-rw-r--r--gcc/doc/install.texi4
-rw-r--r--gcc/doc/invoke.texi15
-rw-r--r--gcc/gcc.c4
-rw-r--r--libada/ChangeLog8
-rw-r--r--libada/Makefile.in2
-rwxr-xr-xlibada/configure19
-rw-r--r--libada/configure.ac3
-rw-r--r--libatomic/ChangeLog10
-rw-r--r--libatomic/Makefile.am2
-rw-r--r--libatomic/Makefile.in3
-rwxr-xr-xlibatomic/configure23
-rw-r--r--libatomic/configure.ac3
-rw-r--r--libatomic/testsuite/Makefile.in1
-rw-r--r--libcc1/ChangeLog8
-rw-r--r--libcc1/Makefile.in1
-rwxr-xr-xlibcc1/configure28
-rw-r--r--libcc1/configure.ac10
-rw-r--r--libcilkrts/ChangeLog10
-rw-r--r--libcilkrts/Makefile.am2
-rw-r--r--libcilkrts/Makefile.in10
-rw-r--r--libcilkrts/aclocal.m41
-rw-r--r--libcilkrts/configure22
-rw-r--r--libcilkrts/configure.ac2
-rw-r--r--libgcc/ChangeLog8
-rw-r--r--libgcc/Makefile.in2
-rw-r--r--libgcc/configure19
-rw-r--r--libgcc/configure.ac3
-rw-r--r--libgfortran/ChangeLog9
-rw-r--r--libgfortran/Makefile.am2
-rw-r--r--libgfortran/Makefile.in3
-rwxr-xr-xlibgfortran/configure23
-rw-r--r--libgfortran/configure.ac3
-rw-r--r--libgomp/ChangeLog10
-rw-r--r--libgomp/Makefile.am2
-rw-r--r--libgomp/Makefile.in5
-rwxr-xr-xlibgomp/configure25
-rw-r--r--libgomp/configure.ac3
-rw-r--r--libgomp/testsuite/Makefile.in1
-rw-r--r--libitm/ChangeLog10
-rw-r--r--libitm/Makefile.am2
-rw-r--r--libitm/Makefile.in3
-rw-r--r--libitm/configure23
-rw-r--r--libitm/configure.ac3
-rw-r--r--libitm/testsuite/Makefile.in1
-rw-r--r--libmpx/ChangeLog9
-rw-r--r--libmpx/Makefile.am2
-rw-r--r--libmpx/Makefile.in2
-rw-r--r--libmpx/configure3
-rw-r--r--libmpx/configure.ac3
-rw-r--r--libobjc/ChangeLog9
-rw-r--r--libobjc/Makefile.in2
-rwxr-xr-xlibobjc/configure23
-rw-r--r--libobjc/configure.ac3
-rw-r--r--liboffloadmic/ChangeLog10
-rw-r--r--liboffloadmic/Makefile.am2
-rw-r--r--liboffloadmic/Makefile.in10
-rw-r--r--liboffloadmic/aclocal.m41
-rw-r--r--liboffloadmic/configure25
-rw-r--r--liboffloadmic/configure.ac3
-rw-r--r--libquadmath/ChangeLog9
-rw-r--r--libquadmath/Makefile.am2
-rw-r--r--libquadmath/Makefile.in3
-rwxr-xr-xlibquadmath/configure22
-rw-r--r--libquadmath/configure.ac2
-rw-r--r--libsanitizer/ChangeLog16
-rw-r--r--libsanitizer/Makefile.am2
-rw-r--r--libsanitizer/Makefile.in3
-rw-r--r--libsanitizer/asan/Makefile.in1
-rwxr-xr-xlibsanitizer/configure23
-rw-r--r--libsanitizer/configure.ac3
-rw-r--r--libsanitizer/interception/Makefile.in1
-rw-r--r--libsanitizer/libbacktrace/Makefile.in1
-rw-r--r--libsanitizer/lsan/Makefile.in1
-rw-r--r--libsanitizer/sanitizer_common/Makefile.in1
-rw-r--r--libsanitizer/tsan/Makefile.in1
-rw-r--r--libsanitizer/ubsan/Makefile.in1
-rw-r--r--libssp/ChangeLog9
-rw-r--r--libssp/Makefile.am2
-rw-r--r--libssp/Makefile.in3
-rwxr-xr-xlibssp/configure23
-rw-r--r--libssp/configure.ac3
-rw-r--r--libstdc++-v3/ChangeLog19
-rw-r--r--libstdc++-v3/Makefile.in3
-rwxr-xr-xlibstdc++-v3/configure37
-rw-r--r--libstdc++-v3/configure.ac3
-rw-r--r--libstdc++-v3/doc/Makefile.in3
-rw-r--r--libstdc++-v3/fragment.am2
-rw-r--r--libstdc++-v3/include/Makefile.in3
-rw-r--r--libstdc++-v3/libsupc++/Makefile.in3
-rw-r--r--libstdc++-v3/po/Makefile.in3
-rw-r--r--libstdc++-v3/python/Makefile.in3
-rw-r--r--libstdc++-v3/src/Makefile.in3
-rw-r--r--libstdc++-v3/src/c++11/Makefile.in3
-rw-r--r--libstdc++-v3/src/c++98/Makefile.in3
-rw-r--r--libstdc++-v3/src/filesystem/Makefile.in3
-rw-r--r--libstdc++-v3/testsuite/Makefile.in3
-rw-r--r--libvtv/ChangeLog10
-rw-r--r--libvtv/Makefile.am2
-rw-r--r--libvtv/Makefile.in3
-rwxr-xr-xlibvtv/configure23
-rw-r--r--libvtv/configure.ac3
-rw-r--r--libvtv/testsuite/Makefile.in1
-rw-r--r--lto-plugin/ChangeLog9
-rw-r--r--lto-plugin/Makefile.am2
-rw-r--r--lto-plugin/Makefile.in3
-rwxr-xr-xlto-plugin/configure23
-rw-r--r--lto-plugin/configure.ac3
120 files changed, 851 insertions, 95 deletions
diff --git a/ChangeLog b/ChangeLog
index db4125a..9291993 100644
--- 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.
diff --git a/config/ChangeLog b/config/ChangeLog
index 625319a..0ad1a30 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -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
diff --git a/config/acx.m4 b/config/acx.m4
index ab42972..aa1d34b 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -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"
diff --git a/configure b/configure
index ba5f8bf..60532fe 100755
--- 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"
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 2e6dd11..60ee208 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -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
diff --git a/fixincludes/Makefile.in b/fixincludes/Makefile.in
index 5dc1b23..1937dca 100644
--- a/fixincludes/Makefile.in
+++ b/fixincludes/Makefile.in
@@ -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)
diff --git a/fixincludes/configure b/fixincludes/configure
index 4836cd8..ab97983 100755
--- a/fixincludes/configure
+++ b/fixincludes/configure
@@ -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"
diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac
index f8f352f..190f538 100644
--- a/fixincludes/configure.ac
+++ b/fixincludes/configure.ac
@@ -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
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6d443fc..bef211c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 59fe4aa..7a7e27a 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -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
diff --git a/gcc/common.opt b/gcc/common.opt
index 693b743..ad6baa3 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -849,6 +849,9 @@ Driver
dumpversion
Driver
+dumpfullversion
+Driver
+
e
Driver Joined Separate
diff --git a/gcc/configure b/gcc/configure
index 60cb979..c9e43fb 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -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
diff --git a/gcc/configure.ac b/gcc/configure.ac
index b73a807..33f9a0e 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -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
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 4958773..713d225 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -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
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 99f193e..e0624da 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 0ed7da9..826b012 100644
--- 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;
diff --git a/libada/ChangeLog b/libada/ChangeLog
index 245c796..de1dfa0 100644
--- a/libada/ChangeLog
+++ b/libada/ChangeLog
@@ -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
diff --git a/libada/Makefile.in b/libada/Makefile.in
index c61dfcf..328c067 100644
--- a/libada/Makefile.in
+++ b/libada/Makefile.in
@@ -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))
diff --git a/libada/configure b/libada/configure
index 3b9f4ae..5ab0e21 100755
--- a/libada/configure
+++ b/libada/configure
@@ -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"
diff --git a/libada/configure.ac b/libada/configure.ac
index 389e2bb..3e0f0a3 100644
--- a/libada/configure.ac
+++ b/libada/configure.ac
@@ -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])
diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog
index def6f3e..9e0c02f 100644
--- a/libatomic/ChangeLog
+++ b/libatomic/ChangeLog
@@ -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.
diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
index 08699b9..d731406 100644
--- a/libatomic/Makefile.am
+++ b/libatomic/Makefile.am
@@ -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)) \
diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
index a083d87..f6eeab3 100644
--- a/libatomic/Makefile.in
+++ b/libatomic/Makefile.in
@@ -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)
diff --git a/libatomic/configure b/libatomic/configure
index 8f9a5f1..c05fc9d 100755
--- a/libatomic/configure
+++ b/libatomic/configure
@@ -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
diff --git a/libatomic/configure.ac b/libatomic/configure.ac
index 7d4e16d..023f172 100644
--- a/libatomic/configure.ac
+++ b/libatomic/configure.ac
@@ -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
diff --git a/libatomic/testsuite/Makefile.in b/libatomic/testsuite/Makefile.in
index 34f83e0..f0928b2 100644
--- a/libatomic/testsuite/Makefile.in
+++ b/libatomic/testsuite/Makefile.in
@@ -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@
diff --git a/libcc1/ChangeLog b/libcc1/ChangeLog
index 32892dc..47cc288 100644
--- a/libcc1/ChangeLog
+++ b/libcc1/ChangeLog
@@ -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.
diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
index 79d39d3..21fb153 100644
--- a/libcc1/Makefile.in
+++ b/libcc1/Makefile.in
@@ -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@
diff --git a/libcc1/configure b/libcc1/configure
index bf112bb..d6f480f 100755
--- a/libcc1/configure
+++ b/libcc1/configure
@@ -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'
diff --git a/libcc1/configure.ac b/libcc1/configure.ac
index af4336b..82bde4a 100644
--- a/libcc1/configure.ac
+++ b/libcc1/configure.ac
@@ -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'])
diff --git a/libcilkrts/ChangeLog b/libcilkrts/ChangeLog
index 443f0a2..9dcff74 100644
--- a/libcilkrts/ChangeLog
+++ b/libcilkrts/ChangeLog
@@ -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
diff --git a/libcilkrts/Makefile.am b/libcilkrts/Makefile.am
index 1dec6aa..2a0fcad 100644
--- a/libcilkrts/Makefile.am
+++ b/libcilkrts/Makefile.am
@@ -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
diff --git a/libcilkrts/Makefile.in b/libcilkrts/Makefile.in
index 6520b16..551a360 100644
--- a/libcilkrts/Makefile.in
+++ b/libcilkrts/Makefile.in
@@ -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
diff --git a/libcilkrts/aclocal.m4 b/libcilkrts/aclocal.m4
index a468681..71023b2 100644
--- a/libcilkrts/aclocal.m4
+++ b/libcilkrts/aclocal.m4
@@ -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])
diff --git a/libcilkrts/configure b/libcilkrts/configure
index ecf88ee..3cc8c99 100644
--- a/libcilkrts/configure
+++ b/libcilkrts/configure
@@ -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
diff --git a/libcilkrts/configure.ac b/libcilkrts/configure.ac
index 8270e0b..9cf9052 100644
--- a/libcilkrts/configure.ac
+++ b/libcilkrts/configure.ac
@@ -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
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 4d29385..256dc24 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -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,
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index ff48b684..f71d320 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -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)
diff --git a/libgcc/configure b/libgcc/configure
index 3c0af1c..5c900cc 100644
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -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
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 927507e..ea2030f 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -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)
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 1a68730..3335177 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -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
diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am
index fed875e..2857af5 100644
--- a/libgfortran/Makefile.am
+++ b/libgfortran/Makefile.am
@@ -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
diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in
index b3b5611..05b183d 100644
--- a/libgfortran/Makefile.in
+++ b/libgfortran/Makefile.in
@@ -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
diff --git a/libgfortran/configure b/libgfortran/configure
index 4cc247e..f975e2a 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -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
diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
index 628f75d..66a8462 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
@@ -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
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 94bcedf..7e40e24 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -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
diff --git a/libgomp/Makefile.am b/libgomp/Makefile.am
index 042ed6f..17af7d7 100644
--- a/libgomp/Makefile.am
+++ b/libgomp/Makefile.am
@@ -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) \
diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in
index 9fb2d00..920d29d 100644
--- a/libgomp/Makefile.in
+++ b/libgomp/Makefile.in
@@ -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
diff --git a/libgomp/configure b/libgomp/configure
index 6355ad9..6a4b3b2 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -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.
#
@@ -16796,6 +16800,21 @@ fi
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"
diff --git a/libgomp/configure.ac b/libgomp/configure.ac
index 4086d3f..a42d4f0 100644
--- a/libgomp/configure.ac
+++ b/libgomp/configure.ac
@@ -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])
diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in
index 1fae9e8..9a13050 100644
--- a/libgomp/testsuite/Makefile.in
+++ b/libgomp/testsuite/Makefile.in
@@ -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@
diff --git a/libitm/ChangeLog b/libitm/ChangeLog
index 0677c6d..13e5e91 100644
--- a/libitm/ChangeLog
+++ b/libitm/ChangeLog
@@ -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.
diff --git a/libitm/Makefile.am b/libitm/Makefile.am
index 1dce82d..5b4aad8 100644
--- a/libitm/Makefile.am
+++ b/libitm/Makefile.am
@@ -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
diff --git a/libitm/Makefile.in b/libitm/Makefile.in
index e874997..bd16ce0 100644
--- a/libitm/Makefile.in
+++ b/libitm/Makefile.in
@@ -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
diff --git a/libitm/configure b/libitm/configure
index 019a72b..775f370 100644
--- a/libitm/configure
+++ b/libitm/configure
@@ -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
diff --git a/libitm/configure.ac b/libitm/configure.ac
index 2151234..c5ecd39 100644
--- a/libitm/configure.ac
+++ b/libitm/configure.ac
@@ -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
diff --git a/libitm/testsuite/Makefile.in b/libitm/testsuite/Makefile.in
index 1d6001f..04c4d8a 100644
--- a/libitm/testsuite/Makefile.in
+++ b/libitm/testsuite/Makefile.in
@@ -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@
diff --git a/libmpx/ChangeLog b/libmpx/ChangeLog
index 67ae96a..3bf0376 100644
--- a/libmpx/ChangeLog
+++ b/libmpx/ChangeLog
@@ -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>
diff --git a/libmpx/Makefile.am b/libmpx/Makefile.am
index bd0a8b6..9ec6ec7 100644
--- a/libmpx/Makefile.am
+++ b/libmpx/Makefile.am
@@ -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
diff --git a/libmpx/Makefile.in b/libmpx/Makefile.in
index d644af3..9b1d7a6 100644
--- a/libmpx/Makefile.in
+++ b/libmpx/Makefile.in
@@ -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
diff --git a/libmpx/configure b/libmpx/configure
index 56461fc..115f53e 100644
--- a/libmpx/configure
+++ b/libmpx/configure
@@ -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"
diff --git a/libmpx/configure.ac b/libmpx/configure.ac
index 18ba687..baa882b 100644
--- a/libmpx/configure.ac
+++ b/libmpx/configure.ac
@@ -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 ]),
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index 97b5737..c3d1ba2 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -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.
diff --git a/libobjc/Makefile.in b/libobjc/Makefile.in
index 33cad1a..febc92d 100644
--- a/libobjc/Makefile.in
+++ b/libobjc/Makefile.in
@@ -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@
diff --git a/libobjc/configure b/libobjc/configure
index 62bdc2b..72645fd 100755
--- a/libobjc/configure
+++ b/libobjc/configure
@@ -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
@@ -11684,6 +11688,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
+
+
+
+
# ------
# Output
# ------
diff --git a/libobjc/configure.ac b/libobjc/configure.ac
index 5265d92..046e568 100644
--- a/libobjc/configure.ac
+++ b/libobjc/configure.ac
@@ -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
# ------
diff --git a/liboffloadmic/ChangeLog b/liboffloadmic/ChangeLog
index 3323bd6..4960f56 100644
--- a/liboffloadmic/ChangeLog
+++ b/liboffloadmic/ChangeLog
@@ -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.
diff --git a/liboffloadmic/Makefile.am b/liboffloadmic/Makefile.am
index c0cf645..b9a0bde 100644
--- a/liboffloadmic/Makefile.am
+++ b/liboffloadmic/Makefile.am
@@ -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.
diff --git a/liboffloadmic/Makefile.in b/liboffloadmic/Makefile.in
index 07727d2..591b3c9 100644
--- a/liboffloadmic/Makefile.in
+++ b/liboffloadmic/Makefile.in
@@ -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
diff --git a/liboffloadmic/aclocal.m4 b/liboffloadmic/aclocal.m4
index a468681..71023b2 100644
--- a/liboffloadmic/aclocal.m4
+++ b/liboffloadmic/aclocal.m4
@@ -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])
diff --git a/liboffloadmic/configure b/liboffloadmic/configure
index ebb60f6..e22b214 100644
--- a/liboffloadmic/configure
+++ b/liboffloadmic/configure
@@ -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
@@ -14481,6 +14485,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
+
+
+
+
# 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
diff --git a/liboffloadmic/configure.ac b/liboffloadmic/configure.ac
index 81fae8f..64728f1 100644
--- a/liboffloadmic/configure.ac
+++ b/liboffloadmic/configure.ac
@@ -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
diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog
index 8c598ec..e0cfc3a 100644
--- a/libquadmath/ChangeLog
+++ b/libquadmath/ChangeLog
@@ -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.
diff --git a/libquadmath/Makefile.am b/libquadmath/Makefile.am
index 5c4d3e2..ec23c66 100644
--- a/libquadmath/Makefile.am
+++ b/libquadmath/Makefile.am
@@ -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
diff --git a/libquadmath/Makefile.in b/libquadmath/Makefile.in
index 94e8014..428e015 100644
--- a/libquadmath/Makefile.in
+++ b/libquadmath/Makefile.in
@@ -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
diff --git a/libquadmath/configure b/libquadmath/configure
index a67939b..5091627 100755
--- a/libquadmath/configure
+++ b/libquadmath/configure
@@ -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"
diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac
index eb4fe8c..6d03c78 100644
--- a/libquadmath/configure.ac
+++ b/libquadmath/configure.ac
@@ -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
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
index db9221c..1e0d0f0 100644
--- a/libsanitizer/ChangeLog
+++ b/libsanitizer/ChangeLog
@@ -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
diff --git a/libsanitizer/Makefile.am b/libsanitizer/Makefile.am
index 6b0c571..6afb2b0 100644
--- a/libsanitizer/Makefile.am
+++ b/libsanitizer/Makefile.am
@@ -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
diff --git a/libsanitizer/Makefile.in b/libsanitizer/Makefile.in
index 28ba4b8..1f4bb8c 100644
--- a/libsanitizer/Makefile.in
+++ b/libsanitizer/Makefile.in
@@ -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
diff --git a/libsanitizer/asan/Makefile.in b/libsanitizer/asan/Makefile.in
index 2d9f4a7..9fe2416 100644
--- a/libsanitizer/asan/Makefile.in
+++ b/libsanitizer/asan/Makefile.in
@@ -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@
diff --git a/libsanitizer/configure b/libsanitizer/configure
index e6153f1..8e0c47e 100755
--- a/libsanitizer/configure
+++ b/libsanitizer/configure
@@ -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
@@ -16500,6 +16504,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
+
+
+
+
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
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac
index e901849..b0c485b 100644
--- a/libsanitizer/configure.ac
+++ b/libsanitizer/configure.ac
@@ -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
diff --git a/libsanitizer/interception/Makefile.in b/libsanitizer/interception/Makefile.in
index 550c8f5..cf06a83 100644
--- a/libsanitizer/interception/Makefile.in
+++ b/libsanitizer/interception/Makefile.in
@@ -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@
diff --git a/libsanitizer/libbacktrace/Makefile.in b/libsanitizer/libbacktrace/Makefile.in
index 3a618ec..dff04cf 100644
--- a/libsanitizer/libbacktrace/Makefile.in
+++ b/libsanitizer/libbacktrace/Makefile.in
@@ -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@
diff --git a/libsanitizer/lsan/Makefile.in b/libsanitizer/lsan/Makefile.in
index a0c8ae9..fdc1a059 100644
--- a/libsanitizer/lsan/Makefile.in
+++ b/libsanitizer/lsan/Makefile.in
@@ -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@
diff --git a/libsanitizer/sanitizer_common/Makefile.in b/libsanitizer/sanitizer_common/Makefile.in
index 052802e..b015a62 100644
--- a/libsanitizer/sanitizer_common/Makefile.in
+++ b/libsanitizer/sanitizer_common/Makefile.in
@@ -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@
diff --git a/libsanitizer/tsan/Makefile.in b/libsanitizer/tsan/Makefile.in
index 4d4ec47..7a58323 100644
--- a/libsanitizer/tsan/Makefile.in
+++ b/libsanitizer/tsan/Makefile.in
@@ -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@
diff --git a/libsanitizer/ubsan/Makefile.in b/libsanitizer/ubsan/Makefile.in
index a816d09..23939f0 100644
--- a/libsanitizer/ubsan/Makefile.in
+++ b/libsanitizer/ubsan/Makefile.in
@@ -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@
diff --git a/libssp/ChangeLog b/libssp/ChangeLog
index 8246e98..d851d4b 100644
--- a/libssp/ChangeLog
+++ b/libssp/ChangeLog
@@ -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.
diff --git a/libssp/Makefile.am b/libssp/Makefile.am
index f8f3153..72df8e7 100644
--- a/libssp/Makefile.am
+++ b/libssp/Makefile.am
@@ -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
diff --git a/libssp/Makefile.in b/libssp/Makefile.in
index 4509e30..96b03ae 100644
--- a/libssp/Makefile.in
+++ b/libssp/Makefile.in
@@ -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
diff --git a/libssp/configure b/libssp/configure
index a02eff4..b14e922 100755
--- a/libssp/configure
+++ b/libssp/configure
@@ -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
diff --git a/libssp/configure.ac b/libssp/configure.ac
index 93dfa8d..9e4a22a 100644
--- a/libssp/configure.ac
+++ b/libssp/configure.ac
@@ -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
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 17c716a..fc798fa 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
index 0456801..0ed59a4 100644
--- a/libstdc++-v3/Makefile.in
+++ b/libstdc++-v3/Makefile.in
@@ -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}
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 64d8933..df81425 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -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"
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index ce0e6a1..8e97350 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -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:
diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in
index e9b0a3a..9db0855 100644
--- a/libstdc++-v3/doc/Makefile.in
+++ b/libstdc++-v3/doc/Makefile.in
@@ -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}
diff --git a/libstdc++-v3/fragment.am b/libstdc++-v3/fragment.am
index f29811a..8985695 100644
--- a/libstdc++-v3/fragment.am
+++ b/libstdc++-v3/fragment.am
@@ -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
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index cfe9feb..4e78aaa 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -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}
diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in
index 6edd792..4c46eec 100644
--- a/libstdc++-v3/libsupc++/Makefile.in
+++ b/libstdc++-v3/libsupc++/Makefile.in
@@ -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}
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
index 3eeb262..2d4c8b8 100644
--- a/libstdc++-v3/po/Makefile.in
+++ b/libstdc++-v3/po/Makefile.in
@@ -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}
diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in
index ef19f0c..a8122aa 100644
--- a/libstdc++-v3/python/Makefile.in
+++ b/libstdc++-v3/python/Makefile.in
@@ -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}
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 182d2c5..7594c3f 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -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}
diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in
index f50ba5b..cd18b82 100644
--- a/libstdc++-v3/src/c++11/Makefile.in
+++ b/libstdc++-v3/src/c++11/Makefile.in
@@ -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}
diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in
index 52ec9b3..704a046 100644
--- a/libstdc++-v3/src/c++98/Makefile.in
+++ b/libstdc++-v3/src/c++98/Makefile.in
@@ -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}
diff --git a/libstdc++-v3/src/filesystem/Makefile.in b/libstdc++-v3/src/filesystem/Makefile.in
index f36b8e1..a4fdf79 100644
--- a/libstdc++-v3/src/filesystem/Makefile.in
+++ b/libstdc++-v3/src/filesystem/Makefile.in
@@ -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}
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index 4fcafd5..da51c0f 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -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}
diff --git a/libvtv/ChangeLog b/libvtv/ChangeLog
index 1e6e66c..45b24c8 100644
--- a/libvtv/ChangeLog
+++ b/libvtv/ChangeLog
@@ -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.
diff --git a/libvtv/Makefile.am b/libvtv/Makefile.am
index cceb176..a44e779 100644
--- a/libvtv/Makefile.am
+++ b/libvtv/Makefile.am
@@ -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
diff --git a/libvtv/Makefile.in b/libvtv/Makefile.in
index 0553927..59d0b11 100644
--- a/libvtv/Makefile.in
+++ b/libvtv/Makefile.in
@@ -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)
diff --git a/libvtv/configure b/libvtv/configure
index b9768fe..c3bed2d 100755
--- a/libvtv/configure
+++ b/libvtv/configure
@@ -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
diff --git a/libvtv/configure.ac b/libvtv/configure.ac
index 19c6508..33b1e79 100644
--- a/libvtv/configure.ac
+++ b/libvtv/configure.ac
@@ -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
diff --git a/libvtv/testsuite/Makefile.in b/libvtv/testsuite/Makefile.in
index e19e13e..7688f3c 100644
--- a/libvtv/testsuite/Makefile.in
+++ b/libvtv/testsuite/Makefile.in
@@ -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@
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog
index b0051b6..c1859e2 100644
--- a/lto-plugin/ChangeLog
+++ b/lto-plugin/ChangeLog
@@ -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.
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index a90a5da..28dc210 100644
--- a/lto-plugin/Makefile.am
+++ b/lto-plugin/Makefile.am
@@ -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)
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index 06ef5f3..c69cc32 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -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@
diff --git a/lto-plugin/configure b/lto-plugin/configure
index 18b3b3f..cdea9ea 100755
--- a/lto-plugin/configure
+++ b/lto-plugin/configure
@@ -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
diff --git a/lto-plugin/configure.ac b/lto-plugin/configure.ac
index b6dc534..aa68632 100644
--- a/lto-plugin/configure.ac
+++ b/lto-plugin/configure.ac
@@ -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)