From: Mike Frysinger Date: Sun, 7 Nov 2021 00:40:20 +0000 (-0400) Subject: sim: arm/bfin/rx: undefine page size from system headers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd0975b96b16d96010dce439af9620d3dfb65426;p=binutils-gdb.git sim: arm/bfin/rx: undefine page size from system headers Some targets (like cygwin) will export page size defines that clash with our local usage here. Undefine the system one to fix building for these targets. --- diff --git a/sim/arm/armvirt.c b/sim/arm/armvirt.c index ba01a652ebc..c162ba79e9b 100644 --- a/sim/arm/armvirt.c +++ b/sim/arm/armvirt.c @@ -46,6 +46,7 @@ #endif +#undef PAGESIZE /* Cleanup system headers. */ #define NUMPAGES 64 * 1024 #define PAGESIZE 64 * 1024 #define PAGEBITS 16 diff --git a/sim/bfin/dv-bfin_mmu.h b/sim/bfin/dv-bfin_mmu.h index 2405f2818ba..408b392b686 100644 --- a/sim/bfin/dv-bfin_mmu.h +++ b/sim/bfin/dv-bfin_mmu.h @@ -21,6 +21,8 @@ #ifndef DV_BFIN_MMU_H #define DV_BFIN_MMU_H +#undef PAGE_SIZE /* Cleanup system headers. */ + void mmu_check_addr (SIM_CPU *, bu32 addr, bool write, bool inst, int size); void mmu_check_cache_addr (SIM_CPU *, bu32 addr, bool write, bool inst); void mmu_process_fault (SIM_CPU *, bu32 addr, bool write, bool inst, bool unaligned, bool miss); diff --git a/sim/rx/mem.h b/sim/rx/mem.h index a4c7455a20d..15bb5573fae 100644 --- a/sim/rx/mem.h +++ b/sim/rx/mem.h @@ -37,6 +37,8 @@ void init_mem (void); void mem_usage_stats (void); unsigned long mem_usage_cycles (void); +#undef PAGE_SIZE /* Cleanup system headers. */ + /* rx_mem_ptr returns a pointer which is valid as long as the address requested remains within the same page. */ #define PAGE_BITS 12