Created attachment 153690 [details] Fix undefined behavior in gas/contrib/tc-arm.c's rotate_left() macro In bug 197395, which is about an exp-run for clang 3.6.0, a failure was reported for gnatdroid-armv7: http://pb2.nyi.freebsd.org/data/headi386PR197395-default/2015-02-27_12h37m23s/logs/errors/gnatdroid-armv7-20141023.log This failure is due to gas emitting "Error: invalid constant (ff) after fixup" on valid assembly, such as "mov ip, #0xff". It turns out this is due to undefined behavior in gas, specifically in gas/config/tc-arm.c, in the rotate_left() macro, which was fixed by this upstream commit: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=d840c081f8082e8b9e63fead5306643975a97bb3 The attachment fixes this in the same manner as bug 197806 for devel/binutils.
Do you know if the problem is fixed in binutils 2.25 already? maybe we should just upgrade to the latest version instead?
nevermind; I see it's broken on 2.25 too.
A commit references this bug: Author: marino Date: Tue Mar 3 12:52:26 UTC 2015 New revision: 380357 URL: https://svnweb.freebsd.org/changeset/ports/380357 Log: lang/gnatdroid-binutils: Fix undefined behavior in arm gas This patch fixes build on clang 3.6 -- all binutils ports need it. PR: 198204 Submitted by: dim@ Changes: head/lang/gnatdroid-binutils/Makefile head/lang/gnatdroid-binutils/files/patch-gas__config__tc-arm.c
thanks!