From patchwork Wed May 10 05:20:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Cruz X-Patchwork-Id: 1779233 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=C6QQFCEw; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QGNfK3b30z214S for ; Wed, 10 May 2023 15:20:57 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 69A5D385773C for ; Wed, 10 May 2023 05:20:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69A5D385773C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1683696053; bh=hg3um8NYXxPGAMhZdQD2vSPY+XIHdYoS3QeW4FWWJtA=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=C6QQFCEwdBjQ/xc1AXK6EIh8tB4p1YuKFTJcihxlP7cucsvn3lhuQEXioizRHUEpT UKFEb6eSCB9wDnopm7hNl7qCeoEVaxvbtVCcB6LoLRza0Ccuu2AKByv8Ll0DRBPtWS onlzMexL8qcV2GXwdD/B7480rzHpD4u0+WnFr0D0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by sourceware.org (Postfix) with ESMTPS id 1AB533858C36 for ; Wed, 10 May 2023 05:20:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1AB533858C36 Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-55a010774a5so104352987b3.3 for ; Tue, 09 May 2023 22:20:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683696036; x=1686288036; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hg3um8NYXxPGAMhZdQD2vSPY+XIHdYoS3QeW4FWWJtA=; b=EcbY/lLWbEXmzVxsbf87Jse2X2yqDQPq9Pq14Ex9l8P4MbkwYkRDFbE0PrLhKeKoAC KHO1Ci9L5fu6WHFa+Ac3LQqeFWUiaRADvYkxS6iI19Lout+uezgmzmIQmxVKA6sFZT+3 RSNQ002UEGG6a2i3pK37UWbXR0WuAV6/12OQR0DfykQFbDU3JhuLd6nlWrnhKxxprPIi guPDumPH+g3hIdQbatwH6OP6kMri5ATyllUPQQghTdt7E5SXhnMwDQmzvbBqdq5ULi8M QHUIGLdorF47p2ssKbP0Sa4D34AGMj5wvBDwp9menSyVdpXzRPf6e32jbPREz009luB3 gLVw== X-Gm-Message-State: AC+VfDx+DLmFfdVLp7ImHgLZFbDckK1sSokpdWwDYcJwP2DCJP5eXHP8 /u/eZ4ZgonvFk3kxL+Wk9MA0VFP50g== X-Google-Smtp-Source: ACHHUZ6tKuMuGOs3CsxIOYKccW2qsasFStpuQ7gv0boC/kFnKccW6t6sG9tDk6FkmCWuN/9F5iqYNA== X-Received: by 2002:a0d:d6cb:0:b0:55a:77c:cfb with SMTP id y194-20020a0dd6cb000000b0055a077c0cfbmr17696497ywd.3.1683696036229; Tue, 09 May 2023 22:20:36 -0700 (PDT) Received: from jupiter.tail36e24.ts.net (dynamic-acs-24-154-253-225.zoominternet.net. [24.154.253.225]) by smtp.gmail.com with ESMTPSA id b127-20020a0dc085000000b00545f7c7cc8csm3840448ywd.93.2023.05.09.22.20.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 22:20:35 -0700 (PDT) Date: Wed, 10 May 2023 01:20:34 -0400 To: bug-hurd@gnu.org, libc-alpha@sourceware.org Cc: samuel.thibault@gnu.org Subject: [PATCH glibc] Stop checking if MiG supports retcode. Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Flavio Cruz via Libc-alpha From: Flavio Cruz Reply-To: Flavio Cruz Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" We already did the same change for Hurd (https://git.savannah.gnu.org/cgit/hurd/hurd.git/commit/?id=ef5924402864ef049f40a39e73967628583bc1a4) Due to MiG requiring the subsystem to be defined early in order to know the size of a port, this was causing a division by zero error during ./configure. We could have just move subsystem to the top of the snippet, however it is simpler to just remove the check given that we have no plans to use some other MiG anyway. HAVE_MIG_RETCODE is removed completely since this will be a no-op either way (compiling against old Hurd headers will work the same, new Hurd headers will result in the same stubs since retcode is a no-op). --- config.h.in | 3 --- sysdeps/mach/configure | 36 ------------------------------------ sysdeps/mach/configure.ac | 26 -------------------------- 3 files changed, 65 deletions(-) diff --git a/config.h.in b/config.h.in index c87008b6a9..44a34072a4 100644 --- a/config.h.in +++ b/config.h.in @@ -150,9 +150,6 @@ /* Override abi-tags ABI version if necessary. */ #undef __ABI_TAG_VERSION -/* Mach/Hurd specific: define if mig supports the `retcode' keyword. */ -#undef HAVE_MIG_RETCODE - /* Mach specific: define if the `host_page_size' RPC is available. */ #undef HAVE_HOST_PAGE_SIZE diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure index b08872b8bc..df20d8640f 100644 --- a/sysdeps/mach/configure +++ b/sysdeps/mach/configure @@ -485,40 +485,4 @@ if test $libc_cv_mach_i386_gdt = yes; then fi - -# See if mig groks `retcode'. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MIG supports the retcode keyword" >&5 -$as_echo_n "checking whether $MIG supports the retcode keyword... " >&6; } -if ${hurd_cv_mig_retcode+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.defs <<\EOF -#include -#include -subsystem foobar 1000; -type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE - ctype: mach_port_t; -simpleroutine foobar_reply ( - reply_port: reply_port_t; - err: kern_return_t, RetCode); -EOF -if { ac_try='CC="${CC}" ${MIG-false} -n conftest.defs 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - hurd_cv_mig_retcode=yes -else - hurd_cv_mig_retcode=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hurd_cv_mig_retcode" >&5 -$as_echo "$hurd_cv_mig_retcode" >&6; } -if test $hurd_cv_mig_retcode = yes; then - $as_echo "#define HAVE_MIG_RETCODE 1" >>confdefs.h - -fi - CPPFLAGS=$OLD_CPPFLAGS diff --git a/sysdeps/mach/configure.ac b/sysdeps/mach/configure.ac index 537677c1d7..869cc9f820 100644 --- a/sysdeps/mach/configure.ac +++ b/sysdeps/mach/configure.ac @@ -104,30 +104,4 @@ if test $libc_cv_mach_i386_gdt = yes; then AC_DEFINE([HAVE_I386_SET_GDT]) fi -dnl Swiped from hurd/aclocal.m4 -AC_DEFUN([hurd_MIG_RETCODE], [dnl -# See if mig groks `retcode'. -AC_CACHE_CHECK(whether $MIG supports the retcode keyword, hurd_cv_mig_retcode, -[cat > conftest.defs <<\EOF -#include -#include -subsystem foobar 1000; -type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE - ctype: mach_port_t; -simpleroutine foobar_reply ( - reply_port: reply_port_t; - err: kern_return_t, RetCode); -EOF -if AC_TRY_COMMAND([CC="${CC}" ${MIG-false} -n conftest.defs 1>&AS_MESSAGE_LOG_FD]); then - hurd_cv_mig_retcode=yes -else - hurd_cv_mig_retcode=no -fi -rm -f conftest*]) -if test $hurd_cv_mig_retcode = yes; then - AC_DEFINE(HAVE_MIG_RETCODE) -fi]) - -hurd_MIG_RETCODE - CPPFLAGS=$OLD_CPPFLAGS