This is the mail archive of the cygwin-developers mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: speclib vs. -lc trouble.

Dave Korn wrote:
> Christopher Faylor wrote:
>> On Sun, Apr 12, 2009 at 06:35:29PM +0100, Dave Korn wrote:
>>> Dave Korn wrote:
>>>> Chris Faylor wrote:
>>>>> I could reproduce the problem and am in the process of testing a fix.
>>>>> [snip]
>>>>> I'll check something in shortly.
>>> Howzat going?  I see you've checked some stuff in but I'm still running
>>> on yesterday's CVS.
>> What is now in CVS represents the fix that I said I would check in.
>> cgf
>   Currently bootstrapping and testing everything.  It built ok and the
> generated library passed the ld-bootstrap test, so I've installed that build
> and am now going to build new binutils, rebuild winsup using them, and make
> sure it all still works.

  Been through several cycles now and everything is working, the new static
libs seem absolutely fine.  I think we've finally put this one to bed!

  Also, I've discovered one remaining weakness in the new coff long section
name handling in upstream binutils (objcopy doesn't yet have a way to tell it
to generate long section names).  With the patch I'm about to submit for that,
it's now possible to use CVS binutils as well as distro binutils to
successfully bootstrap the lot.

  One slight catch: recent libbfds have grown a dependency on zlib, as they
can natively handle compressed files.  This broke the build for dumper.exe,
which uses libbfd.  The attached patch adds libz unconditionally, as it won't
do any harm with older libbfds that don't need it, and because it's a
bog-standard package that's easily available everywhere, so I didn't see the
need to go to great lengths to only require it if the installed libbfd is
sufficiently new to actually need it.  Anyone building winsup from source
would probably have zlib-devel installed already anyway.



	* (libz):  New makefile variable.
	(build_dumper):  Test it was correctly set.
	(dumper.exe):  Use it.

? winsup/cygwin/include/stdint-h.diff
Index: winsup/utils/
RCS file: /cvs/src/src/winsup/utils/,v
retrieving revision 1.82
diff -p -u -r1.82
--- winsup/utils/	18 Mar 2009 04:19:05 -0000	1.82
+++ winsup/utils/	13 Apr 2009 15:07:21 -0000
@@ -81,14 +81,16 @@ ldh.exe: MINGW_LDFLAGS := -nostdlib -lke
 # Check for dumper's requirements and enable it if found.
 LIBICONV := @libiconv@
 libbfd   := ${shell $(CC) -B$(bupdir2)/bfd/ --print-file-name=libbfd.a}
+# Recent libbfd requires libz as it handles compressed files.
+libz     := ${shell $(CC) -B$(bupdir2)/zlib/ --print-file-name=libz.a}
 libintl  := ${shell $(CC) -B$(bupdir2)/intl/ --print-file-name=libintl.a}
-build_dumper := ${shell test -r $(libbfd) -a -r $(libintl) -a -n "$(LIBICONV)" && echo 1}
+build_dumper := ${shell test -r $(libbfd) -a -r $(libz) -a -r $(libintl) -a -n "$(LIBICONV)" && echo 1}
 ifdef build_dumper
 CYGWIN_BINS += dumper.exe
 dumper.o module_info.o parse_pe.o: CXXFLAGS += -I$(bupdir2)/bfd -I$(updir1)/include
 dumper.o parse_pe.o: dumper.h
 dumper.exe: module_info.o parse_pe.o
-dumper.exe: ALL_LDFLAGS += ${libbfd} ${libintl} -L$(bupdir1)/libiberty $(LIBICONV) -liberty
+dumper.exe: ALL_LDFLAGS += ${libbfd} ${libintl} ${libz} -L$(bupdir1)/libiberty $(LIBICONV) -liberty
 all: warn_dumper

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]