maximilian attems
2011-Mar-30 17:03 UTC
[klibc] (fwd) Bug#618616: arm build failure with latest binutils - usr/klibc/syscalls/_exit.S:29: Error: .size expression does not evaluate to a constant
fwd'ing to klibc malinglist. ----- Forwarded message from Lo?c Minier <lool at dooz.org> ----- Date: Wed, 16 Mar 2011 23:34:51 +0100 From: Lo?c Minier <lool at dooz.org> To: Debian Bug Tracking System <submit at bugs.debian.org> Subject: Bug#618616: arm build failure with latest binutils - usr/klibc/syscalls/_exit.S:29: Error: .size expression does not evaluate to a constant Package: klibc Version: 1.5.21-1 Tags: patch User: ubuntu-devel at lists.ubuntu.com Usertags: origin-ubuntu natty ubuntu-patch Hey klibc fails to build with recent binutils as "as" became stricter: http://sourceware.org/bugzilla/show_bug.cgi?id=12519 binutils 20110225 and later would break klibc's builds as follows: TYPE unsigned int: size 4, sign 0 TYPE unsigned long: size 4, sign 0 TYPE void *: size 4, sign 0 gcc -Wp,-MD,usr/klibc/syscalls/._exit.o.d -D__ASSEMBLY__ -nostdinc -iwithprefix include -I/build/buildd/klibc-1.5.20/usr/include/arch/arm -Iusr/include/arch/arm -I/build/buildd/klibc-1.5.20/usr/include/bits32 -Iusr/include/bits32 -I/build/buildd/klibc-1.5.20/usr/klibc/../include -Iusr/klibc/../include -I/build/buildd/klibc-1.5.20/usr/include -Iusr/include -I/build/buildd/klibc-1.5.20/linux/include -Ilinux/include -I/build/buildd/klibc-1.5.20/linux/arch/arm/include -Ilinux/arch/arm/include -D__KLIBC__=1 -D__KLIBC_MINOR__=5 -D_BITSIZE=32 -fno-stack-protector -fwrapv -fno-exceptions -mabi=aapcs-linux -mno-thumb-interwork -Os -march=armv4 -mtune=strongarm -W -Wall -Wno-sign-compare -Wno-unused-parameter -D__ASSEMBLY__ -nostdinc -iwithprefix include -I/build/buildd/klibc-1.5.20/usr/include/arch/arm -Iusr/include/arch/arm -I/build/buildd/klibc-1.5.20/usr/include/bits32 -Iusr/include/bits32 -I/build/buildd/klibc-1.5.20/usr/klibc/../include -Iusr/klibc/../include -I/build/buildd/klibc-1.5.20/usr/include -Iusr/include -I/build/buildd/klibc-1.5.20/linux/include -Ilinux/include -I/build/buildd/klibc-1.5.20/linux/arch/arm/include -Ilinux/arch/arm/include -D__KLIBC__=1 -D__KLIBC_MINOR__=5 -D_BITSIZE=32 -fno-stack-protector -fwrapv -fno-exceptions -mabi=aapcs-linux -mno-thumb-interwork -Os -march=armv4 -mtune=strongarm -W -Wall -Wno-sign-compare -Wno-unused-parameter -D__ASSEMBLY__ -nostdinc -iwithprefix include -I/build/buildd/klibc-1.5.20/usr/include/arch/arm -Iusr/include/arch/arm -I/build/buildd/klibc-1.5.20/usr/include/bits32 -Iusr/include/bits32 -I/build/buildd/klibc-1.5.20/usr/klibc/../include -Iusr/klibc/../include -I/build/buildd/klibc-1.5.20/usr/include -Iusr/include -I/build/buildd/klibc-1.5.20/linux/include -Ilinux/include -I/build/buildd/klibc-1.5.20/linux/arch/arm/include -Ilinux/arch/arm/include -D__KLIBC__=1 -D__KLIBC_MINOR__=5 -D_BITSIZE=32 -fno-stack-protector -fwrapv -fno-exceptions -mabi=aapcs-linux -mno-thumb-interwork -Os -march=armv4 -mtune=strongarm -W -Wall -Wno-sign-compare -Wno-unused-parameter -c -o usr/klibc/syscalls/_exit.o usr/klibc/syscalls/_exit.S usr/klibc/syscalls/_exit.S:1:0: warning: target CPU does not support THUMB instructions usr/klibc/syscalls/_exit.S: Assembler messages: usr/klibc/syscalls/_exit.S:29: Error: .size expression does not evaluate to a constant make[5]: *** [usr/klibc/syscalls/_exit.o] Error 1 sample Ubuntu build log: http://launchpadlibrarian.net/66527153/buildlog_ubuntu-natty-armel.klibc_1.5.20-1ubuntu3_FAILEDTOBUILD.txt.gz I've fixed this in Ubuntu with the attached patch, but didn't find where to upstream it; since you're a klibc upstream developer and since it probably already affects Debian, I figured it was probably best to send it here :-) BTW, do you have any idea why the build process forces such odd and very old toolchain flags instead of just using the defaults? (it forces -march=armv4 -mtune=strongarm) Cheers, -- Lo?c Minier Origin: Ubuntu Last-Update: 2011-03-16 Description: Fix generation of .size directive for ARM; this wouldn't build with recent binutils and was generating broken assembler anyway Author: Lo?c Minier <loic.minier at linaro.org> --- klibc-1.5.20.orig/usr/klibc/arch/arm/sysstub.ph +++ klibc-1.5.20/usr/klibc/arch/arm/sysstub.ph @@ -52,7 +52,7 @@ sub make_sysstub($$$$$@) { print OUT "#endif /* __thumb__*/\n"; - print OUT " .size __syscall${i},.-__syscall${i}\n"; + print OUT " .size ${fname},.-${fname}\n"; } 1; ----- End forwarded message -----
Seemingly Similar Threads
- Build problems: klibc with Linux 3.10.7
- [PATCH] add linux' arch/$ARCH/include to search path From: Marc Kleine-Budde <mkl@pengutronix.de> Date: Mon, 5 Jan 2009 17:46:47 +0100
- Fwd: Launchpad [Bug 1843743] [NEW] klibc ftbfs in eoan
- Fwd: [Bug 1843743] Re: klibc ftbfs in eoan
- Fwd: [Bug 1843743] Re: klibc ftbfs in eoan