[PATCH 4/4] 5/llvm: Add LLVM as a package for RTEMS.
From: Chris Johns - Add '%source download ' to only download the source and do not unpack and prep. This can used when a package internally needs another source package. - Install the staging root only if it is present. A package may internally build another package that is not staged as it is not suitable for installing. Updates #3250 Updatew #3797 --- bare/config/devel/swig-4.0.1.cfg| 20 bare/config/devel/swig.bset | 19 +++ rtems/config/5/rtems-llvm.bset | 21 rtems/config/rtems-base.bset| 9 +- rtems/config/tools/rtems-llvm-8.0.1.cfg | 21 source-builder/config/llvm-common-1.cfg | 152 source-builder/config/swig-4-1.cfg | 97 +++ source-builder/defaults.mc | 3 +- source-builder/sb/build.py | 99 --- source-builder/sb/darwin.py | 1 + source-builder/sb/freebsd.py| 1 + source-builder/sb/options.py| 2 + source-builder/sb/setbuilder.py | 54 + source-builder/sb/sources.py| 27 +++-- 14 files changed, 451 insertions(+), 75 deletions(-) create mode 100644 bare/config/devel/swig-4.0.1.cfg create mode 100644 bare/config/devel/swig.bset create mode 100644 rtems/config/5/rtems-llvm.bset create mode 100644 rtems/config/tools/rtems-llvm-8.0.1.cfg create mode 100644 source-builder/config/llvm-common-1.cfg create mode 100644 source-builder/config/swig-4-1.cfg diff --git a/bare/config/devel/swig-4.0.1.cfg b/bare/config/devel/swig-4.0.1.cfg new file mode 100644 index 000..9352862 --- /dev/null +++ b/bare/config/devel/swig-4.0.1.cfg @@ -0,0 +1,20 @@ +# +# SWIG 4.0.1 +# + +%if %{release} == %{nil} +%define release 1 +%endif + +%include %{_configdir}/base.cfg + +%define swig_version 4.0.1 +%hash sha512 swig-rel-%{swig_version}.tar.gz AeegX9wtAHvY40gxQoEHXIx4RuQG4KpSopReBWwbsmhzfLSz8saStvixkhNgl+ZygHCgGqRFPQdQrArxLLQDSg== + +%define pcre_version 8.40 +%hash sha512 pcre-%{pcre_version}.tar.bz2 tMJ+r73zO9ehOEZVsZNvS+O8Z0XAcjR+sm6YiJbFJmS9haxCRE2hvni24g9Ftsflkh9fIPWwdBtb09mETlvU4g== + +# +# The SWIG build instructions. +# +%include %{_configdir}/swig-4-1.cfg diff --git a/bare/config/devel/swig.bset b/bare/config/devel/swig.bset new file mode 100644 index 000..c269f24 --- /dev/null +++ b/bare/config/devel/swig.bset @@ -0,0 +1,19 @@ +# +# Build set for SWIG +# + +%define release 1 + +# +# Name of the package. +# +package: swig-%{swig_version}-%{_host}-%{release} + +# +# A magic internal path that would break if changes in the defaults.mc +# macro file are made. +# +%define _internal_autotools_path %{_tmppath}/sb-%{_uid}/${SB_PREFIX_CLEAN} + +devel/autotools-internal +devel/swig-4.0.1 diff --git a/rtems/config/5/rtems-llvm.bset b/rtems/config/5/rtems-llvm.bset new file mode 100644 index 000..2b461a0 --- /dev/null +++ b/rtems/config/5/rtems-llvm.bset @@ -0,0 +1,21 @@ +# +# LLVM for RTEMS 5 Tools Stable +# + +%define release 1 + +%define rtems_arch none + +# +# The RTEMS base defines. +# +%include rtems-base.bset + +# +# Build and install into a prefix that is away from the staged area or it will +# be installed. +# +%define swig_prefix %{_tmproot}/swig + +devel/swig +tools/rtems-llvm-8.0.1 diff --git a/rtems/config/rtems-base.bset b/rtems/config/rtems-base.bset index 6749ce4..9f76434 100644 --- a/rtems/config/rtems-base.bset +++ b/rtems/config/rtems-base.bset @@ -20,9 +20,14 @@ package: rtems-%{rtems_version}-%{_target}-%{_host}-%{release} # # Project custom message # -%define rtems_gcc_version %{rtems_version} -%define gcc_version_message RTEMS %{rtems_gcc_version}, RSB %{_sbgit_id}, Newlib %{newlib_version} +%define rtems_version_message RTEMS %{rtems_version}, RSB %{_sbgit_id} +%define rtems_gcc_version %{rtems_version} +%define gcc_version_message %{rtems_version_message}, Newlib %{newlib_version} + +%define rtems_llvm_version%{rtems_version} +%define llvm_version_message %{rtems_version_message} +%define clang_version_message %{rtems_version_message} # # Pick up the RTEMS URLs. # diff --git a/rtems/config/tools/rtems-llvm-8.0.1.cfg b/rtems/config/tools/rtems-llvm-8.0.1.cfg new file mode 100644 index 000..1bf6986 --- /dev/null +++ b/rtems/config/tools/rtems-llvm-8.0.1.cfg @@ -0,0 +1,21 @@ +# +# LLVM +# + +%define llvm_version 8.0.1 + +%hash sha512 llvm-%{llvm_version}.src.tar.xz guEgvlyr39URGuu+popmP+IpyIYdc4AtarCaO/SPYN4zPgfmH4+2G+qhSsK+ok/NdPpvdhrK9iRp9Ta3n8seFg== +%hash sha512 cfe-%{llvm_version}.src.tar.xz Eiey0yBSxwtLSUZZhJAAGI/ORvwxpx8zUrqEV6wLCxfkvHyFiYdMhYbVWqgI7mwfzrffUBqvozWZ+N97/St5HQ== +%hash sha512 clang-tools-extra-%{llvm_version}.src.tar.xz 05liww7p2KFnnYAHAJtI3qLIqusoO+14Gp4ioaV7gYbCz+BY2gRmWIgqzhyEow3fm0y3W86YiJEYnoQjtsanLA== +%hash sha512 compiler-rt-%{llvm_version}.src.tar.xz Er8b2r4lwMOoTMc6cY/hVFc91ynsP/Xgmb1fdMa+ycgFIbh97WRtOyDf25qlHeoCNCgUGMfrgYBeHdXTEH09jg== +%hash sha512 libcxx-%{llvm_version}.src.tar.xz dXSdCLKzQ8b1+a77
[PATCH 3/4] sb/setbuilder: Add a trace to help installing.
From: Chris Johns --- source-builder/sb/setbuilder.py | 1 + 1 file changed, 1 insertion(+) diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py index 7443865..380fa00 100644 --- a/source-builder/sb/setbuilder.py +++ b/source-builder/sb/setbuilder.py @@ -214,6 +214,7 @@ class buildset: self.copy(src, dst) def install(self, mode, name, src, dst): +log.trace('_bset: : %s: copy %s -> %s' % (mode, src, dst)) log.notice('%s: %s -> %s' % (mode, name, path.host(dst))) self.copy(src, dst) -- 2.20.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
RSB LLVM Package
Hello, These patches add LLVM as a package to rtems-5. You can build LLVM to a prefix using ... ../source-builder/sb-setbuilder --prefix=/some/where --log=llvm.txt 5/rtems-llvm - The package builds swig as it is used by lldb. The swig package internally builds and statically links PCRE. There are some changes to the RSB build code to handle downloading but not installing a source package. - LLVM lldb is not built on MacOS by default. You can override the default by adding --with-llvm-lldb. If you do this you will need to have a self signed codesign certificate in your keyring named 'llvm' as lldb has to be codesigned in order to run on MacOS. - I have tested building on FreeBSD and MacOS and would welcome Linux and MSYS2 feedback. - There is currently no integration with rtems-tools trace support which is now using LLVM. It would nice to have this added so the tools built are common for all hosts. - The LLVM compiler is tagged with our RSB details. All targets are built. I am not sure how we build newlib or how we build RTEMS. Suggestions or patches? :) Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 2/4] bare/pcre: Add PCRE 8.40
From: Chris Johns --- bare/config/devel/pcre-8.40-1.cfg | 19 source-builder/config/pcre-8-1.cfg | 70 ++ 2 files changed, 89 insertions(+) create mode 100644 bare/config/devel/pcre-8.40-1.cfg create mode 100644 source-builder/config/pcre-8-1.cfg diff --git a/bare/config/devel/pcre-8.40-1.cfg b/bare/config/devel/pcre-8.40-1.cfg new file mode 100644 index 000..8627260 --- /dev/null +++ b/bare/config/devel/pcre-8.40-1.cfg @@ -0,0 +1,19 @@ +# +# PCRE +# + +%if %{release} == %{nil} +%define release 1 +%endif + +%include %{_configdir}/base.cfg + +%define pcre_version 8.40 +%hash sha512 pcre-%{pcre_version}.tar.bz2 tMJ+r73zO9ehOEZVsZNvS+O8Z0XAcjR+sm6YiJbFJmS9haxCRE2hvni24g9Ftsflkh9fIPWwdBtb09mETlvU4g== + +# +# The PCRE build instructions. We use 8.x Release 1. +# +%ifn %{pkgconfig check pcre} + %include %{_configdir}/pcre-8-1.cfg +%endif diff --git a/source-builder/config/pcre-8-1.cfg b/source-builder/config/pcre-8-1.cfg new file mode 100644 index 000..461967f --- /dev/null +++ b/source-builder/config/pcre-8-1.cfg @@ -0,0 +1,70 @@ +# +# PCRE - Perl Compatible Regular Expressions 0.x.x Version 1. +# +# This configuration file configure's, make's and install's pcre. +# + +%if %{release} == %{nil} +%define release 1 +%endif + +Name: pcre-%{pcre_version}-%{_host}-%{release} +Summary: The PCRE library is a set of functions that implement regular + expression pattern matching using the same syntax and semantics + as Perl 5. +Version: %{pcre_version} +Release: %{release} +URL: http://pcre.org/ +BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) + +# +# Source +# +%source set pcre https://ftp.pcre.org/pub/pcre/pcre-%{pcre_version}.tar.bz2 + +# +# Prepare the source code. +# +%prep + build_top=$(pwd) + + source_dir_pcre="pcre-%{pcre_version}" + %source setup pcre -q -n pcre-%{pcre_version} + %patch setup pcre -p1 + + cd ${build_top} + +%build + build_top=$(pwd) + + %{build_directory} + + mkdir -p ${build_dir} + cd ${build_dir} + + %{host_build_flags} + + ../${source_dir_pcre}/configure \ +--prefix=%{_prefix} \ +--bindir=%{_bindir} \ +--exec_prefix=%{_exec_prefix} \ +--includedir=%{_includedir} \ +--libdir=%{_libdir} \ +--libexecdir=%{_libexecdir} \ +--mandir=%{_mandir} \ +--infodir=%{_infodir} \ +--datadir=%{_datadir} \ +--build=%{_build} --host=%{_host} + + %{__make} %{?_smp_mflags} all + + cd ${build_top} + +%install + build_top=$(pwd) + + %{__rmdir} $SB_BUILD_ROOT + + cd ${build_dir} + %{__make} DESTDIR=$SB_BUILD_ROOT install + cd ${build_top} -- 2.20.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 1/4] sb/check-command: Add a check command wrapper
From: Chris Johns --- source-builder/sb/rtems-check-command | 26 ++ 1 file changed, 26 insertions(+) create mode 100755 source-builder/sb/rtems-check-command diff --git a/source-builder/sb/rtems-check-command b/source-builder/sb/rtems-check-command new file mode 100755 index 000..1cbe5c9 --- /dev/null +++ b/source-builder/sb/rtems-check-command @@ -0,0 +1,26 @@ +#! /bin/sh +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2019 Chris Johns (chr...@rtems.org) +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +# +# Check is a command exists +# + +set +e +command -v $* +exit 0 -- 2.20.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: RSB LLVM Package (chr...@rtems.org)
Hi, Chris, It’s great to hear about rtems has made some progress on LLVM. I’m quite new to rtems, so I have questions about the rtems-llvm packages 1. Can I use rtems-llvm clang compiler build application c code? 2. Does rtems code and newlib still need use arm gcc toolchain? mko_io ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel