Thread (6 messages) 6 messages, 3 authors, 2026-05-22

Re: [PATCH] ARM: mach-rpc: fix zImage build after recent font-related changes

flat view

From: Helge Deller <deller@gmx.de>
Date: 2026-05-22 22:03:57
Also in: linux-arm-kernel

On 5/22/26 23:49, Helge Deller wrote:
Hi Ethan,

On 5/20/26 06:49, Ethan Nelson-Moore wrote:
quoted
Thanks for investigating this issue.

On Tue, May 19, 2026 at 2:11 AM Helge Deller [off-list ref] wrote:
quoted
Ethan, does this compile-only-tested patch fix the issue?
It almost does - I also had to remove #include <linux/math.h> from
include/linux/font.h.
This is probably because of the following highly questionable code in
arch/arm/boot/compressed/Makefile:
CFLAGS_font.o := -Dstatic=
which is causing unused static functions to not be optimized out. (The
real purpose of it is to make the acorndata_8x8 array non-static so
the decompressor can use it.) Really, the decompressor should be fixed
to not use this hack.
Would it help to mark acorndata_8x8 with attribute("visible") ?
That way it should become accessible.
quoted
quoted
Maybe only the first hunk is necessary.
You're right. The kernel links successfully with only the #include
<linux/math.h> removal and the first hunk applied.
Ok, good.
How shall we continue?
Do you want to try the visible trick?
I meant the __visible #define from
include/linux/compiler_attributes.h:# define __visible __attribute__((__externally_visible__))
I understand it might conflict with the "static" keyword (I did not test).

In your patch you #defined OMIT_FONT_DESC:

+# decompressor. OMIT_FONT_DESC is used in lib/fonts/font_acorn_8x8.c to omit the
+# definition of the font's font_desc structure, which requires <linux/font.h>.
+CFLAGS_font.o := -Dstatic= -D_VIDEO_FONT_H -DOMIT_FONT_DESC

On parisc I used a #define BOOTLOADER, which already describes the reason.
For your patch you could also use the "BOOTLOADER" define and then (instead of using __visible):
#ifdef BOOTLOADER
 static const struct font_data acorndata_8x8 =
#else
 const struct font_data acorndata_8x8 = {
#endif

?
Helge
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help