aboutsummaryrefslogtreecommitdiff
path: root/sim/lm32/dv-lm32cpu.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-10-19 15:31:28 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-10-24 17:24:29 +0100
commit1be79b1ebfad75626bf86eee35839e0afd081fdd (patch)
treed38a880d4178d78db0600ab0dc71e7671d974b8f /sim/lm32/dv-lm32cpu.c
parentda8b81754bcd9eb2e45cec4997770a591cc61a8f (diff)
downloadfsf-binutils-gdb-1be79b1ebfad75626bf86eee35839e0afd081fdd.zip
fsf-binutils-gdb-1be79b1ebfad75626bf86eee35839e0afd081fdd.tar.gz
fsf-binutils-gdb-1be79b1ebfad75626bf86eee35839e0afd081fdd.tar.bz2
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.
Diffstat (limited to 'sim/lm32/dv-lm32cpu.c')
-rw-r--r--sim/lm32/dv-lm32cpu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sim/lm32/dv-lm32cpu.c b/sim/lm32/dv-lm32cpu.c
index b97580e..15a08ee 100644
--- a/sim/lm32/dv-lm32cpu.c
+++ b/sim/lm32/dv-lm32cpu.c
@@ -18,6 +18,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#define WANT_CPU lm32bf
+#define WANT_CPU_LM32BF
+
/* This must come before any other includes. */
#include "defs.h"