[Freeswitch-users] What is correct way to compile FS without optimization
Michael Jerris
mike at jerris.com
Wed Feb 11 20:57:08 MSK 2015
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 at 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?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150211/2c254fd3/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list