From patchwork Thu May 12 22:28:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 1630437 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=ckUr450A; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kzmfh4XTxz9sG3 for ; Fri, 13 May 2022 08:29:32 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 18CEE386545C for ; Thu, 12 May 2022 22:29:30 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 76149384B82F for ; Thu, 12 May 2022 22:28:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 76149384B82F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x429.google.com with SMTP id h16so8410017wrb.2 for ; Thu, 12 May 2022 15:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=vUlareFvKclEFsMiXJ+PAHLijGEl3D4dTZav8kkFHnE=; b=ckUr450AjLxeoCMcbi6Jw5AeMcaklfbda3ksot3vsMDTs95gyJDysRydi2bs0Yex4C +/AnwIiDQIEW4wc+PmkzEoiOmkA/S+QdYhsGZeRmZFbU/8Zsr0wWVmxTP5UziRZTdhWO 8Gw0fXid+d+6FfuA8eAm4A4oPKLsVCoh+TVIoGawCsNQCxGhFJvcEowKao37zp92GWhm Pm+dPwgElrLONSd6+napZkbb/3/9/6N8ABoAGUDxYMppTl35fydMBlJjdZMBhQhGPuH9 Rtd2nFGMm4I7lVyngxkPhZKRntb2smQmH7xnzdXdnqVqpXRUymPkJG+XWd5ypdshMr+o TVnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=vUlareFvKclEFsMiXJ+PAHLijGEl3D4dTZav8kkFHnE=; b=HR5MbrdtoKTcC4q4eevitORe98dPqmnAm+z2NZmf1++xlutOORu3J8out2Nh8x7Dvs O8sZdB5nNn52Oft15Pl4yOjJbPm9syU8UlwQJ3qZoaBfd9Cyb0bDmFBZdgKxwL6nDq1Z WmZ2V9A4a9pkxnRbFjvzHSyiDdUFPtqSt9BYmK99TSlk5Heu7jYlxL16LToC0TDr9oYy yQpnpDZpsgupycGTFWuyhftBIyMjUX/PtIqVsTuUh45U5xjKPUbuzRtT53m6eAJRvJMo Lor9IFk90Gn6NzGDGBcmXUCwsBa98HX95J/vaT6+Npm0gmvFARfFQHOlp3SIc31nkASD 60ww== X-Gm-Message-State: AOAM531iu15moen0AHMkktLUtSGT/XpA9ffkBMwmgy2VFqS5VBkwHoPH KBpJMAYCiHdNejgidBcCqbsrtfsB/oi0/0jW X-Google-Smtp-Source: ABdhPJy1anm4/QoS4clgckTCe4076yIs53hP1AURFfiQrUM3VAJ9sMwIoP202BLFhXqsqATO41M0tA== X-Received: by 2002:a5d:4e92:0:b0:20a:cafc:ebf1 with SMTP id e18-20020a5d4e92000000b0020acafcebf1mr1386349wru.17.1652394536383; Thu, 12 May 2022 15:28:56 -0700 (PDT) Received: from tpp.orcam.me.uk (tpp.orcam.me.uk. [2001:8b0:154:0:ea6a:64ff:fe24:f2fc]) by smtp.gmail.com with ESMTPSA id s16-20020adfa290000000b0020c5253d91asm561454wra.102.2022.05.12.15.28.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 May 2022 15:28:55 -0700 (PDT) Date: Thu, 12 May 2022 23:28:54 +0100 (BST) From: "Maciej W. Rozycki" To: libc-alpha@sourceware.org Subject: [PATCH v2 2/4] m68k: Use an autoconf template to produce `preconfigure' In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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: , Cc: Andrew Waterman , Mao Han , Andreas Schwab , Joseph Myers Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Switch to using AC_MSG_ERROR rather than `echo' and `exit' directly for error handling. Owing to the lack of any kind of error annotation it makes it difficult to spot the message in the flood in a parallel build and neither it is logged in `config.log'. --- New change in v2. --- sysdeps/m68k/preconfigure | 6 ++++-- sysdeps/m68k/preconfigure.ac | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) glibc-m68k-preconfigure-as-fn-error.diff Index: glibc/sysdeps/m68k/preconfigure =================================================================== --- glibc.orig/sysdeps/m68k/preconfigure +++ glibc/sysdeps/m68k/preconfigure @@ -1,3 +1,6 @@ +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! +# Local preconfigure fragment for sysdeps/m68k + # This fragment canonicalizes the machine names for m68k variants. case "$machine" in @@ -10,8 +13,7 @@ m68k) variant=`(echo "#ifdef __mcoldfir $CC $CFLAGS $CPPFLAGS -E - | grep '^[a-z]'` if test -z "$variant"; then - echo >&2 "Cannot determine m68k processor variant" - exit 1 + as_fn_error 1 "Cannot determine m68k processor variant" "$LINENO" 5 fi base_machine=m68k machine=m68k/$variant if test "$variant" = "coldfire"; then Index: glibc/sysdeps/m68k/preconfigure.ac =================================================================== --- /dev/null +++ glibc/sysdeps/m68k/preconfigure.ac @@ -0,0 +1,23 @@ +GLIBC_PROVIDES[]dnl See aclocal.m4 in the top level source directory. +# Local preconfigure fragment for sysdeps/m68k + +# This fragment canonicalizes the machine names for m68k variants. + +case "$machine" in +m680?0) base_machine=m68k machine=m68k/m680x0/$machine ;; +m68k) variant=`(echo "#ifdef __mcoldfire__" + echo "coldfire" + echo "#else" + echo "m680x0/m68020" + echo "#endif") | + $CC $CFLAGS $CPPFLAGS -E - | + grep '^[[a-z]]'` + if test -z "$variant"; then + AC_MSG_ERROR([Cannot determine m68k processor variant], [1]) + fi + base_machine=m68k machine=m68k/$variant + if test "$variant" = "coldfire"; then + with_fp_cond="defined __mcffpu__" + fi + ;; +esac