forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user