From mboxrd@z Thu Jan 1 00:00:00 1970 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=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 1617CC433F5 for ; Thu, 16 Sep 2021 14:02:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 CB32361130 for ; Thu, 16 Sep 2021 14:02:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CB32361130 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ilande.co.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:35034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQrya-0004Sg-Th for qemu-devel@archiver.kernel.org; Thu, 16 Sep 2021 10:02:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQrqG-0000ze-QY for qemu-devel@nongnu.org; Thu, 16 Sep 2021 09:54:20 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:40808 helo=mail.default.ilande.bv.iomart.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQrqF-0008Mh-0l for qemu-devel@nongnu.org; Thu, 16 Sep 2021 09:54:20 -0400 Received: from host109-153-76-56.range109-153.btcentralplus.com ([109.153.76.56] helo=[192.168.50.176]) by mail.default.ilande.bv.iomart.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mQrq4-0001SY-TO; Thu, 16 Sep 2021 14:54:13 +0100 To: Helge Konetzka , qemu-devel@nongnu.org References: <2b5ab039-8495-b55f-03f1-ecfd996907a9@zapateado.de> From: Mark Cave-Ayland Message-ID: <058d0e1f-7268-ff3f-7628-48941ee48694@ilande.co.uk> Date: Thu, 16 Sep 2021 14:54:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <2b5ab039-8495-b55f-03f1-ecfd996907a9@zapateado.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 109.153.76.56 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: Re: [PATCH] configure/optionrom: Fix MSYS2 multiboot.bin issue X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.bv.iomart.io) Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.bv.iomart.io X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-1.488, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Howard Spoelstra Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 15/09/2021 11:56, Helge Konetzka wrote: > This patch enables native builds on MSYS2 with symlinks disabled. > > > Signed-off-by: Helge Konetzka > --- > > Without this patch these builds fail with: > > make[1]: *** No rule to make target 'multiboot.bin', needed by 'all'. Stop. > make: *** [Makefile:189: pc-bios/optionrom/all] Error 2 > make: *** Waiting for unfinished jobs.... > ... > ==> ERROR: A failure occurred in build(). >      Aborting... > > Builds fail because make cannot determine correct TOPSRC_DIR/SRC_DIR based on copied > instead of linked Makefile > > After applying this patch to current master I succeeded in building natively on Linux > and Windows/MSYS2 with symlinks disabled and enabled (winsymlinks:nativestrict, bash > executed as Administrator). > >  configure                  | 4 ++++ >  pc-bios/optionrom/Makefile | 5 ++--- >  2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/configure b/configure > index da2501489f..a12bc8edbf 100755 > --- a/configure > +++ b/configure > @@ -5090,6 +5090,10 @@ for rom in seabios; do >      echo "RANLIB=$ranlib" >> $config_mak >  done > > +config_mak=pc-bios/optionrom/config.mak > +echo "# Automatically generated by configure - do not modify" > $config_mak > +echo "TOPSRC_DIR=$source_path" >> $config_mak > + >  if test "$skip_meson" = no; then >    cross="config-meson.cross.new" >    meson_quote() { > diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile > index 30771f8d17..3482508a86 100644 > --- a/pc-bios/optionrom/Makefile > +++ b/pc-bios/optionrom/Makefile > @@ -1,6 +1,5 @@ > -CURRENT_MAKEFILE := $(realpath $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) > -SRC_DIR := $(dir $(CURRENT_MAKEFILE)) > -TOPSRC_DIR := $(SRC_DIR)/../.. > +include config.mak > +SRC_DIR := $(TOPSRC_DIR)/pc-bios/optionrom >  VPATH = $(SRC_DIR) > >  all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin (Added Marc-André on CC) Thanks for the patch! IMO this is a better solution since then there are no special requirements for Windows compared with POSIX-type builds. Marc-André, could you have a look at this? In short, commit bf708f3c4a ("optionrom: simplify Makefile") in its current form requires either a) copying and renaming compiler binaries and passing --cross-prefix into configure (see https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2) or b) enabling symlinks in Windows developer mode as per https://www.mail-archive.com/qemu-devel@nongnu.org/msg750968.html for native Windows builds. ATB, Mark.