armv7l & openSUSE: What the hell…

EDIT: The problem doesn’t occur anymore under openSUSE 12.3 and newer as it appears.

leviathan@shagira:~/rpmbuild/BUILD/clisp-2.49/build> LANG=C ./lisp.run
STACK size: 98222 [0x401bff00 0x40160048]
C_CODE_ALIGNMENT is wrong. &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 -DSAFETY=3 -DNO_GENERATIONAL_GC -DNO_MULTIMAP_FILE -DNO_SINGLEMAP -Wa,--noexecstack \
-W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations \
-Wno-sign-compare -Wno-format-nonliteral -falign-functions=4 -g -O0 -DDEBUG_OS_ERROR \
-DDEBUG_SPVW -DDEBUG_BYTECODE -DSAFETY=3 -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES \
-I. -Wl,-z,noexecstack  -Wl,--export-dynamic spvw.o spvwtabf.o spvwtabs.o spvwtabo.o \
eval.o control.o encoding.o pathname.o stream.o socket.o io.o funarg.o array.o hashtabl.o \
list.o package.o record.o weak.o sequence.o charstrg.o debug.o error.o misc.o time.o predtype.o \
symbol.o lisparit.o i18n.o foreign.o unixaux.o built.o ariarm.o modules.o /usr/lib/libreadline.so \
-lncurses -ldl /usr/lib/libavcall.a /usr/lib/libcallback.a  -L/usr/lib -lsigsegv libgnu_cl.a -o lisp.run

As I see it, the compiler produces a “broken” aka wrongly optimized executable…

leviathan@shagira:~/rpmbuild/BUILD/clisp-2.49/build> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/armv7hl-suse-linux-gnueabi/4.7/lto-wrapper
Target: armv7hl-suse-linux-gnueabi
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man 
--libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java --enable-checking=release 
--with-gxx-include-dir=/usr/include/c++/4.7 --enable-ssp --disable-libssp --disable-libitm --disable-plugin 
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap 
--with-slibdir=/lib --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch 
--enable-version-specific-runtime-libs --enable-linker-build-id --program-suffix=-4.7 --enable-linux-futex 
--without-system-libunwind --with-arch=armv7-a --with-tune=cortex-a9 --with-float=hard --with-abi=aapcs-linux
--with-fpu=vfpv3-d16 --disable-sjlj-exceptions --build=armv7hl-suse-linux-gnueabi
Thread model: posix
gcc version 4.7.1 20120723 [gcc-4_7-branch revision 189773] (SUSE Linux)

Leave a Reply

Your email address will not be published. Required fields are marked *