summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-11-20 15:04:46 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-11-24 20:13:59 +0300
commitcdb39cbeef8d2c7a74b88b1f406d26ef8daeab73 (patch)
tree7dbd100413604f550a7241a84658a11ff97876b1
parent4a481463a3d221d3c3b8d7d7aaa886fbe54e85de (diff)
downloadgcc-9-cdb39cbeef8d2c7a74b88b1f406d26ef8daeab73.tar.gz
Fix conflict with time() in GM-2
-rw-r--r--debian/patches/dyson-gm2-time-conflict.diff71
-rw-r--r--debian/rules.patch2
2 files changed, 73 insertions, 0 deletions
diff --git a/debian/patches/dyson-gm2-time-conflict.diff b/debian/patches/dyson-gm2-time-conflict.diff
new file mode 100644
index 0000000..7e4ee8e
--- /dev/null
+++ b/debian/patches/dyson-gm2-time-conflict.diff
@@ -0,0 +1,71 @@
+Description: fix conflict with the time() function
+Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92647
+Index: gcc-9.git/src/gcc/gm2/mc-boot/GRTint.c
+===================================================================
+--- gcc-9.git.orig/src/gcc/gm2/mc-boot/GRTint.c
++++ gcc-9.git/src/gcc/gm2/mc-boot/GRTint.c
+@@ -54,7 +54,9 @@ typedef _T1 *Vector;
+
+ typedef struct _T2_a _T2;
+
+-typedef enum {input, output, time} VectorType;
++/* "tiempo" was "time", but it was conflicting with the time() function
++ * which is brought to the scope by accident on Dyson. */
++typedef enum {input, output, tiempo} VectorType;
+
+ typedef void (*RTint_DespatchVector_t) (unsigned int, unsigned int, void *);
+ struct RTint_DespatchVector_p { RTint_DespatchVector_t proc; };
+@@ -351,7 +353,7 @@ static void DumpPendingQueue (void)
+ {
+ libc_printf ((char *) "(fd=%d) (vec=%d)", 16, v->File, v->no);
+ }
+- else if (v->type == time)
++ else if (v->type == tiempo)
+ {
+ /* avoid dangling else. */
+ Selective_GetTime (v->rel, &s, &m);
+@@ -552,7 +554,7 @@ unsigned int RTint_InitTimeVector (unsig
+ Storage_ALLOCATE ((void **) &v, sizeof (_T1));
+ VecNo += 1;
+ Assertion_Assert (micro < Microseconds);
+- v->type = time;
++ v->type = tiempo;
+ v->priority = pri;
+ v->arg = NULL;
+ v->pending = NULL;
+@@ -665,7 +667,7 @@ void RTint_IncludeVector (unsigned int v
+ ', vec, v^.File) ; */
+ v->pending = Pending.array[v->priority-(COROUTINES_UnassignedPriority)];
+ Pending.array[v->priority-(COROUTINES_UnassignedPriority)] = v;
+- if ((v->type == time) && ! v->queued)
++ if ((v->type == tiempo) && ! v->queued)
+ {
+ v->queued = TRUE;
+ r = Selective_GetTimeOfDay (v->abs_);
+@@ -721,7 +723,7 @@ void RTint_ExcludeVector (unsigned int v
+ }
+ u->pending = v->pending;
+ }
+- if (v->type == time)
++ if (v->type == tiempo)
+ {
+ v->queued = FALSE;
+ }
+@@ -785,7 +787,7 @@ void RTint_Listen (unsigned int untilInt
+ AddFd (&o, &maxFd, v->File);
+ break;
+
+- case time:
++ case tiempo:
+ if (IsGreaterEqual (t, v->abs_))
+ {
+ Selective_GetTime (v->abs_, &s, &m);
+@@ -895,7 +897,7 @@ void RTint_Listen (unsigned int untilInt
+ }
+ break;
+
+- case time:
++ case tiempo:
+ if (untilInterrupt || TRUE)
+ {
+ r = Selective_GetTimeOfDay (after);
diff --git a/debian/rules.patch b/debian/rules.patch
index 7c1e108..905355d 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -276,6 +276,8 @@ ifeq ($(DEB_TARGET_ARCH_OS), illumos)
debian_patches += illumos-libgcc-regs
endif
+debian_patches += dyson-gm2-time-conflict
+
series_stamp = $(stampdir)/02-series-stamp
series: $(series_stamp)
$(series_stamp):