-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 <http://bugs.pld-linux.org> for instructions.
> Makefile.rules:25: recipe for target 'transformations.o' failed
Opensips Makefile now adds -fPIC where it is necessary.
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