From patchwork Fri Jul 24 21:42:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 51466 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id CF80A20323 for ; Fri, 24 Jul 2015 21:43:53 +0000 (UTC) Received: by laah7 with SMTP id h7sf11390495laa.2 for ; Fri, 24 Jul 2015 14:43:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:subject:message-id :user-agent:mime-version:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=4/U6eQ7c1qxfOFS0134TEKTcsxDsgP4tjQB+ySMV4vk=; b=LTfSpphuY5nyRy12jfbruV65SNuhL5ZlWerMwLfhJ5AvQjxCn903m6Do00jqNpfLbP lFU3uyj1fZKggvA1BwiPNLXvdrOr5zU4TBfdw+QgPDPKZPqx2AJpCoMOCbgz1yQKS0vO Us2sUYf59WqWEmRMA2YrFCuNxlUUqXyor6tMAdOmQdKv70o2rpNLCpxUBPSImHR65/bt Sb94AqkZb8LjvhwTAFbXaMSeJrcSx5oLV9pfpUegLdrVxNPQU/spgDUeYIHuZfqPQEep z+kFVayhBirwD8YCtbAxgoKvIyUlGUdyP3JhteCZc87LqIfAA4WjynrG0lKM9yuUlunO lGFg== X-Gm-Message-State: ALoCoQkfuG0fPsgxiT9vl6dHA4mwpFZrQLELsKcgrA0LmNdaR5z9Gg7a3c/r3ldKxqhqBCpPy3Pd X-Received: by 10.112.181.37 with SMTP id dt5mr7076507lbc.10.1437774232157; Fri, 24 Jul 2015 14:43:52 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.69 with SMTP id l5ls448435lae.73.gmail; Fri, 24 Jul 2015 14:43:52 -0700 (PDT) X-Received: by 10.112.38.106 with SMTP id f10mr13642330lbk.14.1437774232008; Fri, 24 Jul 2015 14:43:52 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id e7si8627433lbc.62.2015.07.24.14.43.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jul 2015 14:43:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbqi7 with SMTP id qi7so22796798lbb.3 for ; Fri, 24 Jul 2015 14:43:51 -0700 (PDT) X-Received: by 10.112.55.207 with SMTP id u15mr15620546lbp.88.1437774231759; Fri, 24 Jul 2015 14:43:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp223168lba; Fri, 24 Jul 2015 14:43:50 -0700 (PDT) X-Received: by 10.67.12.136 with SMTP id eq8mr34858463pad.3.1437774230033; Fri, 24 Jul 2015 14:43:50 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id mk9si23625934pab.72.2015.07.24.14.43.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jul 2015 14:43:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZIkjo-0004uO-Ns; Fri, 24 Jul 2015 21:42:40 +0000 Received: from mail-qg0-f49.google.com ([209.85.192.49]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZIkjn-0004qa-1a for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2015 21:42:39 +0000 Received: by qgeu79 with SMTP id u79so17020679qge.1 for ; Fri, 24 Jul 2015 14:42:17 -0700 (PDT) X-Received: by 10.140.195.20 with SMTP id q20mr24899342qha.82.1437774137751; Fri, 24 Jul 2015 14:42:17 -0700 (PDT) Received: from xanadu.home (modemcable065.157-23-96.mc.videotron.ca. [96.23.157.65]) by smtp.gmail.com with ESMTPSA id d9sm4720774qga.6.2015.07.24.14.42.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jul 2015 14:42:16 -0700 (PDT) Date: Fri, 24 Jul 2015 17:42:15 -0400 (EDT) From: Nicolas Pitre To: Russell King Subject: [PATCH] ARM: asm/unified.h: guard the IT macros against redefinition when using LTO Message-ID: User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150724_144239_168324_480CC538 X-CRM114-Status: GOOD ( 10.33 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.192.49 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.192.49 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nicolas.pitre@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 With LTO, the intermediate representation for each .c file contains those global assembly macro definitions. When the lot is merged together during the final link, we get duplicate definition errors: [...] /tmp/cc48fUMp.s:42352: Error: Macro `it' was already defined /tmp/cc48fUMp.s:42354: Error: Macro `itt' was already defined /tmp/cc48fUMp.s:42356: Error: Macro `ite' was already defined [...] Guard those against redefinitions. Signed-off-by: Nicolas Pitre diff --git a/arch/arm/include/asm/unified.h b/arch/arm/include/asm/unified.h index a91ae49961..ee257a3de7 100644 --- a/arch/arm/include/asm/unified.h +++ b/arch/arm/include/asm/unified.h @@ -103,6 +103,8 @@ .endm #else /* !__ASSEMBLY__ */ __asm__( +/* the .L_it_macros_defined guards against redefinition in the LTO case */ +" .ifndef .L_it_macros_defined\n" " .macro it, cond\n" " .endm\n" " .macro itt, cond\n" @@ -132,7 +134,9 @@ __asm__( " .macro iteet, cond\n" " .endm\n" " .macro iteee, cond\n" -" .endm\n"); +" .endm\n" +" .set .L_it_macros_defined,1\n" +" .endif"); #endif /* __ASSEMBLY__ */ #endif /* CONFIG_ARM_ASM_UNIFIED */