From patchwork Sun Jun 6 13:03:16 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: 1488303 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=SGLv/XYC; 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 4FycCF0h84z9sCD for ; Sun, 6 Jun 2021 23:04:06 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6D1B9383B41F for ; Sun, 6 Jun 2021 13:04:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D1B9383B41F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1622984642; bh=QBbbYz6hmOmkxQsGy8gbSSWG8AXmywPC10drXZvXAhU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=SGLv/XYCnA1nlgKtLTj4yB+/s2pg1X/yGus7XUxsH/khLDezBctKhDaT8R+AdwzkU 17DKMdMtU1YUAAdfjS4TGRNyG6VufUx2tLFcHuCGOzMZIG5PO8ZB0eI1FXuS5f1reE qeiss8h0ZCHd0lr0QgQm6ml0FBy05B+d+0Aoq8kI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id A3F8E3857C62 for ; Sun, 6 Jun 2021 13:03:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A3F8E3857C62 Received: by mail-pf1-x436.google.com with SMTP id p13so1482150pfw.0 for ; Sun, 06 Jun 2021 06:03:19 -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=QBbbYz6hmOmkxQsGy8gbSSWG8AXmywPC10drXZvXAhU=; b=IXQrwt9xcYVtW6M6PFg0nX1TzII8xBvLKFYbyIt4Vru3Y7CIpn7MhEE0WYE+G9QJM2 PnxIbIIt02jLYkRrykM8vspblzkkf3dVHxOJ2DVQDNWwjRJFu7Nh9wOY51ybW5+9AlUf UGaR6Pl2DmkAcghmqKtFY4u/8EGBG+iIaMymrj2uXPj9sm18a3mY8VZsfKIe/YT4y3Zv 5ACHyFprs/a/w+fvUxIm1GfWb1BXNA4em0twfJjdbycxjn2DyE9zI3js1jvsg4+H3nJL MTl33ABVLAx4yB9RVeIbpPv2EyFu2GkncwwL+qHRlzsjl1tPjnV3eGj9zF//PHdoRgeG XLhA== X-Gm-Message-State: AOAM532xScdJFLOPKB20Z3R9Zn/2uRZMXY4lrIci9Hgd6YE1ijv7c6fg UefLmQ/WRhvFZrEOoDKjpQ3g+H2TcQw= X-Google-Smtp-Source: ABdhPJypZ0s9K7/3vYkYtGTq3+PHQ4vWT3A+30nW62xb1+CFp5dV5pser0qkZYzFLrOndEznLUt5Fg== X-Received: by 2002:a65:6256:: with SMTP id q22mr13740478pgv.391.1622984598304; Sun, 06 Jun 2021 06:03:18 -0700 (PDT) Received: from gnu-cfl-2.localdomain ([172.56.38.102]) by smtp.gmail.com with ESMTPSA id j5sm2695021pfc.168.2021.06.06.06.03.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Jun 2021 06:03:17 -0700 (PDT) Received: from gnu-cfl-2.. (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 35DE4C0339; Sun, 6 Jun 2021 06:03:16 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] libgomp: Compile tests with -march=i486 if needed Date: Sun, 6 Jun 2021 06:03:16 -0700 Message-Id: <20210606130316.4596-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3034.7 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 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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" Cc: Jakub Jelinek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Don't add -march=i486 if atomic compare-and-swap is supported on 'int'. This fixes libgomp tests with "-march=x86-64 -m32 -fcf-protection". * testsuite/lib/libgomp.exp (libgomp_init): Don't add -march=i486 if atomic compare-and-swap is supported on 'int'. --- libgomp/testsuite/lib/libgomp.exp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 0f4eb6fd4ff..fc5015de42f 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -210,7 +210,8 @@ proc libgomp_init { args } { # We use atomic operations in the testcases to validate results. if { ([istarget i?86-*-*] || [istarget x86_64-*-*]) - && [check_effective_target_ia32] } { + && [check_effective_target_ia32] + && ![check_effective_target_cas_char] } { lappend ALWAYS_CFLAGS "additional_flags=-march=i486" }