summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Jäger <pascal.jaeger@leimstift.de>2022-11-11 22:59:27 +0100
committerSam James <sam@gentoo.org>2022-11-22 06:48:42 +0000
commit996809c0e52057ec8e5f32dd1d9f8f9bea559c18 (patch)
tree75d3c675de370e805c6dd2f9adc97ca8aaf651d1 /app-misc/bb/files
parentnet-mail/email: add github upstream metadata (diff)
downloadgentoo-996809c0e52057ec8e5f32dd1d9f8f9bea559c18.tar.gz
gentoo-996809c0e52057ec8e5f32dd1d9f8f9bea559c18.tar.bz2
gentoo-996809c0e52057ec8e5f32dd1d9f8f9bea559c18.zip
app-misc/bb: revbump, fix build for clang16 and lto
Closes: https://bugs.gentoo.org/880385 Closes: https://bugs.gentoo.org/854720 Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de> Closes: https://github.com/gentoo/gentoo/pull/28233 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-misc/bb/files')
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-fix-build-for-clang16.patch23
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-fix-lto-type-mismatch.patch18
-rw-r--r--app-misc/bb/files/bb-1.3.0_rc1-fix-return-type-and-QA.patch47
3 files changed, 88 insertions, 0 deletions
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-fix-build-for-clang16.patch b/app-misc/bb/files/bb-1.3.0_rc1-fix-build-for-clang16.patch
new file mode 100644
index 000000000000..77b06874760b
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-fix-build-for-clang16.patch
@@ -0,0 +1,23 @@
+The two functions that are assigned to the formulas structs secnod field
+`int (*calculate)(number_t number_t number_t number_t)`
+(without the REGISTERS(3) which is just a macro to GCC regparm)
+
+However, clang16 has -Wincompatible-function-pointer-types by default, and it
+does not like that and complains, that assigning these functions into the
+structs fields is a problem due to incompatible types.
+
+Bug: https://bugs.gentoo.org/880385
+
+Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
+
+--- a/formulas.h
++++ b/formulas.h
+@@ -50,7 +50,7 @@ struct symetryinfo {
+ #define FORMULAMAGIC 1121
+ struct formula {
+ int magic;
+- int (*calculate) (number_t, number_t, number_t, number_t) REGISTERS(3);
++ int (*calculate) (number_t, number_t, number_t, number_t);
+ char *name[2];
+ vinfo v;
+ int mandelbrot;
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-fix-lto-type-mismatch.patch b/app-misc/bb/files/bb-1.3.0_rc1-fix-lto-type-mismatch.patch
new file mode 100644
index 000000000000..6442a9c9fd29
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-fix-lto-type-mismatch.patch
@@ -0,0 +1,18 @@
+In tex.c these variables are initialized as unsigned longs, so they should
+be declared as unsigned longs. I have scanned the code base for any usage
+of them in the negatives - nothing.
+
+Bug: https://bugs.gentoo.org/854720
+
+Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
+
+--- a/tex.h
++++ b/tex.h
+@@ -28,5 +28,6 @@ extern void disp3d(void);
+ extern void set_zbuff(void);
+ extern void unset_zbuff(void);
+
+-extern int alfa,beta,gama,centerx,centery,centerz;
++extern unsigned long alfa,beta,gama;
++extern int centerx,centery,centerz;
+ extern float zoom;
diff --git a/app-misc/bb/files/bb-1.3.0_rc1-fix-return-type-and-QA.patch b/app-misc/bb/files/bb-1.3.0_rc1-fix-return-type-and-QA.patch
new file mode 100644
index 000000000000..b1c8f8115605
--- /dev/null
+++ b/app-misc/bb/files/bb-1.3.0_rc1-fix-return-type-and-QA.patch
@@ -0,0 +1,47 @@
+diff --git a/ctrl87.c b/ctrl87.c
+index 05f1e6d..8789d92 100644
+--- a/ctrl87.c
++++ b/ctrl87.c
+@@ -43,8 +43,7 @@ unsigned short _control87(unsigned short newcw, unsigned short mask)
+ : /* registers */ "ax", "bx", "dx"
+ );
+ }
+- return cw;
+ #endif
+ #endif
+-
++return cw;
+ } /* _control87 */
+diff --git a/main.c b/main.c
+index a9fac57..41b56d1 100644
+--- a/main.c
++++ b/main.c
+@@ -73,8 +73,8 @@ load_song (char *name)
+ sleep (1);
+ }
+ }
+- return 0;
+ #endif
++return 0;
+ }
+
+ void
+diff --git a/scene4.c b/scene4.c
+index 12b640c..b2f69f3 100644
+--- a/scene4.c
++++ b/scene4.c
+@@ -231,10 +231,10 @@ void scene4(void)
+ draw();
+ bbflushwait(0.1 * 1000000);
+ for (i = 20; i < aa_imgwidth(context) - 20; i++)
+- aa_putpixel(context, i, aa_imgheight(context) - 10, 255),
+- aa_putpixel(context, i, aa_imgheight(context) - 11, 255),
+- aa_putpixel(context, i, aa_imgheight(context) - 12, 255),
+- aa_putpixel(context, i, aa_imgheight(context) - 13, 255),
++ aa_putpixel(context, i, aa_imgheight(context) - 10, 255);
++ aa_putpixel(context, i, aa_imgheight(context) - 11, 255);
++ aa_putpixel(context, i, aa_imgheight(context) - 12, 255);
++ aa_putpixel(context, i, aa_imgheight(context) - 13, 255);
+ gentable();
+ timestuff(-25, drawfire, mydraw, 7 * 1000000);
+ free(table);