qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Helge Konetzka <hk@zapateado.de>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Howard Spoelstra <hsp.cat7@gmail.com>
Subject: [PATCH] configure/optionrom: Fix MSYS2 multiboot.bin issue
Date: Wed, 15 Sep 2021 12:56:34 +0200	[thread overview]
Message-ID: <2b5ab039-8495-b55f-03f1-ecfd996907a9@zapateado.de> (raw)

This patch enables native builds on MSYS2 with symlinks disabled.


Signed-off-by: Helge Konetzka <hk@zapateado.de>
---

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
-- 
2.30.2


             reply	other threads:[~2021-09-15 10:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 10:56 Helge Konetzka [this message]
2021-09-16 13:54 ` [PATCH] configure/optionrom: Fix MSYS2 multiboot.bin issue Mark Cave-Ayland
2021-09-27  5:00 ` ping " Helge Konetzka
2021-10-14 16:10 ` Helge Konetzka
2021-10-15 10:39 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2b5ab039-8495-b55f-03f1-ecfd996907a9@zapateado.de \
    --to=hk@zapateado.de \
    --cc=hsp.cat7@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).