From e10550a7319fb17dbe53fa05b75180b512f703ec Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Thu, 30 Jul 2015 14:21:08 +0200 Subject: [PATCH] Don't build everything with -fPIC -fPIC crashes our GCC on opensips' transformations.c on 32-bit platforms: > Compiling transformations.c > i686-pld-linux-gcc -O2 -fwrapv -pipe -Wformat -Werror=format-security -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i686 -fasynchronous-unwind-tables -mtune=pentium4 -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wcast-align -fPIC -DPKG_MALLOC -DSHM_MMAP -DUSE_MCAST -DDISABLE_NAGLE -DSTATISTICS -DHAVE_RESOLV_RES -DF_MALLOC -DNAME='"opensips"' -DVERSION='"2.1.0"' -DARCH='"i386"' -DOS='"linux"' -DCOMPILER='"i686-pld-linux-gcc 4.9.3"' -D__CPU_i386 -D__OS_linux -D__SMP_yes -DCFG_DIR='"/etc/opensips/"' -DVERSIONTYPE='"git"' -DTHISREVISION='"b365aed"' -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_EPOLL -DHAVE_SIGIO_RT -DHAVE_SELECT -c transformations.c -o transformations.o > transformations.c: In function 'tr_eval_paramlist': > transformations.c:1847:1: internal compiler error: in plus_constant, at explow.c:87 > } > ^ > Please submit a full bug report, > with preprocessed source if appropriate. > See for instructions. > Makefile.rules:25: recipe for target 'transformations.o' failed Opensips Makefile now adds -fPIC where it is necessary. --- opensips.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensips.spec b/opensips.spec index a2bcc6c..e4af23a 100644 --- a/opensips.spec +++ b/opensips.spec @@ -339,7 +339,7 @@ echo "$exclude_modules" > exclude_modules CC="%{__cc}" \ CC_EXTRA_OPTS="-I/usr/include/ncurses" \ PREFIX="%{_prefix}" \ - CFLAGS="%{rpmcflags} -Wcast-align -fPIC" + CFLAGS="%{rpmcflags} -Wcast-align" %install rm -rf $RPM_BUILD_ROOT -- 2.44.0