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=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 ACCD9C433F5 for ; Sat, 11 Sep 2021 08:44:39 +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 EB0F360FE6 for ; Sat, 11 Sep 2021 08:44:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EB0F360FE6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:44336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOycn-0007hV-PJ for qemu-devel@archiver.kernel.org; Sat, 11 Sep 2021 04:44:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOyc7-00072R-Ho for qemu-devel@nongnu.org; Sat, 11 Sep 2021 04:43:55 -0400 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]:43990) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOyc5-0000sI-Iv for qemu-devel@nongnu.org; Sat, 11 Sep 2021 04:43:55 -0400 Received: by mail-ot1-x332.google.com with SMTP id x10-20020a056830408a00b004f26cead745so5728467ott.10 for ; Sat, 11 Sep 2021 01:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4X+a7C/5nP7HAQxrOiSymI1mRpg70mvJhLnB49wVnOs=; b=FYc9pjPHhRi/1LbHY6cg+qBPpqsxoLkv7Y9KQXL5Vl/LrIjxEPO2SUxvO2OZbKEom/ uhSDIPrRaYpIUQu8cf23vljpcIjup73e+bHzr9/JSMlaMoRUSEf2lY2sTlYjBUzMcKl7 Ac0nVImC2BOoteilo7CvNErdd43kveyimg2EnDGmIMmzrm5lW3NMGDj7SiaVJqSZ8QoM 5BZWY6973HTHFVLVq1HgjctqqRxSftpZg+um98aupzF38uYFwr6oC6JEo65RUmb6YejR fbBfl+Uq+sgFaKxbo8fatqimo1BmZZYGlHB9WMvVTGYhioNY9aPxS22XyGOsmOpOLPu5 KIGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4X+a7C/5nP7HAQxrOiSymI1mRpg70mvJhLnB49wVnOs=; b=Y7LWJ3dxt4aichjLyHs32kwL0enIFSh6PZh41fEXTNbpNwBRufokjz0CnhnwIbvgrN zoL8ovayimTqLNrlVe2tqXEgQBT0ScJqnbD8Ux1B9rC5uCZiTuUZ6V+aW+BzTOBxR+VO fC+yj/Zeym9lhViFMQQ9gDLnggecRlmvMKYEq60Znm1MbAkA7+bQmDGvf0UZDRZPBgQV 2FgKVe5ohUCCdwlNEgaUYxtqk3qfcNoLnYkP6pSVQFqio8z9qtBJ9gCr08m+S6PWv3os JIORlrxhqCRDrd7g/E3k/BIdcOMHFiQk6WbLh2BO/ppaJ4NWba2x+gXutj6L9Q9c+DZx tL+g== X-Gm-Message-State: AOAM530WTCkJ83ccbskyiqpuGB8CEpJumYmQf1t5USa9MBtGAHhK4uuU 5qtS5c1MAtg2ExZx03pXOcI2juHYzUnmra5VPO0= X-Google-Smtp-Source: ABdhPJxMFPGTALbIGjKBDKyxiXvAKTCSUXyL0fFZRspfe0W08VSTifnlDk9WJxNYXmu1IPKh5m5/DykPXgHITbG9XwE= X-Received: by 2002:a05:6830:9:: with SMTP id c9mr1586334otp.122.1631349831915; Sat, 11 Sep 2021 01:43:51 -0700 (PDT) MIME-Version: 1.0 References: <6755edb6-f953-4ca2-a4b6-31e4566e9842@zapateado.de> In-Reply-To: From: Howard Spoelstra Date: Sat, 11 Sep 2021 10:43:40 +0200 Message-ID: Subject: Re: [qemu-web PATCH] Fix link to Windows page in Wiki To: Helge Konetzka Content-Type: multipart/alternative; boundary="0000000000003c5cce05cbb43b83" Received-SPF: pass client-ip=2607:f8b0:4864:20::332; envelope-from=hsp.cat7@gmail.com; helo=mail-ot1-x332.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 , qemu-devel qemu-devel Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000003c5cce05cbb43b83 Content-Type: text/plain; charset="UTF-8" On Sat, Sep 11, 2021 at 8:29 AM Helge Konetzka wrote: > Am 10.09.21 um 17:44 schrieb Paolo Bonzini: > > On 25/08/21 18:43, Helge Konetzka wrote: > >> Furthermore I would like to propose to change the instructions for > >> Native builds with MSYS2 on Wiki Windows page. > >> > >> Please remove the section which copies system binaries to match the > >> expected file names! > >> > >> Instead define variables for configure (gcc-ar and gcc-ranlib are > >> existing copies of x86_64-w64-mingw32-gcc-ar and > >> x86_64-w64-mingw32-gcc-ranlib) and add strip to enable make install: > >> > >> AR=gcc-ar NM=nm OBJCOPY=objcopy RANLIB=gcc-ranlib WINDRES=windres > >> STRIP=strip \ > >> ./configure --cross-prefix=x86_64-w64-mingw32- --enable-gtk --enable-sdl > > > > Do you even need anything but "./configure"? (possibly AR=gcc-ar NM=nm > > at the beginning)? > > Sorry for being indistinct! > > My intention was to put "AR=gcc-ar NM=nm OBJCOPY=objcopy > RANLIB=gcc-ranlib WINDRES=windres STRIP=strip" in front of "./configure" > (see the '\' after STRIP=strip) instead of copying binaries: > > diff -Naur qemu.org.orig/Hosts/W32 qemu.org/Hosts/W32 > --- qemu.org.orig/Hosts/W32 2021-09-11 08:27:01.198715675 +0200 > +++ qemu.org/Hosts/W32 2021-09-11 08:28:15.853605118 +0200 > @@ -232,14 +232,6 @@ > Close the MSYS2 console. > Start mingw64.exe. > > -cd /mingw64/bin > -cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe > -cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe > -cp windres.exe x86_64-w64-mingw32-windres.exe > -cp nm.exe x86_64-w64-mingw32-nm.exe > -cp objcopy.exe x86_64-w64-mingw32-objcopy.exe > -cd ~ > - > Download the QEMU source code: > > git clone https://www.github.com/qemu/qemu > @@ -247,6 +239,7 @@ > Finally build QEMU with: > > cd qemu > +AR=gcc-ar NM=nm OBJCOPY=objcopy RANLIB=gcc-ranlib WINDRES=windres > STRIP=strip \ > ./configure --cross-prefix=x86_64-w64-mingw32- --enable-gtk --enable-sdl > make > > Hi, I wrote those instructions as I obviously could not find a better way to get Qemu to cross-compile using MSYS2 in Windows. When you look at configure, you see that only adding the cross-prefix will not find the MSYS equivalents of some tools: ar="${AR-${cross_prefix}ar}" looks for x86_64-w64-mingw32-ar.exe and not (as it is named in MSYS2) x86_64-w64-mingw32-gcc-ar.exe Perhaps it would be better to fix configure for the MSYS2 case so the flags or the renaming are not required? Best, Howard --0000000000003c5cce05cbb43b83 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



On Sat, Sep 11, 2021 at 8:29 AM Helge Konetzka <hk@zapateado.de> wrote:
Am 10.09.21 um 17:44 sch= rieb Paolo Bonzini:
> On 25/08/21 18:43, Helge Konetzka wrote:
>> Furthermore I would like to propose to change the instructions for=
>> Native builds with MSYS2 on Wiki Windows page.
>>
>> Please remove the section which copies system binaries to match th= e
>> expected file names!
>>
>> Instead define variables for configure (gcc-ar and gcc-ranlib are =
>> existing copies of x86_64-w64-mingw32-gcc-ar and
>> x86_64-w64-mingw32-gcc-ranlib) and add strip to enable make instal= l:
>>
>> AR=3Dgcc-ar NM=3Dnm OBJCOPY=3Dobjcopy RANLIB=3Dgcc-ranlib WINDRES= =3Dwindres
>> STRIP=3Dstrip \
>> ./configure --cross-prefix=3Dx86_64-w64-mingw32- --enable-gtk --en= able-sdl
>
> Do you even need anything but "./configure"? (possibly AR=3D= gcc-ar NM=3Dnm
> at the beginning)?

Sorry for being indistinct!

My intention was to put "AR=3Dgcc-ar NM=3Dnm OBJCOPY=3Dobjcopy
RANLIB=3Dgcc-ranlib WINDRES=3Dwindres STRIP=3Dstrip" in front of "= ;./configure"
(see the '\' after STRIP=3Dstrip) instead of copying binaries:

diff -Naur qemu.org.orig/Hosts/W32 qemu.org/Hosts/W32
--- qemu.org.orig/Hosts/W32=C2=A0 =C2=A0 =C2=A02021-09-11 08:27:01.19871567= 5 +0200
+++ qemu.org/Hosts/W32=C2=A0 2021-09-11 08:28:15.853605118 +0200
@@ -232,14 +232,6 @@
=C2=A0 =C2=A0 =C2=A0 Close the MSYS2 console.
=C2=A0 =C2=A0 =C2=A0 Start mingw64.exe.

-cd /mingw64/bin
-cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe
-cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe
-cp windres.exe x86_64-w64-mingw32-windres.exe
-cp nm.exe x86_64-w64-mingw32-nm.exe
-cp objcopy.exe x86_64-w64-mingw32-objcopy.exe
-cd ~
-
=C2=A0 =C2=A0 =C2=A0 Download the QEMU source code:

=C2=A0 git clone https://www.github.com/qemu/qemu
@@ -247,6 +239,7 @@
=C2=A0 =C2=A0 =C2=A0 Finally build QEMU with:

=C2=A0 cd qemu
+AR=3Dgcc-ar NM=3Dnm OBJCOPY=3Dobjcopy RANLIB=3Dgcc-ranlib WINDRES=3Dwindre= s
STRIP=3Dstrip \
=C2=A0 ./configure --cross-prefix=3Dx86_64-w64-mingw32- --enable-gtk --enab= le-sdl
=C2=A0 make

=C2=A0
Hi,

I = wrote those instructions as I obviously could not find a better way to get = Qemu to cross-compile using MSYS2 in Windows.
When you look at co= nfigure, you see that only adding the cross-prefix will not find the MSYS e= quivalents of some tools:

ar=3D"${AR-${cross_= prefix}ar}"
loo= ks for x86_64-w64-mingw32-ar.exe and not (as it is named in MSYS2) x86_64-w= 64-mingw32-gcc-ar.exe
Perhaps it wou=
ld be better to fix configure for the MSYS2 case so the flags or the renami=
ng are not required?
Best,
Howard
--0000000000003c5cce05cbb43b83--