Add -fPIC to CFLAGS. Fixes SSP build, which otherwise breaks in configure: cc1: warning: command line option '-fpermissive' is valid for C++/ObjC++ but not for C ld: /var/tmp//ccfWqlYy.o: warning: relocation against `__stack_chk_fail' in readonly section `.text.startup' ld: /var/tmp//ccfWqlYy.o: relocation R_X86_64_PC32 against symbol `__stack_chk_fail' can not be used when making a shared object; recompile with -fPIC ld: final link failed: Bad value configure: failed program was: #line 10722 "configure" #include "confdefs.h" int main() { ; return 0; } configure: error: --enable-pie requires PIE support from the linker.diff -r1.18 -r1.19 pkgsrc/security/tor-browser/Makefile
(wiz)
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2017/09/08 02:38:43 ryoon Exp $
+# $NetBSD: Makefile,v 1.19 2017/09/10 17:11:47 wiz Exp $
TORBVER= 6.0.8
@@ -41,6 +41,7 @@
CONFIGURE_ARGS+= --enable-tor-data-in-home-dir
CFLAGS+= -DTOR_BROWSER_DATA_IN_HOME_DIR=1
CFLAGS+= -DTOR_BROWSER_DATA_OUTSIDE_APP_DIR=1
+CFLAGS+= -fPIC
# Avoid build failure from security/manager/ssl/src/nsNSSCallbacks.cpp:601
CFLAGS+= -fpermissive