2011/9/26 Jon Masters jcm@redhat.com:
Hi, some feedback,
Folks,
I have been doing some work for a Mandriva armv7 port, and I think some feedback is worth...
At the 2011 Linux Plumbers Conference in Santa Rosa, we held an ARM minisummit to discuss a few cross-distribution issues surrounding the "hard float" ABI for v7, and the ARM device and OS ecosystem in general. This mail is intended to summarize the key actions from that meeting.
1). We discussed some of the different distributions (Debian, ChromeOS, Fedora, MeeGo, Mozilla, Ubuntu, etc.). We all agree on a common notion of what "hard float" means: it's the ARM AAPCS hardware floating point stuff in section 6, with the -d16 register set of the VFPv3 being used. Although there is some possibility to standardize v6, we decided we are interested only in the present and future at this point (and that's v7).
Some use Thumb2, some don't, but interworking allows for that (we in Fedora accidentally built a few packages with Thumb2 and will be undoing that without users even noticing). NEON is similarly an optional feature (supported by hwcaps) and not a required part of the core ABI. So it's really just the ABI that we all care about, and we all agree on it.
For toolchain folks, this means we all agree on the following:
--with-float=hard --with-fpu=vfpv3-d16 --with-abi=aapcs-linux
Currently, for mandriva I am using this:
[root@panda2 /]# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/armv7l-mandriva-linux-gnueabi/4.6.1/lto-wrapper Target: armv7l-mandriva-linux-gnueabi Configured with: ./configure --build=armv7l-mandriva-linux-gnueabi --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --x-includes=/usr/include --x-libraries=/usr/lib --disable-libjava-multilib --with-java-home=/usr/lib/jvm/java-rpmbuild --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-java-awt=gtk --enable-gtk-cairo --with-cloog --with-ppl --enable-cloog-backend=ppl --disable-libquadmath --disable-libquadmath-support --disable-libssp --disable-libunwind-exceptions --disable-werror --enable-__cxa_atexit --enable-bootstrap --enable-checking=release --enable-gnu-unique-object --enable-languages=c,c++,fortran,java,lto --enable-linker-build-id --enable-plugin --enable-shared --enable-threads=posix --with-system-zlib --with-bugurl=https://qa.mandriva.com/ --with-cpu=cortex-a8 --with-tune=cortex-a8 --with-arch=armv7-a --with-mode=thumb --with-float=softfp --with-fpu=vfpv3-d16 --with-abi=aapcs-linux --host=armv7l-mandriva-linux-gnueabi --target=armv7l-mandriva-linux-gnueabi Thread model: posix gcc version 4.6.1 20110916 (Mandriva) (GCC)
most packages built on armv7 (panda board), but for now using softfp abi, that is, it can "automagically" run armv5 (or earlier) binaries due to using a compatible abi, while still using float registers.
other hopefully useful information:
[root@panda2 stage2]# rpm -q glibc glibc-2.14.90-4-mdv2012.0.armv7l
[root@panda2 stage2]# ld --version GNU gold (Linux/GNU Binutils 2.21.53.0.1.20110716) 1.11 Copyright 2011 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty.
Currently I am working with ssh, on a chroot hosted on fedora current work on armv7 and hardfp abi.
(some of us may target different optimizations, etc. of course but that is down to an application to decide whether it cares only about Cortex+)
2). We agreed on the importance of cross-distro binary compatibility. It seems a number of distributions are excited by Debian's multi-arch approach (as am I), but not all of us will be moving to it any time soon. In the shorter term, if the runtime linker will have a special path, we can work around that with symlinks, but it's a kludge. Our preferred goal (from the meeting) is that everyone use this target:
arm-linux-gnueabihf
Call me a troll or whatever you want :-) But for now I am using armv7l-mandriva-linux-gnueabi, mostly because for now I am willing to run armv5 binaries, and would prefer, and considering to, call it just armv7* because I doubt anyone in short term is doing a big endian port, and if doing leave form them adding the "b"...
(Red Hat toolchains will include the vendor, but it is dropped by autotools when actually generating the paths and comparisons). I will advocate for Fedora ARM to switch to this target when possible, and in the interim will try to ensure we can establish some symlinks for the ability to run binaries compiled against Debian and Ubuntu on Fedora. I don't know what our timeline will be for this, but it's not something that's really landed everywhere yet. We at least agree on paths now!
3). We agree that it is a good idea to do LSB. Adam Conrad (Canonical) and I agreed to represent community interests in driving this. We do know that we'll be preferring OpenGL ES 2.0 over OpenGL (same namespace within the library means one default choice is required). There will be many other things :) We agree that the main benefit to pursuing LSB is that it promotes the idea of working together and being compatible. It may be that we don't have the same level of compliance on ARM, but some level of conformance to some common standard(s) is a good start! :)
4). We decided that we should have a standing Cross Distro meeting at Linaro Connect events, beginning with the next one in November. We will also facilitate a "show and tell" for apps at Connect, and have an opportunity to demo different distributions. We will add a specific session at the next Connect to continue this discussion.
Finally, we agreed we should keep the conversation going. I apologize for being a little tardy in sending this mail, but I want to kickstart further discussion and get this ball rolling again. I'll ping Adam about LSB (and thanks again to Jesse for the deep dive on GL). Meanwhile, David can grab ownership of organizing the Cross Distro meeting at Connect (I would like to assist). Anyone else got actions?
More some information on my work on Mandriva, currently a lesser, but somehow active participant, but not really talking on Mandriva behalf, or any legality that may apply :-) Currently most of what I did for Mandriva had as starting point a customized DJDelorie's bootstrap scripts, and so far, the only armv5 rpm binaries I am using are some java-1.6.0-openjdk mandriva 2009.1 rpms I found on the net, a mirror of 2009.1 on russia, that I am using to attempt to get a working java. Call it misscommunication of some kind, that were from an initial work on port of mandriva to armv5, and are now, afaik being continued on Mageia.
Jon.
Thanks, Paulo