From patchwork Sat Dec 23 08:48:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 182938 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1563101dyi; Sat, 23 Dec 2023 00:49:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZ81o+AvbV6PYuoLT62SQg0xFe8bYQ90sYJwtUO27EUr3HwOidP24UugBX1sYnF2z79Bd0 X-Received: by 2002:ac8:5f84:0:b0:427:91cc:19da with SMTP id j4-20020ac85f84000000b0042791cc19damr4012354qta.119.1703321381635; Sat, 23 Dec 2023 00:49:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703321381; cv=pass; d=google.com; s=arc-20160816; b=RTGNSpPkAoaPETgjMY12d5wEyXrvZ0/fqq6zrRrWW335+Pfzmc4/yZcQqUSepqCk9L rDXCHcgvSDPR8ZfFjXSOpb2FJpN2psMR2c1flShY0S6uJqV8KEtu/TM01CHKw98/o338 yDw+W7q1N5wQXst8704vYiS93U3ozJgbVnSkkGS9JAffznu/Jy/A/iwmZ4sz0tU9eEa6 EUSESRt1dHr9DRpsazTeRDrG8hB0ol25YlfATF70uUf1ccd0G6qHe3+bo73Z2fFFiMqx RjCEqAN57WTfoViAF2BzKWP0DHAOD3d3DPuQc1dUjpfSmXkRohOQw8Poxymn3CEZoVZM VbTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:arc-filter :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=/XB2xx1lGODRuS8u0Ubi+sHa2ZNpuL3cECZwyWKxVfU=; fh=Yb7vMu1xmO3w7lzcUJ3g87/936eZQp4GM8b6tTP+qWg=; b=zFI9Yylg6dQzAfad4yF5g4XepsRlJYcsoCWSX+ySkLeXISjjcb9EMfMmIRqqJsRCim TRHRrhabv3XCxJi0P3mOlcZmwKzc4D1ehDCD5cE+UK8LkkWT0oabnTAKpA5s7wXVoAWP 2q2DGOwNij1+ieoxnNUd5njpc6nZ6qYGW2jtQ9mwPkDXU+HxhjzNTytoFXNvexQOSToJ O1lPisUt0/xPomaHiCEF3SW+aTtJm74mx3He1bMu0PhBHWTfbG8mMGUBJP1l0/akJ3HE mGCuvR4Tl/9EFcAmWMFXj3ZydKm5Em/eusHrrQipVUAtkqbkaryjzrDY8iOQO9xBc9hX oIlw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=pJD4aKv4; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s17-20020a05622a179100b0042777b631fesi5951860qtk.414.2023.12.23.00.49.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 00:49:41 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=pJD4aKv4; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 52887385828C for ; Sat, 23 Dec 2023 08:49:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52887385828C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703321381; bh=/XB2xx1lGODRuS8u0Ubi+sHa2ZNpuL3cECZwyWKxVfU=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=pJD4aKv4HEdhC7opBHmxkEPI/5oHAnjznzp9m7xsLFgi+BAxwUsxZCaI5na3ht+W5 SIuS4IMMpAYfytWoIOhk8DO1wihqSbnTltKUO5JMUuYsrFheGeusyTDvOXWi0Z9uIk fPMJ5ptrgJrOhRyFU/hi9v0gFEuhWk8dgQleJwHQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) by sourceware.org (Postfix) with ESMTPS id F36423858D3C; Sat, 23 Dec 2023 08:48:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F36423858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F36423858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.160.41 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703321340; cv=none; b=XrfCmMxK0wa1BmETXKRSGFJbSAo1C6LcWsaD6BX55j/af99xecID7xtBCtjV0aWtrX6MHzZDlNIqF5C+K3TIWGQqLzy0xFIjQoyJ835Kem1ZjiqQHFREeQAF2r3FoO+/B1xdY1wnTXxaZ2vS7oHOIMFgTKikaa6SgkZIgwrVn+o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703321340; c=relaxed/simple; bh=jhF9p7lFKgg3coARZuZbgYMOXoBtWwNRbGqUi0KTC2w=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=gkHU3Rqxsx2RJ4b4nULq/VfMzCyWHsSyTf4i9s/PlgtRINycEbtaCZ9Y+LDIb+MD0+Z0s8AuMMEep2fhKDNbPcVeyieNIIx7vC08ifLOMSf881A+jxJwtdThyuh2ejc6qg/n+1VC2YMrzkM/THPjRy6ApOg4FChp3stWHYZjqdU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-203fed05a31so1787618fac.0; Sat, 23 Dec 2023 00:48:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703321338; x=1703926138; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/XB2xx1lGODRuS8u0Ubi+sHa2ZNpuL3cECZwyWKxVfU=; b=Z4LFXuUJ91Fy+5T7bMZTJmMFcrugLGLdJyLeH7Bpsj6ma01cA1rdbYOBmC4GjnmSIl E9Jqt7ffunsRqx93E/ne5v/LBKhwzLnFMNwSnW0fvwS0VwyqugeE0jmMhDA/ay4RgMgg eOj7RktrlVT/GE5unA80MRJVGtTTQFIMgGKlr+GQGXjV6eWMmDK0Za7tnRTKzhrtK37x IR8DSR9WSpeBpEsdnlOmR6jKlBGneyk0rS/oOmLmYPhTNHKUiOt/KY5CDUSnzMejntwB XuRHbCmQz5j4LwQwAFqfK+xt+SU3xDZt82FxSkcfcTzD1kj1fEjBm1fOBuWgjWBuo+70 FIeA== X-Gm-Message-State: AOJu0YyNpLE5Ud/Rk36rH4vz84mLO8VIkdjrqpMiLZh9v25+Jcr32Su/ 4G8FI8XImL5lmjGQV0QXVH3HZxEM7JNitZFh X-Received: by 2002:a05:6871:610a:b0:203:8474:e84b with SMTP id ra10-20020a056871610a00b002038474e84bmr2883396oab.24.1703321337657; Sat, 23 Dec 2023 00:48:57 -0800 (PST) Received: from localhost.localdomain ([149.248.38.156]) by smtp.gmail.com with ESMTPSA id g6-20020a63f406000000b005c66e25497dsm4565889pgi.83.2023.12.23.00.48.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 00:48:57 -0800 (PST) From: YunQiang Su To: gcc-patches@gcc.gnu.org Cc: YunQiang Su Subject: [commit v3 1/2] MIPS: Put the ret to the end of args of reconcat [PR112759] Date: Sat, 23 Dec 2023 16:48:34 +0800 Message-Id: <20231223084835.4135176-1-syq@gcc.gnu.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785671993754077428 X-GMAIL-MSGID: 1786061920950872945 The function `reconcat` cannot append string(s) to NULL, as the concat process will stop at the first NULL. Let's always put the `ret` to the end, as it may be NULL. We keep use reconcat here, due to that reconcat can make it easier if we add more hardware features detecting, for example by hwcap. gcc/ PR target/112759 * config/mips/driver-native.cc (host_detect_local_cpu): Put the ret to the end of args of reconcat. --- gcc/config/mips/driver-native.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/config/mips/driver-native.cc b/gcc/config/mips/driver-native.cc index afc276f5278..4ef48e14916 100644 --- a/gcc/config/mips/driver-native.cc +++ b/gcc/config/mips/driver-native.cc @@ -44,6 +44,8 @@ const char * host_detect_local_cpu (int argc, const char **argv) { const char *cpu = NULL; + /* Don't assigne any static string to ret. If you need to do so, + use concat. */ char *ret = NULL; char buf[128]; FILE *f; @@ -90,7 +92,8 @@ host_detect_local_cpu (int argc, const char **argv) fallback_cpu: #if defined (__mips_nan2008) - ret = reconcat (ret, " -mnan=2008 ", NULL); + /* Put the ret to the end of list, since it may be NULL. */ + ret = reconcat (ret, " -mnan=2008 ", ret, NULL); #endif #ifdef HAVE_GETAUXVAL @@ -104,7 +107,7 @@ fallback_cpu: #endif if (cpu) - ret = reconcat (ret, ret, "-m", argv[0], "=", cpu, NULL); + ret = reconcat (ret, " -m", argv[0], "=", cpu, ret, NULL); return ret; } From patchwork Sat Dec 23 08:48:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 182939 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1563120dyi; Sat, 23 Dec 2023 00:49:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/SOpua45fjkaHw5HWkta/AzQGF1oHJIlrmfpApNAZ7pgVLaGuH5+VIDz744P422NGwSrz X-Received: by 2002:a05:622a:1a22:b0:412:1c5f:478b with SMTP id f34-20020a05622a1a2200b004121c5f478bmr3755348qtb.15.1703321385970; Sat, 23 Dec 2023 00:49:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703321385; cv=pass; d=google.com; s=arc-20160816; b=SI1G9hEse9Na6uS5Da5lwtCH6GzMxyVe4cmBc2QcCZPmvAgq2n47S9MB+WGFCcAaQs +bnAFgT0vd+dtqWOP9u/oqcp14V+CYpnux75YRgux6f4DNxW2zzbypwm2N9Vx1bGNNVK 9Qxnsh1iLoochyEo+I4SBcaKiZc+qlUrdo7j14QlTB/hsytPPTHM+gZHVDkAIM4FBZS7 M3ko8qbV9J1J4XRF55Ar+IlkuwpMHO+9uX8FlmMO3AUxqwEz6ZSUiLUCTVqRBKrAtDD5 cYpFlmILauuuw91iSVKPUiQzxDgiYWdfyT+0aTxXiZhKbyEwFoM962GLjWMZWqa+bq5W HeRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:arc-filter:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=5wrQc7A/dLRRziVoWUK7/QyqZaADbd7zVZCY8bD22aY=; fh=Yb7vMu1xmO3w7lzcUJ3g87/936eZQp4GM8b6tTP+qWg=; b=vePnj74noeWR8d63n2hAahDYjnLdNe5QucIWu7DoPVQZWP7DbUMqKgP6uPlpWJmCbJ df5GAT7gAutNPOv9F32LyLslDUA3oxmRni9q/A5e85b+8oyS6ftM4WLyqN1oCBCge8Yr mSy0uq0d9mjkWbwfsSL52SJDXZOHZ2Jv2Vkmf/1hfqS7prq92yBCSRFFWUVvfyXI9bKU grK8KK+V40G4lIDQSjG+6OhEVK01T8eEyThAyjgAiykgJzmlH4V3S/X1otQXJcrEjHbl f5jfvJYMRUSzE5p+H/0QAN5FhdscEYI2iaStpXIwvCpbjVA9MYzSopG+HO9aZgvWLc8p nWGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=p1bagkN2; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id c8-20020ac87dc8000000b004254f054839si6189842qte.73.2023.12.23.00.49.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 00:49:45 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=p1bagkN2; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A44F73858D3C for ; Sat, 23 Dec 2023 08:49:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A44F73858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703321385; bh=5wrQc7A/dLRRziVoWUK7/QyqZaADbd7zVZCY8bD22aY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=p1bagkN2iWoL4dAiOnbBxQb6PMcCnxrZ5CCsO6K/aodjnaVloyRLs6q0suUPQNhyj +M3wUgiM6ISOWiDOnRsQpqd7NLhRSvJpjhOW5uvMvWsIJvFo4IhT4BrWWk6uGfxGM9 d7DhCiKG4nNPrw+ppzDhG3DJiZ9A7n9YWa6ryGnM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by sourceware.org (Postfix) with ESMTPS id D7EA6385840E; Sat, 23 Dec 2023 08:49:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D7EA6385840E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D7EA6385840E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.215.179 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703321345; cv=none; b=KmgnK6GsBFJVAIvtehkNUGytuHakvpfQm5JEJ9BwAa3h0NJDnvPl8/WSHx6QEyy6jFW+9MPDWVmwZo2JrtEzUBYYG//NxwZOplIzsf0GzAsk2Bye6PmARn9S1co3hiJmRODvSXLVJMv88uzAuR0WG9JIRik2CVaQ21X60OqTAKc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703321345; c=relaxed/simple; bh=0gItRXFJ2QiroP1CNcf5Zfybwydrc2XhkzrNFgcUhuw=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=HwP5GFpR+d1LlkEOxT2YGhdzSqCBp0A3v/AxoLxNZjSx5AWHydORZRn7QvQvqUJ++5jupU1QWUyiw9Sct2fNBa80hcsY6PG5SC40TOtsu4kbmDwYM5qwBNDMhEaM/2cFRkXlHoZRbAFTUAVFs43rWtst54fvkG+D6GY6ScYmjkg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-5cd86e3a9afso1689887a12.1; Sat, 23 Dec 2023 00:49:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703321342; x=1703926142; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5wrQc7A/dLRRziVoWUK7/QyqZaADbd7zVZCY8bD22aY=; b=ax3ouF7sxgRaiL5xrzIcY8N5kHwU2dnlperkEYJzW+u6pj34231zD4cpopJeQptGpb f0nXi5VAJ2bPF8JlX6J6Q6+K3o7xSh55iTTqHvLnYlMX2DYiDOajdlNgFw6M69EsDAdB KloNbWXJkepuWtRbCqxRhH3WFcQdBe34Qgp3J7aSZJadI9SfpeLIcOudTHI5gCVyxNT7 CL4JGpm9hZ8sQIDCgt8I6+zREfFz7tCBh/+ZElhj/UJtNCV1KAlLz7NCVz9o9//uczQz /pSc/sCxEGp1Uac4C6Les9GI/yU5OXS0Fib0xMVcDtOyeXsJQs3aALJcI19wEhEZe0h4 AvGA== X-Gm-Message-State: AOJu0Yx71Uz7FrUJ5bdSyYlpkMjhugEqLQLI21DD9eS6BVDRBsySZdJH kdz62ofEB0+Xnb3SixxmiOw5iXw3j2yTsgnx X-Received: by 2002:a05:6a20:8e02:b0:194:c0a8:3b5a with SMTP id y2-20020a056a208e0200b00194c0a83b5amr4579867pzj.3.1703321342320; Sat, 23 Dec 2023 00:49:02 -0800 (PST) Received: from localhost.localdomain ([149.248.38.156]) by smtp.gmail.com with ESMTPSA id g6-20020a63f406000000b005c66e25497dsm4565889pgi.83.2023.12.23.00.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 00:49:01 -0800 (PST) From: YunQiang Su To: gcc-patches@gcc.gnu.org Cc: YunQiang Su Subject: [commit v3 2/2] MIPS: Don't add nan2008 option for -mtune=native Date: Sat, 23 Dec 2023 16:48:35 +0800 Message-Id: <20231223084835.4135176-2-syq@gcc.gnu.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231223084835.4135176-1-syq@gcc.gnu.org> References: <20231223084835.4135176-1-syq@gcc.gnu.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786061925184854425 X-GMAIL-MSGID: 1786061925184854425 Users may wish just use -mtune=native for performance tuning only. Let's don't make trouble for its case. gcc/ * config/mips/driver-native.cc (host_detect_local_cpu): don't add nan2008 option for -mtune=native. --- gcc/config/mips/driver-native.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/mips/driver-native.cc b/gcc/config/mips/driver-native.cc index 4ef48e14916..b8c37d69215 100644 --- a/gcc/config/mips/driver-native.cc +++ b/gcc/config/mips/driver-native.cc @@ -93,7 +93,8 @@ host_detect_local_cpu (int argc, const char **argv) fallback_cpu: #if defined (__mips_nan2008) /* Put the ret to the end of list, since it may be NULL. */ - ret = reconcat (ret, " -mnan=2008 ", ret, NULL); + if (arch) + ret = reconcat (ret, " -mnan=2008 ", ret, NULL); #endif #ifdef HAVE_GETAUXVAL