From nobody Thu Apr 25 11:15:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1581309400485906.6074732796695; Sun, 9 Feb 2020 20:36:40 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j10nK-00011c-Cw; Mon, 10 Feb 2020 04:35:38 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j10nJ-00011X-0V for xen-devel@lists.xenproject.org; Mon, 10 Feb 2020 04:35:37 +0000 Received: from mail-pj1-x1041.google.com (unknown [2607:f8b0:4864:20::1041]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c7c83404-4bbe-11ea-a759-bc764e2007e4; Mon, 10 Feb 2020 04:35:36 +0000 (UTC) Received: by mail-pj1-x1041.google.com with SMTP id m13so3650924pjb.2 for ; Sun, 09 Feb 2020 20:35:35 -0800 (PST) Received: from desktop.ice.pyrology.org (static-50-53-74-115.bvtn.or.frontiernet.net. [50.53.74.115]) by smtp.gmail.com with ESMTPSA id l15sm9089246pgi.31.2020.02.09.20.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Feb 2020 20:35:33 -0800 (PST) X-Inumbo-ID: c7c83404-4bbe-11ea-a759-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=z6VDdnmeK8A6Pvjnd3VnWXKJdT8yhGlzjwyTDH3S+4I=; b=EZwrQBWwlIPbBXrAW2KBIPHQa0oLf5cnQQ0Td+zE4TcJPSpqjWj9eCi9HWcg19Cptr 6HTr7pjwTB6DFcSK2W4k8RKna3D0acINwNUQoPm6Tufgngf9wALJI0ABU9ms4d9izkPp 14BlKZTO20Uk2MxICz9u/HLifqg8rc0PRrI48aMRCZtIsU1duFn0Pq5/ov9eK8U8ekPl 2ZZkTzdSdRtMYHz+nbCKHcioPvvT54w6i+zlzbhY4rSHgleXYP4y11OjEnwM533vt1wy WRhNbmU3O9oKhNxh0AkP2g12WTUXFOAhZDfdNQgmO1Cu1ZMdnIZDnLqFFhgZDI1HjSCQ KC4A== 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; bh=z6VDdnmeK8A6Pvjnd3VnWXKJdT8yhGlzjwyTDH3S+4I=; b=ZxO1YU+W4i7E8usdrbUs/YfoL94sg8FnskIZczVEXXXpO22sVkj71O1yARtSuWLxT9 pFnOSlFsfbt9LSEZNKuz+QXh3ST1pRNEmlZnNIQ6DrY0WmH+mEqfDwDq7D25GU4Z2wyg Vx4tleIWByGIiMbgo4lSc64gg6wkK5spBn5+siASScXjSLdplq8BvbDN0EDBgmhvBbB3 JNnGv4lwNBkJ5RHD3qerhtpPQA7++PmfGI1eg5KzfnG9KaKwDk4ZktChT+zfvqb/duQm 1EACEAGjPQY54riJ7D4uzCLjA/UObYS4Kk+TeQtbxm2UkM4smahCIDQaGN3l/1Buipmn LncA== X-Gm-Message-State: APjAAAWrQCwsOFJQi23D5aEaYPjl8zf8TAMXZGSSZ+3KY3EOuk8Gar8c A1qFzpF/D4C8Q35kTh1sEJ/1Iy3i X-Google-Smtp-Source: APXvYqwwqm1lUTc84PxS3uzXpNu8pQPpSWsWQxi9u/Bj8NH0vXYHoQU13WsayPy+X+9ooDCTXZn1NA== X-Received: by 2002:a17:902:fe93:: with SMTP id x19mr11199650plm.155.1581309334688; Sun, 09 Feb 2020 20:35:34 -0800 (PST) From: Christopher Clark To: xen-devel@lists.xenproject.org Date: Sun, 9 Feb 2020 20:35:14 -0800 Message-Id: <20200210043516.1996-1-christopher.w.clark@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [Xen-devel] [PATCH] tools/configure: generate stubs and long-double 32-bit headers if needed X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Rich Persaud , Ian Jackson , Wei Liu MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The gnu/stubs-32.h and bits/long-double-32.h headers are required to build hvmloader but are not always available in 64-bit build environments. To avoid introducing a build requirement on 32-bit multilib generate versions of them from the 64-bit equivalent header. This patch enables the removal of downstream patching that has been carried in the Yocto/OpenEmbedded meta-virtualization layer since 2012. Signed-off-by: Christopher Clark --- tools/configure | 48 ++++++++++++++++++++++++++++++++++++++++++++++ tools/configure.ac | 24 +++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/tools/configure b/tools/configure index 977a8837c3..29cca6267a 100755 --- a/tools/configure +++ b/tools/configure @@ -9769,7 +9769,55 @@ else systemd=3Dn fi =20 +# If 32-bit stubs header is not already available, check for the 64-bit one +# and generate a 32-bit stubs header +ac_fn_c_check_header_mongrel "$LINENO" "gnu/stubs-32.h" "ac_cv_header_gnu_= stubs_32_h" "$ac_includes_default" +if test "x$ac_cv_header_gnu_stubs_32_h" =3D xyes; then : =20 +else + + ac_fn_c_check_header_mongrel "$LINENO" "gnu/stubs-64.h" "ac_cv_header_= gnu_stubs_64_h" "$ac_includes_default" +if test "x$ac_cv_header_gnu_stubs_64_h" =3D xyes; then : + + echo '#include ' >conf-stubs.c + SIXTY_FOUR_HDR=3D`$CC -M conf-stubs.c | grep '/stubs-64.h$'` + rm conf-stubs.c + mkdir -p include/gnu + cat "${SIXTY_FOUR_HDR}" | \ + grep -v 'stub_bdflush\|stub_getmsg\|stub_putmsg' >include/gnu/= stubs-32.h + echo \#define __stub___kernel_cosl >> include/gnu/stubs-32.h + echo \#define __stub___kernel_sinl >> include/gnu/stubs-32.h + echo \#define __stub___kernel_tanl >> include/gnu/stubs-32.h + +else + as_fn_error $? "" "$LINENO" 5No gnu stubs headers found +fi + + +fi + +# If 32-bit long-double header is not already available, check for the 64-= bit +# one and copy it +ac_fn_c_check_header_mongrel "$LINENO" "bits/long-double-32.h" "ac_cv_head= er_bits_long_double_32_h" "$ac_includes_default" +if test "x$ac_cv_header_bits_long_double_32_h" =3D xyes; then : + +else + + ac_fn_c_check_header_mongrel "$LINENO" "bits/long-double-64.h" "ac_cv= _header_bits_long_double_64_h" "$ac_includes_default" +if test "x$ac_cv_header_bits_long_double_64_h" =3D xyes; then : + + echo '#include ' >conf-double.c + SIXTY_FOUR_HDR=3D`$CC -M conf-double.c | grep '/long-double-64.h$'` + rm conf-double.c + mkdir -p include/bits + cat "${SIXTY_FOUR_HDR}" >include/bits/long-double-32.h + +else + as_fn_error $? "" "$LINENO" 5No long-double headers found +fi + + +fi =20 if test "x$systemd" =3D "xy"; then : =20 diff --git a/tools/configure.ac b/tools/configure.ac index 8d86c42de8..769406e9ca 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -488,4 +488,28 @@ AC_ARG_ENABLE([pvshim], ]) AC_SUBST(pvshim) =20 +# If 32-bit stubs header is not already available, check for the 64-bit one +# and generate a 32-bit stubs header +AC_CHECK_HEADER([gnu/stubs-32.h], [], [ + AC_CHECK_HEADER([gnu/stubs-64.h], [ + echo '#include ' >conf-stubs.c + SIXTY_FOUR_HDR=3D`$CC -M conf-stubs.c | grep '/stubs-64.h$'` + rm conf-stubs.c + mkdir -p include/gnu + cat "${SIXTY_FOUR_HDR}" | \ + grep -v 'stub_bdflush\|stub_getmsg\|stub_putmsg' >include/gnu/= stubs-32.h + echo \#define __stub___kernel_cosl >> include/gnu/stubs-32.h + echo \#define __stub___kernel_sinl >> include/gnu/stubs-32.h + echo \#define __stub___kernel_tanl >> include/gnu/stubs-32.h + ], [AC_MSG_ERROR[No gnu stubs headers found]], []) ], []) + +AC_CHECK_HEADER([bits/long-double-32.h], [], [ + AC_CHECK_HEADER([bits/long-double-64.h], [ + echo '#include ' >conf-double.c + SIXTY_FOUR_HDR=3D`$CC -M conf-double.c | grep '/long-double-64.h$'` + rm conf-double.c + mkdir -p include/bits + cat "${SIXTY_FOUR_HDR}" >include/bits/long-double-32.h + ], [AC_MSG_ERROR[No long-double headers found]], []) ], []) + AC_OUTPUT() --=20 2.17.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel