Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 436590

Summary: sys-devel/gcc-4.6.3: ARM compilation failure: error: ./gcc/crtbeginS.o uses VFP register arguments, ./libgcc_s.so.1.tmp does not
Product: Gentoo Linux Reporter: Hanno Böck <hanno>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal CC: arm, hanno
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: gcc-4.6.3-compile.log.xz

Description Hanno Böck gentoo-dev 2012-09-29 11:48:51 UTC
On a toshiba AC100 (ARMv7), I get a bunch of compile errors like
/usr/armv7a-unknown-linux-gnueabi/bin/ld: error: /mnt/sd/data/vartmp/portage/sys-devel/gcc-4.6.3/work/build/./gcc/crtbeginS.o uses VFP register arguments, ./libgcc_s.so.1.tmp does not
with gcc 4.6.3.

As a result, I can't switch from gcc 4.5 to 4.6 and firefox is broken with 4.5 on arm (#434452).

emerge --info:
Portage 2.1.11.9 (default/linux/arm/10.0, gcc-4.5.3, glibc-2.15-r2, 3.0.27-1-ac100 armv7l)
=================================================================
System uname: Linux-3.0.27-1-ac100-armv7l-ARMv7_Processor_rev_0_-v7l-with-gentoo-2.1
Timestamp of tree: Fri, 28 Sep 2012 17:00:01 +0000
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-unknown-linux-gnueabi"
CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"
CHOST="armv7a-unknown-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en ru zh"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl alsa apng arm berkdb bzip2 chipcard cli consolekit cracklib exif fbcon gdbm gpm gudev hbci hwdb iconv icu ipv6 jpeg lxde minizip modules mudflap nls nptl openmp openxml pam pcre png policykit pppd readline session ssl tcpd udev unicode zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="mouse evdev keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en ru zh" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


/proc/cpuinfo:
Processor	: ARMv7 Processor rev 0 (v7l)
processor	: 0
BogoMIPS	: 1987.37

processor	: 1
BogoMIPS	: 1993.93

Features	: swp half thumb fastmult vfp edsp thumbee vfpv3 vfpv3d16 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x1
CPU part	: 0xc09
CPU revision	: 0

Hardware	: Toshiba AC100 / Dynabook AZ
Revision	: 0000
Serial		: 0000000000000000
Comment 1 Hanno Böck gentoo-dev 2012-09-29 11:57:23 UTC
Created attachment 325302 [details]
gcc-4.6.3-compile.log.xz
Comment 2 Hanno Böck gentoo-dev 2012-09-29 11:58:40 UTC
Seems I'm not alone:
http://forums.gentoo.org/viewtopic-t-934492-start-0.html

This indicates that gcc tries to forcibly build with hardfp on a softftp system.
Comment 3 Anthony Basile gentoo-dev 2012-09-29 12:49:03 UTC
(In reply to comment #1)
> Created attachment 325302 [details]
> gcc-4.6.3-compile.log.xz

Lines 130 and 131 say:

 CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16"
 CXXFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16"

This says to use a floating point unit so somewhere somehow in your toolchain you have a mix of both soft and hard.  The VFP register are used in hard float.  To guarantee that you're getting softfloat, add CFLAGS="-mfloat-abi=soft" or softfp.  Man gcc for the difference.  But both will generate libraries for calls to floating point operations.
Comment 4 Hanno Böck gentoo-dev 2012-09-29 13:25:58 UTC
> To guarantee that you're getting softfloat, add CFLAGS="-mfloat-abi=soft"
> or softfp.

Look at my emerge --info output:
CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"

I already have that.
Comment 5 Anthony Basile gentoo-dev 2012-09-29 15:55:10 UTC
(In reply to comment #4)
> > To guarantee that you're getting softfloat, add CFLAGS="-mfloat-abi=soft"
> > or softfp.
> 
> Look at my emerge --info output:
> CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"
> 
> I already have that.

Yeah I see that now that you point it out.  I don't understand why the log doesn't show that.  Also around lines 2850 to 2925, it looks like the build system is aware of the soft float.

For curiosity, can you try dropping -mfpu=vfpv3-d16 and usuing just -mfloat-abi=soft.
Comment 6 Hanno Böck gentoo-dev 2012-09-29 18:07:19 UTC
Dropping -mfpu=vfpv3-d16 and using either softfp or soft both produce just the same error.
Comment 7 SpanKY gentoo-dev 2012-09-30 02:52:23 UTC
your CHOST is wrong if you want softfp.  as announced already, armv7 targets default to hardfp by design.

*** This bug has been marked as a duplicate of bug 416727 ***