openswan: Restore -fPIE to USERCOMPILE flags
authorMarkos Chandras <markos.chandras@imgtec.com>
Tue, 25 Jun 2013 15:14:36 +0000 (16:14 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 27 Jun 2013 18:51:48 +0000 (20:51 +0200)
The default USERCOMPILE variable uses -fPIE so we bring this back.
This also fixes linking problems for MIPS when non-PIC objects
are used to form a PIC one.

Fixes the following linking problem on MIPS:
connections.o: relocation R_MIPS_HI16 against `__gnu_local_gp'
can not be used when making a shared object; recompile with -fPIC

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/openswan/openswan.mk

index 8a857d4fa2a8da39456215ed67ac3231ce41711f..0b8e7d3a69a808ef12590f35342517ee24f2a65c 100644 (file)
@@ -11,7 +11,7 @@ OPENSWAN_LICENSE_FILES = COPYING LICENSE
 
 OPENSWAN_DEPENDENCIES = host-bison gmp iproute2
 OPENSWAN_MAKE_OPT = ARCH=$(BR2_ARCH) CC="$(TARGET_CC)" \
-       USERCOMPILE="$(TARGET_CFLAGS)" INC_USRLOCAL=/usr \
+       USERCOMPILE="$(TARGET_CFLAGS) -fPIE" INC_USRLOCAL=/usr \
        USE_KLIPS=false USE_MAST=false USE_NM=false
 
 ifeq ($(BR2_PACKAGE_LIBCURL),y)