Re: arm-linux-gnueabi-gcc-4.4 -march=armv4t silently produces armv7 (pkgversion=Ubuntu/Linaro 4.4.5-15ubuntu1)

2011-11-14 Thread Matthias Klose
On 11/08/2011 10:41 AM, Steffen Dettmer wrote:
 Hi,
 
 I hope I ask on the right place, otherwise a redirection is appreciated.
 I write here because dpkg-query -p gcc-4.4-arm-linux-gnueabi tells:
 Maintainer: Ubuntu Core developers ubuntu-devel-discuss@lists.ubuntu.com.
 On debian-arm mailinglist I learnt it could be a ubuntu-specific
 problem with the compiler package, because arm-linux-gnueabi-gcc-4.4
 (gcc-4.4 4.4.6-11) seems to work correctly.
 
 I have to put two excuses at the begin: first, I'm not a Debian
 or Ubuntu user and not familiar with the dpkg and apt-get
 details; second, I also don't have much knowledge about
 ARM-linux. But I'm learning.
 
 I installed 6.0.1 (according to /etc/debian_version) on an ARM board
 with v5TE architecture which is not able to execute armv7 code.
 Precompiled binaries are v4T. Now I tried to install gcc toolchain to
 build my application. On a squeeze/sid (according to
 /etc/debian_version) intel machine I used synaptic to install packages
 with arm, gnueabi and armel based on guessing inspired by
 reading http://wiki.debian.org/ArmEabiPort. That documentation for me
 unfortunately is insufficient.
 
 I tried to compile with arm-linux-gnueabi-gcc-4.4 -march=armv4t, but
 I do not get Tag_CPU_arch: v4T (readelf -A) but Tag_CPU_arch: v7.
 It seems that the tool chain was built incorrectly and specific to
 armv7; I don't find the multi-libs -- there seems to be only one
 single set of libs (libgcc.a etc)! I had expected one set for each
 combination of compiler flags (hardfloat/softfloat, arm/thumb, ),
 so heaps of libs. I need something in between v4T, thumb, soft-float
 to maybe v5T, armmode, soft-float, interwork.
 
 I considered to rebuilt the packages
 (gcc-4.4-arm-linux-gnueabi_4.4.5-15ubuntu1_i386.deb, others) but I
 have no clue how to do so. The build system seems to be sophisticated.

it is.

