| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <728415.12131.qm@web25503.mail.ukl.yahoo.com> |
| Date: | Wed, 13 Oct 2010 16:49:46 +0100 (BST) |
| From: | Marco Atzeri <marco_atzeri AT yahoo DOT it> |
| Subject: | R: Finding the SONAME for bzip2 |
| To: | cygwin AT cygwin DOT com |
| In-Reply-To: | <AANLkTi=3d=-DuL8xTHcg=L861zZv=xCZH=iy=DHU=hpN@mail.gmail.com> |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
--- Mer 13/10/10, Al ha scritto:
> Hello,
>=20
> I want to adapt the Makefile of bzip2 for cygwin and I want
> to
> understand enough of what I am doing.
have you checked the bzip2 source package for cygwin ?
I presume the mantainer already solved it
>=20
> This are the lines of interest from the Linux Makefile:
>=20
> BIGFILES=3D-D_FILE_OFFSET_BITS=3D64
> CFLAGS+=3D-fpic -fPIC -Wall -Winline $(BIGFILES)
> SOEXT=3Dso
> SONAME=3Dlibbz2.${SOEXT}.1
> SOLDFLAGS=3D-shared -Wl,-soname -Wl,$(SONAME)
>=20
> $(CC) $(LDFLAGS) $(SOLDFLAGS) -o libbz2.${SOEXT}.1.0.5
> $(OBJS)
usually we should have
-o cygbz2-1.dll
(as you can see on libbz2_1 package)
as the version is before the .dll
due to some windows limitations ;-)
> $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c
> libbz2.${SOEXT}.1.0.5
>=20
>=20
> What would by the appropriate adaption for Cygwin?
>=20
> I would try with this as a bare minimum, but then I loose
> all the versioning:
>=20
> CFLAGS+=3D-Wall
> SONAME=3D
> SOLDFLAGS=3D-shared
>=20
> $(CC) $(LDFLAGS) $(SOLDFLAGS) -o cygbz2.dll $(OBJS)
> $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c
> cygbz2.dll
>=20
> Then the cygwin doc [1] suggests some other flags but no
> soname at all:
>=20
> gcc -shared -o cyg${module}.dll \
> =A0 =A0 -Wl,--out-implib=3Dlib${module}.dll.a \
> =A0 =A0 -Wl,--export-all-symbols \
> =A0 =A0 -Wl,--enable-auto-import \
> =A0 =A0 -Wl,--whole-archive ${old_libs} \
> =A0 =A0 -Wl,--no-whole-archive ${dependency_libs}
>=20
> Al
>=20
> [1] http://www.cygwin.com/cygwin-ug-net/dll.html
>=20
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |