From patchwork Thu Oct 3 19:44:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 1992482 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=P49urlDd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XKMbh1lh4z1xtk for ; Fri, 4 Oct 2024 05:45:36 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3CBAA384642D for ; Thu, 3 Oct 2024 19:45:34 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) by sourceware.org (Postfix) with ESMTPS id A63EE385DDD8 for ; Thu, 3 Oct 2024 19:45:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A63EE385DDD8 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 A63EE385DDD8 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727984709; cv=none; b=SuxBAVpi9sFQw0YnJzqwsy1yu76TksZrc5GI5w5fiUa/QeYmsnayhTCXYT9+jgXuzn45IQpEQJHHYA6NaukDzUdoje9sARj9Vklt9FaXubk8BT3Mxdub5yvMn5hlNDySf+wEnOBA4riSNSjYy+cyFKHBDlbUgnwAkz2LLbvgBVw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727984709; c=relaxed/simple; bh=OBSrgzp1omuq3BskTdBrp+Rh30s1101wwHRRjNS3KRM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=wWqh6gcCkbV43/F+mQy+8N3Q6is46CXL1rgI8miTRNKgJIDHQDlZSBJ30n8CGD+NXmio+9N/i3uFriK7kgtlneFiTjf+zsGZ8v0wKHZeIkv8otOfhP76t5LrQSFipauuxfXFhf3RxdJlfxz6oXhzhtBnCFz8JY9WV8NsCncLge4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-5e20de1d302so671549eaf.0 for ; Thu, 03 Oct 2024 12:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727984706; x=1728589506; darn=gcc.gnu.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=EzlFcN8s3j7+lA4CwB2pByQ/4zqReXTaLOMjQhpPyRA=; b=P49urlDdDpRP6tHN2DU1JXnECFFm4ztIaswErlBvE0T+bUZ8v2r+Wz6GiJuoePAkdb YcC4i0uEqMBrZhr1w+5WFGLk0B7MQGc1JntgGogm2gqP4i0dHWZ0ZIioz6PREELhDyu8 elpsU78fdn2aruRlt2bWyN0IzDoc/8qO38unKYBytSlrm0KWPUJApF0djNXFy+6p/IBE id0P0fRzHGOi6fEw1thOa3wuGsf4AoZM4UVGbNtZ30gScq91tSQazGX1/qbbD3Kza4Z4 8zpJBk4EGeUgeGCu50q4ggcwLpjdIhtmIJgADQo+jnVThz2JUqx0n7tdahqAEYZQomMj wAAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727984706; x=1728589506; 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=EzlFcN8s3j7+lA4CwB2pByQ/4zqReXTaLOMjQhpPyRA=; b=eISWVNTq4uQXDOjD7QtagpROsupiKCHcrZE7cLkwsx1iSpw7DQ6XZeFIKb+qSBrinQ mL5+tj3Rf2YTMl7/lMy5H0J+KAlYX3+JJ14hwO0wp8uT3yXIiEGaRZsa7qzWSgU8O3h0 cpuxENXJt6w79GxIzvQQv9ApibwNg/uMPIHj/EaXe4MT15Y/2SeeD/QkqtXrrri8ALZx 3OHZ8EGmWT29cXSYo7i2WWP8J+FOFcLL6jQYAibiTgEVV4FjUC7oEYp4+//o+JCgfRK3 eNaZhPFHIz54n/Hjqmx+X1iaAmYWj/JNdIkP6LCN55pW/c0uAYX2jDKNiGaMQSooQyj8 +exg== X-Gm-Message-State: AOJu0Yw6PX5CrJ9u30A3e/AjcHY+D7Rxj9E9da4QcXG6341H+aRHwZiL cnd3eQcb5NcPqg+BpewbE7OVu6RmrjwgwoLiNrA8oFparlbd2mkdTAOO7tjRp02vro7ZVXNeWqD J+qOhWg== X-Google-Smtp-Source: AGHT+IGab0YcXuq4GgPxXXRRQKwwCYzNodjtCODIApkxCazhxAzB2iyj8dslf6lAzKjnOBfABsgk8Q== X-Received: by 2002:a05:687c:2bd7:b0:250:70bb:1a97 with SMTP id 586e51a60fabf-287c1e16723mr417027fac.24.1727984706644; Thu, 03 Oct 2024 12:45:06 -0700 (PDT) Received: from localhost.localdomain ([139.178.84.207]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-287ab9b5c14sm651838fac.14.2024.10.03.12.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 12:45:05 -0700 (PDT) From: Christophe Lyon To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com, wdijkstr@arm.com, matthieu.longo@arm.com Cc: Christophe Lyon Subject: [PATCH 1/3] aarch64: libgcc: Cleanup warnings in lse.S Date: Thu, 3 Oct 2024 19:44:48 +0000 Message-Id: <20241003194450.1052220-2-christophe.lyon@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241003194450.1052220-1-christophe.lyon@linaro.org> References: <20241003194450.1052220-1-christophe.lyon@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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 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~incoming=patchwork.ozlabs.org@gcc.gnu.org Since Commit c608ada288ced0268bbbbc1fd4136f56c34b24d4 Author: Zac Walker CommitDate: 2024-01-23 15:32:30 +0000 Ifdef `.hidden`, `.type`, and `.size` pseudo-ops for `aarch64-w64-mingw32` target lse.S includes aarch64-asm.h, leading to a conflicting definition of macro 'L': - in lse.S it expands to either '' or 'L' - in aarch64-asm.h it is used to generate .L ## label lse.S does not use the second, so this patch just undefines L after the inclusion of aarch64-asm.h. libgcc/ * config/aarch64/lse.S: Undefine L() macro. --- libgcc/config/aarch64/lse.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S index ecef47086c6..77b3dc5a981 100644 --- a/libgcc/config/aarch64/lse.S +++ b/libgcc/config/aarch64/lse.S @@ -54,6 +54,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "aarch64-asm.h" #include "auto-target.h" +/* L is defined in aarch64-asm.h for a different purpose than why we + use it here. */ +#undef L + /* Tell the assembler to accept LSE instructions. */ #ifdef HAVE_AS_LSE .arch armv8-a+lse From patchwork Thu Oct 3 19:44:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 1992483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VQj5fdAV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XKMbl1tK6z1xt1 for ; Fri, 4 Oct 2024 05:45:39 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1D25F3846423 for ; Thu, 3 Oct 2024 19:45:37 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by sourceware.org (Postfix) with ESMTPS id C4730385DDDF for ; Thu, 3 Oct 2024 19:45:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C4730385DDDF 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 C4730385DDDF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727984710; cv=none; b=dvrW59cT7bwsyv6Nf6/figXUdMJa8N7w6nktapMEOQVQ0Fd3JYuU5OiBAX7I+CRmZzCqcv2ZD/9eP78k2uCkhq/2nXc3BE/SsFc3P/0g3bTZ1NOYelo3sUYiiTK9NH9w5yI5E40Rc68W08K10SWdb9e7Xh66zpa9LhKVvwDh0Ks= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727984710; c=relaxed/simple; bh=Jwv5MMvoAtP757Ta6ZrPVtOydGCcBxm0UgH900KZLFY=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=TXgJFIDHU7iVDtzXJAghCEIGpuBqmWPk/gl7eRb0wRTh48ikhtdNQ/snNnxhXjzYN8ogp1abDEuqnwYXa7NJ//7z1nYXWvvq3OFOk2I+2R242ASEWpt78a20nGlSwGdC2VZOwtPVmfDsTr3K9r2U2t1FRhYAJ6stFPA50TZSaVo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-28742d10c76so799591fac.1 for ; Thu, 03 Oct 2024 12:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727984708; x=1728589508; darn=gcc.gnu.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=SDFcd59Kvp9sR9ehgAAVZwo7I9ljLa1dTouOQqt3QAA=; b=VQj5fdAVNwEoetfCtefezdd8YaNe+A3CuVxZ0Vh2632ZQ5YxaQDi8oxWELs7BMaoSI gzmkzWt5H4lr71DwzynBPZRf+F2BEdDE0UbBz1zkgMYxlhCmwuk3WjsVGQUkQNw/KCDq 0WiaiXpLLYk3fzH+vYW+dGFpsBtxSD3T3gJ+HVjw0i5aXvYy3dFhBs6pD93KVQJf9wZ/ 1feb7tJS7J8Tf0qSdBQT1+lf+ZV8a9aXbEEg5x3P0H8LzxbVGLiz0UeYge6Zghf7WTcL 9/2r6/87HarPJk93RrdKD/2g9mTBcBuNf6fBdsi+ERAGv2g9WbcNUSbSshbni4xLzVrc v/0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727984708; x=1728589508; 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=SDFcd59Kvp9sR9ehgAAVZwo7I9ljLa1dTouOQqt3QAA=; b=VILit1GkH1i7E82nPanxJM3lxpN45VGH3a9LGvrwXp7AdYW2uFCJnBhcSnqhhwocgy N6pBmiQu8sKAVxN2sI5Sukn1Dxztf/Ggy4FFIwqrgO0iFdtgEp50RQ/Rg8UfATAC/d0B 7bK+YqzZ6NmeT3Q1YtA5+BR0f/vV7ZVg2piDr3oo1eGrDy9azgQfdMmqtGGJTa1Lypyy 4ycAU3otiv2VUaFTzpB0ywnu/dKK3IKSmEdIQOcyBejhNf7sWfx2B3GSS2Nz7EL6zknd aYUhuWqyJti0UURC3MLLHEt9fObMas8aAH/UvUGdAvLZR9mswn4W/bhkPEWMixhGfAg1 NDIg== X-Gm-Message-State: AOJu0YzeQA/37cHtuC0weCQTLvIXYtLsjbeAgpziflz+fKupWuVB3CCc yipQvFKFDens1LRSeE0dK1RpGpGR9hrrAg/gkpqATSgw89dpUSnI1lg1QwnQv79wXlxcOHyKb7g EgjdHHg== X-Google-Smtp-Source: AGHT+IEr7NlmX/meOOuJnr7zJY9UJ/sMI/T8dpwT4iiD1NWFnQBMHs9Qb3P6+8t0daVsQQ194bnaUg== X-Received: by 2002:a05:6870:568c:b0:278:bfa:87da with SMTP id 586e51a60fabf-287c1db8b4cmr594118fac.10.1727984707800; Thu, 03 Oct 2024 12:45:07 -0700 (PDT) Received: from localhost.localdomain ([139.178.84.207]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-287ab9b5c14sm651838fac.14.2024.10.03.12.45.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 12:45:07 -0700 (PDT) From: Christophe Lyon To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com, wdijkstr@arm.com, matthieu.longo@arm.com Cc: Christophe Lyon Subject: [PATCH 2/3] aarch64: libgcc: add prototypes in cpuinfo Date: Thu, 3 Oct 2024 19:44:49 +0000 Message-Id: <20241003194450.1052220-3-christophe.lyon@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241003194450.1052220-1-christophe.lyon@linaro.org> References: <20241003194450.1052220-1-christophe.lyon@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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 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~incoming=patchwork.ozlabs.org@gcc.gnu.org Add prototypes for __init_cpu_features_resolver and __init_cpu_features to avoid warnings due to -Wmissing-prototypes. libgcc/ * config/aarch64/cpuinfo.c (__init_cpu_features_resolver): Add prototype. (__init_cpu_features): Likewise. --- libgcc/config/aarch64/cpuinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libgcc/config/aarch64/cpuinfo.c b/libgcc/config/aarch64/cpuinfo.c index 4b94fca8695..c62a7453e8e 100644 --- a/libgcc/config/aarch64/cpuinfo.c +++ b/libgcc/config/aarch64/cpuinfo.c @@ -418,6 +418,7 @@ __init_cpu_features_constructor(unsigned long hwcap, setCPUFeature(FEAT_INIT); } +void __init_cpu_features_resolver(unsigned long, const __ifunc_arg_t *); void __init_cpu_features_resolver(unsigned long hwcap, const __ifunc_arg_t *arg) { if (__aarch64_cpu_features.features) @@ -425,6 +426,7 @@ __init_cpu_features_resolver(unsigned long hwcap, const __ifunc_arg_t *arg) { __init_cpu_features_constructor(hwcap, arg); } +void __init_cpu_features(void); void __attribute__ ((constructor)) __init_cpu_features(void) { unsigned long hwcap; From patchwork Thu Oct 3 19:44:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 1992484 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=zbhlP5dc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XKMcl466xz1xt1 for ; Fri, 4 Oct 2024 05:46:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C55AF384640A for ; Thu, 3 Oct 2024 19:46:29 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 0302B3865473 for ; Thu, 3 Oct 2024 19:45:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0302B3865473 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 0302B3865473 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::329 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727984712; cv=none; b=nJg6mJozTA7bnWfyeaCVFcwT4yF1Jd1K3z8HkTa4d+pHwhpiMGSgjVhO68RJBxKxoYsega+Bc5vNSmIkGMWYTX8Uh76R56NtmECUikg62evAKQbGqzbZnEyb2cSew4b929OEDSd0AgdABrcb0Me8bVvpbBDdtO+kCp6dcX9Je4s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727984712; c=relaxed/simple; bh=HNnLS3WfzPPlcOItyZyCNqlcGpS9A32K99W4BPZQXWM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=qVHuIsAFysWWgkFQ0dtb6pbbbmAI7eCMl324RV+0e1PjQG1BfdVS73SyVHdXGoQkTOeAzjoDUriCrydIVpdckxc4CRkkwEfKMTjehNLQc34pHj7jzIubfG81d2GKraZSo62KrBpVhV8s6sMhP+DZR/4llILPB5Xy/5CdsEhxbLs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-710e1a47b40so543378a34.2 for ; Thu, 03 Oct 2024 12:45:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727984709; x=1728589509; darn=gcc.gnu.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=nHST+BY+8LHufX0iZPzS2QYyOnu7RghNTCZcHyDLU8g=; b=zbhlP5dcQoXPoXuJwDH+8UNPG5oCZYBQhwJ5KTmBAPy4WjN3umxF9eKK71qNM8eLpf iQBB+J+Op9jCkdUEUUEcPVvILpcIHwbw9N/i0lUuYZr10/TsFc1RnQIB2tJYFI6ay23Q FoUi1VoVNXkb94wq2fZq9tH/VijwZyu6LyX2NnGJl7g2qhQh5sbeiWv23LQH4aTIeMAP m2IFR+L+rPZ+0eZny86fM9K/3L0BwxfoSE+KxYDNjfuRP41Zp5vLExOt3yaDWNGdsLtk GT38dgb5VflQl1un28U1l6tYbhrKXF4VpxUVP2wIAs9nUZ5435twkm0FOzU3LV/hr4Oi 78qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727984709; x=1728589509; 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=nHST+BY+8LHufX0iZPzS2QYyOnu7RghNTCZcHyDLU8g=; b=F8DpmBNfnyUTCgz0Fagc9JvWINFOSG4D1UQC+m8SgISI2e0OImfV/6Vh1c+gw97J7I A1S+/PDf0+gkstAUWzlymybQ6KHQi1BuiBOMhaRK0t2LxPtJYe8PWkog7ZK0jiNJ+F1/ DHsKHGaNpZ/mJ9QR3AJoHPEs5Rv+MGSd1dTUCLC9BOD2dlm+l0M+vLnGRnOAfz2lFvPh cRqqpJdHC4uCDuv2pJHLYPKsdA8PXNFN6vFPaRn9WT1BRwcEJxycYiEGzV+Y8VILcF8r UvgxWmOi5oZ3KEcHXYu1RebHckKs3KF8797/+WoLP0BD2JEUpzWzU3QW47cY31p1UKJk SaQg== X-Gm-Message-State: AOJu0Ywg7GWl2zEKIkSolENI/XyQqy7flN+yIKzPV5aC+LiCpVxNjsFi 9j+rT4tzHVBUDgWIiLWh4FvWREjNQGnovCeZhA/uZiDF3Yc82s2tC9nlUQTDXK0pHIzhH9ojjph Q6G+CjA== X-Google-Smtp-Source: AGHT+IHV+lIjPsaxTTi8FeKldqCJCUPXF+jqI4s9PbkayZB5xDVe3tLemp4zA3cm0dB0fE8WbJMUVw== X-Received: by 2002:a05:6870:7012:b0:259:ae64:9234 with SMTP id 586e51a60fabf-287c1e0d726mr466634fac.13.1727984708760; Thu, 03 Oct 2024 12:45:08 -0700 (PDT) Received: from localhost.localdomain ([139.178.84.207]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-287ab9b5c14sm651838fac.14.2024.10.03.12.45.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 12:45:08 -0700 (PDT) From: Christophe Lyon To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com, wdijkstr@arm.com, matthieu.longo@arm.com Cc: Christophe Lyon Subject: [PATCH 3/3] aarch64: libgcc: Add -Werror support Date: Thu, 3 Oct 2024 19:44:50 +0000 Message-Id: <20241003194450.1052220-4-christophe.lyon@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241003194450.1052220-1-christophe.lyon@linaro.org> References: <20241003194450.1052220-1-christophe.lyon@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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 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~incoming=patchwork.ozlabs.org@gcc.gnu.org When --enable-werror is enabled when running the top-level configure, it passes --enable-werror-always to subdirs. Some of them, like libgcc, ignore it. This patch adds support for it, enabled only for aarch64, to avoid breaking bootstrap for other targets. The patch also adds -Wno-prio-ctor-dtor to avoid a warning when compiling lse_init.c libgcc/ * Makefile.in (WERROR): New. * config/aarch64/t-aarch64: Handle WERROR. Always use -Wno-prio-ctor-dtor. * configure.ac: Add support for --enable-werror-always. * configure: Regenerate. --- libgcc/Makefile.in | 1 + libgcc/config/aarch64/t-aarch64 | 1 + libgcc/configure | 31 +++++++++++++++++++++++++++++++ libgcc/configure.ac | 5 +++++ 4 files changed, 38 insertions(+) diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index 0e46e9ef768..eca62546642 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -84,6 +84,7 @@ AR_FLAGS = rc CC = @CC@ CFLAGS = @CFLAGS@ +WERROR = @WERROR@ RANLIB = @RANLIB@ LN_S = @LN_S@ diff --git a/libgcc/config/aarch64/t-aarch64 b/libgcc/config/aarch64/t-aarch64 index b70e7b94edd..ae1588ce307 100644 --- a/libgcc/config/aarch64/t-aarch64 +++ b/libgcc/config/aarch64/t-aarch64 @@ -30,3 +30,4 @@ LIB2ADDEH += \ $(srcdir)/config/aarch64/__arm_za_disable.S SHLIB_MAPFILES += $(srcdir)/config/aarch64/libgcc-sme.ver +LIBGCC2_CFLAGS += $(WERROR) -Wno-prio-ctor-dtor diff --git a/libgcc/configure b/libgcc/configure index cff1eff9625..ae56f7dbdc9 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -592,6 +592,7 @@ enable_execute_stack asm_hidden_op extra_parts cpu_type +WERROR get_gcc_base_ver HAVE_STRUB_SUPPORT thread_header @@ -719,6 +720,7 @@ enable_tm_clone_registry with_glibc_version enable_tls with_gcc_major_version_only +enable_werror_always ' ac_precious_vars='build_alias host_alias @@ -1361,6 +1363,7 @@ Optional Features: installations without PT_GNU_EH_FRAME support --disable-tm-clone-registry disable TM clone registry --enable-tls Use thread-local storage [default=yes] + --enable-werror-always enable -Werror despite compiler version Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -5808,6 +5811,34 @@ fi +# Only enable with --enable-werror-always until existing warnings are +# corrected. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +WERROR= +# Check whether --enable-werror-always was given. +if test "${enable_werror_always+set}" = set; then : + enableval=$enable_werror_always; +else + enable_werror_always=no +fi + +if test $enable_werror_always = yes; then : + WERROR="$WERROR${WERROR:+ }-Werror" +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + # Substitute configuration variables diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 4e8c036990f..6b3ea2aea5c 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -13,6 +13,7 @@ sinclude(../config/unwind_ipinfo.m4) sinclude(../config/gthr.m4) sinclude(../config/sjlj.m4) sinclude(../config/cet.m4) +sinclude(../config/warnings.m4) AC_INIT([GNU C Runtime Library], 1.0,,[libgcc]) AC_CONFIG_SRCDIR([static-object.mk]) @@ -746,6 +747,10 @@ AC_SUBST(HAVE_STRUB_SUPPORT) # Determine what GCC version number to use in filesystem paths. GCC_BASE_VER +# Only enable with --enable-werror-always until existing warnings are +# corrected. +ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual]) + # Substitute configuration variables AC_SUBST(cpu_type) AC_SUBST(extra_parts)