@@ -20,6 +20,9 @@
/* Define to enable system headers canonicalization. */
#undef ENABLE_CANONICAL_SYSTEM_HEADERS
+/* Define to enable 64-bit locations. */
+#undef ENABLE_LARGE_SOURCE_LOCATIONS
+
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
@@ -753,6 +753,7 @@ enable_host_shared
enable_host_pie
enable_cet
enable_valgrind_annotations
+enable_large_source_locations
'
ac_precious_vars='build_alias
host_alias
@@ -1397,6 +1398,8 @@ Optional Features:
--enable-cet enable Intel CET in host libraries [default=auto]
--enable-valgrind-annotations
enable valgrind runtime interaction
+ --enable-large-source-locations
+ enable 64-bit source locations
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -9416,6 +9419,20 @@ $as_echo "#define ENABLE_VALGRIND_WORKAROUNDS 1" >>confdefs.h
fi
+# Specify whether to use 64-bit locations
+# Check whether --enable-large-source-locations was given.
+if test "${enable_large_source_locations+set}" = set; then :
+ enableval=$enable_large_source_locations;
+else
+ enable_large_source_locations=no
+fi
+
+if test x$enable_large_source_locations != xno; then
+
+$as_echo "#define ENABLE_LARGE_SOURCE_LOCATIONS 1" >>confdefs.h
+
+fi
+
# Output.
ac_config_headers="$ac_config_headers config.h:config.in"
@@ -246,6 +246,17 @@ if test x$enable_valgrind_annotations != xno \
possible memory leaks because of libcpp use of interior pointers.])
fi
+# Specify whether to use 64-bit locations
+AC_ARG_ENABLE([large-source-locations],
+[AC_HELP_STRING([--enable-large-source-locations],
+ [enable 64-bit source locations])],
+[],
+enable_large_source_locations=no)
+if test x$enable_large_source_locations != xno; then
+ AC_DEFINE(ENABLE_LARGE_SOURCE_LOCATIONS,
+ 1, [Define to enable 64-bit locations.])
+fi
+
# Output.
AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])
@@ -206,6 +206,12 @@
#endif
+/* Define to enable 64-bit locations. */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_LARGE_SOURCE_LOCATIONS
+#endif
+
+
/* Define if gcc should always pass --build-id to linker. */
#ifndef USED_FOR_TARGET
#undef ENABLE_LD_BUILDID
@@ -1059,6 +1059,7 @@ with_diagnostics_urls
enable_default_pie
enable_cet
enable_s390_excess_float_precision
+enable_large_source_locations
'
ac_precious_vars='build_alias
host_alias
@@ -1832,6 +1833,8 @@ Optional Features:
--enable-s390-excess-float-precision
on s390 targets, evaluate float with double
precision when in standards-conforming mode
+ --enable-large-source-locations
+ enable 64-bit source locations
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -21454,7 +21457,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 21457 "configure"
+#line 21460 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -21560,7 +21563,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 21563 "configure"
+#line 21566 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -34912,6 +34915,20 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fhardened_support" >&5
$as_echo "$fhardened_support" >&6; }
+# Specify whether to use 64-bit locations
+# Check whether --enable-large-source-locations was given.
+if test "${enable_large_source_locations+set}" = set; then :
+ enableval=$enable_large_source_locations;
+else
+ enable_large_source_locations=no
+fi
+
+if test x$enable_large_source_locations != xno; then
+
+$as_echo "#define ENABLE_LARGE_SOURCE_LOCATIONS 1" >>confdefs.h
+
+fi
+
# Configure the subdirectories
# AC_CONFIG_SUBDIRS($subdirs)
@@ -7951,6 +7951,17 @@ AC_DEFINE_UNQUOTED(HAVE_FHARDENED_SUPPORT,
[Define 0/1 if -fhardened is supported])
AC_MSG_RESULT($fhardened_support)
+# Specify whether to use 64-bit locations
+AC_ARG_ENABLE([large-source-locations],
+[AC_HELP_STRING([--enable-large-source-locations],
+ [enable 64-bit source locations])],
+[],
+enable_large_source_locations=no)
+if test x$enable_large_source_locations != xno; then
+ AC_DEFINE(ENABLE_LARGE_SOURCE_LOCATIONS,
+ 1, [Define to enable 64-bit locations.])
+fi
+
# Configure the subdirectories
# AC_CONFIG_SUBDIRS($subdirs)
@@ -2607,6 +2607,21 @@ include and lib options directly.
These flags are applicable to the host platform only. When building
a cross compiler, they will not be used to configure target libraries.
+
+@item --enable-large-source-locations
+In order to reduce peak memory usage, GCC uses an optimized data
+structure for storing the locations of source code it has parsed from
+its input. This structure uses a 32-bit key to represent source
+locations, which restricts the number of lines and columns that can be
+tracked (per source file, or within one source file) for sufficiently
+large source files. This can become evident as a degradation in the
+quality of diagnostics; those users who want to support large source
+files without encountering such issues and do not mind the extra
+memory consumption may use @option{--enable-large-source-locations}
+to switch to a 64-bit location type that is free of such practical
+issues. This may become the default for some targets in a future
+version of GCC.
+
@end table
@subheading Cross-Compiler-Specific Options