From 12a3fbdb7ed65a89810e606f336556fa737a3215 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 7 Aug 2017 16:56:10 +0200 Subject: libpayload: Use a static copy of `font_glyph_filled()` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libpayload needs a static copy of the out of line function `font_glyph_filled()` in every TU that needs it. So make it static inline. This fixes a build error by gcc (Debian 7.1.0-12) 7.1.0 from Debian Sid/unstable. This happens with any libpayload based payload like coreinfo, nvramcui or tint. ``` […] LPCC build/coreinfo.elf (LINK) /src/coreboot/payloads/coreinfo/build/libpayload/bin/../lib/libpayload.a(corebootfb.libc.o): In function `corebootfb_putchar': /src/coreboot/payloads/libpayload/drivers/video/corebootfb.c:173: undefined reference to `font_glyph_filled' […] ``` Change-Id: I931f0f17b33abafdc49aa755a0dad65e28820750 Signed-off-by: Paul Menzel Reviewed-on: https://review.coreboot.org/20897 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Patrick Georgi --- payloads/libpayload/drivers/video/font.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/payloads/libpayload/drivers/video/font.h b/payloads/libpayload/drivers/video/font.h index 9ea328c78d..cfb679bbd0 100644 --- a/payloads/libpayload/drivers/video/font.h +++ b/payloads/libpayload/drivers/video/font.h @@ -36,7 +36,7 @@ extern int font_width; extern int font_height; extern int font_scale; -inline int font_glyph_filled(unsigned int ch, int x, int y) +static inline int font_glyph_filled(unsigned int ch, int x, int y) { unsigned char *glyph = font8x16 + ((ch & 0xFF) * FONT_HEIGHT); return glyph[y/font_scale] & (1 << x/font_scale); -- cgit v1.2.3