X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 Date: Wed, 13 Oct 2010 17:15:45 +0200 Message-ID: Subject: Finding the SONAME for bzip2 From: Al To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hello, I want to adapt the Makefile of bzip2 for cygwin and I want to understand enough of what I am doing. This are the lines of interest from the Linux Makefile: 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) $(CC) $(LDFLAGS) $(SOLDFLAGS) -o libbz2.${SOEXT}.1.0.5 $(OBJS) $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.${SOEXT}.1.0.5 What would by the appropriate adaption for Cygwin? I would try with this as a bare minimum, but then I loose all the versionin= g: CFLAGS+=3D-Wall SONAME=3D SOLDFLAGS=3D-shared $(CC) $(LDFLAGS) $(SOLDFLAGS) -o cygbz2.dll $(OBJS) $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c cygbz2.dll Then the cygwin doc [1] suggests some other flags but no soname at all: gcc -shared -o cyg${module}.dll \ -Wl,--out-implib=3Dlib${module}.dll.a \ -Wl,--export-all-symbols \ -Wl,--enable-auto-import \ -Wl,--whole-archive ${old_libs} \ -Wl,--no-whole-archive ${dependency_libs} Al [1] http://www.cygwin.com/cygwin-ug-net/dll.html --=20 Caution crosser: =A0Runnig Gentoo/Prefix on Cygwin/Vista. All stupid questions are related to that context. -- 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