Jens Staal
2015-02-05 15:23:46 UTC
Hi
I have been able to build busybox for both Win32 and Linux using Open Watcom
(v2), but the build still depends on gcc as HOSTCC. While trying to use owcc
as HOSTCC, the binary "conf" crashes with a core dump (SIGSEGV).
running wd on "conf" built with -g3 identifies the following function
failing at the "if (!f && name[0] != '/')" :
/*
* Try to open specified file with following names:
* ./name
* $(srctree)/name
* The latter is used when srctree is separate from objtree
* when compiling the kernel.
* Return NULL if file is not found.
*/
FILE *zconf_fopen(const char *name)
{
char *env;
FILE *f;
f = (const char*) fopen(name, "r");
if (!f && name[0] != '/') {
env = getenv(SRCTREE);
if (env) {
char *fullname = alloca( strlen(env) +
strlen(name) + 2 );
sprintf(fullname, "%s/%s", env, name);
f = fopen(fullname, "r");
}
}
return f;
}
according to wd is both f and name NULL.
Any way to solve this?
I have been able to build busybox for both Win32 and Linux using Open Watcom
(v2), but the build still depends on gcc as HOSTCC. While trying to use owcc
as HOSTCC, the binary "conf" crashes with a core dump (SIGSEGV).
running wd on "conf" built with -g3 identifies the following function
failing at the "if (!f && name[0] != '/')" :
/*
* Try to open specified file with following names:
* ./name
* $(srctree)/name
* The latter is used when srctree is separate from objtree
* when compiling the kernel.
* Return NULL if file is not found.
*/
FILE *zconf_fopen(const char *name)
{
char *env;
FILE *f;
f = (const char*) fopen(name, "r");
if (!f && name[0] != '/') {
env = getenv(SRCTREE);
if (env) {
char *fullname = alloca( strlen(env) +
strlen(name) + 2 );
sprintf(fullname, "%s/%s", env, name);
f = fopen(fullname, "r");
}
}
return f;
}
according to wd is both f and name NULL.
Any way to solve this?