From patchwork Fri Jun 9 05:24:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 9777185 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A88506034B for ; Fri, 9 Jun 2017 05:24:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B9B127F8F for ; Fri, 9 Jun 2017 05:24:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9043328546; Fri, 9 Jun 2017 05:24:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34DF127F8F for ; Fri, 9 Jun 2017 05:24:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751515AbdFIFYv (ORCPT ); Fri, 9 Jun 2017 01:24:51 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:35809 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751483AbdFIFYv (ORCPT ); Fri, 9 Jun 2017 01:24:51 -0400 Received: by mail-pg0-f65.google.com with SMTP id f127so6661699pgc.2; Thu, 08 Jun 2017 22:24:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=55XmoVf15EQcNrOhTVGxxkgEgjyhFsH3rg6Wba7wpvA=; b=GoGzOnm0AmcomkCceGfG6uIuk7xEmMfezdpYd3in8aK2D/nmISBmheMOeYonCtZUuK O3PULjrtACpuO9JCnhjyYXl+Qe5Ozv4+IauS9IojW2gTewntoS5j8ujgUtJFFbFFe1vX Vkj4D0lGaQZyjjxb4yHuQf4HwE9y2PCABVwyTHgN5bspa8HmRFJKJFaBpVV36dpcKtPi CQzZ2SI+Idg4G8VXg0Uu6CI9/mykDL/l+bPkT07VBp+7FAp+aq3wEJwO9ZA28F+YsmvM SuoZTU7ak2IvQbKVmb/DdDHqdFp6OmtWeQKHc2uch7v3P8WhNBE7iYAkSZ5F/7trJsVN 428A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=55XmoVf15EQcNrOhTVGxxkgEgjyhFsH3rg6Wba7wpvA=; b=dNdQviZTVj1AIPABgbctsLJdm3lTZqwpXuiaPa6L58VS9eLvn/+wEl5yTMNSlhlCGU 2I9M+pILMedsyoO65BsWzd6dMw/x0TxCO5OWMKTR0ME3BwL6kJkTMjSri9wgkZaqpQvB zxdFrp6Z0LI8oDVTUWXslOJZAjqCsDk+MUZGbUY/F1jM+mn51Cx89fNnLD8UDJpTz6Is IWJ9+U5rqMXVaP5S1153KSQbmwHqNXuF5IJdSBFVfH2G4yw9SwnLfjZeYwNDVerM59IV v7P72p3hHhjXxP1Nv4yYZsMRYWe4i/nOk4KCZUihaQixXQoDUKSgCf6jBuZ8Fzg3fcEt N8Ow== X-Gm-Message-State: AODbwcDY3jGtPhO3P6qUAaL7bFxfZNozPqa5M27RpsHUL0O77Ug1xUI+ bVRE06KyXkzMWjjr X-Received: by 10.99.94.70 with SMTP id s67mr41183021pgb.82.1496985890130; Thu, 08 Jun 2017 22:24:50 -0700 (PDT) Received: from roar.au.ibm.com (14-202-185-133.tpgi.com.au. [14.202.185.133]) by smtp.gmail.com with ESMTPSA id h15sm135375pfk.120.2017.06.08.22.24.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jun 2017 22:24:49 -0700 (PDT) From: Nicholas Piggin To: linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org Cc: Nicholas Piggin , Masahiro Yamada , Michal Marek , Linus Torvalds , Stephen Rothwell Subject: [PATCH 2/5] kbuild: thin archives use P option to ar Date: Fri, 9 Jun 2017 15:24:14 +1000 Message-Id: <20170609052417.561-3-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170609052417.561-1-npiggin@gmail.com> References: <20170609052417.561-1-npiggin@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The P option makes ar do full path name matching and can prevent ar from discarding files with duplicate names in some cases of creating thin archives from thin archives. The sh architecture in particular loses some object files from its kernel/cpu/sh*/ directories without this option. This could be a bug in binutils ar, but the P option should not cause any negative effects so it is safe to use to work around tihs with. Signed-off-by: Nicholas Piggin --- scripts/Makefile.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 733e044fff8b..4a9a2cec0a1b 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -437,8 +437,8 @@ $(sort $(subdir-obj-y)): $(subdir-ym) ; ifdef builtin-target ifdef CONFIG_THIN_ARCHIVES - cmd_make_builtin = rm -f $@; $(AR) rcST$(KBUILD_ARFLAGS) - cmd_make_empty_builtin = rm -f $@; $(AR) rcST$(KBUILD_ARFLAGS) + cmd_make_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) + cmd_make_empty_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) quiet_cmd_link_o_target = AR $@ else cmd_make_builtin = $(LD) $(ld_flags) -r -o @@ -478,7 +478,7 @@ ifdef lib-target quiet_cmd_link_l_target = AR $@ ifdef CONFIG_THIN_ARCHIVES - cmd_link_l_target = rm -f $@; $(AR) rcsT$(KBUILD_ARFLAGS) $@ $(lib-y) + cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(lib-y) else cmd_link_l_target = rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@ $(lib-y) endif @@ -531,7 +531,7 @@ cmd_link_multi-link = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secana ifdef CONFIG_THIN_ARCHIVES quiet_cmd_link_multi-y = AR $@ - cmd_link_multi-y = rm -f $@; $(AR) rcST$(KBUILD_ARFLAGS) $@ $(link_multi_deps) + cmd_link_multi-y = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) $@ $(link_multi_deps) else quiet_cmd_link_multi-y = LD $@ cmd_link_multi-y = $(cmd_link_multi-link)