$NetBSD: patch-ab,v 1.6 2020/08/13 18:30:51 adam Exp $ Use --tag explicitly to always detect the correct compiler. See https://sourceforge.net/p/openjade/patches/48/ Include $(LDFLAGS) in linker arguments. --- Makefile.lib.in.orig 2002-01-22 11:57:53.000000000 +0000 +++ Makefile.lib.in @@ -23,7 +23,7 @@ Makefile.lt: echo 'LT_OBJS='`echo $(OBJS)|sed 's/\.o/.lo/g'` >Makefile.lt lib$(LIB).la: $(LT_OBJS) - $(LIBTOOL) --mode=link $(CC) $(LINKFLAGS) -o lib$(LIB).la $(LT_OBJS) \ + $(LIBTOOL) --mode=link --tag=CXX $(CXX) $(LINKFLAGS) $(LDFLAGS) -o lib$(LIB).la $(LT_OBJS) \ -rpath $(libdir) -version-info $(LTVERSION) $(DEPLIBS) install: