]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - sim/lm32/Makefile.in
sim/lm32: fix some missing function declaration warnings
authorAndrew Burgess <aburgess@redhat.com>
Wed, 19 Oct 2022 14:31:28 +0000 (15:31 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Mon, 24 Oct 2022 16:24:29 +0000 (17:24 +0100)
commit1be79b1ebfad75626bf86eee35839e0afd081fdd
treed38a880d4178d78db0600ab0dc71e7671d974b8f
parentda8b81754bcd9eb2e45cec4997770a591cc61a8f
sim/lm32: fix some missing function declaration warnings

In the lm32 simulator, I was seeing some warnings about missing
function declarations.

The lm32 simulator has a weird header structure, in order to pull in
the full cpu.h header we need to define WANT_CPU_LM32BF.  This is done
in some files, but not in others.  Critically, it's not done in some
files that then use functions declared in cpu.h

In this commit I added the missing #define so that the full cpu.h can
be included.

After doing this there are still a few functions that are used
undeclared, these functions appear to be missing any declarations at
all, so I've added some to cpu.h.

With this done all the warnings when compiling lm32 are resolved for
both gcc and clang, so I've removed the SIM_WERROR_CFLAGS line from
Makefile.in, this allows lm32 to build with -Werror.
sim/lm32/Makefile.in
sim/lm32/cpu.h
sim/lm32/dv-lm32cpu.c
sim/lm32/user.c