Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp919259rdb; Fri, 20 Oct 2023 03:28:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEuRHtHFrmC5evpzmBSVZM2/CD18gB+ft4LhTIS7Pn7uuoNimAgPu3ZGN+s7v7c5yUxQt/e X-Received: by 2002:aca:1c03:0:b0:3a9:bc8d:42ed with SMTP id c3-20020aca1c03000000b003a9bc8d42edmr1256404oic.43.1697797706400; Fri, 20 Oct 2023 03:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697797706; cv=none; d=google.com; s=arc-20160816; b=RuaMUkaZOFv3n+SEhW/BfppHucqZvNg6a+TpPCwYHPftlIUWa6Qm1yYny8/T4yKyn9 8Jc3nXrshx5++0tnNkO03OjaG1imgjEYDxDqAndwL4oKAlKxkKWErronjinJ+edO8Wmy 69xTdLeJZ0VdmkEHxXkjl4sphslQbIxjKgJzJVRaylvTl6DYxyfafGq1RWtOhH9hK3it hfHgR6U6bUpC00RINw+6ZsFhNThsgoh1qznItfVb05imol0VT6dS3v7deBb8BjxP3B8G SjPhVplqivseGVJnJgwPyhoBeHUnl/UJl41RO1reFvUm46Bo01eNJZzblDB5qpL7nGNP oWPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=GNzTg2NBik6I2d8D4EH9EDe/rlEtbwgoSjwpv4Zo7Vk=; fh=xbGOVd4X85p9xvztE4zunqcDz5C3Pl3rOX0JSYsO3T4=; b=uma6BJQle0qGLzVbTp/41lLFcn1yTcgMwnBaCnlMcJ6EGGUNPsQkKCCP592EYLg/AO xYfX2FZMO8+7QAKkRT6kIVGcdhp/FmNC9QgtkZP8dotCenifd1syRtOD0g/MW+CaJV04 p7m0AtUfY3MsyzX4Pje/JuauKMaZrFhMXuksVAoOAUEvASgFDciOPpsfMq0BCiHQrs2u 5iKoUrWhPQ+fmstnz4iCZLYRiOpf3+Ob7Lm4FxhygaKPX8DBfNfYrQClAD29HmbAM8Nl iiQLNYv6I2NDnM2HLhDG+dHCxSerd6OzT8qY44AX9bZKlI7fGTBOgSlx6M75IQ2pfi3j 2geQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id z126-20020a633384000000b0057c2f61474asi1587989pgz.290.2023.10.20.03.28.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 03:28:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A58B083BB7F3; Fri, 20 Oct 2023 03:28:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376794AbjJTK2Q (ORCPT + 99 others); Fri, 20 Oct 2023 06:28:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376715AbjJTK2O (ORCPT ); Fri, 20 Oct 2023 06:28:14 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1C5DDB8 for ; Fri, 20 Oct 2023 03:28:09 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8CxyOg3VjJlFnMzAA--.64000S3; Fri, 20 Oct 2023 18:28:07 +0800 (CST) Received: from [10.130.0.149] (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxH90zVjJlvzssAA--.30051S3; Fri, 20 Oct 2023 18:28:04 +0800 (CST) Subject: Re: [PATCH v3 0/8] Add objtool and orc support for LoongArch To: Huacai Chen References: <1697768821-22931-1-git-send-email-yangtiezhu@loongson.cn> Cc: Josh Poimboeuf , Peter Zijlstra , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn From: Tiezhu Yang Message-ID: Date: Fri, 20 Oct 2023 18:28:03 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf8AxH90zVjJlvzssAA--.30051S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoW7AF48Zry3tFW5JrWDGFWDWrX_yoW8Aw1DpF sFvrW2grWDW3sYy34kG3W0g34vvF1IkryYqFykGFWUArZ5Ary0qa97JFykZF17X3Z0va1Y 934Igr15WF17AagCm3ZEXasCq-sJn29KB7ZKAUJUUUU7529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUPqb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07 AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWU AVWUtwAv7VC2z280aVAFwI0_Cr0_Gr1UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwI xGrwCYjI0SjxkI62AI1cAE67vIY487MxkF7I0En4kS14v26r126r1DMxAIw28IcxkI7VAK I48JMxC20s026xCaFVCjc4AY6r1j6r4UMxCIbckI1I0E14v26r1Y6r17MI8I3I0E5I8CrV AFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCI c40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267 AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Cr0_ Gr1UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07j0pB -UUUUU= X-Spam-Status: No, score=-4.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 20 Oct 2023 03:28:23 -0700 (PDT) On 10/20/2023 04:51 PM, Huacai Chen wrote: > Cross compiling on X86 for LoongArch fails: > > CALL scripts/checksyscalls.sh > DESCEND objtool > make[5]: *** No rule to make target > '/usr/lib/gcc/x86_64-redhat-linux/8/include/stdbool.h', needed by > '/home/chenhuacai/linux-official.git/tools/objtool/libsubcmd/exec-cmd.o'. > Stop. > make[4]: *** [Makefile:80: > /home/chenhuacai/linux-official.git/tools/objtool/libsubcmd/libsubcmd-in.o] > Error 2 > make[3]: *** [Makefile:82: > /home/chenhuacai/linux-official.git/tools/objtool/libsubcmd/libsubcmd.a] > Error 2 > make[2]: *** [Makefile:73: objtool] Error 2 > make[1]: *** [/home/chenhuacai/linux-official.git/Makefile:1355: > tools/objtool] Error 2 > make: *** [Makefile:234: __sub-make] Error 2 It seems that there is no stdbool.h in your cross compile environment. It works well with the following steps, you can try it. wget https://github.com/loongson/build-tools/releases/download/2023.08.08/x86_64-cross-tools-loongarch64-gcc-libc.tar.xz tar xf x86_64-cross-tools-loongarch64-gcc-libc.tar.xz -C /opt export PATH=/opt/cross-tools/bin/:$PATH export LD_LIBRARY_PATH=/opt/cross-tools/loongarch64-unknown-linux-gnu/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/opt/cross-tools/lib:$LD_LIBRARY_PATH export CROSS_COMPILE=loongarch64-unknown-linux-gnu- export ARCH=loongarch find /opt -name stdbool.h /opt/cross-tools/lib/gcc/loongarch64-unknown-linux-gnu/14.0.0/include/stdbool.h /opt/cross-tools/loongarch64-unknown-linux-gnu/include/c++/14.0.0/tr1/stdbool.h cd linux.git make loongson3_defconfig make menuconfig # select CONFIG_UNWINDER_ORC make -j4 Thanks, Tiezhu