It turned out that the linker was doing the wrong with the amalgamation library concerning weak stubs. A regression test has been added and new binaries have been uploaded to https://justine.lol/cosmopolitan/ Ideally this should be fixed by building a tool that turns multiple .a files into a single .a file with deduplication. As a workaround for now the cosmopolitan.a build is restructured to not include LIBC_STUBS which meant technical debt needed to be paid off where non-stub interfaces were moved to LIBC_INTRIN and LIBC_NEXGEN32E. Thank @PerfectProductions in #31 for the report!
56 lines
1.5 KiB
Makefile
56 lines
1.5 KiB
Makefile
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
|
|
#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘
|
|
|
|
LEMON = $(MKDIR) $(@D) && ACTION="LEMON $@" build/do $(THIRD_PARTY_LEMON)
|
|
|
|
THIRD_PARTY_LEMON = o/$(MODE)/third_party/lemon/lemon.com.dbg
|
|
|
|
THIRD_PARTY_LEMON_OBJS = \
|
|
o/$(MODE)/third_party/lemon/lemon.o \
|
|
o/$(MODE)/third_party/lemon/lempar.c.txt.zip.o
|
|
|
|
THIRD_PARTY_LEMON_COMS = \
|
|
o/$(MODE)/third_party/lemon/lemon.com
|
|
|
|
THIRD_PARTY_LEMON_LINK = \
|
|
$(THIRD_PARTY_LEMON_DEPS) \
|
|
o/$(MODE)/third_party/lemon/%.o \
|
|
$(CRT) \
|
|
$(APE)
|
|
|
|
THIRD_PARTY_LEMON_DIRECTDEPS = \
|
|
LIBC_ALG \
|
|
LIBC_CALLS \
|
|
LIBC_FMT \
|
|
LIBC_INTRIN \
|
|
LIBC_MEM \
|
|
LIBC_NEXGEN32E \
|
|
LIBC_RUNTIME \
|
|
LIBC_STDIO \
|
|
LIBC_STR \
|
|
LIBC_STUBS \
|
|
LIBC_UNICODE \
|
|
LIBC_X \
|
|
LIBC_ZIPOS \
|
|
THIRD_PARTY_GDTOA
|
|
|
|
THIRD_PARTY_LEMON_DEPS := \
|
|
$(call uniq,$(foreach x,$(THIRD_PARTY_LEMON_DIRECTDEPS),$($(x))))
|
|
|
|
o/$(MODE)/third_party/lemon/lemon.pkg: \
|
|
$(THIRD_PARTY_LEMON_OBJS) \
|
|
$(foreach x,$(THIRD_PARTY_LEMON_DIRECTDEPS),$($(x)_A).pkg)
|
|
|
|
o/$(MODE)/third_party/lemon/lemon.com.dbg: \
|
|
$(THIRD_PARTY_LEMON_DEPS) \
|
|
o/$(MODE)/third_party/lemon/lemon.pkg \
|
|
o/$(MODE)/third_party/lemon/lemon.o \
|
|
o/$(MODE)/third_party/lemon/lempar.c.txt.zip.o \
|
|
$(CRT) \
|
|
$(APE)
|
|
-@$(APELINK)
|
|
|
|
.PHONY: o/$(MODE)/third_party/lemon
|
|
o/$(MODE)/third_party/lemon: \
|
|
o/$(MODE)/third_party/lemon/lemon.com
|