From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 2F5123858D20 for ; Sat, 13 Jan 2024 14:06:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F5123858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2F5123858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705154774; cv=none; b=lMq4+8KNs5QboU+jmmESy1882pLHbX27O2T8xQbbgec2P4dkRplYoe5CTujr/3zdpuuL2VDj13CqwreSoIsCNDzpw7hqHhC3nMFVs61qZqOK82BwRd/A2sZAKR/AsCzG0hVvO+2AQHTKYVQBCWiZUcDJOS8/OQaI10oPpS+YrLg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705154774; c=relaxed/simple; bh=58KM6LDRRX6jk/Xm3NUQOBgtfOtmZDwIxAGmMQE6BAo=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=Jg2VLdGTLMRQ7RhwW9gn1Jy1X8JH6Z8aT671f8iE6D8OAHwgcWP+oduJQ3oN9iNzwNlVMhGQdjb7Nu5YLQiDVkDwU2P8yws5aulBM+Wull1NWpP4ZY7lcnW+YVAYF7UIrFPVsebCntwIY5S9FmEJHfr6DLAXW3EeMhKHQR8VnLE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail.loongson.cn ([114.242.206.163]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOeeH-0004sW-Fi for gcc-patches@gcc.gnu.org; Sat, 13 Jan 2024 09:06:11 -0500 Received: from loongson.cn (unknown [117.129.62.51]) by gateway (Coremail) with SMTP id _____8DxvuvFmKJlFtIEAA--.13827S3; Sat, 13 Jan 2024 22:05:58 +0800 (CST) Received: from [192.168.2.109] (unknown [117.129.62.51]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxPN7EmKJlLaYZAA--.591S3; Sat, 13 Jan 2024 22:05:57 +0800 (CST) Subject: Re: [PATCH v2 2/2] LoongArch: When the code model is extreme, the symbol address is obtained through macro instructions regardless of the value of -mexplicit-relocs. To: Xi Ruoyao , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn References: <20240105034021.30177-1-chenglulu@loongson.cn> <20240105034021.30177-3-chenglulu@loongson.cn> <0fe0f370-a593-d060-d260-0e190986f833@loongson.cn> <4cdfda6960e75ccc6ccea6263ac02e79c9dba572.camel@xry111.site> <74482b5cbfef5a9d07185cd63430b3907fb389d1.camel@xry111.site> <7808ffa81093a41202b1a5c3cf12b76482741b1e.camel@xry111.site> <16929185-d182-c1d9-ba81-c8ce9dbe7eaf@loongson.cn> From: chenglulu Message-ID: <8979f716-050a-6827-deba-3f89dc555fc1@loongson.cn> Date: Sat, 13 Jan 2024 22:05:56 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID:AQAAf8BxPN7EmKJlLaYZAA--.591S3 X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBj93XoW7Kr15Wr13Zw18Wr17AF43urX_yoW8ZrWUpa s7A3W3KFZ5Ary0kw1Iq3W7tryYyr4Dtw15uFyDGFyrXwn0yry2q3sa9a4q9F9rW3WkGr13 ZFWaya4fZFs8uagCm3ZEXasCq-sJn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUU92b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4j6r4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc 02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUXVWUAwAv7VC2z280aVAF wI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMxk0xIA0c2IEe2xFo4 CEbIxvr21l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAF wI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zV AF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4l IxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCw CI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVF xhVjvjDU0xZFpf9x07UNvtZUUUUU= Received-SPF: pass client-ip=114.242.206.163; envelope-from=chenglulu@loongson.cn; helo=mail.loongson.cn X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9,NICE_REPLY_A=-0.821,SPF_HELO_NONE=0.001,SPF_PASS=-0.001,T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,BODY_8BITS,KAM_DMARC_STATUS,LIKELY_SPAM_BODY,NICE_REPLY_A,SPF_FAIL,SPF_HELO_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 在 2024/1/13 下午9:05, Xi Ruoyao 写道: > 在 2024-01-13星期六的 15:01 +0800,chenglulu写道: >> 在 2024/1/12 下午7:42, Xi Ruoyao 写道: >>> 在 2024-01-12星期五的 09:46 +0800,chenglulu写道: >>> >>>>> I found an issue bootstrapping GCC with -mcmodel=extreme in BOOT_CFLAGS: >>>>> we need a target hook to tell the generic code >>>>> UNSPEC_LA_PCREL_64_PART{1,2} are just a wrapper around symbols, or we'll >>>>> see millions lines of messages like >>>>> >>>>> ../../gcc/gcc/tree.h:4171:1: note: non-delegitimized UNSPEC >>>>> UNSPEC_LA_PCREL_64_PART1 (42) found in variable location >>>> I build GCC with -mcmodel=extreme in BOOT_CFLAGS, but I haven't reproduced the problem you mentioned. >>>> >>>>      $ ../configure --host=loongarch64-linux-gnu --target=loongarch64-linux-gnu --build=loongarch64-linux-gnu \ >>>>          --with-arch=loongarch64 --with-abi=lp64d --enable-tls --enable-languages=c,c++,fortran,lto --enable-plugin \ >>>>          --disable-multilib --disable-host-shared --enable-bootstrap --enable-checking=release >>>>      $ make BOOT_FLAGS="-mcmodel=extreme" >>>> >>>> What did I do wrong?:-( >>> BOOT_CFLAGS, not BOOT_FLAGS :). >>> >> This is so strange. My compilation here stopped due to syntax problems, >> >> and I still haven't reproduced the information you mentioned about >> UNSPEC_LA_PCREL_64_PART1. > I used: > > ../gcc/configure --with-system-zlib --disable-fixincludes \ > --enable-default-ssp --enable-default-pie \ > --disable-werror --disable-multilib \ > --prefix=/home/xry111/gcc-dev > > and then > > make STAGE1_{C,CXX}FLAGS="-O2 -g" -j8 \ > BOOT_{C,CXX}FLAGS="-O2 -g -mcmodel=extreme" &| tee gcc-build.log > > I guess "-g" is needed to reproduce the issue as well as the messages > were produced in dwarf generation. Oh, okay, I'll try this method!:-) >