From patchwork Tue Jun 21 07:51:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1645890 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=jIjdYEhH; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4LRzKL6R43z9sVB for ; Tue, 21 Jun 2022 17:53:25 +1000 (AEST) Received: from localhost ([::1]:42454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3YhN-0002zG-NK for incoming@patchwork.ozlabs.org; Tue, 21 Jun 2022 03:53:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3Yg5-0002xu-He for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:52:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41641) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3Yg1-0005uh-9K for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:51:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655797916; 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=pzgSh6cNqQezBQchzISreqJQeT0hS1LppnZmWHHdUlI=; b=jIjdYEhHG8j/0EsZNjCJvWF4tqg8c9iYs8m0EzVo50YN6PGbkyTH0S4EgSWaDFnCZr9GrT y8HOblJfxwAwZYsB5VRWqA36h60FYuXINWfNRe8XqaOHMnOcmkjQmnnQ1pSASno/Zy4m/Y fbxyFHEEwMIReU5YdkF0xgJjuGaj80E= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-624-2r6C2iX8O9WfAmYOjiU5WA-1; Tue, 21 Jun 2022 03:51:53 -0400 X-MC-Unique: 2r6C2iX8O9WfAmYOjiU5WA-1 Received: by mail-ej1-f72.google.com with SMTP id hy20-20020a1709068a7400b00703779e6f2fso4455345ejc.1 for ; Tue, 21 Jun 2022 00:51:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pzgSh6cNqQezBQchzISreqJQeT0hS1LppnZmWHHdUlI=; b=XXUtAHTC4RZgzVYR0ft3iuiXfVXKkkAI+H70wLq8OuVUums7Y/YtknPOX7HaBqNcUk fFoNE+vGsS2JLjIXGLB98bPSSlC1FRiogiPVQTXgAZD43gBLom4HcXyZlWUcw6KxHKqn QrTsOnYb8izyJGvn4hFO/HW0Alts81ONyeda3lQM/wskDL/TPfENill+6K0iovbNSBoo DrEEkymVgdeb8mO9oNDylnlqzRUiRK5EH009BdK6AOdW9HHKytDu+Ua1QT4uIOxJk6kJ rjviOtCOHwTebfNWtHRKwHLDRph73v/hCKWkHBW+mjB5Xb+HPTjcuB0/zemtW2h8TlIJ xd1Q== X-Gm-Message-State: AJIora+szOiR+AaNeNJ/DNu+hmGW358VhT13gupGevbBzugDpHnuUiBf YCisLe4axciobecNapGCSPe6LpmLXoLVgCu6zoYeRdUkqQqBAaywG9JgXdMl9YxkvkqRvZYLhjG E1hqGgMUQdCaAmof5S39ubJkla+wPKqQg9zby7lb4KDYoqROQ/PvgsoZrTTakpzr6bKk= X-Received: by 2002:aa7:cf87:0:b0:435:65c0:f59b with SMTP id z7-20020aa7cf87000000b0043565c0f59bmr23402596edx.214.1655797912262; Tue, 21 Jun 2022 00:51:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sdVwgECOHfxX3fYdKLqikmHAwqIOa3mcT0puLMuzxghP6Hdjq/YMGFUzy4RBvxePdoKezUUQ== X-Received: by 2002:aa7:cf87:0:b0:435:65c0:f59b with SMTP id z7-20020aa7cf87000000b0043565c0f59bmr23402572edx.214.1655797911908; Tue, 21 Jun 2022 00:51:51 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id h5-20020a17090634c500b007041e969a8asm7050405ejb.97.2022.06.21.00.51.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 00:51:50 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 1/6] pc-bios/optionrom: use -m16 unconditionally Date: Tue, 21 Jun 2022 09:51:42 +0200 Message-Id: <20220621075147.36297-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220621075147.36297-1-pbonzini@redhat.com> References: <20220621075147.36297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.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.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Remove support for .code16gcc, all supported platforms have -m16. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson --- pc-bios/optionrom/Makefile | 15 +-------------- pc-bios/optionrom/code16gcc.h | 3 --- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 pc-bios/optionrom/code16gcc.h diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index f639915b4f..ea89ce9d59 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -11,7 +11,7 @@ CFLAGS = -O2 -g quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) cc-option = $(if $(shell $(CC) $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1 && echo OK), $1, $2) -override CFLAGS += -march=i486 -Wall +override CFLAGS += -march=i486 -Wall -m16 # If -fcf-protection is enabled in flags or compiler defaults that will # conflict with -march=i486 @@ -24,21 +24,8 @@ override CFLAGS += $(filter -W%, $(QEMU_CFLAGS)) override CFLAGS += $(call cc-option, -fno-pie) override CFLAGS += -ffreestanding -I$(TOPSRC_DIR)/include override CFLAGS += $(call cc-option, -fno-stack-protector) -override CFLAGS += $(call cc-option, -m16) override CFLAGS += $(call cc-option, -Wno-array-bounds) -ifeq ($(filter -m16, $(CFLAGS)),) -# Attempt to work around compilers that lack -m16 (GCC <= 4.8, clang <= ??) -# On GCC we add -fno-toplevel-reorder to keep the order of asm blocks with -# respect to the rest of the code. clang does not have -fno-toplevel-reorder, -# but it places all asm blocks at the beginning and we're relying on it for -# the option ROM header. So just force clang not to use the integrated -# assembler, which doesn't support .code16gcc. -override CFLAGS += $(call cc-option, -fno-toplevel-reorder) -override CFLAGS += $(call cc-option, -no-integrated-as) -override CFLAGS += -m32 -include $(SRC_DIR)/code16gcc.h -endif - Wa = -Wa, override ASFLAGS += -32 override CFLAGS += $(call cc-option, $(Wa)-32) diff --git a/pc-bios/optionrom/code16gcc.h b/pc-bios/optionrom/code16gcc.h deleted file mode 100644 index 9c8d25d508..0000000000 --- a/pc-bios/optionrom/code16gcc.h +++ /dev/null @@ -1,3 +0,0 @@ -asm( -".code16gcc\n" -); From patchwork Tue Jun 21 07:51:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1645895 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Avn03t0B; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4LRzRg1N1qz9sGp for ; Tue, 21 Jun 2022 17:58:53 +1000 (AEST) Received: from localhost ([::1]:52226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3Ymg-0001Wb-Hx for incoming@patchwork.ozlabs.org; Tue, 21 Jun 2022 03:58:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3Yg5-0002xv-I4 for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:52:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:51748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3Yg2-0005uv-9N for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:52:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655797917; 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=1ImzJMwhR9wPVnFIPtIciK8UDE1hqPREDSJo0a91d7Q=; b=Avn03t0BjmJKSutVQniL9QK2U/j7xvQmM/yoDWmj8FO1ZSp/H9VanwZBqQ2JWuHONB7MHs NTwy0JSGGIU4v9payxF/4JSAtjB3cZFEPsafcoVH9TXOxCahGww4t8ybSPX39Uos55mr+T Wr69ioVQlwGqgAPd6MWB91VhqUudJLU= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-63-OXUL9_W7N8OFVs0xQ2YnRg-1; Tue, 21 Jun 2022 03:51:55 -0400 X-MC-Unique: OXUL9_W7N8OFVs0xQ2YnRg-1 Received: by mail-ej1-f71.google.com with SMTP id ne36-20020a1709077ba400b00722d5f547d8so1285535ejc.19 for ; Tue, 21 Jun 2022 00:51:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1ImzJMwhR9wPVnFIPtIciK8UDE1hqPREDSJo0a91d7Q=; b=lHIwpYt3rOqWSHRr5vJ9Uiedjl4+8skJVHFuvsRfFBuGcsKA4/Z/DtKWn5+QvdCkiW KE+At05x6QEa5DSDmwEHDR4b2yMqyNS0nZB0wVDZBnugf8rnONSgduY0f7JsQmkU83FA lDPUgPc5KZrmzHtMuuwIwnbsBq+j85js8D+mAt/kM+8YztFLTHHT5XrbqatfatRyjzeF uQ73kF86ep9JcxhXE1qdi7hzQDLuUxQZoo/7/KZlzwMuGuq9icJYdimguWLsOM4o878t ScRKoekFaJAegFdFpnJSMUzgrt4Y3TlPgqtjwNTHvHyO05CEzGppZXbsYF4N+d7NvnhT K9Ag== X-Gm-Message-State: AJIora85ItF2rVbGSl1on1uR5VT+glndY8AKFfjKfc1JlI0bZWLaNAWW aDkcOdf2qNsLQpB/RI5M3IyUrjHZ2hfIgyrUGMl+wpmxOsbHmOSaoDfpm/uHHhHQUDH1I4hg0Z+ wnxNPg3k/8GemNswgELX/ahbAl+ras48ZGqFUE5Zj2Gbb8yHxibU02Tx8Xf5i1yCCgqg= X-Received: by 2002:a17:906:2086:b0:712:1257:77bf with SMTP id 6-20020a170906208600b00712125777bfmr25715139ejq.655.1655797914071; Tue, 21 Jun 2022 00:51:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vhM3nIc+lh4Ubs9X6LCaokpxjTAkSU9KvuQz6eDtuQ+XAGG4YMA9sLCkvV9dKb5aCtP1nhBw== X-Received: by 2002:a17:906:2086:b0:712:1257:77bf with SMTP id 6-20020a170906208600b00712125777bfmr25715118ejq.655.1655797913681; Tue, 21 Jun 2022 00:51:53 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id o2-20020a170906768200b0070b8a467c82sm7144780ejm.22.2022.06.21.00.51.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 00:51:52 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 2/6] configure, pc-bios/optionrom: pass cross CFLAGS correctly Date: Tue, 21 Jun 2022 09:51:43 +0200 Message-Id: <20220621075147.36297-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220621075147.36297-1-pbonzini@redhat.com> References: <20220621075147.36297-1-pbonzini@redhat.com> MIME-Version: 1.0 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.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The optionrom build is disregarding the flags passed to the configure script via --cross-cflags-i386. Pass it down and add it to the Makefile. This also fixes compilation of TCG i386 tests using an x86_64 compiler. Signed-off-by: Paolo Bonzini --- configure | 32 ++++++++++++++++++-------------- pc-bios/optionrom/Makefile | 2 +- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 76728b31f7..3d00b361d7 100755 --- a/configure +++ b/configure @@ -2057,19 +2057,22 @@ probe_target_compiler() { compute_target_variable $1 target_objcopy objcopy compute_target_variable $1 target_ranlib ranlib compute_target_variable $1 target_strip strip - if test "$1" = $cpu; then - : ${target_cc:=$cc} - : ${target_ccas:=$ccas} - : ${target_as:=$as} - : ${target_ld:=$ld} - : ${target_ar:=$ar} - : ${target_as:=$as} - : ${target_ld:=$ld} - : ${target_nm:=$nm} - : ${target_objcopy:=$objcopy} - : ${target_ranlib:=$ranlib} - : ${target_strip:=$strip} - fi + case "$1:$cpu" in + i386:x86_64 | \ + "$cpu:$cpu") + : ${target_cc:=$cc} + : ${target_ccas:=$ccas} + : ${target_as:=$as} + : ${target_ld:=$ld} + : ${target_ar:=$ar} + : ${target_as:=$as} + : ${target_ld:=$ld} + : ${target_nm:=$nm} + : ${target_objcopy:=$objcopy} + : ${target_ranlib:=$ranlib} + : ${target_strip:=$strip} + ;; + esac if test -n "$target_cc"; then case $1 in i386|x86_64) @@ -2238,7 +2241,7 @@ done # Mac OS X ships with a broken assembler roms= -probe_target_compilers i386 x86_64 +probe_target_compiler i386 if test -n "$target_cc" && test "$targetos" != "darwin" && test "$targetos" != "sunos" && \ test "$targetos" != "haiku" && test "$softmmu" = yes ; then @@ -2257,6 +2260,7 @@ if test -n "$target_cc" && echo "# Automatically generated by configure - do not modify" > $config_mak echo "TOPSRC_DIR=$source_path" >> $config_mak echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_mak + echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak fi fi diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index ea89ce9d59..e90ca2e1c6 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -11,7 +11,7 @@ CFLAGS = -O2 -g quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) cc-option = $(if $(shell $(CC) $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1 && echo OK), $1, $2) -override CFLAGS += -march=i486 -Wall -m16 +override CFLAGS += -march=i486 -Wall $(EXTRA_CFLAGS) -m16 # If -fcf-protection is enabled in flags or compiler defaults that will # conflict with -march=i486 From patchwork Tue Jun 21 07:51:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1645892 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Q+d0e3Nd; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4LRzKM0cF9z9sjJ for ; Tue, 21 Jun 2022 17:53:25 +1000 (AEST) Received: from localhost ([::1]:42642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3YhO-00035V-Fr for incoming@patchwork.ozlabs.org; Tue, 21 Jun 2022 03:53:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3Yg6-00030T-Ud for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:52:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:37432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3Yg3-0005v3-9T for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:52:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655797918; 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=Pm+OaO7P0DHdX0xOLqNO9AxjhVX2HalJiFlLI/sz0ao=; b=Q+d0e3NdLZIqCYcjnS/zPgXVHjCRhoe7a2dVo9HHZ9yO5pquWOJuKDHWKUwhlsMpmDYcAM 5cIadmJbZX8BL/cU6ZqZo6t9JwjCeKMGKlzOgUVJKh3i/RWEFDKvSMfQ2+sZZkli8/gH7t 4R86Cp7G4SWDp78uo9eEWesYcBXWVDY= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-483-LDI5SDTTPfWZvtjvgFLv5g-1; Tue, 21 Jun 2022 03:51:57 -0400 X-MC-Unique: LDI5SDTTPfWZvtjvgFLv5g-1 Received: by mail-ed1-f69.google.com with SMTP id z4-20020a05640240c400b004358a7d5a1dso3000629edb.2 for ; Tue, 21 Jun 2022 00:51:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Pm+OaO7P0DHdX0xOLqNO9AxjhVX2HalJiFlLI/sz0ao=; b=LeNPcyq49okWNDrvw2XY2tn3LAhoiHDaAePPCV1T6cOHr1/ktluTY/TS5iA9YnabZL brNUhlSy45L+6ldfUEN2JfVlXSWf3OWr1jd+5YDjTVsDLWsUU3o6f/Vg9Y3LKlwAruYl 9vM11kN6dwV3nWaY39yS//1bnVInnh9L+26KO5a781nEjiEquD7V3+qflJviDOmeKco9 +dTtVgWm+uKRQxFdCBuYxt3m8gfo0ORjWTT5rf0rrh++cGD3dFurm3LxkxAiVK9xZKPE Qeg4SvzHrwFpoQHjid5dw0jIRgBLoPshb/xiojIJpKj8PwEhqbGd5qDQ4jxwQDb4QkvQ Z3JA== X-Gm-Message-State: AJIora+3FSIvFpdIVTg/VgMeVM/+KrFL3K3zV3cGw/ztMBbCaY0WwYWt jefdQRBr8SCPXcXKCc1pwIo/MPW2CeFrV+xksFoZJdMq+1oLxRnOIo6NmJMYjsamZYbQSi51QUy EthwZ5X1/uVGfLfIjEJCWh+Ff1VgX+j6Q/IpsJDO5EF/IxipbF0K923NfeKSm0j+TCT4= X-Received: by 2002:a50:c8cd:0:b0:435:688d:6c59 with SMTP id k13-20020a50c8cd000000b00435688d6c59mr21626344edh.271.1655797915607; Tue, 21 Jun 2022 00:51:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tTEfcldqdZEdc4rHqxC74zriSUsEhWCC32/RfdH3TfwEEg9zPpu8OJCJdu8/aOBx6c75iFpg== X-Received: by 2002:a50:c8cd:0:b0:435:688d:6c59 with SMTP id k13-20020a50c8cd000000b00435688d6c59mr21626315edh.271.1655797915238; Tue, 21 Jun 2022 00:51:55 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id w13-20020a056402268d00b004359202969esm1601924edd.4.2022.06.21.00.51.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 00:51:54 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 3/6] configure, pc-bios/s390-ccw: pass cross CFLAGS correctly Date: Tue, 21 Jun 2022 09:51:44 +0200 Message-Id: <20220621075147.36297-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220621075147.36297-1-pbonzini@redhat.com> References: <20220621075147.36297-1-pbonzini@redhat.com> MIME-Version: 1.0 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.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" QEMU_CFLAGS is not available in pc-bios/s390-ccw/netboot.mak, but the Makefile needs to access the flags passed to the configure script for the s390x cross compiler. Fix everything and rename QEMU_CFLAGS to EXTRA_CFLAGS for consistency with tests/tcg. Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 1 + pc-bios/s390-ccw/Makefile | 20 ++++++++++---------- pc-bios/s390-ccw/netboot.mak | 6 +++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 3d00b361d7..bf9282e2a1 100755 --- a/configure +++ b/configure @@ -2290,6 +2290,7 @@ if test -n "$target_cc" && test "$softmmu" = yes; then config_mak=pc-bios/s390-ccw/config-host.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak + echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak # SLOF is required for building the s390-ccw firmware on s390x, # since it is using the libnet code from SLOF for network booting. diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 6eb713bf37..26ad40f94e 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -18,11 +18,11 @@ $(call set-vpath, $(SRC_PATH)) QEMU_DGFLAGS = -MMD -MP -MT $@ -MF $(@D)/$(*F).d %.o: %.c - $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ + $(call quiet-command,$(CC) $(EXTRA_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ -c -o $@ $<,"CC","$(TARGET_DIR)$@") %.o: %.S - $(call quiet-command,$(CCAS) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ + $(call quiet-command,$(CCAS) $(EXTRA_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \ -c -o $@ $<,"CCAS","$(TARGET_DIR)$@") .PHONY : all clean build-all @@ -30,14 +30,14 @@ QEMU_DGFLAGS = -MMD -MP -MT $@ -MF $(@D)/$(*F).d OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \ virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o dasd-ipl.o -QEMU_CFLAGS := -Wall $(filter -W%, $(QEMU_CFLAGS)) -QEMU_CFLAGS += $(call cc-option,-Werror $(QEMU_CFLAGS),-Wno-stringop-overflow) -QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -fno-common -fPIE -QEMU_CFLAGS += -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tables -QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector) -QEMU_CFLAGS += -msoft-float -QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS),-march=z900,-march=z10) -QEMU_CFLAGS += -std=gnu99 +EXTRA_CFLAGS := $(EXTRA_CFLAGS) -Wall +EXTRA_CFLAGS += $(call cc-option,-Werror $(EXTRA_CFLAGS),-Wno-stringop-overflow) +EXTRA_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -fno-common -fPIE +EXTRA_CFLAGS += -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tables +EXTRA_CFLAGS += $(call cc-option, $(EXTRA_CFLAGS), -fno-stack-protector) +EXTRA_CFLAGS += -msoft-float +EXTRA_CFLAGS += $(call cc-option, $(EXTRA_CFLAGS),-march=z900,-march=z10) +EXTRA_CFLAGS += -std=gnu99 LDFLAGS += -Wl,-pie -nostdlib build-all: s390-ccw.img s390-netboot.img diff --git a/pc-bios/s390-ccw/netboot.mak b/pc-bios/s390-ccw/netboot.mak index 1a06befa4b..ee59a5f4de 100644 --- a/pc-bios/s390-ccw/netboot.mak +++ b/pc-bios/s390-ccw/netboot.mak @@ -8,7 +8,7 @@ LIBNET_INC := -I$(SLOF_DIR)/lib/libnet NETLDFLAGS := $(LDFLAGS) -Wl,-Ttext=0x7800000 -$(NETOBJS): QEMU_CFLAGS += $(LIBC_INC) $(LIBNET_INC) +$(NETOBJS): EXTRA_CFLAGS += $(LIBC_INC) $(LIBNET_INC) s390-netboot.elf: $(NETOBJS) libnet.a libc.a $(call quiet-command,$(CC) $(NETLDFLAGS) -o $@ $^,"BUILD","$(TARGET_DIR)$@") @@ -18,7 +18,7 @@ s390-netboot.img: s390-netboot.elf # libc files: -LIBC_CFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ +LIBC_CFLAGS = $(EXTRA_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ -MMD -MP -MT $@ -MF $(@:%.o=%.d) CTYPE_OBJS = isdigit.o isxdigit.o toupper.o @@ -52,7 +52,7 @@ libc.a: $(LIBCOBJS) LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \ dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o pxelinux.o -LIBNETCFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ +LIBNETCFLAGS = $(EXTRA_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ -DDHCPARCH=0x1F -MMD -MP -MT $@ -MF $(@:%.o=%.d) %.o : $(SLOF_DIR)/lib/libnet/%.c From patchwork Tue Jun 21 07:51:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1645891 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BY+A/AT7; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4LRzKM0J6lz9sVb for ; Tue, 21 Jun 2022 17:53:25 +1000 (AEST) Received: from localhost ([::1]:42648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3YhP-00035n-8z for incoming@patchwork.ozlabs.org; Tue, 21 Jun 2022 03:53:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3Yg6-00030I-Sz for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:52:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:33484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3Yg5-0005vF-An for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:52:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655797920; 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=hUDEvAYpas2OIeLZAuNbCzfYxc2UpJhMF/Rl8lVm3ss=; b=BY+A/AT7P61Uekics15DgpK5+3qgPQDCweGmIO5GeExUqDJNtg5+A86kXUhOCb1kXfWAMV WfOXuihRh00+Xs+2FHtw9HYyDPYToiHz9XIDUOeqJLU1JNSQrB5vwEXsA9xiL/dGLxlHEs iOsNPOL7mFJmK74+2vUWN5nGM8DMG7k= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-435-qerNNhmLNgOHU5kX1RvgZA-1; Tue, 21 Jun 2022 03:51:58 -0400 X-MC-Unique: qerNNhmLNgOHU5kX1RvgZA-1 Received: by mail-ed1-f69.google.com with SMTP id x15-20020a05640226cf00b004318eab9feaso10363314edd.12 for ; Tue, 21 Jun 2022 00:51:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hUDEvAYpas2OIeLZAuNbCzfYxc2UpJhMF/Rl8lVm3ss=; b=7vL/lClm/BtK76+yAjN+3PhusA9dwNa2OltndGQRRDmm2tcGAcuxVldDShbKhpwKGh qQ+Jl9qwXqh/SmDULnZlZPzKvO8jHygACI2cHY4lMp8FJlQcKEwtG/104EouFmjNyvuv /ZczlS2BFlAqCkXgKJ1Ek1A5vAx+PhabemaWT+O2vM3AtCWD1ulH1yQYRkNd2BiVmYmq 0F7jabTEl4M6+3sAB8z3ydRfwoyONJzZl9xeEnEwu0qCpDNREKh7IkobBL6lLVbc0k53 Je00TbW1sTbZi4TnTyprfBA1zoFpE/NzKQqAcGxZ/9DuoAiF9B3t6q9RYmQflUGT2GuX kB3g== X-Gm-Message-State: AJIora/QfgU88BSsRNkIgiUSS5UpSdDHOYjROlyadZwhzod8LJFPzs42 V1F0jfi2IU0sCzpRoRvJ1LCg0xQGrU1JkcXJLDrvJqAcupFf12j1Hm2qZrs6/Qc0brYo4XEbwyn P219628+Lj88+i71rS0mN7l3Hu7FaOIo6oNKf6cy4yqzHN8eJgmE3qnprFgGJM2qXOa4= X-Received: by 2002:a17:907:a410:b0:70b:db4d:784d with SMTP id sg16-20020a170907a41000b0070bdb4d784dmr23813978ejc.185.1655797917029; Tue, 21 Jun 2022 00:51:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1urVsIdXxFSuFM17sykPy3j01xRKQWmPskUNCE6GXgGvc87+ukoheruOGuQ9vTpHS5UVk5DeQ== X-Received: by 2002:a17:907:a410:b0:70b:db4d:784d with SMTP id sg16-20020a170907a41000b0070bdb4d784dmr23813959ejc.185.1655797916652; Tue, 21 Jun 2022 00:51:56 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id g12-20020a056402424c00b0043589eba83bsm3481415edb.58.2022.06.21.00.51.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 00:51:56 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 4/6] configure, pc-bios/vof: pass cross CFLAGS correctly Date: Tue, 21 Jun 2022 09:51:45 +0200 Message-Id: <20220621075147.36297-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220621075147.36297-1-pbonzini@redhat.com> References: <20220621075147.36297-1-pbonzini@redhat.com> MIME-Version: 1.0 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.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Use the flags passed to the configure script for the ppc cross compiler, which in fact default to those that are needed to get the 32-bit ISA. Add the endianness flag so that it remains possible to use a ppc64le compiler to compile VOF. This also fixes compilation of TCG tests using a biarch compiler, for example ppc64 tests on ppc64le. Reported-by: Matheus Ferst --- configure | 13 ++++--------- pc-bios/vof/Makefile | 8 +++----- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/configure b/configure index bf9282e2a1..8f3401a23e 100755 --- a/configure +++ b/configure @@ -1858,7 +1858,7 @@ fi : ${cross_cc_hexagon="hexagon-unknown-linux-musl-clang"} : ${cross_cc_cflags_hexagon="-mv67 -O2 -static"} : ${cross_cc_cflags_i386="-m32"} -: ${cross_cc_cflags_ppc="-m32"} +: ${cross_cc_cflags_ppc="-m32 -mbig-endian"} : ${cross_cc_cflags_ppc64="-m64 -mbig-endian"} : ${cross_cc_ppc64le="$cross_cc_ppc64"} : ${cross_cc_cflags_ppc64le="-m64 -mlittle-endian"} @@ -2059,6 +2059,7 @@ probe_target_compiler() { compute_target_variable $1 target_strip strip case "$1:$cpu" in i386:x86_64 | \ + ppc*:ppc64 | \ "$cpu:$cpu") : ${target_cc:=$cc} : ${target_ccas:=$ccas} @@ -2084,13 +2085,6 @@ probe_target_compiler() { fi } -probe_target_compilers() { - for i; do - probe_target_compiler $i - test -n "$target_cc" && return 0 - done -} - write_target_makefile() { if test -n "$target_cc"; then echo "CC=$target_cc" @@ -2265,12 +2259,13 @@ if test -n "$target_cc" && fi fi -probe_target_compilers ppc ppc64 +probe_target_compiler ppc if test -n "$target_cc" && test "$softmmu" = yes; then roms="$roms pc-bios/vof" config_mak=pc-bios/vof/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak + echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak fi diff --git a/pc-bios/vof/Makefile b/pc-bios/vof/Makefile index 391ac0d600..8809c82768 100644 --- a/pc-bios/vof/Makefile +++ b/pc-bios/vof/Makefile @@ -2,15 +2,13 @@ include config.mak VPATH=$(SRC_DIR) all: vof.bin -CC ?= $(CROSS)gcc -LD ?= $(CROSS)ld -OBJCOPY ?= $(CROSS)objcopy +EXTRA_CFLAGS += -mcpu=power4 %.o: %.S - $(CC) -m32 -mbig-endian -mcpu=power4 -c -o $@ $< + $(CC) $(EXTRA_CFLAGS) -c -o $@ $< %.o: %.c - $(CC) -m32 -mbig-endian -mcpu=power4 -c -fno-stack-protector -o $@ $< + $(CC) $(EXTRA_CFLAGS) -c -fno-stack-protector -o $@ $< vof.elf: entry.o main.o ci.o bootmem.o libc.o $(LD) -nostdlib -e_start -T$(SRC_DIR)/vof.lds -EB -o $@ $^ From patchwork Tue Jun 21 07:51:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1645900 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BgdrMVXg; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4LRzbw4r6Qz9sVb for ; Tue, 21 Jun 2022 18:06:03 +1000 (AEST) Received: from localhost ([::1]:33160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3Ytc-0008Pr-HF for incoming@patchwork.ozlabs.org; Tue, 21 Jun 2022 04:06:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3YgK-0003IA-3J for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:52:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:56000) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3YgI-0005wK-MM for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:52:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655797930; 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=vdqmLvR6JN932wcQnmiu8+mPHY+md+mV37njXiUqS3g=; b=BgdrMVXgrF4t78PCmgLzPB+kmJc3h/NDx7FXorod53kTcrvJ71IdgE3YqIljuhHN9HpC7Q 5Ya3k7kMFKjzoNSWZFiy4vtX2sj5Cnp7EBhvBmrNCCp5caxF6XxRuR8YcSRtGzgDM40H/V TI+nv/GnaqrVnNcZZqW8Gf8sMofieao= 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-630-ZGMlOtY7MeSSdz7ggO3hHg-1; Tue, 21 Jun 2022 03:52:00 -0400 X-MC-Unique: ZGMlOtY7MeSSdz7ggO3hHg-1 Received: by mail-ed1-f71.google.com with SMTP id y5-20020a056402358500b0043592ac3961so1267950edc.6 for ; Tue, 21 Jun 2022 00:52:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vdqmLvR6JN932wcQnmiu8+mPHY+md+mV37njXiUqS3g=; b=AS+BGPrVDw85x0UVhEraGhFLA7bOmlYsfLyeO8DcfHDbz0v/GI4rA+tI1rBaaYZpvw 6jHXxhAJb3pseKbN8iikEee5e3DCfE6HgPH/C48UIMJud1pNCkw5QsEuO6kaFEielNJ+ QjIoJeeI+tWJ2wrnNZBXTnw25CVISVAN9KR19cyIFt7QU7YDgF8jLE6nfXipysh0Q+YJ 62gdyqj52cbzvJTdJnrDDMU3tZrzWLqW02r6/vloUFVvxJLt7mv5KR/lXsYE1XoQPUG5 5FZ7IsbM3O7HcAC8z4ojAyPMkgP+mi62I/zT+D0xPgGvT3R13krlssB4ZxfGus1cLSfF AG9g== X-Gm-Message-State: AJIora/EuvkoMxRdL+kTnUpe/X17E0/BuQwA7BRLMa/IkVPwnLSsDZEX qxoPyOLmdv7Il8MCcIyzrw6lu1EqWbJV2tLVB1OjyfnwayEV+tCo6LouwjAK/zlYwrwErSSnnXw RIzPr3ztkEsBDUz21GaLPdpVcCwzHi5xLG3yJpiv4FmXzOkat1Lxkyk1MMbhAL4GPfxg= X-Received: by 2002:a17:907:d15:b0:71c:9ef2:2440 with SMTP id gn21-20020a1709070d1500b0071c9ef22440mr20747728ejc.266.1655797918607; Tue, 21 Jun 2022 00:51:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u03Q1aHWrrJPgSt9nYGv2MyjAMnl2l+7bcA+qfnp1+gylkLdU3KQwvh4eSBgalA2MXgAGjrg== X-Received: by 2002:a17:907:d15:b0:71c:9ef2:2440 with SMTP id gn21-20020a1709070d1500b0071c9ef22440mr20747718ejc.266.1655797918349; Tue, 21 Jun 2022 00:51:58 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id ku7-20020a170907788700b00722c4b8a3ddsm2545352ejc.64.2022.06.21.00.51.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 00:51:57 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 5/6] configure: allow more host/target combos to use the host compiler Date: Tue, 21 Jun 2022 09:51:46 +0200 Message-Id: <20220621075147.36297-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220621075147.36297-1-pbonzini@redhat.com> References: <20220621075147.36297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.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.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Add more pairs of bi-arch compilers, so that it is not necessary to have e.g. both little-endian and big-endian ARM compilers. Signed-off-by: Paolo Bonzini --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 8f3401a23e..c9feb1a924 100755 --- a/configure +++ b/configure @@ -2058,8 +2058,12 @@ probe_target_compiler() { compute_target_variable $1 target_ranlib ranlib compute_target_variable $1 target_strip strip case "$1:$cpu" in + aarch64_be:aarch64 | \ + armeb:arm | \ i386:x86_64 | \ + mips*:mips64 | \ ppc*:ppc64 | \ + sparc:sparc64 | \ "$cpu:$cpu") : ${target_cc:=$cc} : ${target_ccas:=$ccas} From patchwork Tue Jun 21 07:51:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1645896 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WE/xq2rd; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4LRzWp67GRz9sGp for ; Tue, 21 Jun 2022 18:02:30 +1000 (AEST) Received: from localhost ([::1]:57126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3YqC-0005L3-NS for incoming@patchwork.ozlabs.org; Tue, 21 Jun 2022 04:02:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3YgA-00036W-TO for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:52:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:51571) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3Yg7-0005vi-Nh for qemu-devel@nongnu.org; Tue, 21 Jun 2022 03:52:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655797923; 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=7JySz0fdQvD9uHzuwePQvqCy994/RL69/J08zdtNoNo=; b=WE/xq2rdiK5+CI/x/RSMFegJ+w8SignY5GUuAxEMIOt3OGGMnDeOyb0KKdhIAux4TAfu4D JZguo0l3EzZTzmZ6gopYXfOLg8nFEy7t0Jno4Evc97tCxvjXMGHMe1uUoisZEovMkA6m/H uy2Wk8tRvS6e+iJxcCIZV4z5o03iKos= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-47-rAdVPxEbNrGCfFCxiSr7kA-1; Tue, 21 Jun 2022 03:52:01 -0400 X-MC-Unique: rAdVPxEbNrGCfFCxiSr7kA-1 Received: by mail-ej1-f70.google.com with SMTP id ne36-20020a1709077ba400b00722d5f547d8so1285668ejc.19 for ; Tue, 21 Jun 2022 00:52:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7JySz0fdQvD9uHzuwePQvqCy994/RL69/J08zdtNoNo=; b=LxlRw/GBiai//2wC4+z9VTUTAGkAd6DNoct5Ow42JMe1pQfBcpp7th1MC+hyEa5SnS RtS9dYdT7yC80rB6VevZHCyM7eBxMMs2yAr7HViBz6PVj7A6oy+rkyK4+rPOgNKk03K2 eigI8VCk1FAndanAtp60vKmDdDB0/rLlcBdO7GlHGigFT4JL3WPcrJOJg4dzqF+AazQQ OuaTpNDGp56bVUvZxyNMXOn+E1s0c0djYaakwO4+EqgB+5Nzy4UcMTe6wyt0KSuvSeJJ iwlhiuV/XsCKlkBlkl3Wy+g79x2Ng4TV6y8j9lDHPG3aYbP9QEZqAEixUPzfdpkyan+c lFNQ== X-Gm-Message-State: AJIora99f+7Wp0LihkgDaUYp8+O60A30DNqlAY2/+z9mBo4WvCPF8DwA gdixPl1pTap6gvjUIohp7co9YatUJsUX63StI3cAeqLOPolvxRd7QlGj167Wp+UUR1ABWCkVfFR RntnZc2SAE9NE20w40CyaTst13oP4FaidkwEmG9SG9UgGxMebhx8+VhpyM+8t9TdIYLM= X-Received: by 2002:a05:6402:201:b0:431:665f:11f1 with SMTP id t1-20020a056402020100b00431665f11f1mr34805021edv.378.1655797920252; Tue, 21 Jun 2022 00:52:00 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ugZtV35tb7onWyrzTjcVN5cpL0htyEXSmPnu5Z9gKtJJ1+I+jKDWW2HDEz1+LEOG5f87lJ3g== X-Received: by 2002:a05:6402:201:b0:431:665f:11f1 with SMTP id t1-20020a056402020100b00431665f11f1mr34805002edv.378.1655797919933; Tue, 21 Jun 2022 00:51:59 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id y11-20020a056402270b00b0042e1cbc4471sm12304967edd.3.2022.06.21.00.51.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 00:51:59 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 6/6] configure: write EXTRA_CFLAGS for all sub-Makefiles Date: Tue, 21 Jun 2022 09:51:47 +0200 Message-Id: <20220621075147.36297-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220621075147.36297-1-pbonzini@redhat.com> References: <20220621075147.36297-1-pbonzini@redhat.com> MIME-Version: 1.0 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.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Move the EXTRA_CFLAGS line from the individual subdirectory blocks to the common write_target_makefile and write_container_target_makefile shell functions. Signed-off-by: Paolo Bonzini --- configure | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/configure b/configure index c9feb1a924..0fd2838e82 100755 --- a/configure +++ b/configure @@ -2090,6 +2090,7 @@ probe_target_compiler() { } write_target_makefile() { + echo "EXTRA_CFLAGS=$target_cflags" if test -n "$target_cc"; then echo "CC=$target_cc" echo "CCAS=$target_ccas" @@ -2118,6 +2119,7 @@ write_target_makefile() { } write_container_target_makefile() { + echo "EXTRA_CFLAGS=$target_cflags" if test -n "$container_cross_cc"; then echo "CC=\$(DOCKER_SCRIPT) cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --" echo "CCAS=\$(DOCKER_SCRIPT) cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --" @@ -2258,7 +2260,6 @@ if test -n "$target_cc" && echo "# Automatically generated by configure - do not modify" > $config_mak echo "TOPSRC_DIR=$source_path" >> $config_mak echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_mak - echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak fi fi @@ -2269,7 +2270,6 @@ if test -n "$target_cc" && test "$softmmu" = yes; then config_mak=pc-bios/vof/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak - echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak fi @@ -2289,7 +2289,6 @@ if test -n "$target_cc" && test "$softmmu" = yes; then config_mak=pc-bios/s390-ccw/config-host.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak - echo "EXTRA_CFLAGS=$target_cflags" >> $config_mak write_target_makefile >> $config_mak # SLOF is required for building the s390-ccw firmware on s390x, # since it is using the libnet code from SLOF for network booting. @@ -2604,7 +2603,6 @@ for target in $target_list; do if test $got_cross_cc = yes; then mkdir -p tests/tcg/$target echo "QEMU=$PWD/$qemu" >> $config_target_mak - echo "EXTRA_CFLAGS=$target_cflags" >> $config_target_mak echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile tcg_tests_targets="$tcg_tests_targets $target" fi