Bug 197810

Summary: devel/armv6-freebsd10.0-xdev: fix undefined behavior in gas's tc-arm.c
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Many People CC: bapt, sbruno
Priority: ---    
Version: Latest   
Hardware: arm   
OS: Any   
Bug Depends on:    
Bug Blocks: 197395    
Attachments:
Description Flags
Fix undefined behavior in gas/contrib/tc-arm.c's rotate_left() macro none

Description Dimitry Andric freebsd_committer freebsd_triage 2015-02-18 21:03:47 UTC
Created attachment 153163 [details]
Fix undefined behavior in gas/contrib/tc-arm.c's rotate_left() macro

Similar to bug 197806, there is a failure in armv6-freebsd10.0-xdev due to gas "invalid constant after fixup" errors:

http://pb2.nyi.freebsd.org/data/headi386PR197395-default/2015-02-12_00h00m41s/logs/errors/armv6-freebsd10.0-xdev-10.0.log

This is again due to undefined behavior in gas's rotate_left() macro, as fixed in head here:

https://svnweb.freebsd.org/base?view=revision&revision=274856

Apply this revision onto the unpacked src.txz to avoid the build failure with clang 3.6.0.
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2015-02-18 22:10:26 UTC
Approved as well :)
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-02-18 22:27:15 UTC
A commit references this bug:

Author: dim
Date: Wed Feb 18 22:26:46 UTC 2015
New revision: 379321
URL: https://svnweb.freebsd.org/changeset/ports/379321

Log:
  Fix undefined behavior in gas/contrib/tc-arm.c's rotate_left() macro, as
  in https://svnweb.freebsd.org/base?view=revision&revision=274856

  This fixes possible "invalid constant after fixup" errors from gas, when
  it has been compiled with high levels of optimization.

  PR:		197810
  Approved by:	maintainer (bapt)

Changes:
  head/devel/armv6-freebsd10.0-xdev/files/patch-contrib_binutils_gas_config_tc-arm.c
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2015-02-18 22:27:51 UTC
Fixed in r379321.