From patchwork Mon Oct 10 13:14:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 1865 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1576279wrs; Mon, 10 Oct 2022 06:15:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Dq08b+/DqNQKjE5ibrBHa0HcXs51KAL6Fm0P02R+bOVkgxNym1p2l5kz0pyvklYulrnZQ X-Received: by 2002:a05:6402:406:b0:458:a47:d14c with SMTP id q6-20020a056402040600b004580a47d14cmr17622321edv.41.1665407745748; Mon, 10 Oct 2022 06:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665407745; cv=none; d=google.com; s=arc-20160816; b=CT3ng5PfTauCsgELLIZS68AT1U8rxeujbCH7Wb6Aj2QwJ2iViHKBGHvyLg4vXfd2Zi pVKc3kWo1fBjzUP12AzT+4QTNJIsizpTVDXcfLwiOs5l+6i8Ws+OztUpC03I636dsC90 QgVEMpEpRQYk6SEnJEQYC0GR3VzZd1Q4m6rEV16KmcmdGq6xdlvP6hFDrWPwbnl2GcPU l8rUd7wf+mU++GwTNZ4MLOUJURWZXTJ6cgsYZZJlIN4rofp66rlhIjFwdGt3M7BqhcMP Yq+78fNfeM72dym63RJISTDDktMvWSuBs1YaWm0HsXa8bIsJdPYc44E391yi9nbW7vxW xQ2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :dmarc-filter:delivered-to; bh=0fjWAm8DaUJ4x+smlMH+W/G3Vi8k1f74z16RpR4OvLg=; b=ma2ZWWed/G5mjg0+vgwWcAZOVJZkskfegGTch6NZPmFjl0XYt4tGWcwYHvjahqOIUj LyK+eXFD0FPCpGBIZhe4LFPDfEGn+FZOn1uvun7nR/HIgJgHNdayYP5eIy4JshCvG4UJ iDV1PJ4cgCyv6TatD6jguO9UUedujKZJbErImkjkMEZ1ZJSFg2yV2S90u15BHSXAqO2U KU3anKi7EC5JsQdHU5CoD1Cm+F7uf2ugv6oyJLq74bd9ybejrHIXxubc9S1lx4SFX7kn TnpxUZBWTkInB2bNEkCPzkTF9LNJzLeYxTAhUpi5pCsz05dG7JzD3dbrX1o4V8dwxtVs FEsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=bc6hGrj+; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id e15-20020a17090658cf00b0078db371355esi4027970ejs.987.2022.10.10.06.15.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 06:15:45 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=bc6hGrj+; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9F4D2385414E for ; Mon, 10 Oct 2022 13:15:18 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 402A3385AE5F for ; Mon, 10 Oct 2022 13:14:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 402A3385AE5F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pf1-x42f.google.com with SMTP id y8so10704850pfp.13 for ; Mon, 10 Oct 2022 06:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0fjWAm8DaUJ4x+smlMH+W/G3Vi8k1f74z16RpR4OvLg=; b=bc6hGrj+KVj7THCFnskVmbiK/YOeOG7O+DITzFzU+DEijK5szMmpxPIxNYEfh87x2X WnXLSe0Kivq0gNgAsVKaEL6mf/FDASkyt1mRn8yIiDauSU+CvSaFaml/nP07U3DPfKVk XIahjcct6PjA6XRCyJSSdq9S2in2g1PR5yo3yM+ZkxcdSZuf3VY+xEFLD1VUUMAczuC8 6ZY8nwZJ6yEmYjGUpevAY2avoE99bqNFLwqfXbGRG2lWguhzrdI6swt0lWBKMDmET2yy 2msQdzRMH782ygynGTIWKXC2LeQbOHqbgXovkTbKCuDadMzGVLA/9GmCXKDS87qAt6Uu JyPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0fjWAm8DaUJ4x+smlMH+W/G3Vi8k1f74z16RpR4OvLg=; b=pGla/I+JVsw3TeOBgJKC6pu3HzcESseH+Izs4OP44Rb6288zLHBjnnEJRUjtJkQCVJ VLdmOo5ySTZUUdb2aD6SyCjUF0lNwLZm9XWmSDFZEmmMFtmB13XrPNlZYSL0q2SOTx1n n+Iw29R0xYOvTxrudjuA6y4foDnCkq8OH1dSbWrTQLv15ece1dHXxWLXtz4SvHueouAa GjNL88vyfIfsPKwU7jG9tq/wZDPq07NuvsogtmZ1zHpAJK+HwU8AKrJXVmO0+ZSHGk3w YP0PirxZhSjwj1NeF9StpdqQOQLyNT/iftS34b0ohSFQP5fpc/MZWK0PeQcIboJ3YhIS MRtg== X-Gm-Message-State: ACrzQf2+ecKRdgxYHCKPftSwXhzi4E9Gp5F0Kvs6ggeF1AbABhcRvJYD YcubdsMvyVHmGZWtdb8ADRYcRuw/hH8Os0qLiQxoRobgrGtPGJm7/xePxQBd6rlDcEBciIY0wAV Q7Q8qex496BHL7CHD3tAFeNXcT8OVkFGgNY/9Hx8+RtYVPfryxQDOXqMEwmYgc8O8pZrIHOseMA == X-Received: by 2002:a05:6a00:14ce:b0:544:1ec7:2567 with SMTP id w14-20020a056a0014ce00b005441ec72567mr19301189pfu.24.1665407681586; Mon, 10 Oct 2022 06:14:41 -0700 (PDT) Received: from hsinchu02.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id u1-20020a17090ae00100b0020a7d076bfesm6119938pjy.2.2022.10.10.06.14.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 06:14:40 -0700 (PDT) From: Kito Cheng To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, christoph.muellner@vrull.eu, juzhe.zhong@rivai.ai Subject: [committed] RISC-V: Add riscv_vector.h wrapper in testsuite to prevent pull in stdint.h from C library Date: Mon, 10 Oct 2022 21:14:36 +0800 Message-Id: <20221010131436.13678-1-kito.cheng@sifive.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: , Cc: Kito Cheng Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746306592583976395?= X-GMAIL-MSGID: =?utf-8?q?1746306592583976395?= For RISC-V linux/glibc toolchain will got header file not found when including stdint.h if multilib is not enabled, it because some header file will try to include gnu/stubs-.h from the system, however it only generated when multilib enabled. In order to prevent that, we introduce a wrapper for riscv_vector.h, include stdint-gcc.h rather than the default stdint.h. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/riscv_vector.h: New. Reported-by: Christoph Müllner Tested-by: Christoph Müllner Reviewed-by: Ju-Zhe Zhong Reported-by: Christoph Müllner Tested-by: Christoph Müllner Reviewed-by: Ju-Zhe Zhong --- .../gcc.target/riscv/rvv/base/riscv_vector.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/base/riscv_vector.h diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/riscv_vector.h b/gcc/testsuite/gcc.target/riscv/rvv/base/riscv_vector.h new file mode 100644 index 00000000000..fbb4858fc86 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/riscv_vector.h @@ -0,0 +1,11 @@ +/* Wrapper of riscv_vector.h, prevent riscv_vector.h including stdint.h from + C library, that might cause problem on testing RV32 related testcase when + we disable multilib. */ +#ifndef _RISCV_VECTOR_WRAP_H + +#define _GCC_WRAP_STDINT_H +#include "stdint-gcc.h" +#include_next +#define _RISCV_VECTOR_WRAP_H + +#endif