Wolfgang Lux wrote:
I haven't tried this for other apps, but for SWK+Vespucci the problem is one of initialization order (the same I've seen -- and fixed -- for StepTalk): The __objc_load function is called for libSimpleWebKit*before* libgnustep-base, which means that all protocol references in libSimpleWebKit are set to nil because the actual protocol classes are not yet known. And the problem here is the SimpleWebKit framework fails to list its depend libraries. This sloppy behavior used to work well on *ix (but not on Windows and not without extra flags on macOS either, although in the latter case gnustep-make adds them for you), but no more with version 2.x of the gnustep runtime. So it's important to add «target»_LIBRARIES_DEPEND_UPON += -lgnustep-base to all library and framework projects to make them compatible with clang+ng. In this particular case, adding SimpleWebKit_LIBRARIES_DEPEND_UPON += -lgnustep-base to Sources/GNUmakefile and recompiling SimpleWebKit from scratch should get you straight.
that's a little inconvenient, but makes sense. I wonder how much stuff needs to be fixed
I added (inside the subproject, not the top-level of the Framework): LIBRARIES_DEPEND_UPON = $(FND_LIBS) $(OBJC_LIBS)
Wolfgang PS Incidentally, I've noticed that you don't actually need to use gold: /usr/pkg/gnu/bin/ld.elf would work as well. Apparently the current NetBSD pkgsrc comes with a recent enough version of binutils where the issue with ld -r has been fixed.
I need it for libobjc2, not other stuff