Skip to content

Commit

Permalink
PR other/79046
Browse files Browse the repository at this point in the history
	* 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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244521 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
jakub committed Jan 17, 2017
1 parent 74dbdd1 commit 0812bb0
Show file tree
Hide file tree
Showing 120 changed files with 851 additions and 95 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2017-01-17 Jakub Jelinek <[email protected]>

PR other/79046
* configure: Regenerated.

2017-01-04 Alan Modra <[email protected]>

* configure: Regenerate.
Expand Down
7 changes: 7 additions & 0 deletions config/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2017-01-17 Jakub Jelinek <[email protected]>

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 <[email protected]>

PR go/78978
Expand Down
28 changes: 27 additions & 1 deletion config/acx.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
24 changes: 23 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 ...'
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down
8 changes: 8 additions & 0 deletions fixincludes/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2017-01-17 Jakub Jelinek <[email protected]>

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 <[email protected]>

PR libstdc++/78979
Expand Down
2 changes: 1 addition & 1 deletion fixincludes/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
55 changes: 55 additions & 0 deletions fixincludes/configure
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ ac_includes_default="\

ac_subst_vars='LTLIBOBJS
LIBOBJS
get_gcc_base_ver
MAINT
TARGET
target_noncanonical
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 :
Expand All @@ -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.
Expand Down Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions fixincludes/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 14 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
2017-01-17 Jakub Jelinek <[email protected]>

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 <[email protected]>

PR tree-optimization/71433
Expand Down
5 changes: 3 additions & 2 deletions gcc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions gcc/common.opt
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,9 @@ Driver
dumpversion
Driver

dumpfullversion
Driver

e
Driver Joined Separate

Expand Down
23 changes: 21 additions & 2 deletions gcc/configure
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ INCINTL
LIBINTL_DEP
LIBINTL
USE_NLS
get_gcc_base_ver
extra_opt_files
extra_modes_file
NATIVE_SYSTEM_HEADER_DIR
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions gcc/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading

0 comments on commit 0812bb0

Please sign in to comment.