/usr/src/gcc-8/debian/patches/gcc-linaro-no-macros.diff is in gcc-8-source 8-20180414-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | # DP : Don't add the __LINARO_RELEASE__ and __LINARO_SPIN__ macros for distro builds.
Index: b/src/gcc/cppbuiltin.c
===================================================================
--- a/src/gcc/cppbuiltin.c
+++ b/src/gcc/cppbuiltin.c
@@ -53,41 +53,18 @@ parse_basever (int *major, int *minor, i
*patchlevel = s_patchlevel;
}
-/* Parse a LINAROVER version string of the format "M.m-year.month[-spin][~dev]"
- to create Linaro release number YYYYMM and spin version. */
-static void
-parse_linarover (int *release, int *spin)
-{
- static int s_year = -1, s_month, s_spin;
-
- if (s_year == -1)
- if (sscanf (LINAROVER, "%*[^-]-%d.%d-%d", &s_year, &s_month, &s_spin) != 3)
- {
- sscanf (LINAROVER, "%*[^-]-%d.%d", &s_year, &s_month);
- s_spin = 0;
- }
-
- if (release)
- *release = s_year * 100 + s_month;
-
- if (spin)
- *spin = s_spin;
-}
/* Define __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ and __VERSION__. */
static void
define__GNUC__ (cpp_reader *pfile)
{
- int major, minor, patchlevel, linaro_release, linaro_spin;
+ int major, minor, patchlevel;
parse_basever (&major, &minor, &patchlevel);
- parse_linarover (&linaro_release, &linaro_spin);
cpp_define_formatted (pfile, "__GNUC__=%d", major);
cpp_define_formatted (pfile, "__GNUC_MINOR__=%d", minor);
cpp_define_formatted (pfile, "__GNUC_PATCHLEVEL__=%d", patchlevel);
cpp_define_formatted (pfile, "__VERSION__=\"%s\"", version_string);
- cpp_define_formatted (pfile, "__LINARO_RELEASE__=%d", linaro_release);
- cpp_define_formatted (pfile, "__LINARO_SPIN__=%d", linaro_spin);
cpp_define_formatted (pfile, "__ATOMIC_RELAXED=%d", MEMMODEL_RELAXED);
cpp_define_formatted (pfile, "__ATOMIC_SEQ_CST=%d", MEMMODEL_SEQ_CST);
cpp_define_formatted (pfile, "__ATOMIC_ACQUIRE=%d", MEMMODEL_ACQUIRE);
Index: b/src/gcc/Makefile.in
===================================================================
--- a/src/gcc/Makefile.in
+++ b/src/gcc/Makefile.in
@@ -845,12 +845,10 @@ BASEVER := $(srcdir)/BASE-VER # 4.x
DEVPHASE := $(srcdir)/DEV-PHASE # experimental, prerelease, ""
DATESTAMP := $(srcdir)/DATESTAMP # YYYYMMDD or empty
REVISION := $(srcdir)/REVISION # [BRANCH revision XXXXXX]
-LINAROVER := $(srcdir)/LINARO-VERSION # M.x-YYYY.MM[-S][~dev]
BASEVER_c := $(shell cat $(BASEVER))
DEVPHASE_c := $(shell cat $(DEVPHASE))
DATESTAMP_c := $(shell cat $(DATESTAMP))
-LINAROVER_c := $(shell cat $(LINAROVER))
ifeq (,$(wildcard $(REVISION)))
REVISION_c :=
@@ -877,7 +875,6 @@ DATESTAMP_s := \
"\"$(if $(DEVPHASE_c)$(filter-out 0,$(PATCHLEVEL_c)), $(DATESTAMP_c))\""
PKGVERSION_s:= "\"@PKGVERSION@\""
BUGURL_s := "\"@REPORT_BUGS_TO@\""
-LINAROVER_s := "\"$(LINAROVER_c)\""
PKGVERSION := @PKGVERSION@
BUGURL_TEXI := @REPORT_BUGS_TEXI@
@@ -2804,9 +2801,8 @@ PREPROCESSOR_DEFINES = \
-DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
@TARGET_SYSTEM_ROOT_DEFINE@
-CFLAGS-cppbuiltin.o += $(PREPROCESSOR_DEFINES) -DBASEVER=$(BASEVER_s) \
- -DLINAROVER=$(LINAROVER_s)
-cppbuiltin.o: $(BASEVER) $(LINAROVER)
+CFLAGS-cppbuiltin.o += $(PREPROCESSOR_DEFINES) -DBASEVER=$(BASEVER_s)
+cppbuiltin.o: $(BASEVER)
CFLAGS-cppdefault.o += $(PREPROCESSOR_DEFINES)
Index: b/src/gcc/LINARO-VERSION
===================================================================
--- a/src/gcc/LINARO-VERSION
+++ /dev/null
@@ -1,1 +0,0 @@
-Snapshot 7.2-2017.09
|