Received: by 10.213.65.68 with SMTP id h4csp509474imn; Wed, 4 Apr 2018 02:20:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx4811ePVOXBpMBB3yApIAfdXwaM5m62PUj6WKPpx7DM9WqTyAX4n55NvOr7V1AD4RkbTikzE X-Received: by 10.167.129.215 with SMTP id c23mr8816426pfn.17.1522833627724; Wed, 04 Apr 2018 02:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522833627; cv=none; d=google.com; s=arc-20160816; b=TvzFJoQpKYRPmVHxDD4scWSRENDLIvazjjrUK64BkE/cTHh7HHaGJhNe6DRdheWLgu 8yXw251e2ms+nnHtmI1hRESg6NyrgKhbw91W+TzcFgzlt30PmNk1DFv6OZy/6yLkgc3m mxiu3j4jxLosn34Ch1C7k5NMn/zefQim329MCz7matrS5C81lgVzsvfO5QoFs8GaupkJ Vk9gz0jtBhUzbHsuaEOPm64q+NJrht6LWThUkk1NY/iyii+ihxzCtEeHiwZS7PjTF1Xv yAkDF1qVoGtieRChfepL1Un1s1Dt8wydvoq2DBv780yeCFYG/5MH64uR+99bkxZhGVjS jSEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=wyttmmFs2itXW3RT+0EaxkWCRcYTLr3EWSKt+EibQQc=; b=yrMG2KijGgnRaufo+kTVXCfNQq+4LjnwdY6g8BL5PCjVlYy92eFrl74J3kE62IIa0X oP5HmNnLUZ/GiIJLFaoRDsziCQ5mx4Sffz2Imt7y9fg1guvhcuOYm9lLJzAdHNsBc0OE +9P4J+Q+IbTaUjjC/1onV835xTDK+OnanKnvZ5lWX4G460MyoM48NEhh/ir7WlHfnypt F+cEthitiylZU0xL7dKe53NBmal4PrDVx9TfSAVOdwRYo7YS+XcxwCSktUO2krk8yFAn zxFm1UKw8Hpu2eMwynxS/2YpuGZFgwNE6uKu/RHH793ajZlE6Ihe7DSX9nBXwQC0cwS0 i6MA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si1913515pfn.386.2018.04.04.02.20.13; Wed, 04 Apr 2018 02:20:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751249AbeDDJS5 (ORCPT + 99 others); Wed, 4 Apr 2018 05:18:57 -0400 Received: from 9pmail.ess.barracuda.com ([64.235.154.211]:56605 "EHLO 9pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbeDDJS4 (ORCPT ); Wed, 4 Apr 2018 05:18:56 -0400 Received: from MIPSMAIL01.mipstec.com (mailrelay.mips.com [12.201.5.28]) by mx1411.ess.rzc.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Wed, 04 Apr 2018 09:18:43 +0000 Received: from mredfearn-linux.mipstec.com (192.168.155.41) by MIPSMAIL01.mipstec.com (10.20.43.31) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 4 Apr 2018 02:18:56 -0700 From: Matt Redfearn To: James Hogan , Ralf Baechle CC: , Alban Bedel , Antony Pavlov , Palmer Dabbelt , Matt Redfearn , Bartosz Golaszewski , Subject: [PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly Date: Wed, 4 Apr 2018 10:18:22 +0100 Message-ID: <1522833502-28007-1-git-send-email-matt.redfearn@mips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20180403160728.GB3275@saruman> References: <20180403160728.GB3275@saruman> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.155.41] X-BESS-ID: 1522833523-452059-6216-47763-1 X-BESS-VER: 2018.4.1-r1804031856 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.191678 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit "MIPS: use generic GCC library routines from lib/", MIPS now uses the generic lib/ashldi3.c, but bswapsi.c still comes from arch/mips/lib. The rules for including these into vmlinuz need updating to reflect these locations. Both objects need to be built with different CFLAGS for inclusion to vmlinuz rather than simply including the object built for the main kernel image. But the copy of the source C file can be avoided by simply calling cmd,cc_o_c to build the object from the source directly. This also removes the need for the .gitignore file to ignore the copied files, and the extra-y rule to clean them. Signed-off-by: Matt Redfearn --- arch/mips/boot/compressed/.gitignore | 2 -- arch/mips/boot/compressed/Makefile | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 arch/mips/boot/compressed/.gitignore diff --git a/arch/mips/boot/compressed/.gitignore b/arch/mips/boot/compressed/.gitignore deleted file mode 100644 index ebae133f1d00..000000000000 --- a/arch/mips/boot/compressed/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -ashldi3.c -bswapsi.c diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index adce180f3ee4..8f04d659a915 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -46,10 +46,10 @@ $(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o -extra-y += ashldi3.c bswapsi.c -$(obj)/ashldi3.o $(obj)/bswapsi.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib -$(obj)/ashldi3.c $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c - $(call cmd,shipped) +$(obj)/ashldi3.o: $(srctree)/lib/ashldi3.c + $(call cmd,cc_o_c) +$(obj)/bswapsi.o: $(srctree)/arch/mips/lib/bswapsi.c + $(call cmd,cc_o_c) targets := $(notdir $(vmlinuzobjs-y)) -- 2.7.4