From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 734183858D3C for ; Mon, 20 Nov 2023 23:15:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 734183858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 734183858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.180 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700522159; cv=none; b=djgxRfQUT5tNShpzulYbtJ1rS72w7Fq92F/YL+awGm99otHwvOzeFQhBsHYKdEdaRKB3lA4KPsaFi+HkxkjCQuFWJ8qfHAYZuFz+FWRHuegw5P9SMRAOxDeYr55g0qTioI3JkuJb5dHgk7A50oZXB1TqnO7AL7tIxaT59r6aiZ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700522159; c=relaxed/simple; bh=HwdTgMMqiPdeqLw2koS9Kp0s7oAqi9gCq6dNUXzlwAE=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=FXIhyLKW29Sgh7G4mj/zJCtjBJlKbJ8SP1IqOw4htkEzRIHYgDQgv8LaEqXQNdORMFg/AAEXGHVLq4uNob35+XX1kbTfCME8BrIAh0JPeY8ND3bdbQpS0wIz7TjJaG4GqbcJN4VP6ruFsT2FgDESoVNE5duX+XrCq4qEEb85O+w= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: PZLfumbSQH+HiJT2LW0B7A== X-CSE-MsgGUID: BguvdtSeQCejdeEoI+QeZQ== X-IronPort-AV: E=Sophos;i="6.04,214,1695715200"; d="scan'208";a="23300360" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 20 Nov 2023 15:15:54 -0800 IronPort-SDR: zHeQUZylJTdRRBcuQE37J5IBO1LQVaJ5P7wfR6QYprJ3NR0WlIdaHfNE3NtUrTuN+sVQiZXRiQ NVI70Sxl8i0xteXH5e7gFFvCrqqKX2EzeM32lSTkcYPBU5ElZbISCIH6BEIuRtQ3fDGdEMh25C +pVi+Ag5DgvjkP+s1D2F5EwBhsYQ2aQv3T0q/smaQ5cY269qSePX1zaw3vYNg5UztYGVk//Mvf 280Ju8Vl3hSFSeD1ERxSiFSpt1zBO7/W2ko1Cy5p5RjfaGvztMM0i7nJ8F9eGa8xoL2/itdTEM urY= Date: Mon, 20 Nov 2023 23:15:50 +0000 From: Joseph Myers To: Xi Ruoyao CC: , chenglulu , , Subject: Re: [PATCH v2 2/6] LoongArch: genopts: Add infrastructure to generate code for new features in ISA evolution In-Reply-To: <20231117204323.453536-3-xry111@xry111.site> Message-ID: <74823bfa-1b5c-1790-9fc6-ab97adc1a515@codesourcery.com> References: <20231117204323.453536-1-xry111@xry111.site> <20231117204323.453536-3-xry111@xry111.site> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3109.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,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 List-Id: On Sat, 18 Nov 2023, Xi Ruoyao wrote: > diff --git a/gcc/config/loongarch/loongarch-def.h b/gcc/config/loongarch/loongarch-def.h > index b319cded456..6123c8e0f19 100644 > --- a/gcc/config/loongarch/loongarch-def.h > +++ b/gcc/config/loongarch/loongarch-def.h > @@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see > #ifndef LOONGARCH_DEF_H > #define LOONGARCH_DEF_H > > +#include > #include "loongarch-tune.h" > > #ifdef __cplusplus This has broken libgcc builds when target libc isn't yet available. In file included from /scratch/jmyers/glibc-bot/src/gcc/libgcc/../gcc/config/loongarch/loongarch-def.h:49, from /scratch/jmyers/glibc-bot/src/gcc/libgcc/../gcc/config/loongarch/loongarch-opts.h:24, from ../.././gcc/options.h:8, from ../.././gcc/tm.h:49, from /scratch/jmyers/glibc-bot/src/gcc/libgcc/libgcc2.c:29: /scratch/jmyers/glibc-bot/build/compilers/loongarch64-linux-gnu-lp64d/gcc-first/gcc/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory 9 | # include_next | ^~~~~~~~~~ compilation terminated. make[3]: *** [Makefile:505: _muldi3.o] Error 1 https://sourceware.org/pipermail/libc-testresults/2023q4/012109.html My guess would be that the definitions needing are not actually needed in code built for the target, and so there should be more #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS) conditions like the one already present in loongarch-opts.h, to avoid depending on a target header like this being present. (Alternatively, one could argue for building much libgcc code with -ffreestanding, which would also avoid GCC's expecting a libc header to be available - but that would have more risk for other targets.) -- Joseph S. Myers joseph@codesourcery.com