summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-02-13 20:45:45 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-02-14 11:01:26 +0100
commit1ad3eafef145d90c5e9a8cfad6f0979fecb5936b (patch)
tree24267b0af310dc10c0a74641516fbee7994bc326
parentd02300e1ee9a0d5c244bf845740602c7af0a0155 (diff)
downloadptxdist-1ad3eafef145d90c5e9a8cfad6f0979fecb5936b.tar.gz
ptxdist-1ad3eafef145d90c5e9a8cfad6f0979fecb5936b.tar.xz
calibrator: add patch to fix build with gcc 4.5
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/calibrator-20070821-1/0001-rename-round-_round-to-avoid-name-conficts.patch104
-rw-r--r--patches/calibrator-20070821-1/series3
2 files changed, 107 insertions, 0 deletions
diff --git a/patches/calibrator-20070821-1/0001-rename-round-_round-to-avoid-name-conficts.patch b/patches/calibrator-20070821-1/0001-rename-round-_round-to-avoid-name-conficts.patch
new file mode 100644
index 000000000..25f1d4ca4
--- /dev/null
+++ b/patches/calibrator-20070821-1/0001-rename-round-_round-to-avoid-name-conficts.patch
@@ -0,0 +1,104 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Sun, 13 Feb 2011 20:42:38 +0100
+Subject: [PATCH] rename round -> _round to avoid name conficts
+
+calibrator.c:131:5: error: conflicting types for 'round'
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ calibrator.c | 30 +++++++++++++++---------------
+ 1 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/calibrator.c b/calibrator.c
+index e045dfd..45f2eb4 100644
+--- a/calibrator.c
++++ b/calibrator.c
+@@ -128,7 +128,7 @@ void ErrXit(char *format, ...) {
+ exit(1);
+ }
+
+-lng round(dbl x)
++lng _round(dbl x)
+ {
+ return (lng)(x + 0.5);
+ }
+@@ -890,16 +890,16 @@ void plotCache(cacheInfo *cache, lng **result, lng MHz, char *fn, FILE *fp, lng
+ fprintf(fp, ")\n");
+ fprintf(fp, "set y2tics");
+ for (l = 0, s = " ("; l <= cache->levels; l++, s = ", ") {
+- if (!delay) fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(cache->latency1[l] - delay)), NSperIt(cache->latency1[l] - delay));
+- else fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(cache->latency2[l] - delay)), NSperIt(cache->latency2[l] - delay));
++ if (!delay) fprintf(fp, "%s'(%ld)' %f", s, _round(CYperIt(cache->latency1[l] - delay)), NSperIt(cache->latency1[l] - delay));
++ else fprintf(fp, "%s'(%ld)' %f", s, _round(CYperIt(cache->latency2[l] - delay)), NSperIt(cache->latency2[l] - delay));
+ }
+ for (y = 1; y <= yh; y *= 10) {
+ fprintf(fp, "%s'%1.3g' %ld", s, (dbl)(y * MHz) / 1000.0, y);
+ }
+ fprintf(fp, ")\n");
+ for (l = 0; l <= cache->levels; l++) {
+- if (!delay) z = (dbl)round(CYperIt(cache->latency1[l] - delay)) * 1000.0 / (dbl)MHz;
+- else z = (dbl)round(CYperIt(cache->latency2[l] - delay)) * 1000.0 / (dbl)MHz;
++ if (!delay) z = (dbl)_round(CYperIt(cache->latency1[l] - delay)) * 1000.0 / (dbl)MHz;
++ else z = (dbl)_round(CYperIt(cache->latency2[l] - delay)) * 1000.0 / (dbl)MHz;
+ fprintf(fp, "set label %ld '(%1.3g) ' at %f,%f right\n", l + 1, z, xl, z);
+ fprintf(fp, "set arrow %ld from %f,%f to %f,%f nohead lt 0\n", l + 1, xl, z, xh, z);
+ }
+@@ -986,16 +986,16 @@ void plotTLB(TLBinfo *TLB, lng **result, lng MHz, char *fn, FILE *fp, lng delay)
+ fprintf(fp, "%s'<L1>' %ld)\n", s, TLB->mincachelines);
+ fprintf(fp, "set y2tics");
+ for (l = 0, s = " ("; l <= TLB->levels; l++, s = ", ") {
+- if (!delay) fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(TLB->latency1[l] - delay)), NSperIt(TLB->latency1[l] - delay));
+- else fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(TLB->latency2[l] - delay)), NSperIt(TLB->latency2[l] - delay));
++ if (!delay) fprintf(fp, "%s'(%ld)' %f", s, _round(CYperIt(TLB->latency1[l] - delay)), NSperIt(TLB->latency1[l] - delay));
++ else fprintf(fp, "%s'(%ld)' %f", s, _round(CYperIt(TLB->latency2[l] - delay)), NSperIt(TLB->latency2[l] - delay));
+ }
+ for (y = 1; y <= yh; y *= 10) {
+ fprintf(fp, "%s'%1.3g' %ld", s, (dbl)(y * MHz) / 1000.0, y);
+ }
+ fprintf(fp, ")\n");
+ for (l = 0; l <= TLB->levels; l++) {
+- if (!delay) z = (dbl)round(CYperIt(TLB->latency1[l] - delay)) * 1000.0 / (dbl)MHz;
+- else z = (dbl)round(CYperIt(TLB->latency2[l] - delay)) * 1000.0 / (dbl)MHz;
++ if (!delay) z = (dbl)_round(CYperIt(TLB->latency1[l] - delay)) * 1000.0 / (dbl)MHz;
++ else z = (dbl)_round(CYperIt(TLB->latency2[l] - delay)) * 1000.0 / (dbl)MHz;
+ fprintf(fp, "set label %ld '(%1.3g) ' at %f,%f right\n", l + 1, z, xl, z);
+ fprintf(fp, "set arrow %ld from %f,%f to %f,%f nohead lt 0\n", l + 1, xl, z, xh, z);
+ }
+@@ -1023,9 +1023,9 @@ void printCPU(cacheInfo *cache, lng MHz, lng delay)
+ FILE *fp = stdout;
+
+ fprintf(fp, "CPU loop + L1 access: ");
+- fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[0]), round(CYperIt(cache->latency1[0])));
++ fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[0]), _round(CYperIt(cache->latency1[0])));
+ fprintf(fp, " ( delay: ");
+- fprintf(fp, " %6.2f ns = %3ld cy )\n", NSperIt(delay), round(CYperIt(delay)));
++ fprintf(fp, " %6.2f ns = %3ld cy )\n", NSperIt(delay), _round(CYperIt(delay)));
+ fprintf(fp, "\n");
+ fflush(fp);
+ }
+@@ -1047,8 +1047,8 @@ void printCache(cacheInfo *cache, lng MHz)
+ fprintf(fp, " %3ld KB ", cache->size[l] / 1024);
+ }
+ fprintf(fp, " %3ld bytes ", cache->linesize[l + 1]);
+- fprintf(fp, " %6.2f ns = %3ld cy " , NSperIt(cache->latency2[l + 1] - cache->latency2[l]), round(CYperIt(cache->latency2[l + 1] - cache->latency2[l])));
+- fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[l + 1] - cache->latency1[l]), round(CYperIt(cache->latency1[l + 1] - cache->latency1[l])));
++ fprintf(fp, " %6.2f ns = %3ld cy " , NSperIt(cache->latency2[l + 1] - cache->latency2[l]), _round(CYperIt(cache->latency2[l + 1] - cache->latency2[l])));
++ fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[l + 1] - cache->latency1[l]), _round(CYperIt(cache->latency1[l + 1] - cache->latency1[l])));
+ }
+ fprintf(fp, "\n");
+ fflush(fp);
+@@ -1075,9 +1075,9 @@ void printTLB(TLBinfo *TLB, lng MHz)
+ } else {
+ fprintf(fp, " %3ld KB ", TLB->pagesize[l + 1] / 1024);
+ }
+- fprintf(fp, " %6.2f ns = %3ld cy ", NSperIt(TLB->latency2[l + 1] - TLB->latency2[l]), round(CYperIt(TLB->latency2[l + 1] - TLB->latency2[l])));
++ fprintf(fp, " %6.2f ns = %3ld cy ", NSperIt(TLB->latency2[l + 1] - TLB->latency2[l]), _round(CYperIt(TLB->latency2[l + 1] - TLB->latency2[l])));
+ /*
+- fprintf(fp, " %6.2f ns = %3ld cy" , NSperIt(TLB->latency1[l + 1] - TLB->latency1[l]), round(CYperIt(TLB->latency1[l + 1] - TLB->latency1[l])));
++ fprintf(fp, " %6.2f ns = %3ld cy" , NSperIt(TLB->latency1[l + 1] - TLB->latency1[l]), _round(CYperIt(TLB->latency1[l + 1] - TLB->latency1[l])));
+ */
+ fprintf(fp, "\n");
+ }
+--
+1.7.2.3
+
diff --git a/patches/calibrator-20070821-1/series b/patches/calibrator-20070821-1/series
new file mode 100644
index 000000000..246504a49
--- /dev/null
+++ b/patches/calibrator-20070821-1/series
@@ -0,0 +1,3 @@
+# generated by git-ptx-patches
+0001-rename-round-_round-to-avoid-name-conficts.patch
+# 682c31e68ff1d6e2427b342da2b7433e - git-ptx-patches magic