summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
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