<div dir="ltr"><div>Ovidiu,<br><br></div>My Log<br><div><br>echo $CC_EXTRA_OPTS <br>-march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon --sysroot=/home/caio/fsl-community-bsp/imx6/tmp/sysroots/imx6"<br></div><div><br>CPU=armv7a<br>LD=arm-poky-linux-gnueabi-ld --sysroot=/home/caio/fsl-community-bsp/imx6/tmp/sysroots/imx6 <br><br>CC=arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon --sysroot=/home/caio/fsl-community-bsp/imx6/tmp/sysroots/imx6<br><br><br></div><div>cat Makefile.conf<br><br>#DEFS+= -DPKG_MALLOC #Uses a faster malloc (exclusive w/ USE_SHM_MEM)<br>DEFS+= -DSHM_MMAP #Use mmap instead of SYSV shared memory<br>DEFS+= -DUSE_MCAST #Compile in support for IP Multicast<br>DEFS+= -DDISABLE_NAGLE #Disabled the TCP NAgle Algorithm ( lower delay )<br>DEFS+= -DSTATISTICS #Enables the statistics manager<br>DEFS+= -DHAVE_RESOLV_RES #Support for changing some of the resolver parameters<br>#DEFS+= -DHP_MALLOC #High performance allocator with fine-grained locking<br>#DEFS+= -DF_MALLOC #An even faster allocator. Not recommended for debugging<br>#DEFS+= -DF_MALLOC_OPTIMIZATIONS #Remove all internal checks in F_MALLOC<br>#DEFS+= -DDBG_QM_MALLOC #Allocator used for debugging information<br>#DEFS+= -DUSE_SHM_MEM #All PKG allocations are mapped to SHM ( exclusive w/ PKG_MALLOC )<br>#DEFS+= -DDBG_F_MALLOC #TODO ? <br>#DEFS+= -DNO_DEBUG #Turns off all debug messages<br>#DEFS+= -DNO_LOG #Completely turns off all the logging<br>#DEFS+= -DVQ_MALLOC #TODO ?<br>#DEFS+= -DFAST_LOCK #Uses fast architecture specific locking<br>#DEFS+= -DUSE_FUTEX #Uses linux futexs with fast architecture specific locking<br>DEFS+= -DUSE_SYSV_SEM #Uses SYSV sems for locking ( slower & limited number of locks<br>#DEFS+= -DUSE_PTHREAD_MUTEX #Uses pthread mutexes<br>#DEFS+= -DBUSY_WAIT #Uses busy waiting on the lock<br>#DEFS+= -DDBG_LOCK #TODO ?<br>DEFS+= -DNOSMP #Do not use SMP sompliant locking. Faster but won't work on SMP machines <br>#DEFS+= -DEXTRA_DEBUG #Compiles in some extra debugging code<br><br></div><div><br></div><div> make all<br>Compiling blacklists.c<br>In file included from blacklists.h:30:0,<br> from blacklists.c:38:<br>ip_addr.h: In function 'sockaddr2ip_addr':<br>ip_addr.h:224:25: warning: cast increases required alignment of target type [-Wcast-align]<br> memcpy(ip->u.addr, &((struct sockaddr_in*)sa)->sin_addr, 4);<br> ^<br>ip_addr.h:229:25: warning: cast increases required alignment of target type [-Wcast-align]<br> memcpy(ip->u.addr, &((struct sockaddr_in6*)sa)->sin6_addr, 16);<br> ^<br>In file included from locking.h:66:0,<br> from blacklists.h:32,<br> from blacklists.c:38:<br>lock_alloc.h: In function 'lock_set_alloc':<br>lock_alloc.h:70:13: warning: cast increases required alignment of target type [-Wcast-align]<br> ls->locks=(gen_lock_t*)((char*)ls+sizeof(gen_lock_set_t));<br> ^<br>{standard input}: Assembler messages:<br>{standard input}:105: Error: bad instruction `btsl $0,[r6]'<br>{standard input}:106: Error: bad instruction `adcl $0,r3'<br>{standard input}:208: Error: bad instruction `movb $0,(r3)'<br>{standard input}:305: Error: bad instruction `btsl $0,[r9]'<br>{standard input}:306: Error: bad instruction `adcl $0,r3'<br>{standard input}:390: Error: bad instruction `movb $0,(r3)'<br>{standard input}:436: Error: bad instruction `btsl $0,[r10]'<br>{standard input}:437: Error: bad instruction `adcl $0,r3'<br>{standard input}:480: Error: bad instruction `movb $0,(r3)'<br>{standard input}:526: Error: bad instruction `btsl $0,[r10]'<br>{standard input}:527: Error: bad instruction `adcl $0,r3'<br>{standard input}:555: Error: bad instruction `movb $0,(r2)'<br>{standard input}:619: Error: bad instruction `btsl $0,[r10]'<br>{standard input}:620: Error: bad instruction `adcl $0,r3'<br>{standard input}:718: Error: bad instruction `movb $0,(r3)'<br>{standard input}:3194: Error: bad instruction `btsl $0,[r7]'<br>{standard input}:3195: Error: bad instruction `adcl $0,r6'<br>{standard input}:3249: Error: bad instruction `movb $0,(r3)'<br>{standard input}:3300: Error: bad instruction `btsl $0,[r7]'<br>{standard input}:3301: Error: bad instruction `adcl $0,r3'<br>{standard input}:3340: Error: bad instruction `movb $0,(r0)'<br>{standard input}:3366: Error: bad instruction `btsl $0,[r6]'<br>{standard input}:3367: Error: bad instruction `adcl $0,r3'<br>{standard input}:3411: Error: bad instruction `movb $0,(r1)'<br>{standard input}:3497: Error: bad instruction `btsl $0,[r6]'<br>{standard input}:3498: Error: bad instruction `adcl $0,r3'<br>{standard input}:3542: Error: bad instruction `movb $0,(r1)'<br>{standard input}:3795: Error: bad instruction `btsl $0,[r6]'<br>{standard input}:3796: Error: bad instruction `adcl $0,r3'<br>{standard input}:3839: Error: bad instruction `movb $0,(r3)'<br>{standard input}:3882: Error: bad instruction `btsl $0,[fp]'<br>{standard input}:3883: Error: bad instruction `adcl $0,r3'<br>{standard input}:3981: Error: bad instruction `movb $0,(r3)'<br>{standard input}:4020: Error: bad instruction `btsl $0,[r6]'<br>{standard input}:4021: Error: bad instruction `adcl $0,r3'<br>{standard input}:4081: Error: bad instruction `movb $0,(r3)'<br>{standard input}:4129: Error: bad instruction `btsl $0,[r10]'<br>{standard input}:4130: Error: bad instruction `adcl $0,r3'<br>{standard input}:4381: Error: bad instruction `movb $0,(r3)'<br>{standard input}:4837: Error: bad instruction `btsl $0,[fp]'<br>{standard input}:4838: Error: bad instruction `adcl $0,r3'<br>{standard input}:4951: Error: bad instruction `movb $0,(r3)'<br>{standard input}:5312: Error: bad instruction `btsl $0,[r6]'<br>{standard input}:5313: Error: bad instruction `adcl $0,r9'<br>{standard input}:5383: Error: bad instruction `btsl $0,[r8]'<br>{standard input}:5384: Error: bad instruction `adcl $0,r5'<br>{standard input}:5471: Error: bad instruction `movb $0,(r3)'<br>{standard input}:5510: Error: bad instruction `btsl $0,[r6]'<br>{standard input}:5511: Error: bad instruction `adcl $0,r3'<br>{standard input}:5557: Error: bad instruction `movb $0,(r3)'<br>{standard input}:5596: Error: bad instruction `btsl $0,[r9]'<br>{standard input}:5597: Error: bad instruction `adcl $0,r3'<br>{standard input}:5628: Error: bad instruction `movb $0,(r3)'<br>{standard input}:5889: Error: bad instruction `movb $0,(r3)'<br>{standard input}:5928: Error: bad instruction `btsl $0,[r8]'<br>{standard input}:5929: Error: bad instruction `adcl $0,r3'<br>{standard input}:5975: Error: bad instruction `movb $0,(r3)'<br>{standard input}:6014: Error: bad instruction `btsl $0,[r9]'<br>{standard input}:6015: Error: bad instruction `adcl $0,r3'<br>{standard input}:6045: Error: bad instruction `movb $0,(r3)'<br>{standard input}:6103: Error: bad instruction `btsl $0,[r10]'<br>{standard input}:6104: Error: bad instruction `adcl $0,r3'<br>{standard input}:6203: Error: bad instruction `movb $0,(r3)'<br>{standard input}:6323: Error: bad instruction `btsl $0,[r6]'<br>{standard input}:6324: Error: bad instruction `adcl $0,r3'<br>{standard input}:6421: Error: bad instruction `movb $0,(r3)'<br>{standard input}:6481: Error: bad instruction `btsl $0,[r9]'<br>{standard input}:6482: Error: bad instruction `adcl $0,r3'<br>{standard input}:6582: Error: bad instruction `movb $0,(r3)'<br>{standard input}:7101: Error: bad instruction `btsl $0,[r1]'<br>{standard input}:7102: Error: bad instruction `adcl $0,r3'<br>{standard input}:7232: Error: bad instruction `movb $0,(r3)'<br>{standard input}:7394: Error: bad instruction `btsl $0,[r2]'<br>{standard input}:7395: Error: bad instruction `adcl $0,r1'<br>{standard input}:7527: Error: bad instruction `movb $0,(r3)'<br>{standard input}:7803: Error: bad instruction `btsl $0,[r6]'<br>{standard input}:7804: Error: bad instruction `adcl $0,r3'<br>{standard input}:7912: Error: bad instruction `movb $0,(r3)'<br>{standard input}:8809: Error: bad instruction `btsl $0,[r4]'<br>{standard input}:8810: Error: bad instruction `adcl $0,r3'<br>{standard input}:8852: Error: bad instruction `movb $0,(r1)'<br>{standard input}:8883: Error: bad instruction `btsl $0,[r5]'<br>{standard input}:8884: Error: bad instruction `adcl $0,r3'<br>{standard input}:8930: Error: bad instruction `movb $0,(r3)'<br>{standard input}:8980: Error: bad instruction `btsl $0,[r10]'<br>{standard input}:8981: Error: bad instruction `adcl $0,r3'<br>{standard input}:9020: Error: bad instruction `movb $0,(r0)'<br>make: *** [blacklists.o] Error 1<br><br></div><div><br></div><div><br><br><br></div><div>Thank you.<br><br></div><div>Best Regards,<br><br></div><div>Caio Pereira<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-20 18:28 GMT-02:00 Caio <span dir="ltr"><<a href="mailto:caiortp@gmail.com" target="_blank">caiortp@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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 "s/Power Macintosh/ppc/" \<br> 92 -e s/sun4v/sparc64/ -e "s/cobalt/mips2/" \<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"><div><div class="h5"><br><div class="gmail_quote">2015-10-20 17:17 GMT-02:00 Ovidiu Sas <span dir="ltr"><<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>></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><div><br>
On Tue, Oct 20, 2015 at 1:53 PM, Caio <<a href="mailto:caiortp@gmail.com" target="_blank">caiortp@gmail.com</a>> wrote:<br>
> Hello, Oividiu!<br>
><br>
> Sorry for the delay, I was on vacation.<br>
><br>
> I'm writing a recipe to Yocto.<br>
> This ARM cpu is new (armv7-a), but I see that is not compatible with<br>
> opensips's optimization.<br>
> I'm new with opensips, I have only tested in my host machine x86-64.<br>
><br>
><br>
> Do you know with parameters I need to comment in the Makefile.conf to have a<br>
> basic compilation without any optimization in the opensips?<br>
><br>
><br>
> #DEFS+= -DPKG_MALLOC #Uses a faster malloc (exclusive w/ USE_SHM_MEM)<br>
> #DEFS+= -DSHM_MMAP #Use mmap instead of SYSV shared memory<br>
> DEFS+= -DUSE_MCAST #Compile in support for IP Multicast<br>
> DEFS+= -DDISABLE_NAGLE #Disabled the TCP NAgle Algorithm ( lower delay )<br>
> DEFS+= -DSTATISTICS #Enables the statistics manager<br>
> DEFS+= -DHAVE_RESOLV_RES #Support for changing some of the resolver<br>
> parameters<br>
> #DEFS+= -DHP_MALLOC #High performance allocator with fine-grained locking<br>
> DEFS+= -DF_MALLOC #An even faster allocator. Not recommended for debugging<br>
> #DEFS+= -DF_MALLOC_OPTIMIZATIONS #Remove all internal checks in F_MALLOC<br>
> #DEFS+= -DDBG_QM_MALLOC #Allocator used for debugging information<br>
> #DEFS+= -DUSE_SHM_MEM #All PKG allocations are mapped to SHM ( exclusive w/<br>
> PKG_MALLOC )<br>
> #DEFS+= -DDBG_F_MALLOC #TODO ?<br>
> #DEFS+= -DNO_DEBUG #Turns off all debug messages<br>
> #DEFS+= -DNO_LOG #Completely turns off all the logging<br>
> #DEFS+= -DVQ_MALLOC #TODO ?<br>
> #DEFS+= -DFAST_LOCK #Uses fast architecture specific locking<br>
> #DEFS+= -DUSE_FUTEX #Uses linux futexs with fast architecture specific<br>
> locking<br>
> #DEFS+= -DUSE_SYSV_SEM #Uses SYSV sems for locking ( slower & limited number<br>
> of locks<br>
> #DEFS+= -DUSE_PTHREAD_MUTEX #Uses pthread mutexes<br>
> #DEFS+= -DBUSY_WAIT #Uses busy waiting on the lock<br>
> #DEFS+= -DDBG_LOCK #TODO ?<br>
><br>
><br>
><br>
> Thank you!<br>
><br>
> Best Regards,<br>
><br>
> Caio Pereira<br>
><br>
><br>
> 2015-09-23 21:48 GMT-03:00 Ovidiu Sas <<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>>:<br>
>><br>
>> Hello Caio,<br>
>><br>
>> Have you managed to cross compile opensips?<br>
>> The optimizations do not work for older type of arm CPUs.<br>
>> Did you experienced any issues running opensips on arm?<br>
>><br>
>> Regards,<br>
>> Ovidiu Sas<br>
>><br>
>> On Thu, Sep 17, 2015 at 2:51 PM, Caio <<a href="mailto:caiortp@gmail.com" target="_blank">caiortp@gmail.com</a>> wrote:<br>
>> > Hello,<br>
>> ><br>
>> > I would like to cross compile the opensips to ARMv7 architecture<br>
>> > (Freescale<br>
>> > IMX6).<br>
>> > I saw that there's some optimization in assembly to lock functions.<br>
>> > There's some configuration in the Makeconfig.conf options that I need<br>
>> > disable or enable to able the opensips run in my target architecutre?<br>
>> ><br>
>> > Thank you very much.<br>
>> ><br>
>> > Best Regards<br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > ----------------------------------------------<br>
>> > Caio Pereira<br>
>> ><br>
>> > _______________________________________________<br>
>> > Users mailing list<br>
>> > <a href="mailto:Users@lists.opensips.org" target="_blank">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>
>> ><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" target="_blank">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>
><br>
><br>
><br>
><br>
> --<br>
> ----------------------------------------------<br>
> Caio Pereira<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">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>
><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" target="_blank">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></div></div><span class="HOEnZb"><font color="#888888">-- <br><div>----------------------------------------------<br>Caio Pereira</div>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">----------------------------------------------<br>Caio Pereira</div>
</div>