<div dir="ltr"><div>Ovidiu Sas,<br></div><div><br><br></div><div>In the Makefile.defs there a code to get the ARCH<br><br>  90 ARCH := $(shell $(GETARCH) |sed -e s/i.86/i386/ -e s/sun4u/sparc64/  \<br>  91                         -e s/armv4l/arm/ -e &quot;s/Power Macintosh/ppc/&quot; \<br>  92                         -e s/sun4v/sparc64/ -e &quot;s/cobalt/mips2/&quot; \<br>  93                         -e s/amd64/x86_64/ )<br><br></div><div><br>I tried export ARCH=armv7 but because of the code, the ARCH will be always x86-64 (host machine) .<br><div><br></div><div>I added the CFLAGS to the armv7 arch in the Makefile.defs<br><br> 918 ifeq    ($(ARCH), armv7)<br> 919                 # if gcc <br> 920 ifeq            ($(CC_NAME), gcc)<br> 921                                 #common stuff<br> 922                                  CFLAGS+=-O0 -mfloat-abi=hard -march=armv7-a -mthumb-interwork -Wcast-align $(PROFILE) \<br> 923                                 -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 -Wall<br></div><div> 924 endif<br></div><div> 925 endif<br></div><div><br></div><div><br>Which is the best way to pass the arch parameter to the Makefile? <br><br>(sorry for the typo in the last email).<br><br></div><div>Thank you very much.<br><br></div><div>Best Regards,<br><br></div><div>Caio Pereira<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-20 17:17 GMT-02:00 Ovidiu Sas <span dir="ltr">&lt;<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The optimizations are done via the compiler flags: CFLAGS.<br>
You need to replace -09 with -00.<br>
You need to check if you are using a native compiler or a cross one<br>
and adjust the proper flags inside Makefile.defs.<br>
<br>
Regards,<br>
Ovidiu Sas<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Oct 20, 2015 at 1:53 PM, Caio &lt;<a href="mailto:caiortp@gmail.com">caiortp@gmail.com</a>&gt; wrote:<br>
&gt; Hello, Oividiu!<br>
&gt;<br>
&gt; Sorry for the delay, I was on vacation.<br>
&gt;<br>
&gt; I&#39;m writing a recipe to Yocto.<br>
&gt; This ARM cpu is new (armv7-a), but I see that is not compatible with<br>
&gt; opensips&#39;s optimization.<br>
&gt; I&#39;m new with opensips, I have only  tested in my host machine x86-64.<br>
&gt;<br>
&gt;<br>
&gt; Do you know with parameters I need to comment in the Makefile.conf to have a<br>
&gt; basic compilation without any optimization in the opensips?<br>
&gt;<br>
&gt;<br>
&gt; #DEFS+= -DPKG_MALLOC #Uses a faster malloc (exclusive w/ USE_SHM_MEM)<br>
&gt; #DEFS+= -DSHM_MMAP #Use mmap instead of SYSV shared memory<br>
&gt; DEFS+= -DUSE_MCAST #Compile in support for IP Multicast<br>
&gt; DEFS+= -DDISABLE_NAGLE #Disabled the TCP NAgle Algorithm ( lower delay )<br>
&gt; DEFS+= -DSTATISTICS #Enables the statistics manager<br>
&gt; DEFS+= -DHAVE_RESOLV_RES #Support for changing some of the resolver<br>
&gt; parameters<br>
&gt; #DEFS+= -DHP_MALLOC #High performance allocator with fine-grained locking<br>
&gt; DEFS+= -DF_MALLOC #An even faster allocator. Not recommended for debugging<br>
&gt; #DEFS+= -DF_MALLOC_OPTIMIZATIONS #Remove all internal checks in F_MALLOC<br>
&gt; #DEFS+= -DDBG_QM_MALLOC #Allocator used for debugging information<br>
&gt; #DEFS+= -DUSE_SHM_MEM #All PKG allocations are mapped to SHM ( exclusive w/<br>
&gt; PKG_MALLOC )<br>
&gt; #DEFS+= -DDBG_F_MALLOC #TODO ?<br>
&gt; #DEFS+= -DNO_DEBUG #Turns off all debug messages<br>
&gt; #DEFS+= -DNO_LOG #Completely turns off all the logging<br>
&gt; #DEFS+= -DVQ_MALLOC #TODO ?<br>
&gt; #DEFS+= -DFAST_LOCK #Uses fast architecture specific locking<br>
&gt; #DEFS+= -DUSE_FUTEX #Uses linux futexs with fast architecture specific<br>
&gt; locking<br>
&gt; #DEFS+= -DUSE_SYSV_SEM #Uses SYSV sems for locking ( slower &amp; limited number<br>
&gt; of locks<br>
&gt; #DEFS+= -DUSE_PTHREAD_MUTEX #Uses pthread mutexes<br>
&gt; #DEFS+= -DBUSY_WAIT #Uses busy waiting on the lock<br>
&gt; #DEFS+= -DDBG_LOCK #TODO ?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thank you!<br>
&gt;<br>
&gt; Best Regards,<br>
&gt;<br>
&gt; Caio Pereira<br>
&gt;<br>
&gt;<br>
&gt; 2015-09-23 21:48 GMT-03:00 Ovidiu Sas &lt;<a href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>&gt;:<br>
&gt;&gt;<br>
&gt;&gt; Hello Caio,<br>
&gt;&gt;<br>
&gt;&gt; Have you managed to cross compile opensips?<br>
&gt;&gt; The optimizations do not work for older type of arm CPUs.<br>
&gt;&gt; Did you experienced any issues running opensips on arm?<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Ovidiu Sas<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Sep 17, 2015 at 2:51 PM, Caio &lt;<a href="mailto:caiortp@gmail.com">caiortp@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hello,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I would like to cross compile the opensips to ARMv7 architecture<br>
&gt;&gt; &gt; (Freescale<br>
&gt;&gt; &gt; IMX6).<br>
&gt;&gt; &gt; I saw that there&#39;s some optimization in assembly to lock functions.<br>
&gt;&gt; &gt; There&#39;s some configuration in the Makeconfig.conf options that I need<br>
&gt;&gt; &gt; disable or enable to able the opensips run in my target architecutre?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thank you very much.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Best Regards<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; ----------------------------------------------<br>
&gt;&gt; &gt; Caio Pereira<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Users mailing list<br>
&gt;&gt; &gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt;&gt; &gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; VoIP Embedded, Inc.<br>
&gt;&gt; <a href="http://www.voipembedded.com" rel="noreferrer" target="_blank">http://www.voipembedded.com</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Users mailing list<br>
&gt;&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt;&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; ----------------------------------------------<br>
&gt; Caio Pereira<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" rel="noreferrer" target="_blank">http://www.voipembedded.com</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">----------------------------------------------<br>Caio Pereira</div>
</div>