From patchwork Mon Jul 4 08:55:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Bernabeu X-Patchwork-Id: 1651874 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lc05h2GKsz9sFs for ; Mon, 4 Jul 2022 18:56:06 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 11B2640948; Mon, 4 Jul 2022 08:56:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 11B2640948 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tIPqPAQvg1M6; Mon, 4 Jul 2022 08:56:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id B793540936; Mon, 4 Jul 2022 08:56:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B793540936 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E1B1A1BF338 for ; Mon, 4 Jul 2022 08:55:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id CA5EC82443 for ; Mon, 4 Jul 2022 08:55:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org CA5EC82443 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GbfloKX7FICV for ; Mon, 4 Jul 2022 08:55:58 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 055F181A24 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by smtp1.osuosl.org (Postfix) with ESMTPS id 055F181A24 for ; Mon, 4 Jul 2022 08:55:57 +0000 (UTC) Received: by mail-wm1-x32d.google.com with SMTP id l40-20020a05600c1d2800b003a18adff308so5249708wms.5 for ; Mon, 04 Jul 2022 01:55:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O6mH0QsvxDEcmlrW/kHZKrEU/Jywz/EcwocHAalOrSo=; b=g2PPkWr1t1wD03oATc0TzIuuJFv6wJJWaiLR0oum6zJ3Jl1vHL/+B1pvlECx8PQbbZ QdEYmnFKF/vUGWgFOa9J7to81j2fBoal38ODQx6fsLdeE+mQ0WYcJ5AFMRs7wZ33/8+4 +ENI076cvieTGOvCr0+fo46szqXm3eijC1431ARJWXFZooUR49f4MMq4hME2vMHienLl ocrFxxSAqgJlLODuzE460DSOe2/MDX4b8ToQvW8OpBGolZLrJEwTdEYa3QM86aNRuH9W QbxmkZ5IxOINhZbK7Qem0NmTHIHQZQrqd9L1kjl/ohteym48AkGnjHqafcNJ2AyVuxCt NCAw== X-Gm-Message-State: AJIora/K2XjnyR+aNfL+c3dqT9Vy3juqRMqKgIRVKQWv8sCOdL/rs0NF M6LubKbNph5RAl+4CF1ztR//I4DMpM7pfQ== X-Google-Smtp-Source: AGRyM1uo8XipbhgvQffEG2AmQnlvIPyUsmngEo2q5SuFKgwWxmBqMbhThwBjMNuhBxKj0x3atS6JwA== X-Received: by 2002:a7b:cb58:0:b0:3a2:aefb:a4b with SMTP id v24-20020a7bcb58000000b003a2aefb0a4bmr2777305wmj.84.1656924956064; Mon, 04 Jul 2022 01:55:56 -0700 (PDT) Received: from jupiter.home (14.5.23.95.dynamic.jazztel.es. [95.23.5.14]) by smtp.gmail.com with ESMTPSA id f18-20020adff992000000b0021b9416fa13sm6624967wrr.90.2022.07.04.01.55.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 01:55:55 -0700 (PDT) From: Abel Bernabeu To: buildroot@buildroot.org Date: Mon, 4 Jul 2022 10:55:51 +0200 Message-Id: <20220704085552.3499243-1-abel@x-silicon.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=x-silicon-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O6mH0QsvxDEcmlrW/kHZKrEU/Jywz/EcwocHAalOrSo=; b=nkCOK07bhtqQtzoVghaWQcN0ne3owsulbJj8EAA2Cdly3RGpbUfL5B0GC0PY8UKmOe Qs8iePtSRExcjFZNu7sPKnk2ObeO7dcfEZG1kULW8jamyWNL00UzWA/Hlevb0ZdpL9KQ wW3xPLm9Ksp4sF7TnNZ8IWv38fd6MdFEBskdDm+x74UlsW4gREXl2seUERInOiwCudQP kCmdEAWMNXe2Y2UxH0NOymSxCmLmjKc04G/ea1OQuaH40PU3pC8y22nKINzfFg0OtMot gGPYqbCH/uyxo0LFDBK7tfPS15ybuAaFi4DqTmzvGIV3CqssCkHe5cKkjMM3yuGzbigr Cs4A== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=x-silicon-com.20210112.gappssmtp.com header.i=@x-silicon-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=nkCOK07b Subject: [Buildroot] [PATCH 1/2] package/llvm: Support for RISC-V on the LLVM package X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joseph Kogut , Romain Naour , Mark Corbin , Abel Bernabeu , Valentin Korenblit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" The initial support for the LLVM package did not include RISC-V, and needed to be added. There is a new configuration parameter added (BR2_PACKAGE_LLVM_TARGETS_TO_BUILD) for dealing with the fact that the LLVM target and the architecture have different naming for RISC-V. While the target for RISC-V is "RISCV" irrespective of the ISA being 32 or 64 bits, the architecture does contain the number of bits leading to "riscv32" and "riscv64". For previously supported architectures the naming for target and architecture matched and thus this parameter had not been needed, but it is now needed for RISC-V. Signed-off-by: Abel Bernabeu Reviewed-by: Romain Naour --- package/llvm/Config.in | 10 ++++++++++ package/llvm/llvm.mk | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package/llvm/Config.in b/package/llvm/Config.in index c1887e36dd..5f2864b802 100644 --- a/package/llvm/Config.in +++ b/package/llvm/Config.in @@ -4,12 +4,22 @@ config BR2_PACKAGE_LLVM_ARCH_SUPPORTS default y if BR2_x86_64 default y if BR2_aarch64 default y if BR2_arm || BR2_armeb + default y if BR2_riscv config BR2_PACKAGE_LLVM_TARGET_ARCH string default "AArch64" if BR2_aarch64 default "ARM" if BR2_arm || BR2_armeb default "X86" if BR2_i386 || BR2_x86_64 + default "riscv32" if BR2_riscv && !BR2_ARCH_IS_64 + default "riscv64" if BR2_riscv && BR2_ARCH_IS_64 + +config BR2_PACKAGE_LLVM_TARGETS_TO_BUILD + string + default "AArch64" if BR2_aarch64 + default "ARM" if BR2_arm || BR2_armeb + default "X86" if BR2_i386 || BR2_x86_64 + default "RISCV" if BR2_riscv config BR2_PACKAGE_LLVM bool "llvm" diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk index 4670773ca3..dbf1f7b813 100644 --- a/package/llvm/llvm.mk +++ b/package/llvm/llvm.mk @@ -42,7 +42,7 @@ HOST_LLVM_CONF_OPTS += -DCMAKE_INSTALL_RPATH="$(HOST_DIR)/lib" LLVM_TARGET_ARCH = $(call qstrip,$(BR2_PACKAGE_LLVM_TARGET_ARCH)) # Build backend for target architecture. This include backends like AMDGPU. -LLVM_TARGETS_TO_BUILD = $(LLVM_TARGET_ARCH) +LLVM_TARGETS_TO_BUILD = $(BR2_PACKAGE_LLVM_TARGETS_TO_BUILD) HOST_LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD="$(subst $(space),;,$(LLVM_TARGETS_TO_BUILD))" LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD="$(subst $(space),;,$(LLVM_TARGETS_TO_BUILD))" From patchwork Mon Jul 4 08:55:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Bernabeu X-Patchwork-Id: 1651875 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lc05v4PsJz9sFs for ; Mon, 4 Jul 2022 18:56:19 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id CD3B260D77; Mon, 4 Jul 2022 08:56:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org CD3B260D77 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ikagNUmMqYCp; Mon, 4 Jul 2022 08:56:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id E229860D8C; Mon, 4 Jul 2022 08:56:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E229860D8C X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E3B371BF338 for ; Mon, 4 Jul 2022 08:56:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id BD62E82443 for ; Mon, 4 Jul 2022 08:56:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org BD62E82443 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PCHZh5pHgWHu for ; Mon, 4 Jul 2022 08:56:02 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 261EB81A24 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by smtp1.osuosl.org (Postfix) with ESMTPS id 261EB81A24 for ; Mon, 4 Jul 2022 08:56:02 +0000 (UTC) Received: by mail-wr1-x436.google.com with SMTP id z12so2835173wrq.7 for ; Mon, 04 Jul 2022 01:56:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XEcwkc6CukaKyaQvKEoM2mjWb0wdqLDUqxUGanRWMZ8=; b=XgkuiW9Npzr/hNrHSDuuSEm7r7ISKDEjMFMuwIE2cSwWQSjAK/kYzg1ilENjYh+qaJ qtvVVYArJmQHCqdD+Hqw+hj1yGy+uCh6aM2Tyi+38x4EcQspunQ+j2BxfaejAC12lEZ4 QXjWv9tTQcXGEw03n5rle/DYk/xd82ZvdP3AHQJLUfkj1yqKEHylVWti1ZSsFWILRYVB JIpv2tiPMpvzYJVVQVMn25dloevJTeD9OHlkA7ofpJJxrRC1o0czQg0c7y6LlIlCRzmU bfq3GFYJjjmjANlW8comviPzADfAY4HtrICQgBQ74CO9pV3zo3f4wywQFU3QrGfgVPaz D/jg== X-Gm-Message-State: AJIora8VolgmpEdXBlgrrzwy1otzObjurDY0k9bL2jvd92u2g6vIVDH1 ff6TsE/olg/vMXLAT8G7PtgILCqkC9pv8g== X-Google-Smtp-Source: AGRyM1sxyPSmP72XR3epU7NkqzS45AIaHLj4G9xy+TGctelB5WmV7nEuGtmqVN+b38qRKAMMEwy2hw== X-Received: by 2002:a5d:484c:0:b0:21d:6c71:a053 with SMTP id n12-20020a5d484c000000b0021d6c71a053mr2263698wrs.449.1656924960233; Mon, 04 Jul 2022 01:56:00 -0700 (PDT) Received: from jupiter.home (14.5.23.95.dynamic.jazztel.es. [95.23.5.14]) by smtp.gmail.com with ESMTPSA id f18-20020adff992000000b0021b9416fa13sm6624967wrr.90.2022.07.04.01.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 01:55:59 -0700 (PDT) From: Abel Bernabeu To: buildroot@buildroot.org Date: Mon, 4 Jul 2022 10:55:52 +0200 Message-Id: <20220704085552.3499243-2-abel@x-silicon.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220704085552.3499243-1-abel@x-silicon.com> References: <20220704085552.3499243-1-abel@x-silicon.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=x-silicon-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XEcwkc6CukaKyaQvKEoM2mjWb0wdqLDUqxUGanRWMZ8=; b=QiujlS33dv9ISRHM1xlKOnxnNKcSdC9l9NvCw1V01Kp6hpIbo/FmAqVs/e2NmQJRL0 przYfTuHdR2ww1RIHEZ117g9+f+/CMGD6f2rcJ9odwlutTpeodwTiT45aJ+jYYBAcWNi HVoIUoznkZyFC0iLpOITK6JLo4qvYK9HyqCWGRin9dn7hpoChYjM479CgOjoM9YEELQT uc2DbHRpsLdJ/B0gwLkh0ix4Z8vPLSjo40UTs/Y88GohU9d01rpmilg5ePuYzWTkDtQt Y58RxlleScmvkvFvLrCq1n3aegVveS88WLmZHiyanZ3DGLOSAzQvI/h32A/NRjifWn41 aMgg== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=x-silicon-com.20210112.gappssmtp.com header.i=@x-silicon-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=QiujlS33 Subject: [Buildroot] [PATCH 2/2] arch/riscv: Added support for RISC-V vector extension on the architecture menu. X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joseph Kogut , Romain Naour , Mark Corbin , Abel Bernabeu , Valentin Korenblit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This new setting will allow to test new toolchains already available that support the vector extension (more patches coming soon). Signed-off-by: Abel Bernabeu --- arch/Config.in.riscv | 7 +++++++ arch/arch.mk.riscv | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/arch/Config.in.riscv b/arch/Config.in.riscv index 288ed833eb..e4dc936cf8 100644 --- a/arch/Config.in.riscv +++ b/arch/Config.in.riscv @@ -18,6 +18,9 @@ config BR2_RISCV_ISA_RVD config BR2_RISCV_ISA_RVC bool +config BR2_RISCV_ISA_RVV + bool + choice prompt "Target Architecture Variant" default BR2_riscv_g @@ -63,6 +66,10 @@ config BR2_RISCV_ISA_CUSTOM_RVD config BR2_RISCV_ISA_CUSTOM_RVC bool "Compressed Instructions (C)" select BR2_RISCV_ISA_RVC + +config BR2_RISCV_ISA_CUSTOM_RVV + bool "Vector Instructions (V)" + select BR2_RISCV_ISA_RVV endif choice diff --git a/arch/arch.mk.riscv b/arch/arch.mk.riscv index f3bf2b3467..07a94aa6a4 100644 --- a/arch/arch.mk.riscv +++ b/arch/arch.mk.riscv @@ -26,5 +26,9 @@ endif ifeq ($(BR2_RISCV_ISA_RVC),y) GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)c endif +ifeq ($(BR2_RISCV_ISA_RVV),y) +GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)v +endif + endif