Cross-compiling L4Re for MIPS32

Paul Boddie paul at boddie.org.uk
Thu Jun 16 00:10:50 CEST 2016


On Wednesday 15. June 2016 23.30.47 Adam Lackorzynski wrote:
> On Tue Jun 14, 2016 at 00:42:11 +0200, Paul Boddie wrote:
> > On Tuesday 14. June 2016 00.16.35 Adam Lackorzynski wrote:
> > > On Mon Jun 13, 2016 at 12:50:07 +0200, Paul Boddie wrote:
> > > > I'm compiling in a Debian unstable chroot on i386. Are you still
> > > > using i386 to build with? Recent experiences with other projects
> > > > indicate that support for i386 sometimes falls behind amd64,
> > > > although I have no idea or immediate recollection why the unistd.h
> > > > behaviour changed as indicated above.
> > > 
> > > Although amd64 is in the majority, i386 is still in the game, and I've
> > > never seen this before. Also, __NR_open is not used directly, thus my
> > > question, where is it missing?
> > 
> > In src/l4/tool/gendep/syscall.c there is this include:
> > 
> > #include <unistd.h>
> > 
> > (There are actually two of them.) This header eventually includes the
> > following file:
> > 
> > /usr/include/asm-generic/unistd.h
> > 
> > This is provided by the following packages:
> > 
> > linux-libc-dev:i386, linux-libc-dev:mipsel
> > 
> > In the file in question, I see the following...
> > 
> > /*
> > 
> >  * All syscalls below here should go away really,
> >  * these are provided for both review and as a porting
> >  * help for the C library version.
> >  *
> >  * Last chance: are any of these important enough to
> >  * enable by default?
> >  */
> > 
> > #ifdef __ARCH_WANT_SYSCALL_NO_AT
> > #define __NR_open 1024
> > __SYSCALL(__NR_open, sys_open)
> > 
> > Now, I imagine that the "at-less" syscalls are deprecated (according to
> > some definition of the word, maybe only for the Linux people), but
> > perhaps this decision isn't exposed in other distributions. But I really
> > don't know why this is a problem only for me.
> 
> Please show the error messages you are seeing.

make O=mybuild config
scripts/kconfig/mconf  /home/paulb/L4-for-
MIPS/l4re.org/src/l4/mybuild/Kconfig.generated


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

scripts/kconfig/conf  --silentoldconfig /home/paulb/L4-for-
MIPS/l4re.org/src/l4/mybuild/Kconfig.generated
All build tools checked ok.
gcc -fPIC -Wall -pedantic -g -m32 -c /home/paulb/L4-for-
MIPS/l4re.org/src/l4/tool/gendep/syscall.c -o /home/paulb/L4-for-
MIPS/l4re.org/src/l4/mybuild/tool/gendep/syscall.32.o
mkdir -p /home/paulb/L4-for-MIPS/l4re.org/src/l4/mybuild/tool/gendep/32
gcc -m32 -shared -Wl,--no-as-needed -Wl,-soname,/home/paulb/L4-for-
MIPS/l4re.org/src/l4/mybuild/tool/gendep/32/libgendep.so -ldl -o 
/home/paulb/L4-for-MIPS/l4re.org/src/l4/mybuild/tool/gendep/32/libgendep.so 
/home/paulb/L4-for-MIPS/l4re.org/src/l4/mybuild/tool/gendep/deptrack.32.o 
/home/paulb/L4-for-MIPS/l4re.org/src/l4/mybuild/tool/gendep/syscall.32.o
gcc -fPIC -Wall -pedantic -g -m64 -c /home/paulb/L4-for-
MIPS/l4re.org/src/l4/tool/gendep/syscall.c -o /home/paulb/L4-for-
MIPS/l4re.org/src/l4/mybuild/tool/gendep/syscall.64.o
In file included from /usr/include/sys/syscall.h:31:0,
                 from /home/paulb/L4-for-
MIPS/l4re.org/src/l4/tool/gendep/syscall.c:21:
/home/paulb/L4-for-MIPS/l4re.org/src/l4/tool/gendep/syscall.c: In function 
'real_open':
/home/paulb/L4-for-MIPS/l4re.org/src/l4/tool/gendep/syscall.c:52:19: error: 
'__NR_open' undeclared (first use in this function)
   return (syscall(SYS_open, (fn), (flags), (mode)));
                   ^
/home/paulb/L4-for-MIPS/l4re.org/src/l4/tool/gendep/syscall.c:52:19: note: 
each undeclared identifier is reported only once for each function it appears 
in
/home/paulb/L4-for-MIPS/l4re.org/src/l4/tool/gendep/syscall.c: In function 
'real_unlink':
/home/paulb/L4-for-MIPS/l4re.org/src/l4/tool/gendep/syscall.c:172:18: error: 
'__NR_unlink' undeclared (first use in this function)
   return syscall(SYS_unlink, (fn));
                  ^
/home/paulb/L4-for-MIPS/l4re.org/src/l4/tool/gendep/syscall.c: In function 
'real_open':
/home/paulb/L4-for-MIPS/l4re.org/src/l4/tool/gendep/syscall.c:53:1: warning: 
control reaches end of non-void function [-Wreturn-type]
 }
 ^
/home/paulb/L4-for-MIPS/l4re.org/src/l4/tool/gendep/syscall.c: In function 
'real_unlink':
/home/paulb/L4-for-MIPS/l4re.org/src/l4/tool/gendep/syscall.c:173:1: warning: 
control reaches end of non-void function [-Wreturn-type]
 }
 ^
Makefile:48: recipe for target '/home/paulb/L4-for-
MIPS/l4re.org/src/l4/mybuild/tool/gendep/syscall.64.o' failed
make[4]: *** [/home/paulb/L4-for-
MIPS/l4re.org/src/l4/mybuild/tool/gendep/syscall.64.o] Error 1
Makefile:404: recipe for target 'libgendep' failed
make[3]: *** [libgendep] Error 2
Makefile:232: recipe for target 'DROPSCONF_CONFIG_MK_POST_HOOK' failed
make[2]: *** [DROPSCONF_CONFIG_MK_POST_HOOK] Error 2
mk/config.inc:122: recipe for target '/home/paulb/L4-for-
MIPS/l4re.org/src/l4/mybuild/.config.all' failed
make[1]: *** [/home/paulb/L4-for-MIPS/l4re.org/src/l4/mybuild/.config.all] 
Error 2
mk/config.inc:89: recipe for target 'config' failed
make: *** [config] Error 2




More information about the l4-hackers mailing list