From nobody Mon Feb 9 19:53:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601299203; cv=none; d=zohomail.com; s=zohoarc; b=dlnQL4j2H53Pxl3j1dF3wzMTbqAt2CPX6V+viPi42iDqTO2dIVKZxqfL76PuX3GcNfg+bViAx3D6DnOQVXOcDbcormwNFexgYDxmUrRvvV/g7RDtszwXs0YgYed2hnNm3dSqIUafFr7+1M8ityUc6QMTNXEmnEgzoaYkEdhvdrM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601299203; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=IQxJXzhc1czKuYkocMWwWEQUckk+RWA2innt4R1BD+0=; b=cjJ9Zff/3I2OMo1zb+Twh70S2fxsnLU5UmZYGk4gCC6MEhSu7Mgmedwz5IOnb8Kd8gqj3AVQnS+wH92Mt4mBOb9TFEtghjtb4LZstLOU7SznCqPoCZZl18Wd2DmUkm7W7Eg7CDUApQ3052cUE1pH5zLuKt/0xK9W4HfNCmHGQfY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1601299203342936.147218842947; Mon, 28 Sep 2020 06:20:03 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-238-eb-2VHt1OeWM-7iR-BD_LA-1; Mon, 28 Sep 2020 09:19:59 -0400 Received: by mail-wm1-f71.google.com with SMTP id t8so340646wmj.6 for ; Mon, 28 Sep 2020 06:19:59 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (74.red-83-53-161.dynamicip.rima-tde.net. [83.53.161.74]) by smtp.gmail.com with ESMTPSA id k6sm1201517wmi.1.2020.09.28.06.19.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 06:19:57 -0700 (PDT) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601299202; 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=IQxJXzhc1czKuYkocMWwWEQUckk+RWA2innt4R1BD+0=; b=McNHHhjkiWLp2z0uT1R3jAJk85LqJtC+uEzVcWU9FObrvypEHUv70E/EpmGNEUcxozcEjl XPSIgIB3O/RnVP1ai2h1SpnpngOBjOnRYfatOemOik7Shs1BpI0N2UteXqHO8gCSd5dcHQ tjhRBBAayIKsqtP5ZuKGZUXGkdq/vsc= X-MC-Unique: eb-2VHt1OeWM-7iR-BD_LA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IQxJXzhc1czKuYkocMWwWEQUckk+RWA2innt4R1BD+0=; b=fisO/YqmBYy8sWF1DPrfrFOkHzscO7aMOyvi/KQe5tiAxwalpXD3iv6MD/lhHp8czx y3+PvmS7yA+4z0VRXgQY+WVMR9MNUDMiQ9PAThC1BCfi+FedUwpQci5VFerKoMB7/ww4 qmy7D4VM9xz+f/bediS8qIo3oavyBJuAQlFBoI8JPa8ZSQxfhuFptHoat94XB2kwK0+s aNB1zSUFBlj99hh+N8oEOP3/vxQ/SoEHDp30qNA8W3kqHnyy+vif2IBbBYCYiPHiXsuc 4YDgm8jMa8zgDRtNDCpACH2e3Ig6xAnrxGUTZRZtDqglEydpJuTs+HHOWG4Y/zFEZ+HQ COoA== X-Gm-Message-State: AOAM533NUf15orPzYxj0ILF6s1dXvtd+lpBzvrqnA+4VYaUI4Pnc3VjE 3hI3CBgkStUwVxRC/CttNyoJHfhn31XJiQH/luK3FmEdj+nPPmjqeUNaCQKbF8SpAQAN+skouko yj3TLcNG0gnSR3Q== X-Received: by 2002:a5d:522d:: with SMTP id i13mr1818018wra.296.1601299198478; Mon, 28 Sep 2020 06:19:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzblxRHV4qk9P2hlAVjSPw3Wp0Nhe/xUUzTvRLnKirvlK6osBca2K+2+wIrV8HZYIs84O6bSA== X-Received: by 2002:a5d:522d:: with SMTP id i13mr1818005wra.296.1601299198312; Mon, 28 Sep 2020 06:19:58 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fam Zheng , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Kamil Rytarowski Subject: [PATCH v2 4/8] qemu/bswap: Remove dependency Date: Mon, 28 Sep 2020 15:19:30 +0200 Message-Id: <20200928131934.739451-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200928131934.739451-1-philmd@redhat.com> References: <20200928131934.739451-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Since commit efc6c070aca ("configure: Add a test for the minimum compiler version") the minimum compiler version required for GCC is 4.8, which supports __builtin_bswap(). Drop the dependency. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- configure | 13 ------------- include/qemu/bswap.h | 17 ----------------- 2 files changed, 30 deletions(-) diff --git a/configure b/configure index e8e8e984f24..bff787daea7 100755 --- a/configure +++ b/configure @@ -4886,16 +4886,6 @@ if test "$docs" !=3D "no" ; then fi fi =20 -# Search for bswap_32 function -byteswap_h=3Dno -cat > $TMPC << EOF -#include -int main(void) { return bswap_32(0); } -EOF -if compile_prog "" "" ; then - byteswap_h=3Dyes -fi - # Search for bswap32 function bswap_h=3Dno cat > $TMPC << EOF @@ -6789,9 +6779,6 @@ fi if test "$st_atim" =3D "yes" ; then echo "HAVE_STRUCT_STAT_ST_ATIM=3Dy" >> $config_host_mak fi -if test "$byteswap_h" =3D "yes" ; then - echo "CONFIG_BYTESWAP_H=3Dy" >> $config_host_mak -fi if test "$bswap_h" =3D "yes" ; then echo "CONFIG_MACHINE_BSWAP_H=3Dy" >> $config_host_mak fi diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index fed96dddd7a..55916670d39 100644 --- a/include/qemu/bswap.h +++ b/include/qemu/bswap.h @@ -10,23 +10,6 @@ # include #elif defined(__HAIKU__) # include -#elif defined(CONFIG_BYTESWAP_H) -# include - -static inline uint16_t bswap16(uint16_t x) -{ - return bswap_16(x); -} - -static inline uint32_t bswap32(uint32_t x) -{ - return bswap_32(x); -} - -static inline uint64_t bswap64(uint64_t x) -{ - return bswap_64(x); -} #else #undef bswap16 #define bswap16(_x) __builtin_bswap16(_x) --=20 2.26.2