libpayload: Use a static copy of `font_glyph_filled()`

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 <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/20897
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Paul Menzel 2017-08-07 16:56:10 +02:00 committed by Patrick Georgi
parent 60ce6152fd
commit 12a3fbdb7e
1 changed files with 1 additions and 1 deletions

View File

@ -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);