the target currently is set in debian/rules2 according to the value of the
`distribution' macro.  I assume you derive from Ubuntu and you get the default
armv7 configuration.

  Matthias

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


arm-linux-gnueabi-gcc-4.4 -march=armv4t silently produces armv7 (pkgversion=Ubuntu/Linaro 4.4.5-15ubuntu1)

2011-11-08 Thread Steffen Dettmer
Hi,

I hope I ask on the right place, otherwise a redirection is appreciated.
I write here because dpkg-query -p gcc-4.4-arm-linux-gnueabi tells:
Maintainer: Ubuntu Core developers ubuntu-devel-discuss@lists.ubuntu.com.
On debian-arm mailinglist I learnt it could be a ubuntu-specific
problem with the compiler package, because arm-linux-gnueabi-gcc-4.4
(gcc-4.4 4.4.6-11) seems to work correctly.

I have to put two excuses at the begin: first, I'm not a Debian
or Ubuntu user and not familiar with the dpkg and apt-get
details; second, I also don't have much knowledge about
ARM-linux. But I'm learning.

I installed 6.0.1 (according to /etc/debian_version) on an ARM board
with v5TE architecture which is not able to execute armv7 code.
Precompiled binaries are v4T. Now I tried to install gcc toolchain to
build my application. On a squeeze/sid (according to
/etc/debian_version) intel machine I used synaptic to install packages
with arm, gnueabi and armel based on guessing inspired by
reading http://wiki.debian.org/ArmEabiPort. That documentation for me
unfortunately is insufficient.

I tried to compile with arm-linux-gnueabi-gcc-4.4 -march=armv4t, but
I do not get Tag_CPU_arch: v4T (readelf -A) but Tag_CPU_arch: v7.
It seems that the tool chain was built incorrectly and specific to
armv7; I don't find the multi-libs -- there seems to be only one
single set of libs (libgcc.a etc)! I had expected one set for each
combination of compiler flags (hardfloat/softfloat, arm/thumb, ),
so heaps of libs. I need something in between v4T, thumb, soft-float
to maybe v5T, armmode, soft-float, interwork.

I considered to rebuilt the packages
(gcc-4.4-arm-linux-gnueabi_4.4.5-15ubuntu1_i386.deb, others) but I
have no clue how to do so. The build system seems to be sophisticated.
I found some --with-arch=armv7-a or alike in some rules files, but
I have no clue what to change and in which way to get a correct
ARM-linux-EABI toolchain supporting v4T.

I read that v4T is supposed to be the minimal CPU requirement, but I
don't get it working.
Do I need to install extra packages? Or do I need to rebuild the toolchain?

Isn't it a bug that v4T is not supported anymore?
In ChangeLog I read:
   -- Matthias Klose d...@ubuntu.com  Wed, 04 Nov 2009 16:04:17 +0100
      gcc-4.4 (4.4.2-1ubuntu1) lucid; urgency=low
      * Build --with-arch=armv7-a --with-fpu=vfpv3-d16 on armel.

Is this related? How do I workaround?

I would like to read more about Debian-ARM-Linux, but what google
finds seems to be very limited. For example, I was unable to find
instructions how to bootstrap a compiler, how to build a distribution
using specific compiler flags or anything. Any pointers appreciated.

Any help or pointers appreciated!

oki,

Steffen



tech info:

$ arm-linux-gnueabi-gcc-4.4 -mcpu=arm9tdmi -march=armv4t -msoft-float
-mfloat-abi=soft -mthumb-interwork -v -O0 -Wall -o hello-arm hello.c
Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.4.5-15ubuntu1'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-multiarch
--with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix
--with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.4.5
--libdir=/usr/lib --enable-nls --enable-clocale=gnu
--enable-libstdcxx-debug --enable-objc-gc --disable-sjlj-exceptions
--with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16
--with-mode=thumb --disable-werror --enable-checking=release
--program-prefix=arm-linux-gnueabi-
--includedir=/usr/arm-linux-gnueabi/include --build=i686-linux-gnu
--host=i686-linux-gnu --target=arm-linux-gnueabi
--with-headers=/usr/arm-linux-gnueabi/include
--with-libs=/usr/arm-linux-gnueabi/lib
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.5-15ubuntu1)
COLLECT_GCC_OPTIONS='-mcpu=arm9tdmi' '-march=armv4t' '-msoft-float'
'-mfloat-abi=soft' '-mthumb-interwork' '-v' '-O0' '-Wall' '-o'
'hello-arm' '-mfpu=vfpv3-d16' '-mthumb'
 /usr/lib/gcc/arm-linux-gnueabi/4.4.5/cc1 -quiet -v hello.c -quiet
-dumpbase hello.c -mcpu=arm9tdmi -march=armv4t -msoft-float
-mfloat-abi=soft -mthumb-interwork -mfpu=vfpv3-d16 -mthumb -auxbase
hello -O0 -Wall -version -o /tmp/ccYlVa85.s ignoring duplicate
directory 
/usr/lib/gcc/arm-linux-gnueabi/4.4.5/../../../../arm-linux-gnueabi/include
#include ... search starts here:
#include ... search starts here:
 /usr/lib/gcc/arm-linux-gnueabi/4.4.5/include
 /usr/lib/gcc/arm-linux-gnueabi/4.4.5/include-fixed
 /usr/arm-linux-gnueabi/include
End of search list.
GNU C (Ubuntu/Linaro 4.4.5-15ubuntu1) version 4.4.5 (arm-linux-gnueabi)
       compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR
version 3.0.0-p8.
GGC heuristics: --param ggc-min-expand=100 --param
ggc-min-heapsize=131072 Compiler executable checksum: