From: Sean Nyekjaer <sean@geanix.com>
To: Ross Burton <Ross.Burton@arm.com>
Cc: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>,
"denis@denix.org" <denis@denix.org>,
Richard Purdie <richard.purdie@linuxfoundation.org>,
Khem Raj <raj.khem@gmail.com>
Subject: Re: [OE-core] [PATCH v2 1/2] zlib: split SRC_URI into inc file
Date: Mon, 8 Aug 2022 12:20:09 +0200 [thread overview]
Message-ID: <20220808102009.ktrplj7e4eif2k7c@Seans-MBP.hinnerup> (raw)
In-Reply-To: <FAA024DD-6837-47D2-A00C-A37B146CA2D9@arm.com>
On Mon, Jul 18, 2022 at 04:12:25PM +0000, Ross Burton wrote:
> This still seems overkill. You can build minizip from inside the zlib recipe by fixing the minizip Makefile (fix posted to https://github.com/madler/zlib/pull/681) and then adding one line to do_compile:
>
> oe_runmake -C contrib/minizip CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
>
> A corresponding manual do_install too, obviously.
>
> Ross
>
Hi Ross,
Thanks for the patch :)
However this will create a minizip that is statically linked with zlib :(
Guess we need to add some more to the Makefile (or just use the
autotools generated one)
Something along this:
diff --git a/contrib/minizip/Makefile b/contrib/minizip/Makefile
index 4a0465f..cf9e79a 100644
--- a/contrib/minizip/Makefile
+++ b/contrib/minizip/Makefile
@@ -1,13 +1,26 @@
CPPFLAGS = -I../..
-UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
-ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a
+libminizip_so_SOURCES = \
+ ioapi.c \
+ mztools.c \
+ unzip.c \
+ zip.c
-all: miniunz minizip
+miniunzip_SOURCES = miniunz.c
+miniunzip_LDADD = libminizip.so
+minizip_SOURCES = minizip.c
+minizip_LDADD = libminizip.so -lz
-miniunz: $(UNZ_OBJS)
+all: libminizip.so miniunz minizip
-minizip: $(ZIP_OBJS)
+libminizip.so:
+ $(CC) -fPIC -shared $(libminizip_so_SOURCES) -o libminizip.so
+
+miniunz: libminizip.so
+ $(CC) $(miniunzip_SOURCES) $(miniounzip_LDADD) -o miniunz
+
+minizip: libminizip.so
+ $(CC) $(minizip_SOURCES) $(minizip_LDADD) -o minizip
test: miniunz minizip
@rm -f test.*
Or?
/Sean
next prev parent reply other threads:[~2022-08-08 10:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 11:55 [OE-core] [PATCH v2 1/2] zlib: split SRC_URI into inc file Sean Nyekjaer
2022-07-15 11:55 ` [OE-core] [PATCH v2 2/2] zlib: minizip: add recipe Sean Nyekjaer
2022-07-18 16:12 ` [OE-core] [PATCH v2 1/2] zlib: split SRC_URI into inc file Ross Burton
2022-08-08 10:20 ` Sean Nyekjaer [this message]
2022-08-25 7:33 ` Sean Nyekjaer
2022-07-23 12:27 ` Alexandre Belloni
2022-07-23 12:28 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220808102009.ktrplj7e4eif2k7c@Seans-MBP.hinnerup \
--to=sean@geanix.com \
--cc=Ross.Burton@arm.com \
--cc=denis@denix.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
--cc=richard.purdie@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).