gcc/gcc11-c++tools.patch

87 lines
2.7 KiB
Diff

2020-12-17 Jakub Jelinek <jakub@redhat.com>
* configure.ac: Add GCC_BASE_VER.
* Makefile.in (version): Remove variable.
(gcc_version): New variable.
(libexecsubdir): Use $(gcc_version) instead of $(version).
* configure: Regenerated.
--- c++tools/configure.ac.jj 2020-12-16 23:38:34.091923526 +0100
+++ c++tools/configure.ac 2020-12-17 00:02:48.221661922 +0100
@@ -206,6 +206,9 @@ if test $ac_cv_inet_ntop = yes; then
[Define if inet_ntop provided.])
fi
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
--- c++tools/Makefile.in.jj 2020-12-16 23:38:34.091923526 +0100
+++ c++tools/Makefile.in 2020-12-17 00:01:54.419263424 +0100
@@ -20,8 +20,8 @@ prefix := @prefix@
bindir := @bindir@
libexecdir := @libexecdir@
target_noncanonical := @target_noncanonical@
-version := $(shell cat $(srcdir)/../gcc/BASE-VER)
-libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(version)
+gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
+libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
INSTALL_PROGRAM := @INSTALL_PROGRAM@
INSTALL_STRIP_PROGRAM := $(srcdir)/../install-sh -c -s
AUTOCONF := @AUTOCONF@
--- c++tools/configure.jj 2020-12-16 23:38:34.091923526 +0100
+++ c++tools/configure 2020-12-17 00:02:53.849599006 +0100
@@ -585,6 +585,7 @@ ac_unique_file="c++tools"
ac_unique_file="server.cc"
ac_subst_vars='LTLIBOBJS
LIBOBJS
+get_gcc_base_ver
ac_ct_CC
CFLAGS
CC
@@ -658,6 +659,7 @@ ac_user_opts='
enable_option_checking
enable_c___tools
enable_maintainer_mode
+with_gcc_major_version_only
'
ac_precious_vars='build_alias
host_alias
@@ -1287,6 +1289,12 @@ Optional Features:
enable maintainer mode. Add rules to rebuild
configurey bits
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-gcc-major-version-only
+ use only GCC major number in filesystem paths
+
Some influential environment variables:
CXX C++ compiler command
CXXFLAGS C++ compiler flags
@@ -3557,6 +3565,21 @@ $as_echo "#define HAVE_INET_NTOP 1" >>co
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_headers="$ac_config_headers config.h"
ac_config_files="$ac_config_files Makefile"