From patchwork Sun Dec 22 00:04:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852896 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2772859wrq; Sat, 21 Dec 2024 16:28:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXX0Pmc/lmlH+BsPu43mQNTi4UtoJb/wWYfl7rM7dHXjdzV2hC6iN9RVwRqcFQcQAVfXjfGJA==@linaro.org X-Google-Smtp-Source: AGHT+IEONNa8RIBQSYDsM/zRGdpl4K3BIrqMfMWbaRIakdrB0Ka8UGLJPzTNLb6aB8khR5fTgGbg X-Received: by 2002:a05:622a:245:b0:467:7cda:936d with SMTP id d75a77b69052e-46a4a8e0baamr123709441cf.14.1734827288082; Sat, 21 Dec 2024 16:28:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734827288; cv=pass; d=google.com; s=arc-20240605; b=cSzOfnkHtDAAoPNtTTE+QuzKW7Y7sw4R8z7t89sFZAn8VdRjS4tYtjtfV3JM/XUlk1 zii9sErsJSRFkn2NOg5tHrWGj6ctV3/EvidaqWLgLR2ixO6qVKl+eBJEvHRSpnyAKi5X QezwuwQP5Sqi+xYZ18axaE1nlvVxwEO9YjaKBO8wwkFhdWmZ54GtP1dku8enScr8q+aS FCpAZHid6llvw7VP/WDoPnf74dJRr5ty519+mJJKPV3TliBEXLNnjo1GaknuGWyjNOoq sunXJNEweTKbOq1r+v9gqfq4bbQumpMksEFsSqpUxIuuDgLyRP8s5CovSOVmK4dScFf3 AaiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=LbVYrPxNtzOqlKEndq1g6kUmbIvifGWeVqpFlSRbwZ0=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=CVoRHXTOC9SKeuvW6v/hz940O2bFJLtJuw0VLqShbAl/Asg3Vw5wVchLfc0MMc17Cm TBx61LdJhnsOM9t2qAG3p3kB9izKmepZ5qmZ0AVMl9Q81WyIIxkVbyIMlLB7jEgsmTQc c94amnPcJ3zkmhch7Cb1TE4KgRqMD78eruCpINWC7QOOrqAw4fq7xjAL37gVvRPpH9V+ Y8DebLRZlMsKfEJoiQu+wQKtQzqZzhyjNK4AyVxee+EDMj3JyylLtJQ2Ke/QxO6RZVPw p5vVGhgtRKtsP+kqd12pcL4mDKmJ87Ia8/F2bL0dENo4m5RK1P6vr5JOarbwfSsD/sq5 aO1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HynU0HoD; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d75a77b69052e-46a3ec05b99si58578521cf.686.2024.12.21.16.28.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:28:08 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HynU0HoD; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A5923385842D for ; Sun, 22 Dec 2024 00:28:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A5923385842D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=HynU0HoD X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 8DBC33858427 for ; Sun, 22 Dec 2024 00:05:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DBC33858427 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8DBC33858427 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::629 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; cv=none; b=XIz7VGW9m6pkRI73jyO2MS8L5GrWAvp8CzVBFrOKWlIizhCX9QUMEKjZvlnPz5BxgXEJGQKAd1yuRQckBXoSgb9+pKc4Tj+ish8W7nV/glcM7NIiGw2Nnjvhj7aBJG/T7vzNgpyJWEyzc18f0axF2uNu7RY2eowUaQYOS9P3ET4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; c=relaxed/simple; bh=7JHIyDK18zXmw6w+35Xcnbat8JDgJW6jTEUs5h30I9c=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=tZf6WSAspRJx1QlZiw/oa/bDf0KuOfYycRa+6wM/QzzmVa35hsJ+icA7VMWXmP/4lM7RLP/K3Z+ogzrZC7HqvwZH8fs96JwivMYV0Q2Vp1tFJW67PJGBbUQrOYkxkuQsf05F4WeTDt4AmQ7OVfrebCZR2z/qeW/xGHds9B5a4o0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DBC33858427 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-21683192bf9so32063245ad.3 for ; Sat, 21 Dec 2024 16:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825924; x=1735430724; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LbVYrPxNtzOqlKEndq1g6kUmbIvifGWeVqpFlSRbwZ0=; b=HynU0HoDr5BBR9VF0r0vf2S0mOjtE63FUdJDgp7AyQ8htCOdieaD0vg2ozHCM5Vkts wGtZmhyshlqWzblNN3JL6LCkKfGTOdLueN+Q451SWahr029WkqU/ke8LR61rdo+uU+OW 1TcbbgK4ZmzxtNYghpT6JAsbax2sDJ9tTy1/QgeSNc6KUmiuMSdg/jHF4Hc7pNyYNln4 w/1xBkRSKtp30FGtAIUpEFfG8HcjB1x+SJs8cdoE+jIoeuKLTDprfdiVgbiam1Y40ltR OhQuyqfQQ6Xds/GR4NPbIpyi0iaqNXE47BDOpWhuzXVmprbGA+ykJ0EAhc+GGsorGNwd ZI8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825924; x=1735430724; 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=LbVYrPxNtzOqlKEndq1g6kUmbIvifGWeVqpFlSRbwZ0=; b=htwPYmpYP7w8+Kn64DoZD+TlbLE62R+XEAToH2WZ/TYKIlgod3a8QjuuELHuR1tTEM pXIAZl74lzpXgheDbYce25enqjR3Zt18aM6k+OHYbWMEq3E4FSB2nnMs3Pcxfv0rYFZP xLLAqrbTDVbJE9NO7IDU74L9bhQMPs+pT3MRhBvE2njdSlfWWLfMOWcdlHYeSVLY4kmC qCnw90pUUuiDYAK9ywwSN214FYfR0TEo0wFTd24D9s1ND9MwP+zuuZ5tqmQu8QWwXC2I CWWPsTe5LtQMWrrniWzVoxj5gY88WqJvYAZpODQg7SPfQHabx881ximV7q80msO/hMbW nFqQ== X-Gm-Message-State: AOJu0YwiMMvDTdjJDcB4ghMhmN3z8to9nFsydFVJJ9BUGNm7B4atzqQh TLVkSPoPWFqMe96oVFx63Lr7wTHePxMqct3Sjc2/mdxv8nvkkm4DlkTxztHjkusuFg== X-Gm-Gg: ASbGncuXiTkBgpXiWj594boYQx1TQ1BAkX6BMjC88EWMy37ke+r46IGLQw+yvxV2b3t A6/ddCpJ22Xggbt8bqZd2vVBP/mIxO3pSCujBtd3snCHythHhZiGUi3ptq8LOXmFkahUFINr3yq CdyeC3IwYhVagtUgQ6wWnR3JS5fZN6MSb6XHyA9LdZlYRIwk+4lJRb9et8NCskt249jX60+WoYb vJpGjPPQp2cMEK0pYoR2gJLv9KcRZrBWY/NUEPbH7ICm8VAVGmJT7PqXwUw5Rz/Vc3o88w= X-Received: by 2002:a17:902:ea03:b0:216:5e6e:68ae with SMTP id d9443c01a7336-219e6ebaf33mr113986285ad.31.1734825923873; Sat, 21 Dec 2024 16:05:23 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9629d0sm49216085ad.41.2024.12.21.16.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:22 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 2E61EC0841; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 23/39] elf: Suppress clang warning on tst-unique4 Date: Sun, 22 Dec 2024 08:04:46 +0800 Message-ID: <20241222000509.2205895-24-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella clang warns that the instatiation of the variable is required, but no definition is available. They are implemented on tst-unique4lib.so. Checked on x86_64-linux-gnu. Reviewed-by: Sam James --- elf/tst-unique4.cc | 6 ++++++ elf/tst-unique4lib.cc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/elf/tst-unique4.cc b/elf/tst-unique4.cc index 575c70d3a1..ab727b8dbb 100644 --- a/elf/tst-unique4.cc +++ b/elf/tst-unique4.cc @@ -2,7 +2,12 @@ #include "tst-unique4.h" #include +#include +/* clang warns that the instatiation of the variable is required, but no + definition is available. They are implemented on tst-unique4lib.so. */ +DIAG_PUSH_NEEDS_COMMENT_CLANG; +DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wundefined-var-template"); static int a[24] = { S<1>::i, S<2>::i, S<3>::i, S<4>::i, S<5>::i, S<6>::i, S<7>::i, S<8>::i, @@ -10,6 +15,7 @@ static int a[24] = S<16>::i, S<17>::i, S<18>::i, S<19>::i, S<20>::i, S<21>::i, S<22>::i, S<23>::i, S<24>::i }; +DIAG_POP_NEEDS_COMMENT_CLANG; int main (void) diff --git a/elf/tst-unique4lib.cc b/elf/tst-unique4lib.cc index 17a7cdf567..2829e75cee 100644 --- a/elf/tst-unique4lib.cc +++ b/elf/tst-unique4lib.cc @@ -2,7 +2,7 @@ #include "tst-unique4.h" template -int S::i = N; +int S::i __attribute__ ((used)) = N; template const int S::j __attribute__ ((used)) = -1;