From patchwork Sun Dec 3 05:00:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 1870996 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=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=gVV7czId; 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 4SjZPR0tq5z1ySd for ; Sun, 3 Dec 2023 16:00:39 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5CA853857C72 for ; Sun, 3 Dec 2023 05:00:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by sourceware.org (Postfix) with ESMTPS id F306B3858C53 for ; Sun, 3 Dec 2023 05:00:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F306B3858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F306B3858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701579625; cv=none; b=orsoxDouqcOkXfikDI3hcAgFjKFy5xTa7hEhm0vpJcUryMmWIblGx12rAoMq4giQHwaMsf3A4KvvokRJNDyIuwg86AzO+e5wrGxSOAiRPx+NhDGDI7lecbYT14yN7jfAqc3DXddjHdCciDGS+nGx/SH9LdLsbCZ5vKBDAZL9ZrU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701579625; c=relaxed/simple; bh=GqhKtvbJv/n9w1FksVLj3uefqChA4SpeJmKZOTcpQxk=; h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject; b=pu4nxL1TaRwGdltzIboBzYGu8YfWGWnzcTBhO1kAFcE0i0x6rdIYpd79adusLs884Jqq+06pzY37erGtRLaV3GPAqf14RD0lSTuuWJhLa+3dzo+7wJsNDmB+w9Vyb0L2DdmU7IwXGLyxaOrLg11dtw+Onu5FKiJd315aDb7I2eM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-28654179ec0so2232799a91.2 for ; Sat, 02 Dec 2023 21:00:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701579621; x=1702184421; darn=gcc.gnu.org; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=dvIvW+9gJl/XayTsmB/tA1D9Nl1s4IWyL0kKML9q9/U=; b=gVV7czIdJX8ldQ3QB+ARv4WiD/oUNTEMH8L2uwh6/3dljnDXCoDlfKLh/QX8lkkIRa dkkXJ4Qx0uBG9pSqPajGIExuG7JSwmU0BQFLr0TQ+9DVJlD/KES951Udpmye2GzjOCRp B+OlM0h1kaQY0BpCeA4wtCp+gOq6PXEu99gtGpmvKHPVVTBCw9lgexgLRALJphGgpkjy 1MI2KFCFvp/rdzcsr0R7dD6udxkCvl3bslP+OiRE1Ds/qWW9t8KW+XrlnyLWVNf+V6l8 fudRY3KPMA9r0lAW+wf2VW6g/4JN4NT86GSsvmsFgAMESqi3eBSm9s3eV0h8qrgk+k/L Y2Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701579621; x=1702184421; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dvIvW+9gJl/XayTsmB/tA1D9Nl1s4IWyL0kKML9q9/U=; b=faOryC2xG7m6uADL3oqEsXPu+gORCSB5PSSm/mssoYQNLGmh0qW2Jbjq14iZXgKzKC PYWUHEZ1k2ZE2z9Vkf37//ZsqzWKyFrqR/Jqf9fAPsRyZfq8iuHrz6LfWN20Ut80zjld aKmadvxE1JWgeMLhLAzmWGTTS1gGo8pY40f2Fz6+YIrUd7foj5KSIOrTb5aVzGat2TCG BN/tw5aoBqr55EEAv6Jv7Cul6sS4vqpLpZUzsesklOo/eh8DKdcxDl7wxVOiMNn9Al1p C9s7V0+qctEkOEaRulGjdOGe1sD9fA2B1c4KoufMLBCi0eE1nm3D1Ouszj27JC1IJiJ+ 3dsg== X-Gm-Message-State: AOJu0Yy4Uonaku17ysdeSVzJ+iMyJUvd9xJ+gETWNTjOZ0t13YlJfbUZ sVfp9zJgdQF/R+RFn+/2Ozsysgidscdezg== X-Google-Smtp-Source: AGHT+IFZVQwkOizCzCuoJ/4lT7DvVvM4iE44iaTpLj+f4IQLx/jxa1quYkDtfcBb2WLhIDcoKLl82g== X-Received: by 2002:a17:903:234a:b0:1ca:731a:23e4 with SMTP id c10-20020a170903234a00b001ca731a23e4mr2121423plh.40.1701579621217; Sat, 02 Dec 2023 21:00:21 -0800 (PST) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id y8-20020a170902700800b001cfba46e407sm5973798plk.129.2023.12.02.21.00.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Dec 2023 21:00:20 -0800 (PST) Message-ID: Date: Sat, 2 Dec 2023 22:00:19 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "gcc-patches@gcc.gnu.org" From: Jeff Law Subject: [committed] Fix frv build after C99 changes X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 Two issues prevent the frv-elf port from building after the C99 changes. First the trampoline code emitted into libgcc has calls to exit, but no prototype. Adding a trivial prototype for exit() into the macro fixes that little goof. Second, frvbegin.c has a call to atexit, so a quick prototype is added into frvbegin.c to fix that problem. That's enough to get the compiler building again. Pushed to the trunk, Jeff commit 870b63fe71607b94c0e5b0c6e61cd807e0216ddd Author: Jeff Law Date: Sat Dec 2 21:54:36 2023 -0700 [committed] Fix frv build after C99 changes Two issues prevent the frv-elf port from building after the C99 changes. First the trampoline code emitted into libgcc has calls to exit, but no prototype. Adding a trivial prototype for exit() into the macro fixes that little goof. Second, frvbegin.c has a call to atexit, so a quick prototype is added into frvbegin.c to fix that problem. That's enough to get the compiler building again. gcc/ * config/frv/frv.h (TRANSFER_FROM_TRAMPOLINE): Add prototype for exit. libgcc/ * config/frv/frvbegin.c (atexit): Add prototype. diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h index 979561126f8..93a7c6d0fcc 100644 --- a/gcc/config/frv/frv.h +++ b/gcc/config/frv/frv.h @@ -1241,6 +1241,7 @@ typedef struct frv_stack { #if ! __FRV_FDPIC__ #define TRANSFER_FROM_TRAMPOLINE \ extern int Twrite (int, const void *, unsigned); \ +extern void exit (int); \ \ void \ __trampoline_setup (short * addr, int size, int fnaddr, int sc) \ @@ -1284,6 +1285,7 @@ __asm__("\n" \ #else #define TRANSFER_FROM_TRAMPOLINE \ extern int Twrite (int, const void *, unsigned); \ +extern void exit (int); \ \ void \ __trampoline_setup (addr, size, fnaddr, sc) \ diff --git a/libgcc/config/frv/frvbegin.c b/libgcc/config/frv/frvbegin.c index 76b40ec46c6..24ea06b1ae7 100644 --- a/libgcc/config/frv/frvbegin.c +++ b/libgcc/config/frv/frvbegin.c @@ -119,6 +119,7 @@ __do_global_dtors (void) } } +int atexit (void (*)(void)); /* Run the global constructors. */ void __do_global_ctors (void)