[PATCH] Fix relocation error on OpenBSD (amd64) when compiling with pcc

From: sin <sin_AT_2f30.org>
Date: Sun, 27 Oct 2013 10:15:45 +0000

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': _AT_pcc -o basename basename.o util.a -g)
*** Error 1 in /home/sin/repos/sbase (Makefile:104 'binlib')
---
 config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.mk b/config.mk
index a3ffc4d..6441d6b 100644
--- a/config.mk
+++ b/config.mk
_AT_@ -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
-- 
1.8.3.4
--Q68bSM7Ycu6FN28Q--
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 27 2013 - 11:36:02 CET