{"id":587,"date":"2013-04-16T22:27:29","date_gmt":"2013-04-16T20:27:29","guid":{"rendered":"http:\/\/blog.the-leviathan.ch\/?p=587"},"modified":"2013-04-16T22:41:04","modified_gmt":"2013-04-16T20:41:04","slug":"armv7l-opensuse-what-the-hell","status":"publish","type":"post","link":"https:\/\/blog.the-leviathan.ch\/?p=587","title":{"rendered":"armv7l &#038; openSUSE: What the hell&#8230;"},"content":{"rendered":"<p><strong>EDIT:<\/strong> The problem doesn&#8217;t occur anymore under openSUSE 12.3 and newer as it appears.<\/p>\n<pre>leviathan@shagira:~\/rpmbuild\/BUILD\/clisp-2.49\/build&gt; LANG=C .\/lisp.run\r\nSTACK size: 98222 [0x401bff00 0x40160048]\r\nC_CODE_ALIGNMENT is wrong. &amp;EVAL-WHEN = 0x5f2d1.\r\nAdd -falign-functions=4 to CFLAGS in the Makefile.<\/pre>\n<p>Especially when you take into consideration, that I just did this:<\/p>\n<pre>gcc <span style=\"text-decoration: underline;\"><strong>-falign-functions=4<\/strong><\/span> -g -march=armv7-a -mfloat-abi=hard -mthumb -mabi=aapcs-linux \\\r\n-g -DSAFETY=3 -DNO_GENERATIONAL_GC -DNO_MULTIMAP_FILE -DNO_SINGLEMAP -Wa,--noexecstack \\\r\n-W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations \\\r\n-Wno-sign-compare -Wno-format-nonliteral -falign-functions=4 -g -O0 -DDEBUG_OS_ERROR \\\r\n-DDEBUG_SPVW -DDEBUG_BYTECODE -DSAFETY=3 -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES \\\r\n-I. -Wl,-z,noexecstack  -Wl,--export-dynamic spvw.o spvwtabf.o spvwtabs.o spvwtabo.o \\\r\neval.o control.o encoding.o pathname.o stream.o socket.o io.o funarg.o array.o hashtabl.o \\\r\nlist.o package.o record.o weak.o sequence.o charstrg.o debug.o error.o misc.o time.o predtype.o \\\r\nsymbol.o lisparit.o i18n.o foreign.o unixaux.o built.o ariarm.o modules.o \/usr\/lib\/libreadline.so \\\r\n-lncurses -ldl \/usr\/lib\/libavcall.a \/usr\/lib\/libcallback.a  -L\/usr\/lib -lsigsegv libgnu_cl.a -o lisp.run<\/pre>\n<p>As I see it, the compiler produces a &#8220;broken&#8221; aka wrongly optimized executable&#8230;<\/p>\n<pre>leviathan@shagira:~\/rpmbuild\/BUILD\/clisp-2.49\/build&gt; gcc -v\r\nUsing built-in specs.\r\nCOLLECT_GCC=gcc\r\nCOLLECT_LTO_WRAPPER=\/usr\/lib\/gcc\/armv7hl-suse-linux-gnueabi\/4.7\/lto-wrapper\r\nTarget: armv7hl-suse-linux-gnueabi\r\nConfigured with: ..\/configure --prefix=\/usr --infodir=\/usr\/share\/info --mandir=\/usr\/share\/man \r\n--libdir=\/usr\/lib --libexecdir=\/usr\/lib --enable-languages=c,c++,objc,fortran,obj-c++,java --enable-checking=release \r\n--with-gxx-include-dir=\/usr\/include\/c++\/4.7 --enable-ssp --disable-libssp --disable-libitm --disable-plugin \r\n--with-bugurl=http:\/\/bugs.opensuse.org\/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap \r\n--with-slibdir=\/lib --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch \r\n--enable-version-specific-runtime-libs --enable-linker-build-id --program-suffix=-4.7 --enable-linux-futex \r\n--without-system-libunwind --with-arch=armv7-a --with-tune=cortex-a9 --with-float=hard --with-abi=aapcs-linux\r\n--with-fpu=vfpv3-d16 --disable-sjlj-exceptions --build=armv7hl-suse-linux-gnueabi\r\nThread model: posix\r\ngcc version 4.7.1 20120723 [gcc-4_7-branch revision 189773] (SUSE Linux)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>EDIT: The problem doesn&#8217;t occur anymore under openSUSE 12.3 and newer as it appears. leviathan@shagira:~\/rpmbuild\/BUILD\/clisp-2.49\/build&gt; LANG=C .\/lisp.run STACK size: 98222 [0x401bff00 0x40160048] C_CODE_ALIGNMENT is wrong. &amp;EVAL-WHEN = 0x5f2d1. Add -falign-functions=4 to CFLAGS in the Makefile. Especially when you take into consideration, that I just did this: gcc -falign-functions=4 -g -march=armv7-a -mfloat-abi=hard -mthumb -mabi=aapcs-linux \\ -g &hellip; <a href=\"https:\/\/blog.the-leviathan.ch\/?p=587\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">armv7l &#038; openSUSE: What the hell&#8230;<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,6],"tags":[],"class_list":["post-587","post","type-post","status-publish","format-standard","hentry","category-daily","category-tech"],"_links":{"self":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=587"}],"version-history":[{"count":8,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/587\/revisions"}],"predecessor-version":[{"id":595,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/587\/revisions\/595"}],"wp:attachment":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}