[hackers] [sbase][PATCH] Call C compiler for linking

From: Shiz <hi_AT_shiz.me>
Date: Sat, 1 Aug 2015 00:09:40 +0200

Using $(LD) directly for linking can cause issues with cross-compilers
and various other toolchains, as various libraries such as libc may not
be implicitly linked in, causing symbol resolution errors.
Linking through the C compiler frontend solves this issue.
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index aa129a8..7194ade 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -168,7 +168,7 @@ $(BIN): $(LIB) $(@:=.o)
 $(OBJ): $(HDR) config.mk
 
 .o:
-	$(LD) $(LDFLAGS) -o $_AT_ $< $(LIB)
+	$(CC) $(LDFLAGS) -o $_AT_ $< $(LIB)
 
 .c.o:
 	$(CC) $(CFLAGS) $(CPPFLAGS) -o $_AT_ -c $<
-- 
2.4.6
Received on Sat Aug 01 2015 - 00:09:40 CEST

This archive was generated by hypermail 2.3.0 : Sat Aug 01 2015 - 00:12:27 CEST