mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
sim: add checks to core headers to prevent incorrect common building
Some of the core sim headers rely on the SIM_AC_OPTION_BITSIZE macro which can change the size of core types. Since these haven't been unified across ports, add checks to make sure they aren't accidentally included when building for all ports. This caught the sim-load file using poisoned headers that it didn't actually need.
This commit is contained in:
parent
6688220490
commit
e9307449c3
@ -23,6 +23,9 @@
|
||||
#ifndef SIM_CONFIG_H
|
||||
#define SIM_CONFIG_H
|
||||
|
||||
#ifdef SIM_COMMON_BUILD
|
||||
#error "This header is unusable in common builds due to reliance on SIM_AC_OPTION_BITSIZE"
|
||||
#endif
|
||||
|
||||
/* Host dependant:
|
||||
|
||||
|
@ -27,12 +27,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "sim-basics.h"
|
||||
#include "bfd.h"
|
||||
#include "sim-utils.h"
|
||||
|
||||
#include "sim/callback.h"
|
||||
#include "sim/sim.h"
|
||||
#include "sim-utils.h"
|
||||
|
||||
static void eprintf (host_callback *, const char *, ...);
|
||||
static void xprintf (host_callback *, const char *, ...);
|
||||
|
@ -23,6 +23,10 @@
|
||||
#ifndef SIM_TYPES_H
|
||||
#define SIM_TYPES_H
|
||||
|
||||
#ifdef SIM_COMMON_BUILD
|
||||
#error "This header is unusable in common builds due to reliance on SIM_AC_OPTION_BITSIZE"
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* INTEGER QUANTITIES:
|
||||
|
Loading…
Reference in New Issue
Block a user