[packages] tor[-alpha] add fix to compile with SSP support
authortripolar <tripolar@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 8 Nov 2013 19:34:44 +0000 (19:34 +0000)
committertripolar <tripolar@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 8 Nov 2013 19:34:44 +0000 (19:34 +0000)
without this fix the compile ends with:

tor-resolve.o: relocation R_MIPS_26 against `puts' can not be used when making a shared objec$
tor-resolve.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[8]: *** [tor-resolve] Error 1

Signed-off-by: Peter Wagner <tripolar@gmx.at>
git-svn-id: svn://svn.openwrt.org/openwrt/packages@38694 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/tor-alpha/Makefile
net/tor/Makefile

index 6e6e698..8824ab1 100644 (file)
@@ -86,15 +86,17 @@ CONFIGURE_ARGS += \
 ifneq ($(CONFIG_SSP_SUPPORT),y)
        CONFIGURE_ARGS += \
                --disable-gcc-hardening
+       MAKE_FLAGS += \
+               CFLAGS="$(TARGET_CFLAGS)"
+else
+       MAKE_FLAGS += \
+               CFLAGS="$(TARGET_CFLAGS) -fPIC"
+
 endif
 
 CONFIGURE_VARS += \
        CROSS_COMPILE="yes"
 
-# pass CFLAGS again to override -O2 set by configure
-MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS)"
-
 define Package/tor-alpha/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor $(1)/usr/sbin/
index faa72da..7d24616 100644 (file)
@@ -84,15 +84,16 @@ CONFIGURE_ARGS += \
 ifneq ($(CONFIG_SSP_SUPPORT),y)
        CONFIGURE_ARGS += \
                --disable-gcc-hardening
+       MAKE_FLAGS += \
+               CFLAGS="$(TARGET_CFLAGS)"
+else
+       MAKE_FLAGS += \
+               CFLAGS="$(TARGET_CFLAGS) -fPIC" 
 endif
 
 CONFIGURE_VARS += \
        CROSS_COMPILE="yes"
 
-# pass CFLAGS again to override -O2 set by configure
-MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS)"
-
 define Package/tor/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor $(1)/usr/sbin/