summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2022-09-14 16:38:37 +1000
committerChris Johns <chrisj@rtems.org>2022-09-14 16:56:25 +1000
commit468fc79e8c7c8076e8b65be82ba2009e41dd6c8e (patch)
tree7cda80048a335af5f17696a91dcf55d4f68181cd
parenttextproc/gsed: Add GNU sed build support (diff)
downloadrtems-source-builder-468fc79e8c7c8076e8b65be82ba2009e41dd6c8e.tar.bz2
devel/gcc: Check and build GNU sed if not available on build host
Closes #2300
-rw-r--r--bare/config/devel/gnu-default-tools.bset6
-rw-r--r--rtems/config/tools/rtems-default-tools.bset5
-rw-r--r--source-builder/config/gcc-common-1.cfg4
3 files changed, 15 insertions, 0 deletions
diff --git a/bare/config/devel/gnu-default-tools.bset b/bare/config/devel/gnu-default-tools.bset
index dab8c5e..f038352 100644
--- a/bare/config/devel/gnu-default-tools.bset
+++ b/bare/config/devel/gnu-default-tools.bset
@@ -7,6 +7,12 @@
%define gcc_version_message RTEMS bare %{rtems_version}, RSB %{_sbgit_id}, Newlib %{newlib_version}
#
+# GCC requires a GNU sed so build an internal version if one is not
+# available
+#
+%include textproc/gsed-internal
+
+#
# Build gdb first to raise the Python install error as early as
# possible. GDB needs expat so it needs to be built before gdb.
#
diff --git a/rtems/config/tools/rtems-default-tools.bset b/rtems/config/tools/rtems-default-tools.bset
index 7d273cf..8ec6721 100644
--- a/rtems/config/tools/rtems-default-tools.bset
+++ b/rtems/config/tools/rtems-default-tools.bset
@@ -2,6 +2,11 @@
# Default tools build
#
+# GCC requires a GNU sed so build an internal version if one is not
+# available
+#
+%include textproc/gsed-internal.bset
+
#
# Build gdb first to raise the Python install error as early as
# possible. GDB needs expat so it needs to be built before gdb.
diff --git a/source-builder/config/gcc-common-1.cfg b/source-builder/config/gcc-common-1.cfg
index 87ccef1..933202a 100644
--- a/source-builder/config/gcc-common-1.cfg
+++ b/source-builder/config/gcc-common-1.cfg
@@ -165,6 +165,10 @@ URL: http://gcc.gnu.org/
%build
build_top=$(pwd)
+ %if %{defined _internal_gsed_path}
+ export PATH=%{_internal_gsed_path}/bin:$PATH
+ %endif
+
%{build_directory}
mkdir -p ${build_dir}