[openbeos] Re: static libs for drivers

> "Waldemar Kornewald" <Waldemar.Kornewald@xxxxxx> wrote:
> > > I don't know, if KernelStaticLibrary is the right rule. AFAIK it is
> > > intended for static libs for our kernel, while for the networking 
> > > stuff
> > > you will probably want to use BeOS for the time being.
> > >
> > > What you want to your Jamfile is:
> > >
> > >   SubDirCcFlags -D_KERNEL_MODE=1 -no-fpic ;
> > >   SubDirC++Flags -D_KERNEL_MODE=1 -no-fpic -fno-exceptions -fno-
> > > rtti ;
> > >
> > > The C++ flags disable exceptions and RTTI, if you don't want those.
> > > Unless I missed it, Axel hasn't put his cpp.{cpp,h} to public
> > > locations, so you will have to add also:
> > >
> > >   LOCATE_SOURCE += [ FDirName $(OBOS_TOP) src add-ons kernel
> > > file_systems bfs ] ;
> > >   SubDirHdrs [ FDirName $(OBOS_TOP) src add-ons kernel file_systems 
> > > bfs
> > > ] ;
> > >
> > > And add `cpp.cpp' to your list of sources.
> > 
> > Wow! :)
> > Would anyone like to add this to the Jamrules? :)
> 
> I've added a rule R5KernelStaticLibrary. It does basically set the 
> flags only, so you have to do the latter part anyway (beginning with 
> `LOCATE_SOURCE...').
> 
> > Which class should I use for lists and maps? Templates? This would 
> > make my
> > code very big...
> > Can I use BObjectList, at least? I do not like STL templates. The 
> > whole code
> > looks ugly...
> 
> I believe, you cannot use the STL in the kernel, for most parts of it 
> require a shared library (libstdc++.r4.so). BObjectList cannot be used 
> since its base class lives in libbe. So it doesn't look too good 
> regarding generic containers.
> 
> If you like, I can send you a generic List class (similar to BList, but 
> works also with non-pointer type members), a hacked version of 
> OpenHashTable from the Tracker sources including some fixes for 
> kernelland usage and using areas for storing its data, and a generic 
> AVL tree implementation, oh, and a simple doubly linked list. All 
> kernel tested.

Thank you very much. That would be very nice.

Waldemar

Other related posts: