Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 155970 - [cross/arm-softfloat-linux-uclibc] uclibc fails with gcc-4.1.1
Summary: [cross/arm-softfloat-linux-uclibc] uclibc fails with gcc-4.1.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 274618 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-22 12:13 UTC by Priit Laes (IRC: plaes)
Modified: 2009-10-02 19:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cross-arm-softfloat-linux-uclibc-uclibc.log (cross-arm-softfloat-linux-uclibc-uclibc.log,648.93 KB, text/plain)
2006-11-22 12:14 UTC, Priit Laes (IRC: plaes)
Details
cross-armeb-softfloat-linux-uclibc-info (cross-armeb-softfloat-linux-uclibc-info.log,7.23 KB, text/plain)
2006-12-17 13:27 UTC, Mathias Zimmermann
Details
cross-armeb-softfloat-linux-uclibc-uclibc.log (cross-armeb-softfloat-linux-uclibc-uclibc.log,648.37 KB, text/plain)
2006-12-17 13:28 UTC, Mathias Zimmermann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Priit Laes (IRC: plaes) 2006-11-22 12:13:04 UTC
Build failed with these errors:

arm-softfloat-linux-uclibc-ld: ERROR: /usr/lib/gcc/arm-softfloat-linux-uclibc/4.
1.1/libgcc.a(_udivsi3.o) uses VFP instructions, whereas libuClibc-0.9.28.so does
 not
arm-softfloat-linux-uclibc-ld: failed to merge target specific data of file /usr
/lib/gcc/arm-softfloat-linux-uclibc/4.1.1/libgcc.a(_udivsi3.o)


emerge info:
--------------------------------------------------------------------------------
 * Host Portage ARCH:     x86
 * Target Portage ARCH:   arm
 * Target System:         arm-softfloat-linux-uclibc
 * Stage:                 4 (C/C++ compiler)

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * headers:               linux-headers-[latest]
 * libc:                  uclibc-[latest]

 * PORTDIR_OVERLAY:       /usr/overlay/amd
 * PORT_LOGDIR:           /var/log/portage
 * PKGDIR:                /usr/portage/packages/cross/arm-softfloat-linux-uclibc
 * PORTAGE_TMPDIR:        /var/tmp/cross/arm-softfloat-linux-uclibc
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  
Portage 2.1.2_rc2-r1 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.5-r0, 2.6.17-
gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 Intel(R) Pentium(R) M processor 1.60GHz
Gentoo Base System version 1.12.6
Last Sync: Wed, 22 Nov 2006 17:00:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disable
d]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium-m -g -ggdb -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms
/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-Os -march=pentium-m -g -ggdb -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms 
splitdebug strict"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/"
LDFLAGS="-Wl,--as-needed"
LINGUAS="et"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages/cross/arm-softfloat-linux-uclibc"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress 
--force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/di
stfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp/cross/arm-softfloat-linux-uclibc"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/overlay/amd /home/amd/code/gentoo/non-gnome /home/amd/code
/gentoo/gnome /home/amd/code/gentoo/gentopia /usr/portage/local/layman/gnome-exp
erimental /usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 elibc_glibc input_devices_evdev input_devices_keyboard input_devices_mo
use input_devices_synaptics kernel_linux linguas_et userland_GNU video_cards_rad
eon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_
EXTRA_OPTS
Comment 1 Priit Laes (IRC: plaes) 2006-11-22 12:14:23 UTC
Created attachment 102564 [details]
cross-arm-softfloat-linux-uclibc-uclibc.log
Comment 2 SpanKY gentoo-dev 2006-11-26 05:33:59 UTC
gcc-4 hasnt really been tested with softfloat so you should just stick with gcc-3.4.6 for now
Comment 3 Stefan de Konink 2006-12-09 03:43:16 UTC
(In reply to comment #2)
> gcc-4 hasnt really been tested with softfloat so you should just stick with
> gcc-3.4.6 for now

I have the same issue on AMD64.
Comment 4 Stefan de Konink 2006-12-09 04:24:15 UTC
ereshkigal skinkie # crossdev --target arm-softfloat-linux-uclibc --gcc 3.4.6-r2
-------------------------------------------------------------------------------------
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm
 * Target System:         arm-softfloat-linux-uclibc
 * Stage:                 4 (C/C++ compiler)

 * binutils:              binutils-[latest]
 * gcc:                   gcc-3.4.6-r2
 * headers:               linux-headers-[latest]
 * libc:                  uclibc-[latest]

 * PORTDIR_OVERLAY:       /usr/local/overlays/ebuildexchange
 * PORT_LOGDIR:           /var/log/portage
 * PKGDIR:                /usr/portage/packages/cross/arm-softfloat-linux-uclibc
 * PORTAGE_TMPDIR:        /var/tmp/cross/arm-softfloat-linux-uclibc
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -
 * Forcing the latest versions of binutils-config/gcc-config ...               [ ok ]
 * Log: /var/log/portage/cross-arm-softfloat-linux-uclibc-binutils.log
 * Emerging cross-binutils ...                                                 [ ok ]
 * Log: /var/log/portage/cross-arm-softfloat-linux-uclibc-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...                                               [ ok ]
 * Log: /var/log/portage/cross-arm-softfloat-linux-uclibc-linux-headers.log
 * Emerging cross-linux-headers ...                                            [ ok ]
 * Log: /var/log/portage/cross-arm-softfloat-linux-uclibc-uclibc.log
 * Emerging cross-uclibc ...

 * uclibc failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-arm-softfloat-linux-uclibc-info.log
 * /var/log/portage/cross-arm-softfloat-linux-uclibc-uclibc.log


./gen_wctype en_US
setlocale(LC_CTYPE,en_US) failed!
./gen_locale locales.txt@mapping: "@euro" to 'e'
error: missing or illegal UTF-8 setting
make: *** [locale_tables.h] Error 1
make: *** Waiting for unfinished jobs....
gen_collate.c: At top level:
gen_collate.c:3792: warning: 'dump_base_locale' defined but not used
gen_collate.c:3828: warning: 'dump_der_locale' defined but not used
gen_collate.c:850: warning: 'print_colnode' defined but not used
gen_collate.c:2584: warning: 'print_starter_node' defined but not used
gen_collate.c:3248: warning: 'print_starter_all_node' defined but not used

Comment 5 Stefan de Konink 2006-12-09 04:34:45 UTC
The 'minimal' use-flag screwed up...
Comment 6 Mathias Zimmermann 2006-12-17 13:27:25 UTC
Created attachment 104243 [details]
cross-armeb-softfloat-linux-uclibc-info
Comment 7 Mathias Zimmermann 2006-12-17 13:28:46 UTC
Created attachment 104244 [details]
cross-armeb-softfloat-linux-uclibc-uclibc.log
Comment 8 Mathias Zimmermann 2006-12-17 13:29:49 UTC
for me with another gcc version it will not work:

crossdev armeb-softfloat-linux-uclibc --gcc 3.4.6

uclibc failed :(

I attached the two log files.
Comment 9 SpanKY gentoo-dev 2006-12-17 13:39:08 UTC
read the log and you'd see that your crossdev options are wrong ... you are still using gcc-4.1.1
Comment 10 Mathias Zimmermann 2006-12-23 12:10:03 UTC
(In reply to comment #9)
> read the log and you'd see that your crossdev options are wrong ... you are
> still using gcc-4.1.1
> 

I set the gcc version with --gcc and at the summery section it said:

gcc:                   gcc-3.4.6-r1

so why he uses gcc 4.1.1 when I set 3.4.6. Did I need to set something in a config file?
Comment 11 Christopher Friedt 2007-05-17 07:16:48 UTC
Code:
make[4]: Entering directory `/usr/portage/local/tinygentoo/tmpdir/portage/sys-libs/uclibc-0.9.28.3/work/uClibc-0.9.28.3/libc/sysdeps/linux/arm'                 
arm-softfloat-linux-uclibc-gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing  -mlittle-endian -mtune=arm9tdmi -march=armv4 -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../../../../include -I.  -fstrict-aliasing -Os -funit-at-a-time   -isystem /usr/lib/gcc/arm-softfloat-linux-uclibc/3.4.4/include -DNDEBUG -fPIC  -c __longjmp.S -o __longjmp.o __longjmp.S: Assembler messages:                                               
__longjmp.S:36: Error: selected processor does not support `lfmfd f4,4,[ip]!'


This error corresponds to the source code located in uClibc/libc/sysdeps/linux/arm/__longjmp.S and if you take a look at that, then you'll see

Code:
#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
        lfmfd   f4, 4, [ip] !   /* load the floating point regs */
#else
        add             ip, ip, #48             /* skip the FP registers */
#endif


The first condition, __UCLIBC_HAS_FLOATS__, corresponds to

Code:
Target Architecture Features and Options -->
[*] Enable floating point number support


or within the .config file UCLIBC_HAS_FLOATS=y .

The second condition corresponds to the event where gcc -msoft-floats is invoked. It is then safe to set HAS_FPU above, as long as -msoft-float is invoked with gcc.

Code:
Target Architecture Features and Options -->
[*]   Target CPU has floating point unit (FPU)


The 'Help' information for this option claims that it is OK to set HAS_FPU=y as long as you specify -msoft-float.

Code:
HAS_FPU:

If your target CPU does not have a Floating Point Unit (FPU) or a kernel FPU emulator, but you still wish to support floating point functions, then uClibc will need to be compiled with soft floating point support (-msoft-float).  If your target CPU does not have an FPU or an FPU emulator within the Linux kernel, then you should answer N.


I've enabled floating point emulation in my kernel, and so what I did, is before the emerge of uClibc, i set CFLAGS="-msoft-float". This had absolutely no effect in the emerge, even though CFLAGS="-msoft-float" appears when i do CFLAGS="-msoft-float" emerge --info. This is not a bug in gcc, but I would say that it's rather a bug in the ebuild file because it is ignoring a critical parameter.

If i set CFLAGS="-msoft-float" directly before an emerge, on the same line, I would expect that CFLAG to actually show up in the compiler. Likewise, if the option was present in make.conf.
Comment 12 SpanKY gentoo-dev 2007-06-30 12:16:35 UTC
try latest cvs
Comment 13 Mike Auty (RETIRED) gentoo-dev 2009-06-29 15:07:24 UTC
*** Bug 274618 has been marked as a duplicate of this bug. ***
Comment 14 Vince C. 2009-10-02 19:02:42 UTC
This problem can still be reproduced with uclibc-0.9.30.1-r1 as long as

1. gcc differs from 3.4.6*
2. arch is ARM
3. vendor is softfloat.

Example, fails:
~ # UCLIBC_CPU=ARM926T crossdev -t armv5tejl-softfloat-linux-uclibc

Example, succeeds:
~ # UCLIBC_CPU=ARM926T crossdev -t armv5tejl-softfloat-linux-uclibc --gcc 3.4.6-r2

Should a new bug be filed or this one be reopened?