From patchwork Tue Jul 6 01:00:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1501013 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=pK0npMJ2; dkim-atps=neutral Received: from sourceware.org (server2.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 (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GJklB0wBcz9sXN for ; Tue, 6 Jul 2021 11:01:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 75317387742C for ; Tue, 6 Jul 2021 01:01:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75317387742C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1625533265; bh=9aqkgAdafRqQhv16QzcgcSc0A1DMXh2QD05cqm/csBw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=pK0npMJ2vvEpy9AyW/arEH/TT0kX20+ok2ZhuGnNYFI/yg2Ds1bPaJD5sCoOljsSZ SmmHJMT/WPc4OGVf5IEEvuO24bdmFx97I5m1jhwj1UgYxuK+FV87LA6iz/LrtopPeY 2KOMAQQ5yOe73JDvgFCQPZW7dE37WxyMhoxFktFQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id 26A45385AC1F for ; Tue, 6 Jul 2021 01:00:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 26A45385AC1F Received: by mail-pj1-x1029.google.com with SMTP id oj10-20020a17090b4d8ab0290172f77377ebso42016pjb.0 for ; Mon, 05 Jul 2021 18:00:20 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=9aqkgAdafRqQhv16QzcgcSc0A1DMXh2QD05cqm/csBw=; b=qKenvqZrBvRsrhm+B49ql3t/hQVSm/PTOnzGC8SFT1a72A/efj+ATN2FUEzIjSZqPd aGHFnu8T43LRK5OQZeAhuev2sKIY3Jy2FyPx8sU7qHdc6EvPsEO6YtnJOvO72YgsM+Qv 5/mabTT8n0kMFheoKItpYSQq0HR++Uyn7UysTT7evV1Pj59Xo6jX6HPoxnOD4i3A+hDG sr+yR3aEyk2KWLO0qmu1Lhd6v3pQ856g7MJkVx0A9yl5K65+jJhrmD5lGiAhQsC4NXKG p4VNpNLJKOKosfy2uOSyITEpFnb8RWWPSrrYJYrfX3riJ5BCBQdivkRheSESD3Q1UVqS T4wA== X-Gm-Message-State: AOAM532kwBBa5M8ViSKNnw1IJ5qiPLUu/Vo2uzVWadbqcE4M2N1Eh6/X ehE1UV9odj794ImNx6PvKf2HqDELU/4= X-Google-Smtp-Source: ABdhPJz/VJ4gwKrCvtB5g2nwils5vdq+8xp+7NSPo5KjMMnlbzpKfa/QZ+Jz3+Dr0NJCa1Rt3UVUtw== X-Received: by 2002:a17:90b:380a:: with SMTP id mq10mr1642389pjb.79.1625533219096; Mon, 05 Jul 2021 18:00:19 -0700 (PDT) Received: from gnu-cfl-2.localdomain ([172.56.39.115]) by smtp.gmail.com with ESMTPSA id y16sm14057365pfe.70.2021.07.05.18.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 18:00:18 -0700 (PDT) Received: from gnu-cfl-2.. (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 373D0C030A; Mon, 5 Jul 2021 18:00:17 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] libffi/x86: Always check __x86_64__ for x86 hosts Date: Mon, 5 Jul 2021 18:00:17 -0700 Message-Id: <20210706010017.1922065-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3032.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Gcc-patches" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Since for gnux32 hosts, -m32 generates i386 codes, always check __x86_64__ for x86 hosts. PR libffi/101336 * configure.host: Always check __x86_64__ for x86 hosts. --- libffi/configure.host | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/libffi/configure.host b/libffi/configure.host index 786b32c5bb0..7248acb7458 100644 --- a/libffi/configure.host +++ b/libffi/configure.host @@ -95,20 +95,13 @@ case "${host}" in i?86-*-* | x86_64-*-* | amd64-*) TARGETDIR=x86 if test $ac_cv_sizeof_size_t = 4; then - case "$host" in - *-gnux32) - TARGET=X86_64 - ;; - *) - echo 'int foo (void) { return __x86_64__; }' > conftest.c - if $CC $CFLAGS -Werror -S conftest.c -o conftest.s > /dev/null 2>&1; then - TARGET=X86_64; - else - TARGET=X86; - fi - rm -f conftest.* - ;; - esac + echo 'int foo (void) { return __x86_64__; }' > conftest.c + if $CC $CFLAGS -Werror -S conftest.c -o conftest.s > /dev/null 2>&1; then + TARGET=X86_64; + else + TARGET=X86; + fi + rm -f conftest.* else TARGET=X86_64; fi