svn commit: r380357 - in head/lang/gnatdroid-binutils: . files

John Marino marino at FreeBSD.org
Tue Mar 3 12:52:26 UTC 2015


Author: marino
Date: Tue Mar  3 12:52:25 2015
New Revision: 380357
URL: https://svnweb.freebsd.org/changeset/ports/380357
QAT: https://qat.redports.org/buildarchive/r380357/

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@

Added:
  head/lang/gnatdroid-binutils/files/patch-gas__config__tc-arm.c   (contents, props changed)
Modified:
  head/lang/gnatdroid-binutils/Makefile

Modified: head/lang/gnatdroid-binutils/Makefile
==============================================================================
--- head/lang/gnatdroid-binutils/Makefile	Tue Mar  3 12:32:36 2015	(r380356)
+++ head/lang/gnatdroid-binutils/Makefile	Tue Mar  3 12:52:25 2015	(r380357)
@@ -3,7 +3,7 @@
 
 PORTNAME=		binutils
 PORTVERSION=		2.24
-PORTREVISION=		3
+PORTREVISION=		4
 CATEGORIES=		lang
 MASTER_SITES=		${MASTER_SITE_SOURCEWARE}
 MASTER_SITE_SUBDIR=	binutils/releases

Added: head/lang/gnatdroid-binutils/files/patch-gas__config__tc-arm.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gnatdroid-binutils/files/patch-gas__config__tc-arm.c	Tue Mar  3 12:52:25 2015	(r380357)
@@ -0,0 +1,17 @@
+From d840c081f8082e8b9e63fead5306643975a97bb3 Mon Sep 17 00:00:00 2001
+From: Richard Earnshaw <Richard.Earnshaw at arm.com>
+Date: Thu, 20 Nov 2014 17:02:47 +0000
+Subject: [PATCH] * config/tc-arm.c (rotate_left): Avoid undefined behaviour
+ when N = 0.
+
+--- gas/config/tc-arm.c.orig	2014-10-14 09:32:03.000000000 +0200
++++ gas/config/tc-arm.c	2015-02-18 21:13:40.720573000 +0100
+@@ -7251,7 +7251,7 @@
+ 
+ /* Functions for operand encoding.  ARM, then Thumb.  */
+ 
+-#define rotate_left(v, n) (v << n | v >> (32 - n))
++#define rotate_left(v, n) (v << (n & 31) | v >> ((32 - n) & 31))
+ 
+ /* If VAL can be encoded in the immediate field of an ARM instruction,
+    return the encoded form.  Otherwise, return FAIL.  */


More information about the svn-ports-head mailing list