From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mengyan1223.wang (mengyan1223.wang [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 3A6A1385840F for ; Sun, 28 Nov 2021 00:51:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3A6A1385840F Received: from [IPv6:240e:35a:1026:7200:dc73:854d:832e:2] (unknown [IPv6:240e:35a:1026:7200:dc73:854d:832e:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@mengyan1223.wang) by mengyan1223.wang (Postfix) with ESMTPSA id 2A8B4659CF; Sat, 27 Nov 2021 19:51:19 -0500 (EST) Message-ID: <25a89acf318adfc42a0d8af0eb9ecb6fb062b20a.camel@mengyan1223.wang> Subject: Re: [PATCH 01/12] LoongArch Port: gcc build From: Xi Ruoyao To: chenglulu , gcc-patches@gcc.gnu.org Cc: yangyujie@loongson.cn, xuchenghua@loongson.cn Date: Sun, 28 Nov 2021 08:51:12 +0800 In-Reply-To: <20211127082735.4139682-2-chenglulu@loongson.cn> References: <20211127082735.4139682-1-chenglulu@loongson.cn> <20211127082735.4139682-2-chenglulu@loongson.cn> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3032.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2021 00:51:26 -0000 On Sat, 2021-11-27 at 16:27 +0800, chenglulu wrote: > +++ b/gcc/config/loongarch/loongarch-opts.h /* snip */ > +#ifdef IN_LIBGCC2 > +#include "loongarch-def.h" > +#else > +extern "C" { > +#include "loongarch-def.h" > +} > + > +/* Handler for "-m" option combinations, > +   shared by the driver and the compiler proper.  */ > +void > +loongarch_config_target (struct loongarch_target *target, > +  HOST_WIDE_INT opt_switches, > +  int opt_arch, int opt_tune, int opt_fpu, > +  int opt_abi_base, int opt_abi_ext, > +  int opt_cmodel, int follow_multilib_list); > +#endif This is causing failures building libobjc (complaining that `extern "C"` can't be used in C code, and HOST_WIDE_INT is not defined). I think #ifdef IN_LIBGCC2 should be replaced with #if defined(IN_LIBGCC2) || defined(IN_TARGET_LIBS) -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University