* [Buildroot] [PATCH] package/libclc: switch to using LLVM's monorepo
@ 2021-01-09 10:33 Yann E. MORIN
2021-01-09 11:25 ` Romain Naour
0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2021-01-09 10:33 UTC (permalink / raw)
To: buildroot
The LLVM project has switched to using a monorepo to host all their
components. The separate, individual repositories have been closed
late 2020 / early 2021. The libclc repository is no longer.
Switch to using the libclc source from the llvm monorepo; switch to
using the github helper, to avoid a huge git clone (still 115MiB
instead of the previous 172KiB...).
Finding the corresponding commit was made easy because the commit
logs embed a reference to the svn revision the git commit is made
from (and comparing with a local git clone of the previous repo).
Adapt the build commands and license location accordingly; switch
to the new, two-space separator in the hash file.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Valentin Korenblit <valentinkorenblit@gmail.com>
Cc: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
package/libclc/libclc.hash | 4 ++--
package/libclc/libclc.mk | 15 +++++++--------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/package/libclc/libclc.hash b/package/libclc/libclc.hash
index 29728fbc76..f685fe7354 100644
--- a/package/libclc/libclc.hash
+++ b/package/libclc/libclc.hash
@@ -1,3 +1,3 @@
# locally calculated
-sha256 5ea2cd2fa7fa1474d3e0580064e7a22014ef8d64dbbd7c546277fa4beb5acf86 libclc-d1cbc92e2ceee59963f5c3a576382e5bba31f060.tar.gz
-sha256 3c536c052db9afd997809e38785c9f2a9e54e2892330fa7c5b438e18a7413479 LICENSE.TXT
+sha256 b025a5fb23c78deee144e4a7fee76bedca46e327d99695484a2a2cbf7f2192f9 libclc-2abbe2f09119ccad8ad96841ea4632a9c8a8f04d.tar.gz
+sha256 3c536c052db9afd997809e38785c9f2a9e54e2892330fa7c5b438e18a7413479 libclc/LICENSE.TXT
diff --git a/package/libclc/libclc.mk b/package/libclc/libclc.mk
index 630616905c..e2b20695b2 100644
--- a/package/libclc/libclc.mk
+++ b/package/libclc/libclc.mk
@@ -5,11 +5,10 @@
################################################################################
# Use the latest commit from release_90 branch.
-LIBCLC_VERSION = d1cbc92e2ceee59963f5c3a576382e5bba31f060
-LIBCLC_SITE = https://git.llvm.org/git/libclc
-LIBCLC_SITE_METHOD = git
+LIBCLC_VERSION = 2abbe2f09119ccad8ad96841ea4632a9c8a8f04d
+LIBCLC_SITE = $(call github,llvm,llvm-project,$(LIBCLC_VERSION))
LIBCLC_LICENSE = Apache-2.0 with exceptions or MIT
-LIBCLC_LICENSE_FILES = LICENSE.TXT
+LIBCLC_LICENSE_FILES = libclc/LICENSE.TXT
LIBCLC_DEPENDENCIES = host-clang host-llvm
LIBCLC_INSTALL_STAGING = YES
@@ -28,19 +27,19 @@ LIBCLC_CONF_OPTS = \
--with-cxx-compiler=$(HOSTCXX_NOCCACHE)
define LIBCLC_CONFIGURE_CMDS
- (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS))
+ cd $(@D)/libclc && $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS)
endef
define LIBCLC_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc
endef
define LIBCLC_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc DESTDIR=$(TARGET_DIR) install
endef
define LIBCLC_INSTALL_STAGING_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc DESTDIR=$(STAGING_DIR) install
endef
$(eval $(generic-package))
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/libclc: switch to using LLVM's monorepo
2021-01-09 10:33 [Buildroot] [PATCH] package/libclc: switch to using LLVM's monorepo Yann E. MORIN
@ 2021-01-09 11:25 ` Romain Naour
2021-01-09 13:25 ` Yann E. MORIN
0 siblings, 1 reply; 3+ messages in thread
From: Romain Naour @ 2021-01-09 11:25 UTC (permalink / raw)
To: buildroot
Hello Yann,
Le 09/01/2021 ? 11:33, Yann E. MORIN a ?crit?:
> The LLVM project has switched to using a monorepo to host all their
> components. The separate, individual repositories have been closed
> late 2020 / early 2021. The libclc repository is no longer.
>
> Switch to using the libclc source from the llvm monorepo; switch to
> using the github helper, to avoid a huge git clone (still 115MiB
> instead of the previous 172KiB...).
I didn't noticed that the repository is no longer available because I'm using a
mirror locally: https://github.com/llvm-mirror/libclc.git
If we really care about thee download size, maybe we can use the mirror before
updating to llvm 11.0 that's the first release providing an archive for libclc:
https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/libclc-11.0.0.src.tar.xz
Otherwise ok for me.
>
> Finding the corresponding commit was made easy because the commit
> logs embed a reference to the svn revision the git commit is made
> from (and comparing with a local git clone of the previous repo).
>
> Adapt the build commands and license location accordingly; switch
> to the new, two-space separator in the hash file.
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Romain Naour <romain.naour@gmail.com>
> Cc: Valentin Korenblit <valentinkorenblit@gmail.com>
> Cc: Michael Opdenacker <michael.opdenacker@bootlin.com>
> ---
> package/libclc/libclc.hash | 4 ++--
> package/libclc/libclc.mk | 15 +++++++--------
> 2 files changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/package/libclc/libclc.hash b/package/libclc/libclc.hash
> index 29728fbc76..f685fe7354 100644
> --- a/package/libclc/libclc.hash
> +++ b/package/libclc/libclc.hash
> @@ -1,3 +1,3 @@
> # locally calculated
> -sha256 5ea2cd2fa7fa1474d3e0580064e7a22014ef8d64dbbd7c546277fa4beb5acf86 libclc-d1cbc92e2ceee59963f5c3a576382e5bba31f060.tar.gz
> -sha256 3c536c052db9afd997809e38785c9f2a9e54e2892330fa7c5b438e18a7413479 LICENSE.TXT
> +sha256 b025a5fb23c78deee144e4a7fee76bedca46e327d99695484a2a2cbf7f2192f9 libclc-2abbe2f09119ccad8ad96841ea4632a9c8a8f04d.tar.gz
> +sha256 3c536c052db9afd997809e38785c9f2a9e54e2892330fa7c5b438e18a7413479 libclc/LICENSE.TXT
> diff --git a/package/libclc/libclc.mk b/package/libclc/libclc.mk
> index 630616905c..e2b20695b2 100644
> --- a/package/libclc/libclc.mk
> +++ b/package/libclc/libclc.mk
> @@ -5,11 +5,10 @@
> ################################################################################
>
> # Use the latest commit from release_90 branch.
> -LIBCLC_VERSION = d1cbc92e2ceee59963f5c3a576382e5bba31f060
> -LIBCLC_SITE = https://git.llvm.org/git/libclc
> -LIBCLC_SITE_METHOD = git
> +LIBCLC_VERSION = 2abbe2f09119ccad8ad96841ea4632a9c8a8f04d
> +LIBCLC_SITE = $(call github,llvm,llvm-project,$(LIBCLC_VERSION))
> LIBCLC_LICENSE = Apache-2.0 with exceptions or MIT
> -LIBCLC_LICENSE_FILES = LICENSE.TXT
> +LIBCLC_LICENSE_FILES = libclc/LICENSE.TXT
>
> LIBCLC_DEPENDENCIES = host-clang host-llvm
> LIBCLC_INSTALL_STAGING = YES
> @@ -28,19 +27,19 @@ LIBCLC_CONF_OPTS = \
> --with-cxx-compiler=$(HOSTCXX_NOCCACHE)
>
> define LIBCLC_CONFIGURE_CMDS
> - (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS))
> + cd $(@D)/libclc && $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS)
Here you're removing the sub-shell but it's used for most other packages.
Best regards,
Romain
> endef
>
> define LIBCLC_BUILD_CMDS
> - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc
> endef
>
> define LIBCLC_INSTALL_TARGET_CMDS
> - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc DESTDIR=$(TARGET_DIR) install
> endef
>
> define LIBCLC_INSTALL_STAGING_CMDS
> - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libclc DESTDIR=$(STAGING_DIR) install
> endef
>
> $(eval $(generic-package))
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/libclc: switch to using LLVM's monorepo
2021-01-09 11:25 ` Romain Naour
@ 2021-01-09 13:25 ` Yann E. MORIN
0 siblings, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2021-01-09 13:25 UTC (permalink / raw)
To: buildroot
Romain, All,
On 2021-01-09 12:25 +0100, Romain Naour spake thusly:
> Le 09/01/2021 ? 11:33, Yann E. MORIN a ?crit?:
> > The LLVM project has switched to using a monorepo to host all their
> > components. The separate, individual repositories have been closed
> > late 2020 / early 2021. The libclc repository is no longer.
> >
> > Switch to using the libclc source from the llvm monorepo; switch to
> > using the github helper, to avoid a huge git clone (still 115MiB
> > instead of the previous 172KiB...).
>
> I didn't noticed that the repository is no longer available because I'm using a
> mirror locally: https://github.com/llvm-mirror/libclc.git
Ah, but then we would be back to square one when we eventually want to
update the libclc version, which is not going to be available in that
legacy mirror, but only in the official llvm-project repo...
> If we really care about thee download size, maybe we can use the mirror before
> updating to llvm 11.0 that's the first release providing an archive for libclc:
> https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/libclc-11.0.0.src.tar.xz
I would say that if people are concerned about the download size, they
would have to go to the llvm project and whine there.
[--SNIP--]
> > @@ -28,19 +27,19 @@ LIBCLC_CONF_OPTS = \
> > --with-cxx-compiler=$(HOSTCXX_NOCCACHE)
> >
> > define LIBCLC_CONFIGURE_CMDS
> > - (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS))
> > + cd $(@D)/libclc && $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS)
>
> Here you're removing the sub-shell but it's used for most other packages.
The subshell is totally useless; it is an anti-pattern.
That most packages use it is not a reason to keep it; instead, we should
get rid of it.
Note: I know we have similar constructs in the infras; that's not good,
at all...
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-09 13:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-09 10:33 [Buildroot] [PATCH] package/libclc: switch to using LLVM's monorepo Yann E. MORIN
2021-01-09 11:25 ` Romain Naour
2021-01-09 13:25 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox