From patchwork Tue Apr 7 16:36:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 132768 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 16EA74BA2E0D for ; Tue, 7 Apr 2026 16:36:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16EA74BA2E0D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=baylibre-com.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256 header.s=20251104 header.b=Gih9ftEF X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by sourceware.org (Postfix) with ESMTPS id B60274BA2E04 for ; Tue, 7 Apr 2026 16:36:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B60274BA2E04 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B60274BA2E04 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.167.181 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775579771; cv=none; b=UeHfqQ5J0BAFNgcD1KDFCwdZMYi8cc3lWQP8GA65olwHfHjnagiqULdcUuasztmFu/M5jt6s40J/YgXNI4jTvTs7kLAeYXTYgQuHB+nG3T/TIU7kx5dkM/t5JbmHMo03ijC3gvKmGhjfd/mkJVHRRQo75cbsH0lqshMNlM/R1Bg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775579771; c=relaxed/simple; bh=Ph6NJ+yvnHpOM+nkWW/agIeNgvgFxox2Rkv5v+KhilM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=f++wfaZ6wBExBKuf7+scL4wgpIbckJn5NJuE9DbBFTYzVqkyKzH8zXR4CvYOEkdAzxE8qQj7vk9crplM2tLRxrXtjkCd8LQK5+kYBuhw07y8298S4+F2MMcdDv2bKR21n+rCrSsq5jviRiqxBpBSy4Pz5HmPKSI1XnyvON1izWg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B60274BA2E04 Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-47018d34159so2681343b6e.2 for ; Tue, 07 Apr 2026 09:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1775579770; x=1776184570; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=xLesPVT+gtE6GJL86lesFRiHoZK9xd7yzBB4lHqPac0=; b=Gih9ftEFy7NsZzQSA/QAs6YnK2gpYDuZ4NyFC1+yuiRghjuHOVAvBfKhzPK22UQh7B tQMI7/Cm3Xp7uvwxk4m7zwpUw+2KwhaOebzTuYQEJPXknRy3MJaEpwNAqxytdldBkOW4 X+G6Vk6hNNJp6I0ENJJCHNHAZL1F27fy+DR0kWW2Ldi9L9e1PiYXGg0Rbjz34J5d1cL6 fT4sjnljsJuHSA0T9kf66oqyLY8E8A6dYE3agVruNisKOM+YFUmhcFUH5uCE2MaOIPEm QJoAn9DEUrnUr/T3gmU7xhmwtZre6XL9f4IsvWsljsonh+4weftWK8dRe82EXaselsmC tM9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775579770; x=1776184570; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xLesPVT+gtE6GJL86lesFRiHoZK9xd7yzBB4lHqPac0=; b=dZ2L745jw9lsX8GUclsl/3I7rIY8BXqPe7HxuFgF9MId22tQ6MbqOSu/scVhNV/2ce a7UhxlFFGS4z6CdRzh1lhO3joFLdMOO6bL9uPadB000DUYcy0IfG7a7OHvkXcY5nvZsq 61h4yg6AUcNJX8OUsnMQ5o51GfILG8K8yxqARHtEMixf4Vbpzb6MecPCpWIIH9L6H58a evZhaWYMxCG9XK20ql7Md6NdvsPTo4tv/BSnZYD+vJGnUgGdjbHH52hQqqaVUhrnj/2g jY6iyW45AHWrwGEzelc/KxzLNZlvcxTqNKoqT34//ZcggpfebGFQcVo9LAbUlyJdZuzT 3w+A== X-Gm-Message-State: AOJu0YwR2eK5wK5CRYezoqGVm/DJLNyLkz7q03pK0tY+XKQI5ZJNgcIG sEB9OC5sW3X6beK/5Hspe6FsuFNYdJodhPWpW8Fkv1cHJErz26s47qR5krYTwhrAJTeMe3cex0o EYP9m X-Gm-Gg: AeBDiev15YAry87UHBnNsN7N/pApjyF0370cAF6d8IT4PXmCt8ZJXEwup0n2Cvffauf 0PBVZ5rVpLft7Ij/UkBsifZJBxFn/Ips6qxxtapxcZA5mV0ISTSd6UI5M47GRffU20ZZQrEkkJr ewNS/NkAM/tb7GOEzbH/2Tz8NQNNGx63MRqCYhX+aQDjSVauTk+iiERgqwYdF5dNTrRykbjhxLB fhb1zAf8cxNTwlwYWw097oWslMvLOXfYJOlcIRZeSYTnOHY8Z8sS5Ka86KWJHMq7rUDQof5igcu 8qFYg8r8ZhrnUtGkRqDRjkl9moToUxAEFXM3PLLgEy7Zt+QafDVtmoxL867grNdwPQ+Uwq/PPOy B+u7pxyDHQsa5/o9SgqPEGdn+ycm6gpztP1WPkX1y/VbhaP7NG9hXR8Fwp8D9ppQnopGOcbb1aM D1ZJodNJk4yW9vX9O4EiXZiJw1DLP4IWBq X-Received: by 2002:a05:6808:c282:b0:45e:ecd9:652e with SMTP id 5614622812f47-46ef55f3bcemr9177600b6e.5.1775579769656; Tue, 07 Apr 2026 09:36:09 -0700 (PDT) Received: from nenufar.hsd1.co.comcast.net ([2601:281:d901:97c0::9a27]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-422eb3c9e06sm12690239fac.15.2026.04.07.09.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2026 09:36:09 -0700 (PDT) From: Sandra Loosemore To: gcc-patches@gcc.gnu.org Subject: [PUSHED] doc, sanitizer: Document -static-libhwasan [PR124170] Date: Tue, 7 Apr 2026 10:36:04 -0600 Message-Id: <20260407163604.779109-1-sloosemore@baylibre.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on 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~patchwork=sourceware.org@gcc.gnu.org gcc/ChangeLog PR sanitizer/124170 * doc/invoke.texi (Option Summary) : Add -static-libhwasan and fix alphabetization of similar options. (Link Options): Likewise. * common.opt.urls: Regenerated. --- gcc/common.opt.urls | 3 +++ gcc/doc/invoke.texi | 27 +++++++++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/gcc/common.opt.urls b/gcc/common.opt.urls index b316954a98e..25ddc584171 100644 --- a/gcc/common.opt.urls +++ b/gcc/common.opt.urls @@ -2246,6 +2246,9 @@ UrlSuffix(gcc/Link-Options.html#index-static-libstdc_002b_002b) static-libasan UrlSuffix(gcc/Link-Options.html#index-static-libasan) +static-libhwasan +UrlSuffix(gcc/Link-Options.html#index-static-libhwasan) + static-libtsan UrlSuffix(gcc/Link-Options.html#index-static-libtsan) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b01787d29fc..d02743301ff 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -769,7 +769,8 @@ Objective-C and Objective-C++ Dialects}. -e @var{entry} -pie -pthread -r -rdynamic -s -static -static-pie -static-libgcc -static-libstdc++ --static-libasan -static-libtsan -static-liblsan -static-libubsan +-static-libasan -static-libhwasan -static-liblsan +-static-libtsan -static-libubsan -shared -shared-libgcc -symbolic -T @var{script} -Wl,@var{option} -Xlinker @var{option} -u @var{symbol} @@ -18699,14 +18700,14 @@ option is not used, then this links against the shared version of driver to link @file{libasan} statically, without necessarily linking other libraries statically. -@opindex static-libtsan -@item -static-libtsan -When the @option{-fsanitize=thread} option is used to link a program, -the GCC driver automatically links against @option{libtsan}. If -@file{libtsan} is available as a shared library, and the @option{-static} +@opindex static-libhwasan +@item -static-libhwasan +When the @option{-fsanitize=hwaddress} option is used to link a program, +the GCC driver automatically links against @option{libhwasan}. If +@file{libhwasan} is available as a shared library, and the @option{-static} option is not used, then this links against the shared version of -@file{libtsan}. The @option{-static-libtsan} option directs the GCC -driver to link @file{libtsan} statically, without necessarily linking +@file{libhwasan}. The @option{-static-libhwasan} option directs the GCC +driver to link @file{libhwasan} statically, without necessarily linking other libraries statically. @opindex static-liblsan @@ -18719,6 +18720,16 @@ option is not used, then this links against the shared version of driver to link @file{liblsan} statically, without necessarily linking other libraries statically. +@opindex static-libtsan +@item -static-libtsan +When the @option{-fsanitize=thread} option is used to link a program, +the GCC driver automatically links against @option{libtsan}. If +@file{libtsan} is available as a shared library, and the @option{-static} +option is not used, then this links against the shared version of +@file{libtsan}. The @option{-static-libtsan} option directs the GCC +driver to link @file{libtsan} statically, without necessarily linking +other libraries statically. + @opindex static-libubsan @item -static-libubsan When the @option{-fsanitize=undefined} option is used to link a program,