Building dahdi-tools 2.11.1:

gcc -DHAVE_CONFIG_H -I. -g -Wall -O2 -I/home/asterisk/rpmbuild/BUILD/dahdi-tools-2.11.1/include -c -o fxstest.o fxstest.c /bin/sh ./libtool --tag=CC --mode=link gcc -g -Wall -O2 -I/home/asterisk/rpmbuild/BUILD/dahdi-tools-2.11.1/include -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o fxstest fxstest.o libtonezone.la -lpthread -lm libtool: link: gcc -g -Wall -O2 -I/home/asterisk/rpmbuild/BUILD/dahdi-tools-2.11.1/include -Wl,-z -Wl,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o .libs/fxstest fxstest.o ./.libs/libtonezone.so -lpthread -lm -Wl,-rpath -Wl,/usr/lib64 /usr/bin/ld: fxstest.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC

Even though:

+ CFLAGS='-O2 -march=native -mtune=native -ftree-vectorize -ffast-math -fPIC'
+ export CFLAGS
+ CXXFLAGS='-O2 -march=native -mtune=native -ftree-vectorize -ffast-math -fPIC'
+ export CXXFLAGS

because CFLAGS doesn't override the Makefile CFLAGS. Notice no -fPIC above.

The fix: add -fPIC to CFLAGS in Makefile.am, ./bootstrap.sh, build.

sean



--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to