The code cleanup now sets DYLD_LIBRARY_PATH this way in Makefile:
NATIVE_TARGET = $(ARCH)
ifdef CONFIG_OSX
NATIVE_TARGET = $(ARCH)-osx
ifneq ($(CC_NAME),tcc)
LDFLAGS += -flat_namespace -undefined warning
endif
export MACOSX_DEPLOYMENT_TARGET := 10.6
export DYLD_LIBRARY_PATH := $(CURDIR)/$(TOP)
endif
It is still unclear why it does not work but on macOS, ./configure
-disable-static
Now raises an error:
------------ hello-exe ------------
=== recurse /Users/jullien/tinycc/tests/.. ===
dyld: Library not loaded: libtcc.dylib
Referenced from: /Users/jullien/tinycc/tests/../tcc
Reason: image not found
Tracing a little bit with:
hello-exe: ../examples/ex1.c
@echo ------------ $@ ------------
@echo === recurse $(DYLD_LIBRARY_PATH) ===
$(TCC) $< -o hello$(EXESUF) && ./hello$(EXESUF) || $(DUMPTCC)
Shows that DYLD_LIBRARY_PATH is correctly set:
------------ hello-exe ------------
=== recurse /Users/jullien/tinycc/tests/.. ===
dyld: Library not loaded: libtcc.dylib
Referenced from: /Users/jullien/tinycc/tests/../tcc
Only this change (similar to what it was before cleanup) makes it run:
hello-exe: ../examples/ex1.c
@echo ------------ $@ ------------
@echo === recurse $(DYLD_LIBRARY_PATH) ===
DYLD_LIBRARY_PATH=$(DYLD_LIBRARY_PATH) $(TCC) $< -o hello$(EXESUF)
&& ./hello$(EXESUF) || $(DUMPTCC)
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel