[PATCH] cpukit: Move zlib into librtemcpu.a and do not install libz.a.

Chris Johns chrisj at rtems.org
Thu Sep 18 22:26:34 UTC 2014


On 18/09/2014 11:05 pm, Ralf Corsepius wrote:
> On 09/17/2014 02:26 AM, Chris Johns wrote:
>> The JFFS2 file system can optionally use zlib as a compressor and
>> if this is the only reference to zlib the application will not link.
> Moving libz.a into librtemscpu.a is not a wise idea.

Why ? RTEMS is one source tree that must be built together and used as 
one so the idea of splitting libraries is counter to this. Yes years ago 
the separated libraries helped the link speed but those days are long gone.

The zlib source not a separate package built separately and it can be 
argued the separation of this and other libraries without any specific 
versioning between them is bug and a big one.

>
>> Adding -lz does not work because librtemscpu.a is added to the end of
>> ld's command line via the bsp_specs hack and user added libraries
>> appear before this.
> That's simply a bug somewhere. You should fix it.

Yes using bsp_specs is simply a bug and a hack however it is too late to 
fix for 4.11 and RTEMS has dependences on these libraries so we need a 
solution.

I looked into removing bsp_specs about 18months ago and saw no clear 
alternative without ripping out the build system and breaking all 
applications. That can happen after 4.11 has been released.

There is a solution on the table that I am ok with for 4.11. It is not 
pretty or nice but it solves the current problem with little impact to 
users. If you have another solution in mind please provide a tested patch.

Chris



More information about the devel mailing list