[hackers] [sbase] Call C compiler for linking || Shiz
commit 8d1ae98163e2e7b30c5d56de1cb8ea4082db1fbe
Author: Shiz <hi_AT_shiz.me>
AuthorDate: Sat Aug 1 00:09:40 2015 +0200
Commit: sin <sin_AT_2f30.org>
CommitDate: Fri Jul 31 23:15:42 2015 +0100
Call C compiler for linking
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.
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 $<
Received on Sat Aug 01 2015 - 00:15:49 CEST
This archive was generated by hypermail 2.3.0
: Sat Aug 01 2015 - 00:24:11 CEST