tor[-alpha] add fix to compile with SSP support
authorPeter Wagner <​tripolar@gmx.at>
Fri, 8 Nov 2013 19:34:44 +0000 (19:34 +0000)
committerPeter Wagner <​tripolar@gmx.at>
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>
SVN-Revision: 38694

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

index 6e6e69893d949a5ccd55175bf116ce28642c0d32..8824ab10b55dde185009f595cb6dcc207c99f9ef 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 faa72da0dcd8c8e82e07608a16e81e2f16a3d68b..7d246166ffd8045ad4d80642a1bac4c7ee318b7a 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/