A quick experiment reveals that this hack is needed for C code - simply removing this hack entirely breaks the build of libstdc++, since regs.h (more accurately, the cpu-specific header it pulls in) defines structs in terms of types from vxTypesOld. Those definitions are properly guarded by #ifndef _ASMLANGUAGE, but the cpu-files do not take care to include vxTypesOld.h for the types they depend on. But when using regs.h from some assembly file, the assembler chokes on the typedefs in vxTypesOld.h. We can fix that by guarding the include of vxTypesOld by !_ASMLANGUAGE. This should not affect existing C code. Now, the OS' regs.h contains preprocessor conditionals such as #if CPU_FAMILY==I960 ... #endif /* CPU_FAMILY==I960 */ #if CPU_FAMILY==MC680X0 ... #endif /* CPU_FAMILY==MC680X0 */ Without definitions of CPU_FAMILY, I960 etc., these would all be true, which will not end well. Code using the fix-included regs.h automatically get vxCpu.h via a chain of includes from vxTypesOld.h, but we can make regs.h a little more self-contained for both C and asm users by doing an explicit include of vxCpu.h. From-SVN: r265187
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
tests/base | Loading commit data... | |
ChangeLog | Loading commit data... | |
Makefile.in | Loading commit data... | |
README | Loading commit data... | |
README-fixinc | Loading commit data... | |
aclocal.m4 | Loading commit data... | |
check.tpl | Loading commit data... | |
config.h.in | Loading commit data... | |
configure | Loading commit data... | |
configure.ac | Loading commit data... | |
fixfixes.c | Loading commit data... | |
fixinc.in | Loading commit data... | |
fixincl.c | Loading commit data... | |
fixincl.tpl | Loading commit data... | |
fixincl.x | Loading commit data... | |
fixlib.c | Loading commit data... | |
fixlib.h | Loading commit data... | |
fixopts.c | Loading commit data... | |
fixtests.c | Loading commit data... | |
genfixes | Loading commit data... | |
inclhack.def | Loading commit data... | |
mkfixinc.sh | Loading commit data... | |
mkheaders.in | Loading commit data... | |
procopen.c | Loading commit data... | |
server.c | Loading commit data... | |
server.h | Loading commit data... | |
system.h | Loading commit data... |