summaryrefslogtreecommitdiff
path: root/fixincludes
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 /fixincludes
parent12314dc98976f0dc987ec8081e4672b76507e46e (diff)
downloadgcc-3c36aa6ba2be894d4092a6ce8129d39ef846c964.tar.gz
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
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog8
-rw-r--r--fixincludes/Makefile.in2
-rwxr-xr-xfixincludes/configure55
-rw-r--r--fixincludes/configure.ac3
4 files changed, 67 insertions, 1 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 2e6dd11ba9b..60ee208b4ef 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 5dc1b23bc86..1937dcaa32d 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 4836cd88653..ab97983f327 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 f8f352fb715..190f5382874 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