Comments inline On 6/29/08 4:06 PM, "Michael Jerris" <mike@jerris.com> wrote:
See questions/comments inline
Is there a way to disable the c++ code in freeswitch without totally breaking it? I'm in an embedded environment and libstdc++ is large and takes up valuable flash space.
We could fairly easily get rid of the cpp wrapper we use for embedded languages, but its used in mod_lua. The other thing you would have to disable would be portions of the switch_xml which uses cpp for the globbing routines which would have to be re-written in c or all of the globbing includes in the xml would have to not be used.
I'm not stuck on lua, I thought it would be the smallest. Do you have any advice here, C maybe (I couldn't find a "mod_c"). Can I try anything to get rid of the other cpp files?
Is there a way to specify a different install and runtime location for the modules (like you can do for log conf and db?) Could be runtime or build time, I found --with-modinstdir but this seems to affect the install location and the runtime search location.
I am sure there is a way with modifications to the build system, but why?
In the cross compile environment the files are installed into a staging area rather than the absolute location they are run from, the staging area becomes root of the flash filesystem. The workaround I have is to copy the files out of the build area by hand rather than using install. A runtime option like -conf or -db would also work well.
In switch_core_state_machine.c backtrace_symbols() fails, not supported in my arm environment. I hacked this to use the alternative version of print_trace.
Is there a better ifdef we can use here so you don't need to hack?
You could test for the presence of backtrace_symbols() or execinfo.h in configure and have your own macro. I don't know of a macro that would work well for different architectures. Or you could just disable it for cross compile.
export ac_cv_path__libcurl_config=$(BUILD_DIR)/curl-7.18.2/install/bin/curl- config; \
We have configure options for this one --with-libcurl
I did use the --with-libcurl but it did not work, I'll investigate more.
(cd $(TOPDIR)/ooma/freeswitch; rm -rf config.{cache,status} ; \
Why?
Cut and paste, this is how many of the openwrt modules build, I will remove it, a config.cache would work well.
$(TARGET_CONFIGURE_OPTS) \ CFLAGS='$(TARGET_CFLAGS)' \ CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
why?
On the build machine the build environment variables are set for cross compilation at build time by a build script, all the ARM cross compile tools, compilers, linkers, libs, headers etc are in $(STAGING_DIR), this just makes sure they are all set correctly, the freeswitch makefile picks up these values OK. This is normal. I'm still very new to freeswitch, less than a week, so any advice about using it in the embedded world would be really useful. Thanks, Simon