commit 06d43e48328ce7e6e0eae70293f4e3a4fef417d5
parent b2a0362bf856138c3b78a976a2d851acfa6c8dfc
Author: sin <sin@2f30.org>
Date: Sun, 27 Oct 2013 10:15:45 +0000
Fix relocation error on OpenBSD (amd64) when compiling with pcc
ld: util.a(eprintf.o): relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC
util.a: could not read symbols: Bad value
*** Error 1 in . (Makefile:114 'basename': @pcc -o basename basename.o util.a -g)
*** Error 1 in /home/sin/repos/sbase (Makefile:104 'binlib')
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.mk b/config.mk
@@ -9,7 +9,7 @@ MANPREFIX = $(PREFIX)/share/man
#CC = musl-gcc
LD = $(CC)
CPPFLAGS = -D_BSD_SOURCE -D_GNU_SOURCE
-CFLAGS = -g -ansi -Wall -Wno-long-long -pedantic $(CPPFLAGS)
+CFLAGS = -g -ansi -Wall -Wno-long-long -pedantic -fPIC $(CPPFLAGS)
LDFLAGS = -g
#CC = tcc