From nobody Mon Feb 9 18:46:14 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664474983; cv=none; d=zohomail.com; s=zohoarc; b=kSJWBloH2GITv5cJCk/O16IBKPI3vquQYtXfTgwCFO1wBcTyZ16FWMr9pRaLfqfkXnFfQXpLzrKQEptzuuDMPORiYkMHXnwJMqeN5SPoIY+1RkfFEJMpgpA4FQFrQ3Enh2Iaojn4n+Ejil6hK4Z9BcJ946LpCe3ZWPytBLOp5gY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664474983; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ziq4VGpS8d35Ri8KEGR9TwGMwDkZruBUJpKoLFh+vSQ=; b=OYWL2q/W9MIakDebsyw/LX9JIQJhjcWuCU+AivhjQAfA/Gu13Nm/3TYWnkRtZ8WCV26j4A1YBiICPOTT9uex34fkTCly1wkuX9iGI9TCrEcg2BvUKOquwirbUXEKBqKsjdVjPeaSOvbSWUb7slsExUgN0Kybm9h5e8m4fBY7JjU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 166447498398270.86852767557411; Thu, 29 Sep 2022 11:09:43 -0700 (PDT) Received: from localhost ([::1]:48234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odxyf-00040C-AN for importer@patchew.org; Thu, 29 Sep 2022 14:09:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odwQr-0003hT-Rz for qemu-devel@nongnu.org; Thu, 29 Sep 2022 12:30:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:49097) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odwQo-00036V-Kn for qemu-devel@nongnu.org; Thu, 29 Sep 2022 12:30:39 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-593-6tjRe2UrMY2BquPbk2nYJw-1; Thu, 29 Sep 2022 12:30:36 -0400 Received: by mail-ed1-f71.google.com with SMTP id w17-20020a056402269100b0045249bc17a9so1648348edd.9 for ; Thu, 29 Sep 2022 09:30:36 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id s3-20020a056402520300b00453d8dee355sm5835151edd.60.2022.09.29.09.30.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 09:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664469037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ziq4VGpS8d35Ri8KEGR9TwGMwDkZruBUJpKoLFh+vSQ=; b=KM7uuv758jjad8LKVtaK2Pa8yWlMmFTQnQjPIjoFruuXqeGt6Tcj9EPI4rU537rqCRWKBF N46eND6fMCTKoQA4jqgbPNMLKMph34NaCVh8lzZUSAium7wZ0tQXaBm+WvOm58J1G+eZIy KLRams+rwn5aSx1dvc1wSYZSF3VqNJk= X-MC-Unique: 6tjRe2UrMY2BquPbk2nYJw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date; bh=ziq4VGpS8d35Ri8KEGR9TwGMwDkZruBUJpKoLFh+vSQ=; b=UrL6oYVvaJTakuAqg7uVNTeBkhLzhgmfU1Lei/mLY/Evpg9NGx7vI2Fr9Aqnn5R/00 +dR55fwuU9B239jbRtLlScSZwA228ycFdJJQi46xjSgFzlfpzsoWmlwROIT5GRUkzptv r/achZ9Fwr2HPiPzyAUhuGrImWfrzpQcyVSVT+Qy2V3Jb7odQVZTlMmg+4P7aLE1W1RX oYdfp0HZZ0NITmOKPUq7k4Wd0N8cLqEvZAl1luC9rZvuS3yO70I6IY7dtRHVsyC3NTcM usZckFXGDyjYhlvgVsIKACMVsspl9oCYP526Ls7jRyYDoHcl9+r3MHph+5x/bTzLR04I iJeQ== X-Gm-Message-State: ACrzQf0f0Ce9NwVFImk9zeWKQUiVjkQ5kCkpQ540YysMBPRB0RZy8RLM nqdvW+hvDUrSvPjb5MDkYOvyOhVP4HJqxpbDGsjlFKzjFOfTit7A0aAfCBybFyTIRCdUrHf6xpw QAor9KrtjMEfU698YU9sC2HQeWknhqQrCI6aCKuaZdeOeIvE3MZsCvnwYrN2/1O8e4Ho= X-Received: by 2002:a05:6402:d49:b0:458:27b3:4d1b with SMTP id ec9-20020a0564020d4900b0045827b34d1bmr3601650edb.201.1664469034327; Thu, 29 Sep 2022 09:30:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6rKwxy8HJCUj4U9jJb23CqlAqHlnSvQSEx/4uOF/8cOIQPG7pmLXFMH2rTfO6ElfHkEs1M8w== X-Received: by 2002:a05:6402:d49:b0:458:27b3:4d1b with SMTP id ec9-20020a0564020d4900b0045827b34d1bmr3601620edb.201.1664469033906; Thu, 29 Sep 2022 09:30:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 06/14] configure: do not invoke as/ld directly for pc-bios/optionrom Date: Thu, 29 Sep 2022 18:30:06 +0200 Message-Id: <20220929163014.16950-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220929163014.16950-1-pbonzini@redhat.com> References: <20220929163014.16950-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.08, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664474984625100001 Content-Type: text/plain; charset="utf-8" Just use using the compiler binary, with -nostdlib in the case of the linker; the compiler driver (whether i686-*-gcc, or x86_64-*-gcc with the -m32 option) will then pick the right magic option to as and ld. Signed-off-by: Paolo Bonzini --- configure | 22 +++++----------------- pc-bios/optionrom/Makefile | 12 ++++-------- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/configure b/configure index cc4ecd6008..894e37310f 100755 --- a/configure +++ b/configure @@ -2320,23 +2320,11 @@ probe_target_compiler i386-softmmu if test -n "$target_cc" && test "$targetos" !=3D "darwin" && test "$targetos" !=3D "sunos" &&= \ test "$targetos" !=3D "haiku" && test "$softmmu" =3D yes ; then - # Different host OS linkers have different ideas about the name of the= ELF - # emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the = _fbsd - # variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386p= e. - for emu in elf_i386 elf_i386_fbsd elf_i386_obsd i386pe; do - if "$target_ld" -verbose 2>&1 | grep -q "^[[:space:]]*${emu}[[:spa= ce:]]*$"; then - ld_i386_emulation=3D"$emu" - break - fi - done - if test -n "$ld_i386_emulation"; then - roms=3D"pc-bios/optionrom" - config_mak=3Dpc-bios/optionrom/config.mak - echo "# Automatically generated by configure - do not modify" > $c= onfig_mak - echo "TOPSRC_DIR=3D$source_path" >> $config_mak - echo "LD_I386_EMULATION=3D$ld_i386_emulation" >> $config_mak - write_target_makefile >> $config_mak - fi + roms=3D"pc-bios/optionrom" + config_mak=3Dpc-bios/optionrom/config.mak + echo "# Automatically generated by configure - do not modify" > $confi= g_mak + echo "TOPSRC_DIR=3D$source_path" >> $config_mak + write_target_makefile >> $config_mak fi =20 probe_target_compiler ppc-softmmu diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index e90ca2e1c6..3e06c11dea 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -20,28 +20,24 @@ override CFLAGS +=3D $(call cc-option, -fcf-protection= =3Dnone) # Flags for dependency generation override CPPFLAGS +=3D -MMD -MP -MT $@ -MF $(@D)/$(*F).d =20 -override CFLAGS +=3D $(filter -W%, $(QEMU_CFLAGS)) override CFLAGS +=3D $(call cc-option, -fno-pie) +override CFLAGS +=3D $(call cc-option, -no-pie) override CFLAGS +=3D -ffreestanding -I$(TOPSRC_DIR)/include override CFLAGS +=3D $(call cc-option, -fno-stack-protector) override CFLAGS +=3D $(call cc-option, -Wno-array-bounds) =20 -Wa =3D -Wa, -override ASFLAGS +=3D -32 -override CFLAGS +=3D $(call cc-option, $(Wa)-32) - -override LDFLAGS =3D -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds +override LDFLAGS =3D -nostdlib -Wl,-T,$(SRC_DIR)/flat.lds =20 pvh.img: pvh.o pvh_main.o =20 %.o: %.S - $(call quiet-command,$(CC) $(CPPFLAGS) -E -o - $< | $(AS) $(ASFLAGS) -o $= @,"AS","$@") + $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<,"AS","$@") =20 %.o: %.c $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@,"CC","$@") =20 %.img: %.o - $(call quiet-command,$(LD) $(LDFLAGS) -s -o $@ $^,"BUILD","$@") + $(call quiet-command,$(CC) $(CFLAGS) $(LDFLAGS) -s -o $@ $^,"BUILD","$@") =20 %.raw: %.img $(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@,"BUILD","$@") --=20 2.37.3