Fix builds on latest clang - #13
Conversation
|
Mentioning @wscott for visibility |
|
Yeah, I saw it the first time, but haven't gotten around to trying this out. |
|
Ah, sorry for the ping then. I included the full zlib sources since that's what was previously included in the |
wscott
left a comment
There was a problem hiding this comment.
You should be able to do a build on MacOS in a fresh clone by only typing make in the src subdir.
These are the fixes I noticed. I was going to just push changes but I don't think I can.
| ifeq ($(shell uname -s), Darwin) | ||
| XLIBS += -lresolv | ||
| G += -DNOPROC | ||
| WARNINGS += |
There was a problem hiding this comment.
This line is pointless and in fact the whole block can be removed because it already happens in mkconf.sh
There was a problem hiding this comment.
This was not the original Makefile, but a wrapper used by the larger build. You shouldn't be building this yourself.
For me this worked:
zlib.fake:
$(MAKE) -C.. zlib
ZLIB_OBJS = $(patsubst %,zlib/%, \
adler32.o \
compress.o crc32.o \
deflate.o \
infback.o inffast.o inflate.o inftrees.o \
trees.o \
uncompr.o \
zutil.o)
ZLIB_HDRS = $(patsubst %,zlib/%, \
crc32.h deflate.h gzguts.h inffast.h inffixed.h inflate.h \
inftrees.h trees.h zconf.h zlib.h zutil.h \
)
zlib: $(ZLIB_OBJS)
This PR fixes builds on the latest clang versions. Tested and verified on MacOS 26. zlib needs to be updated since the previously included 1.1.4 no longer builds.