Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3605364imm; Mon, 6 Aug 2018 07:38:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpduL5U8yaLocpD8E8CFcwcaG6xn+gyx2csmQHeQpdgPxKoR6GNCZbYzIZGhTWiT4QwMDrKh X-Received: by 2002:a63:aa44:: with SMTP id x4-v6mr14952032pgo.120.1533566300289; Mon, 06 Aug 2018 07:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533566300; cv=none; d=google.com; s=arc-20160816; b=os6EJM2mFePiKGp4vSnwDmed6AJ7h8WnAKbW37yhpDkFv89ncHmZGFJuxc3H2qMt7a YgHspxWrZeISR8X3F8Hxx23VotFWnpGu2VMmkVQ9YHhobRwIkwXVHaMLQYUQBfXP7SPK 6quvTp2/VLAFlPOA26VgLFUqiVR4bN4WvY7Qxyoq7lrFfGRnRWgw5YhJRbGUfSBg1cma eXcePWU7tQNAdjXLEv/dWIgSUmNiUHZqY3ffP1/d7Z/YSWolOZ/EvT4+t1V6GtCTHzKd fF1gALoDLI1jGq/hYlJW9ObHnQQ8vKaNGIGn+v9d4xZh4vLVr6GrB18wjO4FUzMX8Koe 3DUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-disposition :mime-version:subject:cc:to:from:date:arc-authentication-results; bh=11rvIijLkTANeMIFbsfUCfza5Q1yBAtAUfEawpFmps4=; b=J7W3/D5pWC+I6OIBQtpSjgiVCAqKUs2+o69Hpnf0gaXaPR3leWjE9eeGgDFRDgYai3 1zBTS4xGLvqccGlvoGzDi2sZpG/RpKZD9DcuyatY/5om7fA06bOBSsi/kQDzFg/6sp6C jqV5SQHeCHAhmG3pzog7DGuckKfXQ7dUz7sG+vvO1B0xcFP4auk16Bd0CntcQ7rkg203 Q4UlIjlla1j9WbO0wXESw5gtkW40lCqZXPsKKMikk4Yb9H4/3te2nfONs1UkntZ2t8YN 4kIH7UkA0V5C23LWTFRU+JHO26uZmciGjW6cOAnhRpk7Z5qVR1joB+UsGvaMcZ0rU9Gj 42gA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16-v6si10030846pls.404.2018.08.06.07.38.04; Mon, 06 Aug 2018 07:38:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732250AbeHFQqk (ORCPT + 99 others); Mon, 6 Aug 2018 12:46:40 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47198 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730770AbeHFQqk (ORCPT ); Mon, 6 Aug 2018 12:46:40 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w76EUAJo069476 for ; Mon, 6 Aug 2018 10:37:16 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kpnkrqd1q-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 Aug 2018 10:37:15 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 6 Aug 2018 15:37:13 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 6 Aug 2018 15:37:10 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w76Eb9kf40304704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 6 Aug 2018 14:37:09 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 434115204E; Mon, 6 Aug 2018 17:37:17 +0100 (BST) Received: from localhost (unknown [9.152.212.144]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 1989252054; Mon, 6 Aug 2018 17:37:17 +0100 (BST) Date: Mon, 6 Aug 2018 16:37:07 +0200 From: Vasily Gorbik To: Masahiro Yamada , Michal Marek Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCH 0/1] kbuild: allow alternate src for target's implicit prerequisite MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-TM-AS-GCONF: 00 x-cbid: 18080614-0028-0000-0000-000002E63CB7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080614-0029-0000-0000-0000239E5F85 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-06_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=692 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808060153 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While adding more functionality to s390's decompressor code and looking at other architectures implementation there is an apparent need to reuse some code outside of arch/*/boot folder (files like lib/ctype.c, lib/cmdline.c and others). On s390 there is a need to rebuild and reuse few additional files to print out early error messages (console support, ebcdic, arch/s390/lib/mem.S). This list will be extended with additional features implementation (like kaslr, etc). Current solution seems to be reverse including source files, which is ugly. The following patch proposes another way to address that problem, which in the end would we used like: in some arch/*/boot/Makefile: obj-y := ctype.o cmdline.o mem.o ..some local files.. SRCDIR_ctype.o := lib SRCDIR_cmdline.o := lib SRCDIR_mem.o := arch/s390/lib Vasily Gorbik (1): kbuild: allow alternate src for target's implicit prerequisite scripts/Makefile.build | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) -- 2.18.0.13.gd42ae10