building fiasco on alpine linux

Adam Lackorzynski adam at os.inf.tu-dresden.de
Mon Jun 27 00:49:10 CEST 2016


On Sat Jun 25, 2016 at 15:35:56 +0200, Michael Schnupp wrote:
> On Fri, Jun 24, 2016 at 12:05:43AM +0200, Adam Lackorzynski wrote:
> > 
> > I gave this a try with Alpine 3.4 and just the -fno-pic addition made it
> > compile for me. However, the error message while compiling was
> > different. Thus: Which version do you use?
> 
> I'm currently using a fresh install of the current Alpine 3.4. Everything is amd64.
> 
>   $ uname -a
>   Linux alpine 4.4.11-0-grsec #1-Alpine SMP Fri May 20 08:35:18 GMT 2016 x86_64 Linux
>   $ gcc --version
>   gcc (Alpine 5.3.0) 5.3.0

I had the same.

> I use am minimally configured fiasco from the current public snapshot.
> 
>   tar xf l4re-snapshot-2016060908.tar.bz2
>   make -C l4re-snapshot-2016060908/src/kernel/fiasco/ B=$PWD/fiasco
>   echo "CONFIG_AMD64=y" >fiasco/globalconfig.out
>   make -C fiasco olddefconfig
>   make -C fiasco V=0 SHARED_FLAGS=-fno-pic

Please use this instead of specifying SHARED_FLAGS on the command line.
Otherwise all of the flags that are set in the Makefiles are missing.

--- src/Makeconf
+++ src/Makeconf
@@ -129,6 +129,7 @@ L4ALL_INCDIR     	?= $(addprefix -I, $(PRIVATE_INCDIR))
 L4STD_INCDIR    	?= -nostdinc
 L4STD_INCDIR_LAST	?= -isystem $(GCCINCDIR)
 KERNEL_LDFLAGS		+= -gc-sections
+SHARED_FLAGS            += -fno-pic
 SHARED_FLAGS-gcc        += -fno-defer-pop
 # gcc #57845
 SHARED_FLAGS-gcc        += $(if $(filter sparc,$(CONFIG_XARCH)),,-freg-struct-return)


> If I replace '-fno-pic' with '-D__KERNEL__' it will no longer complain about the undefiend reference, but still complain about the trucated relocation.
> 
> It is no big problem if it does not compile on this kind of system.
> It only felt like there might be an easy fix.

It is :)


Adam



More information about the l4-hackers mailing list