From nobody Tue Nov 18 07:47:47 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608056637; cv=none; d=zohomail.com; s=zohoarc; b=INchevvscOkhWWutq0eqy5xCYP/sEfTm4/s7LfmWzvxwmCnVtto2WaAwzTb1n7/mh1NaFUt8fK8NCeSnP82kzM7C9HEH/OxDNuyF4PFKk/h/88KiSghRekYrNplTjKEjcx2iB5wundklbVtBcmu+s8QsFksh9oOggJF2Gw8ESvI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608056637; h=Content-Type:Content-Transfer-Encoding:Cc: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=bemhwXleYo/H+Fzmdbp/M6MBosU6GzGa3ffHK2XxtKU=; b=OW+kQCKJMcRsuJwvrHQkc2bxzTLQUrVhdqoxO39FQJ8AZ1z0Rwk9Hqs6vvWNcgWmDo6iS9AaTaAuDWi/1/JzSa8I9C84yt4zYEs/ZsV6df0MnlOFrjjNNs6lJEFbwFuRapWewCjSwndJ6qUZdbwjL29Thd7i+bsEAfkjz5DlFh0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160805663714323.849359375515633; Tue, 15 Dec 2020 10:23:57 -0800 (PST) Received: from localhost ([::1]:49908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpEzK-00083r-8j for importer@patchew.org; Tue, 15 Dec 2020 13:23:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpEY2-0003zq-54 for qemu-devel@nongnu.org; Tue, 15 Dec 2020 12:55:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36252) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpEXg-0001a3-L2 for qemu-devel@nongnu.org; Tue, 15 Dec 2020 12:55:41 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-247-W4AKqkRIPO2k5jlQnwNQiw-1; Tue, 15 Dec 2020 12:55:14 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7E22910054FF; Tue, 15 Dec 2020 17:55:13 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEF6260854; Tue, 15 Dec 2020 17:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608054918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bemhwXleYo/H+Fzmdbp/M6MBosU6GzGa3ffHK2XxtKU=; b=KxiSIvMTaCmqUU6w/SWd2UDEWnbEd5xTBeCzgkmOF0+fmMLUx1m9Uw36qB4iLy3XXpwScR txUGlgTwmYicNF0t6inykZv6yft5F5nnBSExgFVbDnLhtjxu0vU2ZL12F+5cfqRchcjHwE no9rAwDC8Uxr9sdXCIETvC17r8hcu9c= X-MC-Unique: W4AKqkRIPO2k5jlQnwNQiw-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 45/45] build: -no-pie is no functional linker flag Date: Tue, 15 Dec 2020 12:54:45 -0500 Message-Id: <20201215175445.1272776-46-pbonzini@redhat.com> In-Reply-To: <20201215175445.1272776-1-pbonzini@redhat.com> References: <20201215175445.1272776-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: qemu-stable@nongnu.org, Christian Ehrhardt Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Christian Ehrhardt Recent binutils changes dropping unsupported options [1] caused a build issue in regard to the optionroms. ld -m elf_i386 -T /<>/pc-bios/optionrom//flat.lds -no-pie \ -s -o multiboot.img multiboot.o ld.bfd: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?) This isn't really a regression in ld.bfd, filing the bug upstream revealed that this never worked as a ld flag [2] - in fact it seems we were by accident setting --nmagic). Since it never had the wanted effect this usage of LDFLAGS_NOPIE, should be droppable without any effect. This also is the only use-case of LDFLAGS_NOP= IE in .mak, therefore we can also remove it from being added there. [1]: https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dcommit;h=3D983d92= 5d [2]: https://sourceware.org/bugzilla/show_bug.cgi?id=3D27050#c5 Signed-off-by: Christian Ehrhardt Message-Id: <20201214150938.1297512-1-christian.ehrhardt@canonical.com> Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini --- configure | 3 --- pc-bios/optionrom/Makefile | 1 - 2 files changed, 4 deletions(-) diff --git a/configure b/configure index cb21108d34..c228f7c21e 100755 --- a/configure +++ b/configure @@ -2137,7 +2137,6 @@ EOF # Check we support --no-pie first; we will need this for building ROMs. if compile_prog "-Werror -fno-pie" "-no-pie"; then CFLAGS_NOPIE=3D"-fno-pie" - LDFLAGS_NOPIE=3D"-no-pie" fi =20 if test "$static" =3D "yes"; then @@ -2153,7 +2152,6 @@ if test "$static" =3D "yes"; then fi elif test "$pie" =3D "no"; then CONFIGURE_CFLAGS=3D"$CFLAGS_NOPIE $CONFIGURE_CFLAGS" - CONFIGURE_LDFLAGS=3D"$LDFLAGS_NOPIE $CONFIGURE_LDFLAGS" elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then CONFIGURE_CFLAGS=3D"-fPIE -DPIE $CONFIGURE_CFLAGS" CONFIGURE_LDFLAGS=3D"-pie $CONFIGURE_LDFLAGS" @@ -6714,7 +6712,6 @@ echo "QEMU_CXXFLAGS=3D$QEMU_CXXFLAGS" >> $config_host= _mak echo "GLIB_CFLAGS=3D$glib_cflags" >> $config_host_mak echo "GLIB_LIBS=3D$glib_libs" >> $config_host_mak echo "QEMU_LDFLAGS=3D$QEMU_LDFLAGS" >> $config_host_mak -echo "LDFLAGS_NOPIE=3D$LDFLAGS_NOPIE" >> $config_host_mak echo "LD_I386_EMULATION=3D$ld_i386_emulation" >> $config_host_mak echo "EXESUF=3D$EXESUF" >> $config_host_mak echo "HOST_DSOSUF=3D$HOST_DSOSUF" >> $config_host_mak diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index 084fc10f05..30771f8d17 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -41,7 +41,6 @@ override CFLAGS +=3D $(call cc-option, $(Wa)-32) =20 LD_I386_EMULATION ?=3D elf_i386 override LDFLAGS =3D -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds -override LDFLAGS +=3D $(LDFLAGS_NOPIE) =20 all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin =20 --=20 2.26.2