Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25818C4338F for ; Tue, 24 Aug 2021 15:00:37 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D8976610C7 for ; Tue, 24 Aug 2021 15:00:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D8976610C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.171555.313042 (Exim 4.92) (envelope-from ) id 1mIXuV-0003WS-5L; Tue, 24 Aug 2021 15:00:19 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 171555.313042; Tue, 24 Aug 2021 15:00:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIXuV-0003WL-20; Tue, 24 Aug 2021 15:00:19 +0000 Received: by outflank-mailman (input) for mailman id 171555; Tue, 24 Aug 2021 15:00:18 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mIXuT-0003WF-To for xen-devel@lists.xenproject.org; Tue, 24 Aug 2021 15:00:17 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id fd4fb902-04eb-11ec-a8e4-12813bfff9fa; Tue, 24 Aug 2021 15:00:16 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: fd4fb902-04eb-11ec-a8e4-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629817215; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=PYzDpQ+zJTaK4UhGmMVlgoUAKQkUadY8DkY4QPcsSCI=; b=XH4NvidhfOB14/QrRnFzLvOhYGtbPypSvIZj5nFqLjk8oYj1yV/Rvbu3 x5nUNU79+IwcE8pUuU/IC6Rz5zLoC4lIJi81uDlcpvo/zUYgQg4CLaZnX UGRqu1q1GdJumUl9a9LzVFke9FD09m4RhLzPXkBejjdZ5DjzTRmJX36FL A=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: XtIJ1k6kg6DvDDjdAEE9m0uZV7hBxkLB7lXQ2ibhFeUzzQ8PJnXe2UQU8IjfKofvvOOtCTKQ7J UCZU0W+XVw9x5m6A8SRQ/E2NCAf57KKwOx5B2J1XYngyh6tieXxGoIjfyZffJHfIFUy1OZJt2w ftPP2VKGlJ9ZfHMXhGMlvCBPFnzCxuLbvladMVqxI83i2LvZ79Lgb1xeM/5Z4joJG0MYNZuyaJ oKWy4A5feS6l9lIO/6ftVOEZJs3NeOiycWEsgNrramB3jAqS2edL02xdKJyZYJL25tzNNLz42L oWAOoSyJEUBaCqxGvl6ThivB X-SBRS: 5.1 X-MesageID: 50795068 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:BIjFu6jS8V+MK2sE16drg43IGXBQXtoji2hC6mlwRA09TySZ// rBoB0+726RtN9xYgBEpTnuAsS9qB/nmaKdpLNhWotKPzOW2ldATrsD0WKK+VSJcEfDH6xmpM RdmsBFebvN5DNB7PoSjjPWL+od X-IronPort-AV: E=Sophos;i="5.84,347,1620705600"; d="scan'208";a="50795068" Date: Tue, 24 Aug 2021 16:00:12 +0100 From: Anthony PERARD To: Julien Grall CC: , Stefano Stabellini , Volodymyr Babchuk Subject: Re: [XEN PATCH v7 10/51] build,arm: move LDFLAGS change to arch.mk Message-ID: References: <20210824105038.1257926-1-anthony.perard@citrix.com> <20210824105038.1257926-11-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: On Tue, Aug 24, 2021 at 01:50:33PM +0100, Julien Grall wrote: > Hi Anthony, > > Can you explain why this is moved? Well, it was in the wrong place, it is best to avoid making changes to XEN_CFLAGS or XEN_LDFLAGS in Makefile in subdirectories as those are exported variable and may not work as expected. They may or may not change *flags in subdirectories, or in the case of arch/*/Makefile, they might changes *flags in the other directories or not depending on whether one try to build "xen" or just "common/". But more importantly, with patch build: set ALL_OBJS to main Makefile; move prelink.o to main Makefile make isn't going to load arch/*/Makefile before building the rest of xen, and thus changes to XEN_LDFLAGS will only apply to arch/*/Makefile rather than for all objects. (XEN_LDFLAGS is used with all built_in.o and few other places like for libfdt-temp.o) If you want an explanation in the commit message, maybe this one will do: Changes to XEN_LDFLAGS may or may not apply to targets in for example "common/" depending on whether one runs `make` or `make common/`. But arch.mk is loaded before doing any build, so changes to LDFLAGS there mean that the value of XEN_LDFLAGS won't depends on the initial target. Thanks, -- Anthony PERARD