* [Buildroot] [PATCH] zlib: fix shared lib logic for static-only targets
@ 2010-11-20 2:35 Mike Frysinger
2010-11-20 3:45 ` [Buildroot] [PATCH v2] " Mike Frysinger
0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2010-11-20 2:35 UTC (permalink / raw)
To: buildroot
FLAT targets only support static libraries. The zlib code atm though
assumes a libz.so is always created. So have the install target check
to see if libz.so exists before trying to install it.
While we're here, also punt the package-local stripping.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
package/zlib/zlib.mk | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/package/zlib/zlib.mk b/package/zlib/zlib.mk
index 751cfc1..a4da4fa 100644
--- a/package/zlib/zlib.mk
+++ b/package/zlib/zlib.mk
@@ -72,8 +72,9 @@ endif
define ZLIB_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/usr/lib
- cp -dpf $(@D)/libz.so* $(TARGET_DIR)/usr/lib
- -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libz.so*
+ if [ -e "$(@D)/libz.so" ]; then \
+ cp -dpf $(@D)/libz.so* $(TARGET_DIR)/usr/lib; \
+ fi
$(INSTALL) -D $(@D)/libz.a $(TARGET_DIR)/usr/lib/libz.a
$(ZLIB_INSTALL_TARGET_HEADERS)
endef
--
1.7.3.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] zlib: fix shared lib logic for static-only targets
2010-11-20 2:35 [Buildroot] [PATCH] zlib: fix shared lib logic for static-only targets Mike Frysinger
@ 2010-11-20 3:45 ` Mike Frysinger
2010-11-24 15:24 ` Peter Korsgaard
0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2010-11-20 3:45 UTC (permalink / raw)
To: buildroot
FLAT targets only support static libraries. The zlib code atm though
assumes a libz.so is always created. So have the targets check to see
if libz.so exists before trying to work with it.
While we're here, also punt the package-local stripping.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
v2
- fix all install targets
package/zlib/zlib.mk | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/package/zlib/zlib.mk b/package/zlib/zlib.mk
index 751cfc1..759ab1f 100644
--- a/package/zlib/zlib.mk
+++ b/package/zlib/zlib.mk
@@ -53,14 +53,18 @@ define ZLIB_INSTALL_STAGING_CMDS
$(INSTALL) -D $(@D)/libz.a $(STAGING_DIR)/usr/lib/libz.a
$(INSTALL) -D $(@D)/zlib.h $(STAGING_DIR)/usr/include/zlib.h
$(INSTALL) $(@D)/zconf.h $(STAGING_DIR)/usr/include/
- cp -dpf $(@D)/libz.so* $(STAGING_DIR)/usr/lib/
+ if [ -e "$(@D)/libz.so" ]; then \
+ cp -dpf $(@D)/libz.so* $(STAGING_DIR)/usr/lib/; \
+ fi
endef
define HOST_ZLIB_INSTALL_CMDS
$(INSTALL) -D $(@D)/libz.a $(HOST_DIR)/usr/lib/libz.a
$(INSTALL) -D $(@D)/zlib.h $(HOST_DIR)/usr/include/zlib.h
$(INSTALL) $(@D)/zconf.h $(HOST_DIR)/usr/include/
- cp -dpf $(@D)/libz.so* $(HOST_DIR)/usr/lib/
+ if [ -e "$(@D)/libz.so" ]; then \
+ cp -dpf $(@D)/libz.so* $(HOST_DIR)/usr/lib/; \
+ fi
endef
ifeq ($(BR2_HAVE_DEVFILES),y)
@@ -72,8 +76,9 @@ endif
define ZLIB_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/usr/lib
- cp -dpf $(@D)/libz.so* $(TARGET_DIR)/usr/lib
- -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libz.so*
+ if [ -e "$(@D)/libz.so" ]; then \
+ cp -dpf $(@D)/libz.so* $(TARGET_DIR)/usr/lib; \
+ fi
$(INSTALL) -D $(@D)/libz.a $(TARGET_DIR)/usr/lib/libz.a
$(ZLIB_INSTALL_TARGET_HEADERS)
endef
--
1.7.3.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] zlib: fix shared lib logic for static-only targets
2010-11-20 3:45 ` [Buildroot] [PATCH v2] " Mike Frysinger
@ 2010-11-24 15:24 ` Peter Korsgaard
2010-11-24 18:56 ` Sergio Monteiro Basto
0 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2010-11-24 15:24 UTC (permalink / raw)
To: buildroot
>>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes:
Mike> FLAT targets only support static libraries. The zlib code atm though
Mike> assumes a libz.so is always created. So have the targets check to see
Mike> if libz.so exists before trying to work with it.
Mike> While we're here, also punt the package-local stripping.
Thanks, but I prefer to simply use zlib's own 'make install' instead,
instead of repeating these steps 3 times. I've committed a change to do
so in git.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] zlib: fix shared lib logic for static-only targets
2010-11-24 15:24 ` Peter Korsgaard
@ 2010-11-24 18:56 ` Sergio Monteiro Basto
2010-11-24 19:59 ` Peter Korsgaard
0 siblings, 1 reply; 5+ messages in thread
From: Sergio Monteiro Basto @ 2010-11-24 18:56 UTC (permalink / raw)
To: buildroot
On Wed, 2010-11-24 at 16:24 +0100, Peter Korsgaard wrote:
> >>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes:
>
> Mike> FLAT targets only support static libraries. The zlib code atm though
> Mike> assumes a libz.so is always created. So have the targets check to see
> Mike> if libz.so exists before trying to work with it.
>
> Mike> While we're here, also punt the package-local stripping.
>
> Thanks, but I prefer to simply use zlib's own 'make install' instead,
> instead of repeating these steps 3 times. I've committed a change to do
> so in git.
hum there is a bug here in git ...
cd /home/sergio/hardware/moviecube/buildroot/output/build/zlib-1.2.5
/usr/bin/make -j1
-C /home/sergio/hardware/moviecube/buildroot/output/build/zlib-1.2.5
DESTDIR=/home/sergio/hardware/moviecube/buildroot/output/target install
make: Entering directory
`/home/sergio/hardware/moviecube/buildroot/output/build/zlib-1.2.5'
cp
libz.a /home/sergio/hardware/moviecube/buildroot/output/target/home/sergio/hardware/moviecube/buildroot/output/staging/usr/lib
cp libz.a to output/staging/ instead output/target ?
no worst , /home/sergio/hardware/moviecube/buildroot/output/target/
more /home/sergio/hardware/moviecube/buildroot/output/staging/usr/lib
Best regards,
--
S?rgio M. B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3309 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101124/2eb49216/attachment.bin>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] zlib: fix shared lib logic for static-only targets
2010-11-24 18:56 ` Sergio Monteiro Basto
@ 2010-11-24 19:59 ` Peter Korsgaard
0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2010-11-24 19:59 UTC (permalink / raw)
To: buildroot
>>>>> "Sergio" == Sergio Monteiro Basto <sergio@sergiomb.no-ip.org> writes:
Hi,
Sergio> hum there is a bug here in git ...
Sergio> cd /home/sergio/hardware/moviecube/buildroot/output/build/zlib-1.2.5
Sergio> /usr/bin/make -j1
Sergio> -C /home/sergio/hardware/moviecube/buildroot/output/build/zlib-1.2.5
Sergio> DESTDIR=/home/sergio/hardware/moviecube/buildroot/output/target install
Sergio> make: Entering directory
Sergio> `/home/sergio/hardware/moviecube/buildroot/output/build/zlib-1.2.5'
Sergio> cp
Sergio> libz.a /home/sergio/hardware/moviecube/buildroot/output/target/home/sergio/hardware/moviecube/buildroot/output/staging/usr/lib
Crap, that's because of the --libdir=$(STAGING_DIR).. I'm afraid I
tested it without that line and added it back later, will fix asap.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-11-24 19:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-20 2:35 [Buildroot] [PATCH] zlib: fix shared lib logic for static-only targets Mike Frysinger
2010-11-20 3:45 ` [Buildroot] [PATCH v2] " Mike Frysinger
2010-11-24 15:24 ` Peter Korsgaard
2010-11-24 18:56 ` Sergio Monteiro Basto
2010-11-24 19:59 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox