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: 6863071 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 92E8EC05AC for ; Fri, 24 Jul 2015 21:44:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA891205B6 for ; Fri, 24 Jul 2015 21:44:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D7CFA205B4 for ; Fri, 24 Jul 2015 21:44:17 +0000 (UTC) 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version:content-type; bh=tewW/Q8NgiK4ataZE0On7f9efyb+dYiv5+nhjx/unBA=; b=blcUojEhbmvL6tIa+NaH553dYjoxAsVef6Cfw1b7tmGp1a5VNF3DdoafEcSLmlVBgM uKQFUS4bXY5FDojXuP2OVI6ojVf9oTdQInBfYTk2tMcpyMz1oRm+3zu6a2JXWK8/fUuw lcPOYNEdxVVmENlfidYd/7WPV/ZkxjV3gDZ41nLzHh4EgYnLl15xmlByTUUICdJCCXb4 eH8c8XHHwyOBuqC2ES7qwjeHaZqbuaX4Ov8JwnHaav7pSGsalz865XgIHyrcdXKHvukZ wNVK2AMc5T7SKYl6RNb7e2iwigcqmSKuIdgUJGCkLelROi7Lcdy7iLRYD3gzWVu16bTB /+VQ== X-Gm-Message-State: ALoCoQlhfssez9In4G0icRBQwGnAG7BqETy1Zizz2FsZHPMACPzVCLeKTK3fVe5Y5rm2iiVJdmyl 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-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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Dave Martin 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 */