From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EdAQCg0rg2pUMC0AWB0awg (envelope-from ) for ; Mon, 17 Aug 2026 11:38:53 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RWZyRcAw; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 247EA1E0A3; Mon, 17 Aug 2026 11:38:53 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id ABCFC1E033 for ; Mon, 17 Aug 2026 11:38:52 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A6ADA4BA9014 for ; Mon, 17 Aug 2026 15:38:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6ADA4BA9014 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RWZyRcAw Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 8944F4BA9013 for ; Mon, 17 Aug 2026 15:37:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8944F4BA9013 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8944F4BA9013 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786981027; cv=none; b=KwbUo/zEOyPUaoS7YmtnlF9rJ7uY0D1X1qwTgAJLeRlwwcGEhKszDXuUd5Wu6exKhHZAU8bPszhK6r/HEG4EdgsUX/I23MNP/4RI5GRPI+BiTShZO6WviYG/kXNYmsgwBhoVqSUKsS9zwtXJSFMZODXp/TIcHhVMGhs2mwoAMdY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786981027; c=relaxed/simple; bh=j5tVXZx6sNt8MDgwI0KQd77CJZau3yeoAAHgAAfIWX4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=DdwC8olKC/B3wsZjiVwumkYYN0XxKjlnzf+J/pageDtjils5WE7x/Ts4p7G2GQnSn84s/UijEOEMaeM0PmtKBypS2Nvl8B1+7TpW9SVgR0Vj3Q2Cjz2BR/tEShnfW3QQWSUguIDm9NFa9CGZYL3HdpGMwcAUef9wCv/qcKXYvM0= ARC-Authentication-Results: i=1; sourceware.org; dkim=fail (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RWZyRcAw reason="signature verification failed" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8944F4BA9013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1786981027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hi5HKpbLxdjlRvZC4N/Aq+4uR1HrXiSA8vhrywR6DrE=; b=RWZyRcAwx+NtRjM9+24sLCSug567IVAsEJMW/nOKJswbOxwFS5K6rvoM+BZI7hzHEtDOP4 /0t32HxvcTT293DYwCq0cKNnWG/EhTpKNH2wShLxset2aaYOvURnIKsMohHLxcGGpmfBBB yRmucgSPQbSNK8BqmVKlHbMVj1lAp3k= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-75-fJNAk9HDMSKzt-LQi9FWmw-1; Mon, 17 Aug 2026 11:37:05 -0400 X-MC-Unique: fJNAk9HDMSKzt-LQi9FWmw-1 X-Mimecast-MFC-AGG-ID: fJNAk9HDMSKzt-LQi9FWmw_1786981025 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-49545071724so34231985e9.0 for ; Mon, 17 Aug 2026 08:37:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786981024; x=1787585824; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=uXnhjugHMp8edIoNvTMNw0T5aBuHYMahiFaRjpXJwzU=; b=rx0PY2g+gOkohWDT8G48956073bop66ZR95yofqo4uCuyjs7eFTCNfC6aXf4Eh/YbQ PAQFQB7HtGXKBiNNf1Z2VduNoGNcO95M1wZ9WRgypNyEDU/Svu/CTFf/wuyIb/SqnwVs pGGmgoS8cCeN0txe1o/tEw9jmnepd9IjSybCY8XtasInTeFujPLmBEZwRKun9gC7QuSw 9XAXfiBtn8OaQLoN6ZRgVUjEZ+4wJMCPosxO+wcMpU8DTol54xmv5KdLx7J8T9Wbz9pR Y0lSI9LO9IRhjUk+3+B0Qo6o10qIZvVMYHAJV9n6/PDPth8x5TmQbYcsUeoE9Z3asx3Y M+MA== X-Forwarded-Encrypted: i=1; AHgh+RoRgBgcZHHoPgFoth0BsNFGm9ftw8jD9MlvCuJ+BUt63tdLljoCipAz3xiXKUQoA/ZFptBi/ZBwXql/aw==@sourceware.org X-Gm-Message-State: AOJu0YzRk9E5PRHaEXEQM50fd4jVinYKAeyKUvHhFN6qnv5y1Arazk0C EspIpQnpt2Aii5Gk/0ighT8cL0C8tfhqLxShVDBjLkJBwQZQasFDLAmLxrSJFxOTQ9kTfLjnVFf 1EZcJ01u3ir0sk6UTQG04oUMrsvJ10oE5OTrNxKl2HY46TZtXIQCcwbuCVFIbDwU= X-Gm-Gg: AR+sD12hFRCcrO1wiH4GrCsWx39TVj8tYsVi8jb1NlowZ/pf0GSU5zeRkMxQ/rsDoo7 ol1Ewo2AFniUq7BG18UDPejpMeFZKdU4nn73hO/bktN63JxDpJcHLrZ+uJdUpIcwAMdLjgUmlQO oSDXgIUr1sCGpalr149Wpt3dQ6Yvcb7W+CfO1/eXoMQNLBZI/cPd7RsEs6DXX0RK/VuvsfbjyyF ZrpaxfuLOJqH6N4eQP5ma8jQ7JwnxoLvfm/mseJY8eaR7FavYy9eFfghNwQ4Wl/57ZuGweMVBBZ yKQSp4m411G4fN9WC2riQcr8DLWYaAVC+hjFj10q/Y9TofZLuUiPt6vcf3zSfPLVe6ymcA07oca F4tJpREVZz/G/OG9Xs4s= X-Received: by 2002:a05:600c:528d:b0:499:900c:9c69 with SMTP id 5b1f17b1804b1-499900c9e99mr284930455e9.9.1786981024548; Mon, 17 Aug 2026 08:37:04 -0700 (PDT) X-Received: by 2002:a05:600c:528d:b0:499:900c:9c69 with SMTP id 5b1f17b1804b1-499900c9e99mr284929595e9.9.1786981024127; Mon, 17 Aug 2026 08:37:04 -0700 (PDT) Received: from localhost (67.72.115.87.dyn.plus.net. [87.115.72.67]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4999d0876b8sm70129165e9.8.2026.08.17.08.37.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2026 08:37:03 -0700 (PDT) From: Andrew Burgess To: Simon Marchi , gdb-patches@sourceware.org, binutils@sourceware.org Cc: Simon Marchi Subject: Re: [PATCH 06/13] sim/m32r: fix unused function warnings on non-Linux hosts In-Reply-To: <20260817151646.152571-7-simon.marchi@efficios.com> References: <20260817151646.152571-1-simon.marchi@efficios.com> <20260817151646.152571-7-simon.marchi@efficios.com> Date: Mon, 17 Aug 2026 16:37:03 +0100 Message-ID: <87se4c3gio.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: uB4PhxO57_YHZm9y-xi7uuELx0uEzKVfv4a2wTNnUq0_1786981025 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Simon Marchi writes: > When building on macOS, I get: > > /Users/smarchi/src/binutils-gdb/sim/m32r/traps.c:141:1: error: unused function 't2h_addr' [-Werror,-Wunused-function] > 141 | t2h_addr (host_callback *cb, struct cb_syscall *sc, > | ^~~~~~~~ > /Users/smarchi/src/binutils-gdb/sim/m32r/traps.c:158:1: error: unused function 'translate_endian_h2t' [-Werror,-Wunused-function] > 158 | translate_endian_h2t (void *addr, size_t size) > | ^~~~~~~~~~~~~~~~~~~~ > /Users/smarchi/src/binutils-gdb/sim/m32r/traps.c:171:1: error: unused function 'translate_endian_t2h' [-Werror,-Wunused-function] > 171 | translate_endian_t2h (void *addr, size_t size) > | ^~~~~~~~~~~~~~~~~~~~ > > These three helpers are only called from the TRAP_LINUX_SYSCALL case, > which is guarded by `#ifdef __linux__'. Put them behind the same > guard. Approved-By: Andrew Burgess Thanks, Andrew > > Change-Id: I8c8744727eb27abc08231be2a10f8d0de44d7ea6 > --- > sim/m32r/traps.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/sim/m32r/traps.c b/sim/m32r/traps.c > index bb82ae80e2aa..43a81c915d1c 100644 > --- a/sim/m32r/traps.c > +++ b/sim/m32r/traps.c > @@ -134,7 +134,9 @@ m32r_core_signal (SIM_DESC sd, SIM_CPU *current_cpu, sim_cia cia, > sim_core_signal (sd, current_cpu, cia, map, nr_bytes, addr, > transfer, sig); > } > - > + > +#ifdef __linux__ > + > /* Translate target's address to host's address. */ > > static void * > @@ -180,6 +182,8 @@ translate_endian_t2h (void *addr, size_t size) > *((unsigned short *) p) = T2H_2 (*((unsigned short *) p)); > } > > +#endif /* __linux__ */ > + > /* Trap support. > The result is the pc address to continue at. > Preprocessing like saving the various registers has already been done. */ > -- > 2.55.0