public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Finding the SONAME for bzip2
@ 2010-10-13 15:15 Al
  2010-10-13 15:50 ` R: " Marco Atzeri
  2010-10-13 17:04 ` Charles Wilson
  0 siblings, 2 replies; 7+ messages in thread
From: Al @ 2010-10-13 15:15 UTC (permalink / raw)
  To: cygwin

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=-D_FILE_OFFSET_BITS=64
CFLAGS+=-fpic -fPIC -Wall -Winline $(BIGFILES)
SOEXT=so
SONAME=libbz2.${SOEXT}.1
SOLDFLAGS=-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 versioning:

CFLAGS+=-Wall
SONAME=
SOLDFLAGS=-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=lib${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

-- 
Caution crosser:  Runnig 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-13 18:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-13 15:15 Finding the SONAME for bzip2 Al
2010-10-13 15:50 ` R: " Marco Atzeri
2010-10-13 16:03   ` Al
2010-10-13 17:23     ` Charles Wilson
2010-10-13 18:19       ` Al
2010-10-13 17:04 ` Charles Wilson
2010-10-13 17:15   ` Al

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 read-only IMAP folder(s) and NNTP newsgroup(s).