What is correct way to compile FS without optimization
In case like ticket FS-7214 <https://freeswitch.org/jira/browse/FS-7214> very helpful compile FS without optimization. When I add flags CFLAGS and CXXFLAGS like below compilation is breaks. Addiding option "--disable-optimization" for configure script is help me. export CFLAGS="$CFLAGS -O0" export CXXFLAGS="$CXXFLAGS -O0" make[4]: Entering directory `/home/build/rpmbuild/BUILD/freeswitch-1.4.13/src/mod/languages/mod_python' CC mod_python_la-mod_python.lo In file included from /usr/include/limits.h:26:0, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/limits.h:168, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/syslimits.h:7, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/limits.h:34, from /usr/include/python2.7/Python.h:19, from mod_python.c:35: /usr/include/features.h:330:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] # warning _FORTIFY_SOURCE requires compiling with optimization (-O) Can you suggest correct way to compile FS without optimization?
greping for that in the code I get: <156>:git grep -n _FORTIFY_SOURCE debian/rules:11:FS_CPPFLAGS?=-D_FORTIFY_SOURCE=2 libs/libsndfile/configure.ac:516: MN_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) so, 1. if you are building debs, remove this from debian rules, and remove the line from libsndfile before bootstrap might help. I have never personally built the whole thing with -O0, just portions of the code by manually editing makefiles. --disable-optimization i know used to work ok for me, but does leave some turned on.
On Feb 11, 2015, at 2:19 AM, Sergey Safarov <s.safarov@gmail.com> wrote:
In case like ticket FS-7214 <https://freeswitch.org/jira/browse/FS-7214> very helpful compile FS without optimization. When I add flags CFLAGS and CXXFLAGS like below compilation is breaks. Addiding option "--disable-optimization" for configure script is help me.
export CFLAGS="$CFLAGS -O0" export CXXFLAGS="$CXXFLAGS -O0"
make[4]: Entering directory `/home/build/rpmbuild/BUILD/freeswitch-1.4.13/src/mod/languages/mod_python' CC mod_python_la-mod_python.lo In file included from /usr/include/limits.h:26:0, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/limits.h:168, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/syslimits.h:7, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/limits.h:34, from /usr/include/python2.7/Python.h:19, from mod_python.c:35: /usr/include/features.h:330:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
Can you suggest correct way to compile FS without optimization?
participants (2)
-
Michael Jerris
-
Sergey Safarov