On 05/23/2012 02:03 PM, rbmj wrote:
OK, so I went into fixincludes/inclhack.def and added this rule:
/*
* This hack makes makes unistd.h more POSIX-compliant on VxWorks
*/
fix = {
hackname = vxworks_tasklib_regs;
files = taskLib.h;
test = " -r vxWorks.h ";
select = "#[\t ]*include[\t ]+<regs.h>";
c_fix = format;
c_fix_arg = "#include <arch/../regs.h>";
test_text = "`touch vxWorks.h taskLib.h`"
"#include <regs.h>\n";
};
I then ran genfixes and then went in to my build directory. I ran
make check. This was in fixincludes/test/inc/taskLib.h:
#if defined( VXWORKS_TASKLIB_REGS_CHECK )
#include <regs.h>
#endif /* VXWORKS_TASKLIB_REGS_CHECK */
and I saw this in tests/res/taskLib.h:
#if defined( VXWORKS_TASKLIB_REGS_CHECK )
#include <arch/../regs.h>
#endif /* VXWORKS_TASKLIB_REGS_CHECK */
So it looks good. I deleted the fixincludes subdir and then ran make.
However, when I get to libgcc:
In file included from ../../../gcc-4.7.0/libgcc/../gcc/regs.h:25:0,
from /usr/powerpc-wrs-vxworks/sys-include/taskLib.h:213,
from ../../../gcc-4.7.0/libgcc/config/vxlib.c
<errors />
These errors go away if i run sed -i.orig -e
's|<regs.h>|<arch/../regs.h>|' /usr/powerpc-wrs-vxworks/taskLib.h
So taskLib.h is still including regs.h, not arch/../regs.h like it
should. I go into the build directory, and type find | grep taskLib.
The only thing I get are the two in fixincludes/tests - there's no
file in GCC's build tree.
taskLib.h and vxWorks.h are in /usr/powerpc-wrs-vxworks/sys-include.
I configured gcc with the following command line:
../gcc-4.7.0/configure --prefix=/usr --target=powerpc-wrs-vxworks
--with-gnu-as --with-gnu-ld
--with-headers=../gccdist/WindRiver/vxworks-6.3/target/h
--disable-shared --disable-libssp --disable-multilib --with-float=hard
--enable-languages=c --enable-threads=vxworks --without-gconv
--disable-libgomp --disable-nls --disable-libmudflap --with-cpu-PPC603
What is the problem here? Do I need to manually specify to run
fixincludes?
Refine my question: anyone know why fixincludes does not appear to be
doing *anything*? I can't seem to find any fixed headers anywhere in
GCC's build tree. And the compile keeps failing...
Thanks,
Robert Mason