[PATCH] cpukit: Move zlib into librtemcpu.a and do not install libz.a.
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Sep 17 06:26:35 UTC 2014
On 17/09/14 07:51, Chris Johns wrote:
> On 17/09/2014 3:30 pm, Sebastian Huber wrote:
>> On 17/09/14 02:26, 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.
>>>
>>> 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.
>>
>> If we remove libz.a then this will break all application Makefiles, that
>> assume that RTEMS provides it. I would still provide libz.a.
>>
>
> Will the linker complain if the symbols are in 2 separate archives ?
Since the object files are identical it doesn't matter.
>
> To me this will appear confusing and result in questions about which is which
> and why there are 2 copies.
Yes, it is confusing and brittle, but it doesn't break user Makefiles.
Another option would be to patch GCC:
diff --git a/gcc/config/rtems.h b/gcc/config/rtems.h
index f14aed3..8f9fa1e 100644
--- a/gcc/config/rtems.h
+++ b/gcc/config/rtems.h
@@ -44,7 +44,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If
not, see
#undef LIB_SPEC
#define LIB_SPEC "%{!qrtems: " STD_LIB_SPEC "} " \
"%{!nostdlib: %{qrtems: --start-group \
- -lrtemsbsp -lrtemscpu \
+ -lrtemsbsp -lrtemscpu -lz \
-lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}"
#define TARGET_POSIX_IO
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list