From patchwork Tue Dec 31 18:26:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 854386 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7048313wrq; Tue, 31 Dec 2024 10:27:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXc7U1xkGMVpvPoNLAriz/NiFSIYqEPMkmylz/IKtnkz+Cde12d+0C141D5wdNg7P5l9OLqgg==@linaro.org X-Google-Smtp-Source: AGHT+IGB427cQA5zGXJehdYN5AiTGIu3LU3TBRujLVY6LUbFTquVJNdLEYe4dS5E6EGP+GLSOa62 X-Received: by 2002:a05:6214:c4f:b0:6cb:20b6:f398 with SMTP id 6a1803df08f44-6dd2334c4c4mr591604086d6.21.1735669642589; Tue, 31 Dec 2024 10:27:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735669642; cv=pass; d=google.com; s=arc-20240605; b=aNe33xkMOJW853aKWaMTKktDrBK9QoHPivWev9jaJFnW04snjpp894nhvnYf9Sx+wc 1CT15+Ei51uzgHqOtokXythXoNLB2WE02hfWWZUmlHjoiVA2a+l+rIoz1XLBsg+OBBU3 U2/qTWRI+vEBSawxTOH3lzeEuallhivmJVB06DcJ2fuJLnc6WmkZCF7GZ0lzn+bh/D+N G5vMIpTW9cw8g2cwOW0eMrafGhiH/AmfbvfF7r/tB4ymCxktCCExQqRg6N12gZP2thaL dWZRQa947eNxBRSu+lXu748QEVjlYpaZLbVBzvrIHV5miBCvIvvdpmmKKU1VJO8i9J/7 h5yg== 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=RxukHwZqjI2ZLvMNuFcyK3eIn86L5cWKbLJxgON8enQ=; fh=d7KdQ+eBG5Owb97PZQUBRjccSsV/hB6hMlyGG6W37vA=; b=RidDxdjYqW+ZuESBEjVZRLNH7kbSiqoR0ABVeyJ3xdf97wp1eT5JY1eR64ztK/kvu9 BcMPC3ZpKS1i027X8OwMqTa/jbybTVZI1MB8Wju3TljIbXtb59rDcI6dgHY6vYEMRqlx uz9A8teqnuBVy+SCXxhm0ADqOh2PzPEHVDI3gWhzt7ShJEpWOHmlN8endCP3TlKKUszQ krOJaR+Lb/rlBesmidz9jCsZQxdupqxMs4s6x8EQPpR+1VC89JzSfjZhgqfDmWWPLE4E xfoMJyaMje/bsNS8hY4l0nCSQoYtAy7YSdDJ1JhsRdbRNw3pGFo57VphZgAeCegyezL8 qSqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UZJm9BSE; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd18234c09si294640746d6.251.2024.12.31.10.27.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:27:22 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.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=@linaro.org header.s=google header.b=UZJm9BSE; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2F85A3858C2B for ; Tue, 31 Dec 2024 18:27:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F85A3858C2B Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=UZJm9BSE X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 123A23858D20 for ; Tue, 31 Dec 2024 18:26:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 123A23858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 123A23858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669618; cv=none; b=bHSbE4GL38jOtQocjaAz4y4hTnj8HNWDFaCe7tNG+34Fudcv7CxYsRXmE2iRDlrv2t1NqJJMVKCCR+iqHaURxAHoO9cZLInxMiNA/DMvc5jK+P/px1bflXmL98CV8QKGtYj3AjL7R3FA4TrzC73RazQx7G4ZmsjbzEzptUsOmfE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669618; c=relaxed/simple; bh=t88mJ5HDBDMhYHu5Cr9YWPv69Vja78iW/V+5jUUyf1I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=W8EFAcmVtq9Cfpe3rP9GjcNW6XKa+slhXDQ+fJZI8opypJs2jVfxnRnAqij3LWGhcflsXAu+RD+w8jmAw8R6cJWZ+3pzgIrDqoVRzL2tZnSuAdZr/DUDJk9KeMSpHc6tEHQKmXbpKiV9p4/yfW+mcMJZmrJXfJj40dfbZPNK9pY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 123A23858D20 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2161eb94cceso95669815ad.2 for ; Tue, 31 Dec 2024 10:26:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735669616; x=1736274416; 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=RxukHwZqjI2ZLvMNuFcyK3eIn86L5cWKbLJxgON8enQ=; b=UZJm9BSE6uWIUYUnC8QG0HKcGinoeP+fhob77mFUcL2O7PfoxNTkPsUd/bQ6nKi4Bu qI8JJN9RRRux0et3c4A/YLp1hhjxHnJgM1l/lHaiYRCFdUpjsDiCL9RFTNV3CKbqwEKW Wc4wlJVV7/b05uGq/xKE2s11KMtCCWT0wRatVKLE1UmjzcLZJJa/jx1pY86BbnrxSxY/ SUNZE7Nple1VFUnjn2FNdzSNnIWESajEr4AI6cYAJRv6sBvAmW2w+F/zRbGY8DBEo/NF R9qy+vEH3Boy0reL97txXKVo7KPK7gfwnsnfCWxmOmNVKRQ2wdyop+/nrtMXVSf3Q0fP DlzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735669616; x=1736274416; 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=RxukHwZqjI2ZLvMNuFcyK3eIn86L5cWKbLJxgON8enQ=; b=NwxeingwTQI79zN6idsMbUCljCuGra2pLVVnCBM7SD1t9KIzQZQZGUFmOJcQUxJVJr uJFP1XjIbWRYx80zyGkraXpgr3ytwqGJlLDc8AkvmawIT9ZebQ6fxhhZuiyUTbxH+JUa QwW4ZvGNpQGiooMfXckHxa+E8Nggx1HipHzri2ZJIgpvHc5/UIfS14zcB0nHdTCqL5iP tJn3kP4QwSVO9a4thnSCWTyygz7cA/t7VRD7qK7tGkRcgKSChRZnK5YJ0zqSYbHZbAar LGj7HHRJQkcSFX7uVpizn2EVwCWfwgzRxnEB0KVEnwcoBefbWofyowZ/JNC/mgGgO1SO cJqw== X-Gm-Message-State: AOJu0Yx3xZfwYe+VgsBOu8nIKiKvBlbmfxprRDbHyCC5Us1I4MhpqFq5 HffHxIKnHo4bn1pLLBfeQ0e5fCVkVHKVa9zxg6cy0PWPEZD+pA7jdIHc7EfJgCC6E24xNFVZ2ST E X-Gm-Gg: ASbGnctOwbaz598r4wYZ6PEK1ipLGuucEdOA5AwYRsleIJNG37Qnto9xcAa9OZsCkZC XXMi2hAMSISkt1/7KdJBXKXQWnbvlp3WgxfNktMdtK/6X8yZK2QxyqmtrQkXRv1AM3d4dWsgbV0 Tej6i0KfPeRFl/o5eVr4mfxLyyaEIxLsaYxw64sNe+tlDcN7IJsx5ePd+vonXOFiFJ1HWjWY+Q9 QdDp1YY9YWXNiQYpeg6Qac7s3a3cfOV3iRR7ZDfxhjItvaWM6JS5YjsQ4zj4+ZrN8Yal03sxF/w 5Z05YrYXPFNWDMDglLgwLLlT5ln1 X-Received: by 2002:a17:902:ce92:b0:215:5ea2:6544 with SMTP id d9443c01a7336-219e6e8c365mr480376315ad.7.1735669616343; Tue, 31 Dec 2024 10:26:56 -0800 (PST) Received: from ubuntu-vm.. (201-92-184-234.dsl.telesp.net.br. [201.92.184.234]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f5046sm198693105ad.179.2024.12.31.10.26.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:26:55 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Sam James , "H . J . Lu" Subject: [PATCH 1/7] Fix internal tests when building with clang Date: Tue, 31 Dec 2024 15:26:07 -0300 Message-ID: <20241231182649.1811734-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> References: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> 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 When building internal tests, clang fails with: ../include/string.h:183:44: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] 183 | extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy"); | ^ ../string/bits/string_fortified.h:42:8: note: previous definition is here 42 | __NTH (mempcpy (void *__restrict __dest, const void *__restrict __src, | ^ Because memcpy might be already defined if glibc is build with fortify support. The straighforward solution is just to avoid this indirection for internal tests, since it is not required. Checked on aarch64-linux-gnu. --- include/string.h | 4 +++- scripts/gen-as-const.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/string.h b/include/string.h index 3b4c6007d7..003636b75b 100644 --- a/include/string.h +++ b/include/string.h @@ -175,7 +175,9 @@ extern __typeof (strnlen) strnlen attribute_hidden; extern __typeof (strsep) strsep attribute_hidden; #endif -#if (!IS_IN (libc) || !defined SHARED) \ +/* Also exclude tests and related modules. */ +#if ((!IS_IN (libc) || !defined SHARED) \ + && !(IS_IN (testsuite_internal) || IS_IN (extramodules))) \ && !defined NO_MEMPCPY_STPCPY_REDIRECT /* Redirect calls to __builtin_mempcpy and __builtin_stpcpy to call __mempcpy and __stpcpy if not inlined. */ diff --git a/scripts/gen-as-const.py b/scripts/gen-as-const.py index 2f6b09d05b..17d08dd5a2 100644 --- a/scripts/gen-as-const.py +++ b/scripts/gen-as-const.py @@ -38,7 +38,8 @@ def gen_test(sym_data): for arg in sym_data: if isinstance(arg, str): if arg == 'START': - out_lines.append('#include \n' + out_lines.append('#define NO_MEMPCPY_STPCPY_REDIRECT\n' + '#include \n' '#include \n' '#include \n' '#if __WORDSIZE == 64\n' From patchwork Tue Dec 31 18:26:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 854385 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7048286wrq; Tue, 31 Dec 2024 10:27:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUIsrtq75TtmyekbloTI/C0V9mfpZiov9A7k34fgjzPC0pZVqP1VQWa1ZCuPXuWSXhwulg6bQ==@linaro.org X-Google-Smtp-Source: AGHT+IH7hKeHsii9L/qQKRUcBJolTB0/qgW6WokGOKbGNwBUaHxLmtGYy2v5DwUNg0LyJXQ2KPYg X-Received: by 2002:a05:6214:caf:b0:6d8:889c:54ed with SMTP id 6a1803df08f44-6dd2334d31amr578015106d6.26.1735669638633; Tue, 31 Dec 2024 10:27:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735669638; cv=pass; d=google.com; s=arc-20240605; b=czyU+a1Xk8FeIf2ANPkj1cPF88wh84bKCRMOAiNXY+bZQ/a294zmtexKiIzIXalf3v RGrFKueEqH+6k/CmhIVnra3Bmu5T38ePpOqCxfdaEiXH7AmxJ+CKXDvww8oO7zCvoPUD UpwM31ctgtxuNrkYDPWudOYJ/0GByswIuqU+ksD65TVmbybrDzB/Ey+h3x8kbbcgnoKE gfeQmjJOqBovmJ0EmmZP6g62AiF4fPpdpyEeFnZaxAwVOu1QxCc0pbaMZNY9A2pqVr3f /R9vitGuRkBSH/8u2gxBBSxjkoCXWBaYcZPLXWCKQ9P+4j2dNAnbjGBiy2gdTib2Leyu jx6Q== 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:arc-filter:dmarc-filter:delivered-to; bh=TQSeV0oEsECz33sJu7afc8OfMMmofQYo6jRmE9OqGUE=; fh=d7KdQ+eBG5Owb97PZQUBRjccSsV/hB6hMlyGG6W37vA=; b=Hsd7o+lzJV72hdVtiH5ZtFAUSjfP0mL96z5nYNC3+lya9sCWDilqXtSWtqGOBs5OmW e2SpSQ66sgO9hawoq43IeSgrIU7CmhVDYyDxzeWqyk2K7cotHSjNd7CI7tp43SLk7w9/ A70pSaT/EkuX3MZ5e80mWdlTI+4E/jqbDVp/haPDkllIvBxjYHm7JM417l9BpqlRmU+q R+T6Tq/iB2DH5rf71asxJK06UzSjDGPgBNroOqMhSyggKg/Eew9a1Nz/5VNuafNp5r4s KEj6VxRqvj0NySg1UJiWUtZvoMhQ1Ib3rBKGW8yYRFKNX27vBersbjm3XM5siVBJnvcF IkWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ILUyuKny; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd1835b2b3si314245096d6.457.2024.12.31.10.27.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:27:18 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.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=@linaro.org header.s=google header.b=ILUyuKny; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 498BF3858C78 for ; Tue, 31 Dec 2024 18:27:18 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 8D45E3858D26 for ; Tue, 31 Dec 2024 18:26:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D45E3858D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8D45E3858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669619; cv=none; b=MzBKK0ADEcWwft11wQjIY/EXh+JnbPWv4HivGNipT2gItrCc1r2y9iJGu8TbYLRtfzUQNAnmY6yrtcKsjcY5xvYqEeg6QJOcMFfZIIFaor5mvvYQiAjmQEzYx6G09lE9yLryKU75SzlwYmZQOGlH7XauK0lqH2SKa9nD93hmBiY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669619; c=relaxed/simple; bh=l2mMecXYxu1LdoKLp6hSHpuKmN953JHg+up2QA9qmGg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=POaSE45TrpNvU90j7xyCzpFLYs/z40ywBBLXVkBn9aUCiqB7NqekljjXwuVE1IDGgIS69PccBIdqyOL2DvzRk9RNZhlU+/R/eD0rLE09pk0D+mAmDXKVoFSydTcB8mqQHvlE67FYBDxY4j23s2/JpwooivMPKd72LenFvqeVMaQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2166022c5caso119806835ad.2 for ; Tue, 31 Dec 2024 10:26:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735669618; x=1736274418; 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=TQSeV0oEsECz33sJu7afc8OfMMmofQYo6jRmE9OqGUE=; b=ILUyuKny0eLKIm34djtEPd4z0faqqKyRrmFYxcbNalRzOnSIkLP2wdr4lJ2un4ay2D Ebfb2OgONUFmzyHg7P9N1BK5XJQtzz451JXwuhYb0Jz5YBW5HQ8f7tek54kATfqwGWZ/ KEMERCo5+4E7P4kyW4VswmPUCAAohQ+qEZYBun9/7cI7AmxXxK3ihLvVH5yZLvqIDpO6 thi0MSG81B8qm8ZrlYBcbNYNU540tprefUfgiYZiHtwcPfI0lut11rSyEbAfMfbnyAhS NMCpWcZl7+gu5fcKDjBYqv0ZJ1chnH5kNLKJfuM8Uk/n51GVkgrJ0/eckAmM1wjBAHxm 2sOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735669618; x=1736274418; 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=TQSeV0oEsECz33sJu7afc8OfMMmofQYo6jRmE9OqGUE=; b=II5fat9eNO7rZMRzQai/shg0fGlEPZ1hSpeLTkzfg5QWJGYwgi61HfF8oicdBV1SD2 MJx3QTvUs0X6KYd5VKg8cSIHZQo2Ep52lf3leJm65Bqj4AdUrHNSS012cdRMmTgeUG1G syCW2PFes8fp+UgSqWU+p8Ugfliig7g/RVYxbbbsV95fzzPB6Zf50s5HmMs1o3Zcvkyj mHOvwmrZUI8xJLrJUDbbrAue3+S3dEj4KlZaE4AbfHMzHTUWCH4l9rDnTlcgZiaxt5w2 4zzsiXb5P6pE9qDWouRXuIuDIauGqaQMRUGE+Tm8TiqRtZ7/Uz1KHkZdMRl/c8Y3YEDM jOIA== X-Gm-Message-State: AOJu0Yxa3uxzR2CAUckuL+cjUGfHiQrB1LXYy71ZddruYlqA8qTekNzl MtMsPBGpxULsPk+P+f5XXRxuwB4tY5g00vjE0FYZPgBEUw5BZ/uwTE/rH88YsESkoCAIuQhLQn9 W X-Gm-Gg: ASbGncufJOvM0JNfesjE8KVrMY9oWPopY40nElz+EPz3tKdoN2Egx+lz4cN2iBcn4mr 3DxbExzEuoXHUS1veq9jXMqfN2l4bfQtQGgk5IWamRBo5UplZTuL77QchsHIUBt2TwKmhKBg4xa 7uz5l//1Na1dtBpG2iKXeUgjz7Dr3MLiM6bhziVlurXprVduH5m/2azoH1MBtlqPxzxFuA/QRod 8lHeIOqTZwH9tV2K8UsltewDKFKWtARrzJvRLDG7pGF1qAIXO8p74dYKJv/4QB+RKU6bZUaKD6r pz4GjCE1h1Ba3RoAiNWBv8touX6+ X-Received: by 2002:a17:90b:1f86:b0:2ee:ee5e:42fb with SMTP id 98e67ed59e1d1-2f452e149c6mr57252016a91.13.1735669618410; Tue, 31 Dec 2024 10:26:58 -0800 (PST) Received: from ubuntu-vm.. (201-92-184-234.dsl.telesp.net.br. [201.92.184.234]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f5046sm198693105ad.179.2024.12.31.10.26.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:26:58 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Sam James , "H . J . Lu" Subject: [PATCH 2/7] aarch64: Use 64-bit variable to access the special registers Date: Tue, 31 Dec 2024 15:26:08 -0300 Message-ID: <20241231182649.1811734-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> References: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> 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 clang issues: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths] while tryng to use 32 bit variables with 'mrs' to get/set the fpsr, dczid_el0, and ctr. Since all of 64 bit register, use the expected variable size. --- sysdeps/aarch64/fpu/fpu_control.h | 36 +++++++++++++------ sysdeps/aarch64/fpu/fraiseexcpt.c | 2 +- sysdeps/aarch64/sfp-machine.h | 2 +- .../unix/sysv/linux/aarch64/cpu-features.c | 2 +- sysdeps/unix/sysv/linux/aarch64/sysconf.c | 2 +- 5 files changed, 29 insertions(+), 15 deletions(-) diff --git a/sysdeps/aarch64/fpu/fpu_control.h b/sysdeps/aarch64/fpu/fpu_control.h index 263cf36c05..743c2e5b15 100644 --- a/sysdeps/aarch64/fpu/fpu_control.h +++ b/sysdeps/aarch64/fpu/fpu_control.h @@ -29,17 +29,31 @@ # define _FPU_GETFPSR(fpsr) (fpsr = __builtin_aarch64_get_fpsr ()) # define _FPU_SETFPSR(fpsr) __builtin_aarch64_set_fpsr (fpsr) #else -# define _FPU_GETCW(fpcr) \ - __asm__ __volatile__ ("mrs %0, fpcr" : "=r" (fpcr)) - -# define _FPU_SETCW(fpcr) \ - __asm__ __volatile__ ("msr fpcr, %0" : : "r" (fpcr)) - -# define _FPU_GETFPSR(fpsr) \ - __asm__ __volatile__ ("mrs %0, fpsr" : "=r" (fpsr)) - -# define _FPU_SETFPSR(fpsr) \ - __asm__ __volatile__ ("msr fpsr, %0" : : "r" (fpsr)) +# define _FPU_GETCW(fpcr) \ + ({ \ + unsigned long int __fpcr; \ + __asm__ __volatile__ ("mrs %0, fpcr" : "=r" (__fpcr)); \ + fpcr = __fpcr; \ + }) + +# define _FPU_SETCW(fpcr) \ + ({ \ + unsigned long int __fpcr = fpcr; \ + __asm__ __volatile__ ("msr fpcr, %0" : : "r" (__fpcr)); \ + }) + +# define _FPU_GETFPSR(fpsr) \ + ({ \ + unsigned long int __fpsr; \ + __asm__ __volatile__ ("mrs %0, fpsr" : "=r" (__fpsr)); \ + fpsr = __fpsr; \ + }) + +# define _FPU_SETFPSR(fpsr) \ + ({ \ + unsigned long int __fpsr = fpsr; \ + __asm__ __volatile__ ("msr fpsr, %0" : : "r" (__fpsr)); \ + }) #endif /* Reserved bits should be preserved when modifying register diff --git a/sysdeps/aarch64/fpu/fraiseexcpt.c b/sysdeps/aarch64/fpu/fraiseexcpt.c index 5abf498443..c48ba50777 100644 --- a/sysdeps/aarch64/fpu/fraiseexcpt.c +++ b/sysdeps/aarch64/fpu/fraiseexcpt.c @@ -23,7 +23,7 @@ int __feraiseexcept (int excepts) { - int fpsr; + unsigned long int fpsr; const float fp_zero = 0.0; const float fp_one = 1.0; const float fp_max = FLT_MAX; diff --git a/sysdeps/aarch64/sfp-machine.h b/sysdeps/aarch64/sfp-machine.h index a9ecdbf961..b4b34e98e9 100644 --- a/sysdeps/aarch64/sfp-machine.h +++ b/sysdeps/aarch64/sfp-machine.h @@ -74,7 +74,7 @@ do { \ const float fp_1e32 = 1.0e32f; \ const float fp_zero = 0.0; \ const float fp_one = 1.0; \ - unsigned fpsr; \ + unsigned long int fpsr; \ if (_fex & FP_EX_INVALID) \ { \ __asm__ __volatile__ ("fdiv\ts0, %s0, %s0" \ diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c index c0b047bc0d..4a74ec6bfe 100644 --- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c +++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c @@ -128,7 +128,7 @@ init_cpu_features (struct cpu_features *cpu_features) cpu_features->midr_el1 = midr; /* Check if ZVA is enabled. */ - unsigned dczid; + uint64_t dczid; asm volatile ("mrs %0, dczid_el0" : "=r"(dczid)); if ((dczid & DCZID_DZP_MASK) == 0) diff --git a/sysdeps/unix/sysv/linux/aarch64/sysconf.c b/sysdeps/unix/sysv/linux/aarch64/sysconf.c index 6c8216e95a..657df5d845 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sysconf.c +++ b/sysdeps/unix/sysv/linux/aarch64/sysconf.c @@ -27,7 +27,7 @@ static long int linux_sysconf (int name); long int __sysconf (int name) { - unsigned ctr; + unsigned long int ctr; /* Unfortunately, the registers that contain the actual cache info (CCSIDR_EL1, CLIDR_EL1, and CSSELR_EL1) are protected by the Linux From patchwork Tue Dec 31 18:26:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 854387 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7048483wrq; Tue, 31 Dec 2024 10:27:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVscvkMBVPeNz2Ym2oZERVjmx6HIPXvdPUeCgAy7ILqvkzEnANWhlqTZjKRuNlvmTcrHrnldQ==@linaro.org X-Google-Smtp-Source: AGHT+IFeE6w5kFyxGu2wAg+c0btIo8zgYIy5qTSydnS+0sFnA/Ll7YA/3r6zQCX+oIqYmODbzm78 X-Received: by 2002:ac8:5716:0:b0:466:9f89:3d6b with SMTP id d75a77b69052e-46a4a8fc79bmr704095521cf.24.1735669673580; Tue, 31 Dec 2024 10:27:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735669673; cv=pass; d=google.com; s=arc-20240605; b=R/elMMW4rptwOWt+mhsByGpljV8vabGIH0NncZvFia9cNpn2e2DVikl/Yl32jUOC8q 4PZXluhnmw6dcLk++AhQ3oD1VNHxUdFyKoHY6vgfaL0f6EA1IdjqG4nuGRxhHn8MUUCQ X8q0lZBA5tWjRZReWFDxhkSmqpYnGUhCJge/gxYX4ObcNoiA+8xW7Lk4gnLPQ0fnzL1z uHgZZUT3c2OBWH4/cutozojj5taSEP3uw3YkMk3ohV8lErm/1GkZLBqY/dyWGT4BhKr3 ajeEGaqZ18CmPO7iYiJVavDVe/EuUvSvFdxNA+pKJbulfEISQwQ3hYDVHKRcqFVZq4ZO Yriw== 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; bh=Y2ybwykzPfSzQcmB0H4Fjt2k7h17t5MS7NcMgwHIwN4=; fh=d7KdQ+eBG5Owb97PZQUBRjccSsV/hB6hMlyGG6W37vA=; b=PZ1c6NG0bUiyS9QnvMs1pkfmP6VuksOWxts9zZQ1mTuNVpBzOfctiskN709Rbpfage 7YectQ2+3AuYMw+9fvkXBaCsLkvGVBE3Lhb61xO3cul1ra+Aw8q7LjhWB1Z/ujFqjVnx FMp/IvMYmkIXOidaacEkx30kOPXVlBy0ZVGbyzDYlW5Xm8PKr3sIJCoPPRZTQMrkvMLO mNbCKCHgZBQUTUvAAVUxstYLzbtsgVsp1HKZAcv/3sSJNNPAYCHQSckIYCgboQ15up6A OA1M2k7vQiglajTN1EqQ6TtOGfZIEj8wvaXGtxjhxgZTkb/h/ikQtY4dHp31cE1uFhD6 uHXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AY3RZhkT; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d75a77b69052e-46a3e6abb04si319295521cf.151.2024.12.31.10.27.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:27:53 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.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=@linaro.org header.s=google header.b=AY3RZhkT; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 425183858C78 for ; Tue, 31 Dec 2024 18:27:53 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 8891B3858D38 for ; Tue, 31 Dec 2024 18:27:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8891B3858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8891B3858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::635 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669621; cv=none; b=w8R2vFZyXLIwk5wZwsRCd4w0ancYm9VuSqou+lh2+NJ2p5CXcMEMTM/Ppm6hO/jjkrcThQlfdf8cu3FnjHyiAwRU2qWS99NHJKs1FdWg8zQfz0R0B4q5cp3CAnzEWfxfQh95Qrs4h9z+QITRl/51i2tYJCQZJrqOk3bysZqnseM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669621; c=relaxed/simple; bh=zF53BUWx1YE7yUlYQ85z7nolcEf6awA6vqwQe+HlJSQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=e9q+TZz6hnW18okelx2aIJHHea/seEpwXfIxEViJB9UxC63c1Hz2QZVljeoSh94ahSahwstArEJaTBtNpvPqpd6Oy9Asw1bBJyDZe7TKIj9b/3F7xgQRwXAnpzZRqYMw9liOG9a1NH8Y5XnM6bLg8QGBvYas1EILMB8WYTsFUr0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8891B3858D38 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=AY3RZhkT Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2166f1e589cso164427565ad.3 for ; Tue, 31 Dec 2024 10:27:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735669620; x=1736274420; 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=Y2ybwykzPfSzQcmB0H4Fjt2k7h17t5MS7NcMgwHIwN4=; b=AY3RZhkT8otcqpV36WoL3iMMfw3X3UkqXyRHY08NoDrGbMob/qMIhrB0YgBF6wAcHH lHxDtuzMd7+zb8FncJSk+AmLi4+OXZd9NqKHqz/oL039O4UelfeCQayIZcFZed+D9UBr gwH1d6CjMMJf9WlSDGQyOGOkdUshuhdUwUvV88RK3AC8EZF5pEcP2RcYvq2tn8WhgVKv eAvt77OLEOtaXRsRiTy3XBTjOFNYvOj36XAcZGZK3iRdhUCimWpOjqcTVc4jjJ+/Q8fw ruAG6Th3LqDxw0sRWHLWpiGb+wdVfA7Tib39mAoITT0fC4xO9tyV1QbzFg6j552omMJ3 Th4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735669620; x=1736274420; 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=Y2ybwykzPfSzQcmB0H4Fjt2k7h17t5MS7NcMgwHIwN4=; b=kCucRuxyeAD08W8umEHm1nKFT2i5DDpLi/8qF85yeVP5skNp32j06oc5JId/mXc7IG FNX8lPsrO0pYfB874W3MkShVX3G6IbgZUDEh2SN9YWeVXdzUyrxSJupG7BlVnFVhXEQI KBbooU75/+/Y4tJTu6aMoS8SESwlRYguEcc9f3NKtT2YUfEVtC0VtBLNpoQznWwTk3vZ oPjajxMq9qbdkepRZWQlx94XgegwxsnPy2r7RaQYhl1SmjD+ZfHFaWdPhd7PFSOqniqE /L+8GXYUIzcRrz+cBIU37t7vTq3ElplG+NFET5lJQAuKY0+oNnlNOFqwY5pCcxQ+xxe8 fRyQ== X-Gm-Message-State: AOJu0YzUtR/qfb+cTK04rYygFPYDQ3jHSBpVWqFVl5/41vTskHz1h33e YWZcl97IjEcnqKLM8kZSnGGO2DygCrgLOvd8hZqBLVmZOSfVglXJywh7occqGEx8OKeWnZ0+5tb K X-Gm-Gg: ASbGncu/Qka7Gxj9cUQQy2nluIuEd9EwO7+OW4VlWpWD0QwKEYq7HEBfXA8ohOo6zgP 6oWIFicNX3hdla0aRhNqNFaKlB3GR5ArYe2E2t7h8fpCzdw3r0lcqo+wdmU+8I5nZSYcmWDSz74 NIGtJxHD9xZKw0s1WATioizWNJQ/OyA+/G0j3h2g/3c7gc3maduQzZpaSfiwUHwkQ5gKohxO0GY /oFdrtFaqc8lWvhYm1kezYr1GUvhHHcCXabmu9M8xB3+r8JlIBLGA7xRYEZALFuE8SYMFZe2OM3 reFVDM3iFCheJ6PU0Eoco4CIA8ET X-Received: by 2002:a17:902:cec3:b0:216:401f:acd with SMTP id d9443c01a7336-219e6ea889emr397408095ad.21.1735669620170; Tue, 31 Dec 2024 10:27:00 -0800 (PST) Received: from ubuntu-vm.. (201-92-184-234.dsl.telesp.net.br. [201.92.184.234]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f5046sm198693105ad.179.2024.12.31.10.26.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:26:59 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Sam James , "H . J . Lu" Subject: [PATCH 3/7] gmon: Remove ununsed LDFLAGS-tst-profile-static Date: Tue, 31 Dec 2024 15:26:09 -0300 Message-ID: <20241231182649.1811734-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> References: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> 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 It also fixes the test buidl when using clang. --- gmon/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gmon/Makefile b/gmon/Makefile index db19c205d1..f44e7060a9 100644 --- a/gmon/Makefile +++ b/gmon/Makefile @@ -43,10 +43,8 @@ tests = \ tst-sprofil \ # tests ifeq ($(build-profile),yes) -tests += tst-profile-static -tests-static += tst-profile-static - -LDFLAGS-tst-profile-static = -profile +tests += tst-profile-static +tests-static += tst-profile-static endif tests += tst-gmon-static From patchwork Tue Dec 31 18:26:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 854388 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7048591wrq; Tue, 31 Dec 2024 10:28:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUUU5DBqlOPuxnDNDR3HBlzEsDudXzGl057doJyuhTr0cb4d1Mn1NafKaFfwUUbXGW2ghUnfw==@linaro.org X-Google-Smtp-Source: AGHT+IFZ1TsEB+6ztVGNQiitzsHCBi62bRC0O+5340qoLhxbwy1oGAvfGGYW6SKw/rZRhMhYk4Jy X-Received: by 2002:a05:622a:209:b0:467:874a:fc77 with SMTP id d75a77b69052e-46a4a99e63dmr591488301cf.45.1735669693622; Tue, 31 Dec 2024 10:28:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735669693; cv=pass; d=google.com; s=arc-20240605; b=AA0fbjZY+V8PjCk/3rFFMpB89pbRTmiNgmRoKhsKn7I9oguiWh83X1+Kxk50oB9BPi QxCLEGibr0ju4TWG+aMfkDeOhNDO8yXP1KzFX/xVtSN5/ZIPAFXOpSquYg/R/CmyYyyf aD1r7ymUjSYi6TbTBHxri0UEjY0AXf97txya+oa363El8WdrHkH7XpELzHEjlnEfOeMu x++AP55UUN5yHjfoQvl0cMQDDcDFi7NH4BHv5KuPXxTk4WcIkI23M6VBYGx+tK7aBGMD Jp80uGRuKtpdkf44EkuSOorO4dEYi6JE9/LWrB5A+Ae3wafq06djJSeQ0E6GMehvGyST 1o3w== 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; bh=Z8Y9gF0ZlNufK2c+AUMZtPCGf3g4ZxvZTOq8laMDeYw=; fh=d7KdQ+eBG5Owb97PZQUBRjccSsV/hB6hMlyGG6W37vA=; b=TBN9A/Y2Db8a9EOPCLMIlcg8eRjx66ddIKRj6l9hDL6AZokQx4H1AUSk7yGeU3UpL5 rMNWpAHhn94ScqTHaZw79yyKt+x5p4x5Lhmop4YIu9PS9U+Zr2Gywvv0GdaSTds0ZeLz CE51WcsWP9CxJTl3/O7+eAmC4VPcZl5xTXGJzs/ZVVxSIyXGK74LgyAB8VU4Kdjb+Kc9 UND3IQ02NHyTfPgL2M5HioLjKHbMEtdkan03gNWFQZa2wCM/NB4zVrRZjnKES3Udggw5 4crf1MXeYqoUEdEalJCM2Iqt4v8ptE7syBHUOr2dZYo8ALI+pRJVK44aind3znCsP27m OHNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HvxJTYT9; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d75a77b69052e-46a3ebd5f9csi290770321cf.506.2024.12.31.10.28.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:28:13 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.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=@linaro.org header.s=google header.b=HvxJTYT9; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4C9893858C54 for ; Tue, 31 Dec 2024 18:28:13 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 293D33858C98 for ; Tue, 31 Dec 2024 18:27:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 293D33858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 293D33858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1030 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669623; cv=none; b=Rq5QhM8mrAwvSDm8+jpvsEnAg2ayazpA347pTl8XWY51xZNW4A6cQhQbDXRnqmq/UN/IquiZYfouEl8m4fDDPED24UQJDbyhsCOy61+KOLvgxJVf0f+1/4FvfvxcYlbMFaWCHw6A7aM49pbXCUh3WqCnaHLC3rekb6B9N2lgyiw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669623; c=relaxed/simple; bh=vJxGTsZ5S27o/JdM5b7BXtKz09ZeDIry7CI7T2meNT4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Ry3nrr86RvaWjIXWK4o+XQesVe13N2pjNcbZBqh1uh2KCiqmxJ47LtyWF+/0RW3zR5bdBC2vIX2/qz5ze2cAZTxDzflpS+lJMRQgWILsrCMiQO6CF/AVdjUz6VS5lLuSi/mobKDwxrqUGZlTHLLTIQJILOh54QjWPRCuIHJw/3s= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 293D33858C98 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=HvxJTYT9 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2ef89dbd8eeso10171874a91.0 for ; Tue, 31 Dec 2024 10:27:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735669622; x=1736274422; 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=Z8Y9gF0ZlNufK2c+AUMZtPCGf3g4ZxvZTOq8laMDeYw=; b=HvxJTYT9oVeDzdZgsOgpdUdRxB59NpBphR9qYc+h81DeONF4689M3A/Li9hyO9479J GrG+x75TMBtuJwqer+o7pnRhhTAhoQJGBqVODSHBs6ZH7L/chXN2qwNAY8P3LRUnSZGh 9laJlzf1ciIUNLf6RV+qCQ9kArDgja8llxMDVUfwafWBRmF6M+FbjuWIv6/Yx7A+zzlq qkfd8JOEGWMceLhM9WT+KTRCop0GpB8somuBlmjZ+jtPULzb6jWFLCvvLjv7709WA+C1 OsWaiN9a/sQwlPf+xPj4LOJxI0fTKdvH7ZUCgDnhH5vs0WWKYg/odIypJDLKLWoIFe+z ckqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735669622; x=1736274422; 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=Z8Y9gF0ZlNufK2c+AUMZtPCGf3g4ZxvZTOq8laMDeYw=; b=H1npzfOhMBGS5vxzHblTCoqMwR+0nKZYn+0E2bYb6+JvfCZU3xTpOyIQm+FX6xM7SP V/f4z612EHsW+ltvDrU1kVOA0uAKxtVW0mtnqUPEpH+8ij2wpflKiLkVc9huVkc2cO/g zL4C3xeHii2wFv16vcBSAYNjz65OimQUni5HLyRDygiA+VR6/jztBuCEEM1tIGXK7i0+ eCr2D0EUk3P8HILE2l/xVoYfMGoHgUbc28XspvpwuxugQdo11e3uoxZfg1puYtdIHS26 UreWhU3UE3ZcULXUCfm8/xOn6/x3EoG9rmzXoEeZ74k8eNmaGzCcfYcXaRIw5g4szdgu AFVg== X-Gm-Message-State: AOJu0YyNgfVdfE6YValqILOvhuOXSYeHLSPRLtESaUBu6NDMTWrrPBmo Xs8fgu9EpSPO7WtpjLF3WTLr8J2i0gPck4ctgJwkE4HU6cujQiXgZNGyiJGJDNoSDnORYaqaSS3 + X-Gm-Gg: ASbGncsnES2oDBYpyMbmIAxSmW+23zyjQwWvH5LqWcFBGQOpWhLE57FHHG+dlJ5vSm0 veLSkmhDmli6KimXh9WaNuIkFawevSD3gsMLl+UYILsi7bjfM3zBMiIscs5UFzR6sdfTx9sR2gO 5YdeR93RtGtTemMQREOAaYQfVV4k7hsLxwvX+P7K+oz+17jQAqIsh3FAgrTKITsWJombi/5k1Ve vPgU7ek5hLlAc8333Vt9vS1vb2P4DBDrxkl9c9h+oX7yNdqtI37uhDgXYTd0h3lTwnO/FYfh3M2 J1RWLWt73ylB2gHtJsAfvfi5q8eL X-Received: by 2002:a17:90b:2e06:b0:2ea:853b:2761 with SMTP id 98e67ed59e1d1-2f452eeb5d6mr61310260a91.37.1735669621855; Tue, 31 Dec 2024 10:27:01 -0800 (PST) Received: from ubuntu-vm.. (201-92-184-234.dsl.telesp.net.br. [201.92.184.234]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f5046sm198693105ad.179.2024.12.31.10.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:27:01 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Sam James , "H . J . Lu" Subject: [PATCH 4/7] linux: Expand internal prototypes for not-cancel.h Date: Tue, 31 Dec 2024 15:26:10 -0300 Message-ID: <20241231182649.1811734-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> References: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> 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 When building with fortify enable and with clang, internal tests that might use not-cancel fail with: ../sysdeps/unix/sysv/linux/not-cancel.h:36:10: error: reference to overloaded function could not be resolved; did you mean to call it? 36 | __typeof (open64) __open64_nocancel; because clang fortify supports relies on function overload and by having multiple function prototypes the __typeof can not find which one to use. --- sysdeps/unix/sysv/linux/not-cancel.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h index 12f26912d3..3a14a407f4 100644 --- a/sysdeps/unix/sysv/linux/not-cancel.h +++ b/sysdeps/unix/sysv/linux/not-cancel.h @@ -30,31 +30,31 @@ #include /* Non cancellable open syscall. */ -__typeof (open) __open_nocancel; +int __open_nocancel (const char *, int, ...); /* Non cancellable open syscall (LFS version). */ -__typeof (open64) __open64_nocancel; +int __open64_nocancel (const char *, int, ...); /* Non cancellable openat syscall. */ -__typeof (openat) __openat_nocancel; +int __openat_nocancel (int, const char *, int, ...); /* Non cacellable openat syscall (LFS version). */ -__typeof (openat64) __openat64_nocancel; +int __openat64_nocancel (int, const char *, int, ...); /* Non cancellable read syscall. */ -__typeof (__read) __read_nocancel; +ssize_t __read_nocancel (int, void *, size_t); /* Non cancellable pread syscall (LFS version). */ -__typeof (__pread64) __pread64_nocancel; +ssize_t __pread64_nocancel (int, void *, size_t, __off64_t); /* Uncancelable write. */ -__typeof (__write) __write_nocancel; +ssize_t __write_nocancel (int, const void *, size_t); /* Uncancelable close. */ -__typeof (__close) __close_nocancel; +int __close_nocancel (int); /* Uncancelable fcntl. */ -__typeof (__fcntl) __fcntl64_nocancel; +int __fcntl64_nocancel (int, int, ...); #if IS_IN (libc) || IS_IN (rtld) hidden_proto (__open_nocancel) From patchwork Tue Dec 31 18:26:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 854389 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7049178wrq; Tue, 31 Dec 2024 10:29:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXh3l0cjpXqHpK7/62T0SooOmnALmQoj1Baw8GNByTTw6bf5VSXbzg2WsqdIKlxzcDxcbNHLA==@linaro.org X-Google-Smtp-Source: AGHT+IEM7IztbZ9/+lH4vLPgvZvduuRgKWIrJhvRIWLFEeoorcSdEjlXDOKGH1lycZtrjwdOkq4Z X-Received: by 2002:a05:6214:dac:b0:6d8:9124:8799 with SMTP id 6a1803df08f44-6dd2331f006mr773456176d6.5.1735669791497; Tue, 31 Dec 2024 10:29:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735669791; cv=pass; d=google.com; s=arc-20240605; b=E+Fn4niL8gVxpXT8v+OJ1Z+/4a5FOPdak2Lov/UIBSQH2P0xNyyw4kyl7GIs4QA+v5 ROZEfGwSsVSPJBAADqQWVbVBSHIhJ2sAkWG5Xf2XHz+H/OplsfZM2BT0h4dUmkXERLyY c663gB60+mFiaGY2Vl4pT1BXXZvgagTzUL3yQ/ogfvXTQC6RRB+CnNRiUffdz9S1pYFf P4srHdEeTHpxEb69n98RrdK9kwLReuRYaCHGjp1h+mXk2gbJ+MXoz3Lo+LQ0Yor3ZkQ5 sFY+eWJwLC23NMB3kOYVF6t4cyZ9zDFdypGBycWVCG4lpx5Qkq3InvWGP5z7OugRoFw+ Kkvw== 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=5u5sErn1ELgq7PPw2jSPZ+dcJ4iyjQ2p3uj1+tSCIVg=; fh=d7KdQ+eBG5Owb97PZQUBRjccSsV/hB6hMlyGG6W37vA=; b=NaNqaaSFDz9oBYfPm2mW70rSjjD8FZdSvT1GiKKdRtF8DYYJwkoaUHjMW45PNp5eWA OY8UJxZ8zCdingbHrxuuPgo3cTV5A4nENL6pBOMe4GgcZ0xFQAnocJ0sNPjkhhCBsDC9 KaA1VVlpdyyjAr0Wg2rOHlZjQ1P8C/DeVspY8pZCZ4P1plTAo0aLWwAK6KF5AHqdDBju Ona//4PvNuT2PiATAh0lo98uqq5Xn7G+qToFkvYl+6uvCZE8YXGYqxrPT83I1HO8b4Pe R/b9oNer/E8ZCKbdmNwW3ppIxbY0n6AY90qh5r5POh/s1xsciD9usaZHuqcRXVLolQBL C6zQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EnoT41ev; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd1835a111si304484706d6.424.2024.12.31.10.29.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:29:51 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.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=@linaro.org header.s=google header.b=EnoT41ev; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1D49D3858C98 for ; Tue, 31 Dec 2024 18:29:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D49D3858C98 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=EnoT41ev X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id BF84D3858D28 for ; Tue, 31 Dec 2024 18:27:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BF84D3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BF84D3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669624; cv=none; b=P9xkxa3mOFg9i1EPMFoCLz8jc4wVEeDY9hmyes6ZMq9ubnWkfV5v8HWndRDDp76Vf626OWIgOCrqzu8YJ2d2+ltqBUFiAFePA8rPkwiGn8TzFMwsHLpRQ95FPNxh2sSVlL/jVogreXTW3StrUFGcuuwEJ4U1e0xDebCU72/8VlM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669624; c=relaxed/simple; bh=VA2mfZc6LIXv/g0ABcfrwpckZbdc/1aM5Q/mZkrgYnQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=henC1ofIGLqfomWAhFUBKPCngbLr4NqtWBX1UPQR5P7iz+ltR5hif+SDf2S111QPyVnx6cf6HiowyupTysxtb6y4jyGMnALhnFEkPv//3UujpLEQ7p1P/GC404bF06+C6yugtLzAVTuImP5Mfp46jnQND5VIlMH7/IjTVH2/2eY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF84D3858D28 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-21649a7bcdcso133449365ad.1 for ; Tue, 31 Dec 2024 10:27:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735669623; x=1736274423; 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=5u5sErn1ELgq7PPw2jSPZ+dcJ4iyjQ2p3uj1+tSCIVg=; b=EnoT41evhggwfSjJn62y0iV//SJgvVve9KQqAdGJueuBBFLk8I3KHgXtb3akDdqiSa WpLIpQ7b8rAZbLwCviBO1lzpJKO9t2HnzjVhzL0IRNi53UEb47B4dKJ3yMmpGr9k9zZz 2MJMY1pO8gAYFPpRcvE7h1+M/9NK1XeFo7HjI9gVF1bhwwu+PwO8ofQqX3xOAIrYpgJb BWFf1fkE1NYSLkaGKVHHrnacsS8efR7hkJJRa/cdgAPjqEpc/AtOEAfVu5stvTaZJ1HU GACJwLRD9FYMwr/sHyWdJl9CuUIueZKpwPZdstPdL6u3Mzt/U8SATzJIRAjmel1WF6/d 0c9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735669623; x=1736274423; 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=5u5sErn1ELgq7PPw2jSPZ+dcJ4iyjQ2p3uj1+tSCIVg=; b=betPKqbXdeGJ5yF2sry0RWXsm7h8CN03Mtw0jq3HVw1Au/55Eb0R55H7bLr0Zj3iD3 QeaPapt0NSdxd5tec3gFCjFriE6sTM2PEtv6j04xL7s+7ptiduwSCnomsncSHWIgC4xj DtDCBfVepns9f6B33g9UH8bXbwXops0haeJrkOSqcvNPG/BFZi54ICLI9ILdJBC3yr8E hVefwVi4J2D7MkoA6rEXPSEAy18mpdlMiN3Gjla5aM22rjl8Kohd4CJKOACi+NOo8Gx1 m2yVQN7XyGOiy0aby1UBQPWZlnSHt4ZukUce0TBe2Ik6no/zXdkJ9StUX5jluE8bEMHO 8aZA== X-Gm-Message-State: AOJu0YyfjCVtVxnx0e0r+4K/1YmKd//7hB5S7WGiE9gu6gFcd64Wgo+v YPPL+P4DOXJoMBPro0JT6EwwCeyfVYGxd/Yd+Sg1zRkYytcGWpPoDpf5ZQvxvurce7+OnDilXbN A X-Gm-Gg: ASbGncvQl65MPXrn6rRHZ63tiGWj93TVMvKDcSNLPVccLguHCQGrqQLhCort/X2CQqp QZss0ILivPwSQw8LvXwmhTixYGjAkq7B9JEFuSqZPvVFe5XxMPCTO7cVjNPqMeTx9Fq/3WjzHsh nCW7zhbfsg2PyxvNDaSApUYIMApGMOwPYht1tCpAdlFMcFgaId7cWZ4iR4uyG4tyADCC1PU1DUV 4eQGxbb7yIkZBwzWWiFOECWgPtpT3wa6cFmo9VC/+W/J54bGSujQvP/53XlCmOo2qjp0S/OgVIr +RACg+lAh7Sbp8HPkM31iDsi4Vmx X-Received: by 2002:a17:903:2345:b0:216:4e8d:4803 with SMTP id d9443c01a7336-219e70bf2e8mr454206455ad.42.1735669623562; Tue, 31 Dec 2024 10:27:03 -0800 (PST) Received: from ubuntu-vm.. (201-92-184-234.dsl.telesp.net.br. [201.92.184.234]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f5046sm198693105ad.179.2024.12.31.10.27.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:27:03 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Sam James , "H . J . Lu" Subject: [PATCH 5/7] elf: Suppress unused function clang for __ifunc_resolver Date: Tue, 31 Dec 2024 15:26:11 -0300 Message-ID: <20241231182649.1811734-6-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> References: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> 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 The __ifunc_resolver macro expands to: extern __typeof (__redirect_name) name __attribute__ ((ifunc ("iname_ifunc"))); static __typeof (__redirect_name) *name_ifunc (void) { [...] }; And although NAME_IFUNC is and alias for NAME, clang still emits an 'unused function 'name_ifunc' [-Werror,-Wunused-function]' warning. The static is used to avoid name pollution on static linkage. --- elf/ifuncmain9.c | 4 ++++ elf/tst-ifunc-fault-lazy.c | 4 ++++ include/libc-symbols.h | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/elf/ifuncmain9.c b/elf/ifuncmain9.c index 654beeadfe..f102b140bd 100644 --- a/elf/ifuncmain9.c +++ b/elf/ifuncmain9.c @@ -22,6 +22,7 @@ #include #include +#include #if __GNUC_PREREQ (5, 5) /* Do not use the test framework, so that the process setup is not @@ -41,6 +42,8 @@ implementation (void) return random_constant; } +DIAG_PUSH_NEEDS_COMMENT_CLANG; +DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wunused-function"); static __typeof__ (implementation) * inhibit_stack_protector resolver (void) @@ -50,6 +53,7 @@ resolver (void) } static int magic (void) __attribute__ ((ifunc ("resolver"))); +DIAG_POP_NEEDS_COMMENT_CLANG; int main (void) diff --git a/elf/tst-ifunc-fault-lazy.c b/elf/tst-ifunc-fault-lazy.c index 5157c6cc6c..04448b2b15 100644 --- a/elf/tst-ifunc-fault-lazy.c +++ b/elf/tst-ifunc-fault-lazy.c @@ -21,6 +21,7 @@ relocations. */ #include +#include #ifdef HAVE_GCC_IFUNC @@ -34,6 +35,8 @@ implementation (void) *p = 0; } +DIAG_PUSH_NEEDS_COMMENT_CLANG; +DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wunused-function"); static __typeof__ (implementation) * resolver (void) { @@ -42,6 +45,7 @@ resolver (void) *p = 0; return implementation; } +DIAG_POP_NEEDS_COMMENT_CLANG; static void magic (void) __attribute__ ((ifunc ("resolver"))); diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 56ae61015d..9fe047f4d3 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -86,6 +86,7 @@ /* Obtain the definition of symbol_version_reference. */ #include +#include /* When PIC is defined and SHARED isn't defined, we are building PIE by default. */ @@ -671,7 +672,10 @@ for linking") # define __ifunc_args(type_name, name, expr, init, ...) \ extern __typeof (type_name) name __attribute__ \ ((ifunc (#name "_ifunc"))); \ - __ifunc_resolver (type_name, name, expr, init, static, __VA_ARGS__) + DIAG_PUSH_NEEDS_COMMENT_CLANG; \ + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wunused-function"); \ + __ifunc_resolver (type_name, name, expr, init, static, __VA_ARGS__); \ + DIAG_POP_NEEDS_COMMENT_CLANG; # define __ifunc_args_hidden(type_name, name, expr, init, ...) \ __ifunc_args (type_name, name, expr, init, __VA_ARGS__) From patchwork Tue Dec 31 18:26:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 854390 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7049525wrq; Tue, 31 Dec 2024 10:30:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUBlgd8m6P7C6fxTuJ14Vr8sVu0OscCAqeYLbnKDim+xFEzN5jngneZsaGoo8CW6cmdvHJCAA==@linaro.org X-Google-Smtp-Source: AGHT+IE3LRCI81kCmLRvhScxQLAv6DPQYNhtGUoZfwG1nokIk0tbY9iKb4/vCLXZE1K3stmPbmJf X-Received: by 2002:a05:6102:e0a:b0:4af:c31d:b4e8 with SMTP id ada2fe7eead31-4b2cc38231bmr31750506137.14.1735669843329; Tue, 31 Dec 2024 10:30:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735669843; cv=pass; d=google.com; s=arc-20240605; b=loVCzWJHaD/ofVxKM/53hJqE9rPRw6h9vY+AW7glhJvStNIsud34321/CjW5oYMqpi L7wKRmFXr823BwIrUUo+jMS0xsd4nKr5uR12mF/Bd0UMnlhesIf+r1alGJtvDJ44uhd6 RCy2JMdIQiGXWQiMIGKQG1TRaG+njcNhr3HRW5Cb+pNgq8KW0D3ssDrf8FoBFy7v2Tjm oSjWtHBw3V718sS/XjtiVspP5NcrYhzdjFHIrX6YYbfsJX15Sq93gtjA3G05EhWLTYzT OsV4uOMRmdm2YkQJHf6xP5J6VwNL2EZkVWJtqatKd2NU+XzODiL4b7M7jOOGMjbZbLZe nvUA== 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:arc-filter:dmarc-filter:delivered-to; bh=x8TTZ4XIw/MmiTdmny8yxcND/nCVLX1q5l0FGzJfYes=; fh=d7KdQ+eBG5Owb97PZQUBRjccSsV/hB6hMlyGG6W37vA=; b=QMcV9acrYywZI4Atjzjc3ex75fpPbIYFlsgiasKk85hmM+bSW6vWlg3W3wP+D8BRkk tn7eMJqO09GgZQRRp+bpjZrYMonHLaF4LWYMwgW2uz0e3gXaUObMCH4etR8kIBv5ynNV R7b7D7V39YCd90mWzTltBEqtLbwSPigDJMJ2ieGCGxczn/ZP+DKXrj7UpqnRFfLNhd/G GFHaQhBJTHvgiYzy6Cz1UzhNPa0OWqDxVJ+dqm8TGRlQMaEyDff/XzTo+rwvgdUV92Tg iq7Q1nRYlGCSnCcbGcK1ioDyFn+4+z4RBfxyFVQ23d3mPJ4zSKcmgLTUTuF4j+WtGQNA 1ugA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jeFC2+oq; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ada2fe7eead31-4b2bfba4341si7069423137.590.2024.12.31.10.30.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:30:43 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.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=@linaro.org header.s=google header.b=jeFC2+oq; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F00B13858C62 for ; Tue, 31 Dec 2024 18:30:42 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id ADAEA3858CD1 for ; Tue, 31 Dec 2024 18:27:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ADAEA3858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ADAEA3858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::632 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669626; cv=none; b=qzY5Qtq7R3OyLph8Yodqa1cza5u7Y/vSV4mhnAP8tTDDWScAArC2uYwCrgjlWfMwZGOyjpp9Co4bPiTXGc0Ll7sF12emcc4rCzvJO2VAzznRjZJlPw7RpWryy7+YU3XgARf5z1wqVM1+fv3cv9c4HgPCjZqXWOwVXw7SP2CUmrI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669626; c=relaxed/simple; bh=+l2Y7nBHYY5nWUaBVvAuVXruoht7I9kBD4REmWzPLMM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=cLU05gmTMb6BsGy98TuNIZUJDH8pgx0hPeTgl5myPdy8I9RxEeVNitsc1uxzcAxLGLJnic8UnNmKRJdfTXJw3Zrepo5gITsSahuEGYNfgZJBiK5AFn7ak4xfvI/BcOtctGiRECe4pOcYBqMgBtrhIEomLlKnv3LmGVa7XKGh4kk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-21619108a6bso127416655ad.3 for ; Tue, 31 Dec 2024 10:27:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735669625; x=1736274425; 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=x8TTZ4XIw/MmiTdmny8yxcND/nCVLX1q5l0FGzJfYes=; b=jeFC2+oqOSkcNGPEqoXLVxeBv17y+j/Q7KIsUt9er0/UHhrEq7Kk5cZrLyoV9uuNkr 3kYPg/o8DteYf98fi85kHT2dK1Phc57imR8Yz95GN9/sGayNQ4E9TKcC/Yo5UcI/M0PH LkTBV77mifa7OhPlsepKhVO2mg7mxaHSKsMgLAbDqi1qTLmRgnnS6e8/ZrKU2JRHFbTz Xsoy3qATNDidllkDJO6MtR0qbloxqlmUUtCjHxA/iOMNakUSQ0IeUfTN9MZMu+Wtvg+N 3en9F6JxBKeOeELyg3yqlfzuVBBuIF5JQARK9gCtVv8GKMQKTeefHZ5W9IXs/j4wx13v B/eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735669625; x=1736274425; 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=x8TTZ4XIw/MmiTdmny8yxcND/nCVLX1q5l0FGzJfYes=; b=WmcY1FuCbDEwTDWi+pxEeHl+G7uhA5jOsGtnfQ+kfYDw8llNlmJtlM5IBz0P0ry5IE 6P+uBjn74GOdFVDCNe0/NlkbBsIRzU6ksBWtqnRDnJYgoAuSaeAxkCb1OtIuSImM0XQ9 iQdr6Zfev2yxmW7CcQNZtIa4ArGC8enSDmyxhBob1BXR0U9d3RqcsvRInJ5lUZJx/XQQ 1bBzoy/MCXeV1AZPGgWKA1efQXRgX2Pl4plM/o5kTFj6aaJgYx8ybXaO75eUAn7rAPPv DDhU8LdkxQmofJGR2PnXYjRGrdMYoRD4u9lb+Hwaq/cfrcIeebAC4szs9Jn7hUOo70KI py+A== X-Gm-Message-State: AOJu0YzfAOBdep4gCU+iJt9a7u6B/3Tpxz5JxGxxF6c9fdtGWJcAKwZK V8GHsPcwydG9vcv804bD89IhMwYCXlQfb+B1A6tusECJvbgTOaCJg7VhM3b81DjisqFPCmNPp1/ V X-Gm-Gg: ASbGncurZUN4RUmr77QWbSR8JZjYBAL0RG4HqfDhtGoOSFDYQf7aQNRTDWLtbKrGLXb Ow5VeV42zWXTfJEKyT6Mga2lu+NecmO7ou5RiTsEFrm3k+XAe1S46tT8ExkHswaugkIBjGukTJ2 9lSDFFZdBj3UYFKYfTGYsFzx2cFSktoovxggrfNdY/IMJz8GDEttcWwQrTHCgnaPGMDF0eLiZ0b n91dZupeUZM4Ah8+VFn8oFsv8FfADDoz/CL5BC/lfQhghgvZYvvCRemDv4Og9XnHswThiALeRiP PO/LUKta1LqgiUACNnK/YEifcJm+ X-Received: by 2002:a17:903:1108:b0:215:6489:cfb8 with SMTP id d9443c01a7336-219e6e85b42mr573555715ad.10.1735669625299; Tue, 31 Dec 2024 10:27:05 -0800 (PST) Received: from ubuntu-vm.. (201-92-184-234.dsl.telesp.net.br. [201.92.184.234]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f5046sm198693105ad.179.2024.12.31.10.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:27:04 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Sam James , "H . J . Lu" Subject: [PATCH 6/7] conform: Do not use __SIG_ATOMIC_TYPE__ Date: Tue, 31 Dec 2024 15:26:12 -0300 Message-ID: <20241231182649.1811734-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> References: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> 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 clang does not define __SIG_ATOMIC_TYPE__, instead add another directive ('size:') which instruct to use an interger type of defined minimum size. Reviewed-by: Sam James --- conform/conformtest.py | 4 ++++ conform/data/stdint.h-data | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/conform/conformtest.py b/conform/conformtest.py index d38afb06a8..f89d994e5f 100644 --- a/conform/conformtest.py +++ b/conform/conformtest.py @@ -172,6 +172,10 @@ class ConstantTest(object): c_type = self.c_type[len('promoted:'):] text = ('__typeof__ ((%s) 0 + (%s) 0) a2_%d;\n' % (c_type, c_type, self.num)) + elif self.c_type.startswith('size:'): + c_type = "int{}_t".format(self.c_type[len('size:'):]) + text = ('__typeof__ ((%s) 0 + (%s) 0) a2_%d;\n' + % (c_type, c_type, self.num)) else: text = '__typeof__ ((%s) 0) a2_%d;\n' % (self.c_type, self.num) text += 'extern __typeof__ (%s) a2_%d;\n' % (self.symbol, self.num) diff --git a/conform/data/stdint.h-data b/conform/data/stdint.h-data index 4e84e17fb8..5d65d4ecd5 100644 --- a/conform/data/stdint.h-data +++ b/conform/data/stdint.h-data @@ -88,8 +88,8 @@ macro-int-constant UINTMAX_MAX {promoted:uintmax_t} >= 18446744073709551615ULL macro-int-constant PTRDIFF_MIN {promoted:__PTRDIFF_TYPE__} <= -65535 macro-int-constant PTRDIFF_MAX {promoted:__PTRDIFF_TYPE__} >= 65535 -macro-int-constant SIG_ATOMIC_MIN {promoted:__SIG_ATOMIC_TYPE__} -macro-int-constant SIG_ATOMIC_MAX {promoted:__SIG_ATOMIC_TYPE__} >= 127 +macro-int-constant SIG_ATOMIC_MIN {size:__SIG_ATOMIC_WIDTH__} +macro-int-constant SIG_ATOMIC_MAX {size:__SIG_ATOMIC_WIDTH__} >= 127 macro-int-constant SIZE_MAX {promoted:__SIZE_TYPE__} >= 65535 From patchwork Tue Dec 31 18:26:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 854391 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7049979wrq; Tue, 31 Dec 2024 10:31:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWwlsa7wXYeligkIfMzVLJRffsgG7LZqlLjJ4itFiJRAQFWq1NFfdBa1nAFAnGVUVT8bc1EDw==@linaro.org X-Google-Smtp-Source: AGHT+IHic2Ra6addFPJS7xGSwscAlgrw4rTkvt3pF7E9+BMT/OnHIJVimH59Yi+hJAuBcQGZZSiK X-Received: by 2002:a05:6102:6e88:b0:4b2:cc94:1877 with SMTP id ada2fe7eead31-4b2cc941e10mr27129614137.13.1735669897654; Tue, 31 Dec 2024 10:31:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735669897; cv=pass; d=google.com; s=arc-20240605; b=KZ7bQivISuAXzCbl/BzevNmvLI0r6fwBH8jQPkmoGFMBlcBRoOy7LgsJn03YWJ8bkt /7vyJUuERU3AiodRgwgVwKJrBAhYEuK32DRwwjni9MliaIXR8lWuKcUP7zPb6DsTcHAJ a1PRmhptK5/ZielERY3n59PIW9PWzycbu6jY/aslRv3FS6S25qn/EFnN8lI9mrsNY2vC EWWZmrShzSFfYWf1e0xJS9uPwrWsfdybIFWH01TouaC/jZtW9i6d8yU8/qCsuE89gaoq AZNKNXyN3Cm5VOkrbgcPfxV+Bl9knD+P8bfuZZbLa42gXdSc8krwwGG5F9ZpmtYJTUQO ISQQ== 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:arc-filter:dmarc-filter:delivered-to :dkim-filter; bh=DEvGX96DqG3KBM5zGoGDfzfR3wUcBVN+ImIzTJKh26k=; fh=d7KdQ+eBG5Owb97PZQUBRjccSsV/hB6hMlyGG6W37vA=; b=OH3i4/KyAaoRNrOxqL/1TuSF/dfu/73pediA1zXpAiJ6yejxQ7rwrKIsf8GSqLHihr 3R0AV3ew7BQupTUMD6rofrVaGaD9DQ5TqlIi9uhE12AZA53G8RARfwufJiQoDNBhdRln U4RXFs2K+C7IPzyFE8e+RccHDKLzn248CAt/rNuho1xZLyHWmOjp0X7WTKU1D2Alx63U 8uiTfHTcV73eLWIqaAXq7tCBRLWLIbaImJnDEJis4P5v5W/jXrAffBoToxcfxZiMKt3a L8l6fQi7AwxyK3ak+M5ZXE3HJZ1HAx3A5gdKYaLEC6JD90DMvtw50a2p9pc1y0OHXRMl igxA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dhNyvsLS; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ada2fe7eead31-4b2bfb1d890si8261678137.251.2024.12.31.10.31.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:31:37 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.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=@linaro.org header.s=google header.b=dhNyvsLS; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3C7C83858D1E for ; Tue, 31 Dec 2024 18:31:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C7C83858D1E Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=dhNyvsLS X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id ADED33858C48 for ; Tue, 31 Dec 2024 18:27:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ADED33858C48 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ADED33858C48 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::635 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669628; cv=none; b=le6rQa2og+A+RlO9hvAh8JavE5jMyK07Jh1pecMmYieUbjyQAq3Fc93Q6z6oFB0eq8jU/dwClcmxtWIQoDMGGQMAi1swWSP6gXYGG8BJu8ff1LtngNeI1iT12wppJBbf2JcwPFuuM0rLQyOExgDFwoYZvym9PAyK5H995lr5xIg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669628; c=relaxed/simple; bh=IYo3plGgz6I8IlTcPBOtcsC2nSujOGNxxOLiIyrOfRw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZaMTN+ptiYwfVWJRdDY9AZQJArpJiRQvwoN8jxwwrvJ45tEAqJkCt3aEvFIiyYabxWyAltLC0tEoQudhT0pGmn1UxUH2MwsWyu6gkch9qgf759NYER0xyODMfMuhJ6da1TIy15ZyGC9WD1Ba0weTaum7knX5JOCxUYVb3QYPNJg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-21670dce0a7so45049525ad.1 for ; Tue, 31 Dec 2024 10:27:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735669627; x=1736274427; 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=DEvGX96DqG3KBM5zGoGDfzfR3wUcBVN+ImIzTJKh26k=; b=dhNyvsLSgjcRIPKj3SNL1nQ+gwdBKvSNlSEOjKON8uYbXvJLwJjrAAG5szXEEb3ki/ VnMt0nswxNwVEl6hdO0tN7NKFVClIf4tfo1ymgx9Hk5Lim91NhbYOS4aali6+JGHXNKS rTZuUH28Iivy4N+pQItj1D/cU1pp810Ya+38rvbsSW96laTM2KBR9WWL8HLVgH2P2iMZ j87jh7MuhzPI/MqazAr935g/O2PEQvomSHMD2NLqxZU9djTkNVeVlIMBTx7Svh5xNoKE 2Us+Ro4ztwSwzUtE9cSru/D5nFDK35+jlq8nSRBVvW/nnNWGY+x6Ksn2Ak0RTA7EbKNW tT7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735669627; x=1736274427; 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=DEvGX96DqG3KBM5zGoGDfzfR3wUcBVN+ImIzTJKh26k=; b=wsh/fNNYpLf519iC7uQartP6FHiJvPfy9wVGCA9Bi7fkLCCbOkd2IXtdrvEdWc1Ao6 72C732TiloDsxFPcWGPJT9Etrj0KR8vUDId8HKNQys9f/Ly5dW5cJ04F//JnExygj14/ MCEDAAQgVh1XmeqDkDHx/jWbKojy13pk9QfbHPB5Tk3mWEiTuuhuNjTkNIkSm/56kK6R 3RDzRM7PxaGfAkRSaJPPHetORJ7xhP0GTnJqgnJCqkYws7gb4V9rEvNfdTwM/X2qp8IT ORYmHaSYkViuTd4bCHWIyReHHzhfP1g0yYbWYgPvhciA+PLalm4GrvhteLU1iEOGj/e/ CvJA== X-Gm-Message-State: AOJu0Yztr6IPwnizfl3tVPQ/JcCg1OcpbeDOGN8SsuJvrcg6i5SrDfDl LR/RqCQNznQsnVzQDg1t9FXDk/frU+KwKJ2f297u7Yvfsz2evSevV6C96LbxDb2w1MgMF9JV4Ub 2 X-Gm-Gg: ASbGncsjc93OzWmBSgjmw5C/6+yoZoBiw0PEI175PNRpyJyyWG0fG+l2y/tqo7zEtQ8 qqXjA85ruqYFGEOKWLS+aIRHExH1U0tB6ydxGzWuXJJfMLjdlL2EqYBoj1ABz5UMNKzNsLCQK+a krvAVs5efbB3t1kaJgftwUAC1t/SPLL7rtnppqfDOIOew4ISMY927MbniJm6+656Se9kG9L+hMv froqtpxBTWDkUaXOltIm2q+BLRKenEyWBzzLmU9ZrGniTNgJfkhsotQtD+xXeLHD/bCgMUVMHYM t6jpgFbZnr60mFnxWn+mtepnOwiT X-Received: by 2002:a17:902:ef12:b0:216:52a5:dd41 with SMTP id d9443c01a7336-219e6ec13bcmr631696635ad.31.1735669627032; Tue, 31 Dec 2024 10:27:07 -0800 (PST) Received: from ubuntu-vm.. (201-92-184-234.dsl.telesp.net.br. [201.92.184.234]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f5046sm198693105ad.179.2024.12.31.10.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:27:06 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Sam James , "H . J . Lu" Subject: [PATCH 7/7] libio: Disable stack protector for tst-fopen-compat with clang Date: Tue, 31 Dec 2024 15:26:13 -0300 Message-ID: <20241231182649.1811734-8-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> References: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> 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 For aarch64, even with -fno-pie clang 18.1.3 seems to generate non valid relocations: tst-fopen-compat.o(.text+0xc): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `__stack_chk_guard@@GLIBC_2.17' Disable stack protection in this case. --- libio/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libio/Makefile b/libio/Makefile index 3b5adff74d..98f626a4c8 100644 --- a/libio/Makefile +++ b/libio/Makefile @@ -313,6 +313,9 @@ tst-fopen-compat-ARGS = tst-fopen-compat.c # Disable PIE to trigger copy relocation. CFLAGS-tst-fopen-compat.c += -fno-pie tst-fopen-compat-no-pie = yes +ifeq ($(have-test-clang),yes) +CFLAGS-tst-fopen-compat.c += $(no-stack-protector) +endif endif shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \