From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1814) id B67123858D28; Sun, 23 Oct 2022 02:00:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B67123858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666490437; bh=EYdA7B6Ueu6UVGMR8SZjY6qRAqhuFQnudph0O5txDs8=; h=From:To:Subject:Date:From; b=PFv1PSZKDH7jfiM2QmxhADE8ce9vHyiDXNb14zec6jtknPK3zwHtmNmuIP8jGEuG6 HD7awyVFol4qof59jtQXUbcozdZDXV0PDStOzds2db94HU1iBq2zYTQapRjdnwbRtI 4+jD02gokRh4hAD+h5EP7aIsvxXyyG7UCAyRI5Ro= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Yong To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3446] libgcc: Update 'gthr-mcf.h' to include a dedicated header for libobjc X-Act-Checkin: gcc X-Git-Author: LIU Hao X-Git-Refname: refs/heads/master X-Git-Oldrev: e39624519ae9e3b3160baf443e519ef22724edb3 X-Git-Newrev: 0e37fd4dc74c1db99cdc7d71ef378e1221253c6f Message-Id: <20221023020037.B67123858D28@sourceware.org> Date: Sun, 23 Oct 2022 02:00:37 +0000 (GMT) List-Id: https://gcc.gnu.org/g:0e37fd4dc74c1db99cdc7d71ef378e1221253c6f commit r13-3446-g0e37fd4dc74c1db99cdc7d71ef378e1221253c6f Author: LIU Hao Date: Sat Oct 22 17:31:46 2022 +0800 libgcc: Update 'gthr-mcf.h' to include a dedicated header for libobjc 'libobjc/thr.c' includes 'gthr.h'. While all the other gthread headers have `#ifdef _LIBOBJC` checks, and provide a different set of inline functions, I think having one header provide two completely unrelated set of APIs is unsatisfactory, complicates maintenance, and hinders further development. This commit references a new header for libobjc, and adds a copyright notice, as in other headers. libgcc/ChangeLog: * config/i386/gthr-mcf.h: Include 'gthr_libobjc.h' when building libobjc, instead of 'gthr.h' Diff: --- libgcc/config/i386/gthr-mcf.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h index 58131bb7ca9..40da86802b6 100644 --- a/libgcc/config/i386/gthr-mcf.h +++ b/libgcc/config/i386/gthr-mcf.h @@ -1 +1,36 @@ +/* Threads compatibility routines for libgcc and libobjc. */ +/* Copyright (C) 2022 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifdef _LIBOBJC + +/* libobjc references some internal structures and requires a + * dedicated set of functions. */ +#include + +#else /* _LIBOBJC */ + +/* This is for libgcc and libstdc++. */ #include + +#endif /* _LIBOBJC */