diff options
author | Chris Johns <chrisj@rtems.org> | 2013-02-13 11:30:47 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2013-02-13 11:35:36 +1100 |
commit | d963553b51d452b36a560c8de953c890f02184ec (patch) | |
tree | 1e123f30e2622743d3697f77959acae6b7d077bb | |
parent | Fixes to the NIOS2 build on FreeBSD. (diff) | |
download | rtems-source-builder-d963553b51d452b36a560c8de953c890f02184ec.tar.bz2 |
Restructure RTEMS Config Files
Add arch build files. This allows archs to have different versions
and patches for specific tools.
Break the RTEMS config directory up into separate directories to
make long term maintenance easier. This required a change to config.py
to handle the config files being in subdirs of the config directory.
The defaults have been updated to include the install SB root so
packages built before a package are available.
Add makeinfo to the required tools. GDB (and others) need it to
build without error.
-rw-r--r-- | rtems/config/4.11/rtems-arm.bset (renamed from rtems/config/rtems-arm-4.11.bset) | 6 | ||||
-rw-r--r-- | rtems/config/4.11/rtems-avr.bset | 19 | ||||
-rw-r--r-- | rtems/config/4.11/rtems-bfin.bset | 19 | ||||
-rw-r--r-- | rtems/config/4.11/rtems-h8300.bset | 19 | ||||
-rw-r--r-- | rtems/config/4.11/rtems-m32c.bset | 19 | ||||
-rw-r--r-- | rtems/config/4.11/rtems-m32r.bset | 19 | ||||
-rw-r--r-- | rtems/config/4.11/rtems-m68k.bset | 19 | ||||
-rw-r--r-- | rtems/config/4.11/rtems-mips.bset | 19 | ||||
-rw-r--r-- | rtems/config/4.11/rtems-nios2.bset (renamed from rtems/config/rtems-nios2-4.11.bset) | 7 | ||||
-rw-r--r-- | rtems/config/4.11/rtems-sparc.bset (renamed from rtems/config/rtems-sparc-4.11.bset) | 6 | ||||
-rw-r--r-- | rtems/config/tools/rtems-binutils-2.20.1-1.cfg (renamed from rtems/config/rtems-binutils-2.20.1-1.cfg) | 0 | ||||
-rw-r--r-- | rtems/config/tools/rtems-binutils-2.22-1.cfg (renamed from rtems/config/rtems-binutils-2.22-1.cfg) | 0 | ||||
-rw-r--r-- | rtems/config/tools/rtems-binutils-2.23.1-1.cfg (renamed from rtems/config/rtems-binutils-2.23.1-1.cfg) | 0 | ||||
-rw-r--r-- | rtems/config/tools/rtems-gcc-4.4.7-newlib-1.18.0-1.cfg (renamed from rtems/config/rtems-gcc-4.4.7-newlib-1.18.0-1.cfg) | 0 | ||||
-rw-r--r-- | rtems/config/tools/rtems-gcc-4.6.3-newlib-1.20.0-1.cfg (renamed from rtems/config/rtems-gcc-4.6.3-newlib-1.20.0-1.cfg) | 0 | ||||
-rw-r--r-- | rtems/config/tools/rtems-gcc-4.7.2-newlib-1.20.0-1.cfg (renamed from rtems/config/rtems-gcc-4.7.2-newlib-1.20.0-1.cfg) | 0 | ||||
-rw-r--r-- | rtems/config/tools/rtems-gdb-7.3.1-1.cfg (renamed from rtems/config/rtems-gdb-7.3.1-1.cfg) | 0 | ||||
-rw-r--r-- | rtems/config/tools/rtems-gdb-7.5-1.cfg (renamed from rtems/config/rtems-gdb-7.5-1.cfg) | 0 | ||||
-rw-r--r-- | rtems/config/tools/rtems-gdb-7.5.1-1.cfg (renamed from rtems/config/rtems-gdb-7.5.1-1.cfg) | 0 | ||||
-rw-r--r-- | rtems/config/tools/rtems-nios2-binutils-2.20-1.cfg (renamed from rtems/config/rtems-nios2-binutils-2.20-1.cfg) | 0 | ||||
-rw-r--r-- | rtems/config/tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg (renamed from rtems/config/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg) | 0 | ||||
-rw-r--r-- | rtems/config/tools/rtems-nios2-gdb-7.0-1.cfg (renamed from rtems/config/rtems-nios2-gdb-7.0-1.cfg) | 0 | ||||
-rw-r--r-- | source-builder/config/binutils-2-1.cfg | 4 | ||||
-rw-r--r-- | source-builder/sb/config.py | 22 | ||||
-rw-r--r-- | source-builder/sb/defaults.py | 4 |
25 files changed, 167 insertions, 15 deletions
diff --git a/rtems/config/rtems-arm-4.11.bset b/rtems/config/4.11/rtems-arm.bset index c08066e..27b3b84 100644 --- a/rtems/config/rtems-arm-4.11.bset +++ b/rtems/config/4.11/rtems-arm.bset @@ -14,6 +14,6 @@ # # Tools configuration. # -rtems-binutils-2.22-1 -rtems-gcc-4.6.3-newlib-1.20.0-1 -rtems-gdb-7.5-1 +tools/rtems-binutils-2.22-1 +tools/rtems-gcc-4.6.3-newlib-1.20.0-1 +tools/rtems-gdb-7.5-1 diff --git a/rtems/config/4.11/rtems-avr.bset b/rtems/config/4.11/rtems-avr.bset new file mode 100644 index 0000000..f020f57 --- /dev/null +++ b/rtems/config/4.11/rtems-avr.bset @@ -0,0 +1,19 @@ +# +# Tools Set for RTEMS AVR 4.11 Stable +# + +%define _target avr-rtems4.11 + +%define release 1 + +# +# The RTEMS 4.11 base defines. +# +%include rtems-4.11-base.bset + +# +# Tools configuration. +# +tools/rtems-binutils-2.22-1 +tools/rtems-gcc-4.7.2-newlib-1.20.0-1 +tools/rtems-gdb-7.5.1-1 diff --git a/rtems/config/4.11/rtems-bfin.bset b/rtems/config/4.11/rtems-bfin.bset new file mode 100644 index 0000000..676c2b8 --- /dev/null +++ b/rtems/config/4.11/rtems-bfin.bset @@ -0,0 +1,19 @@ +# +# Tools Set for RTEMS BFIN 4.11 Stable +# + +%define _target bfin-rtems4.11 + +%define release 1 + +# +# The RTEMS 4.11 base defines. +# +%include rtems-4.11-base.bset + +# +# Tools configuration. +# +tools/rtems-binutils-2.22-1 +tools/rtems-gcc-4.7.2-newlib-1.20.0-1 +tools/rtems-gdb-7.5.1-1 diff --git a/rtems/config/4.11/rtems-h8300.bset b/rtems/config/4.11/rtems-h8300.bset new file mode 100644 index 0000000..f26cf30 --- /dev/null +++ b/rtems/config/4.11/rtems-h8300.bset @@ -0,0 +1,19 @@ +# +# Tools Set for RTEMS H8300 4.11 Stable +# + +%define _target h8300-rtems4.11 + +%define release 1 + +# +# The RTEMS 4.11 base defines. +# +%include rtems-4.11-base.bset + +# +# Tools configuration. +# +tools/rtems-binutils-2.22-1 +tools/rtems-gcc-4.7.2-newlib-1.20.0-1 +tools/rtems-gdb-7.5.1-1 diff --git a/rtems/config/4.11/rtems-m32c.bset b/rtems/config/4.11/rtems-m32c.bset new file mode 100644 index 0000000..4d5594e --- /dev/null +++ b/rtems/config/4.11/rtems-m32c.bset @@ -0,0 +1,19 @@ +# +# Tools Set for RTEMS M32C 4.11 Stable +# + +%define _target m32c-rtems4.11 + +%define release 1 + +# +# The RTEMS 4.11 base defines. +# +%include rtems-4.11-base.bset + +# +# Tools configuration. +# +tools/rtems-binutils-2.22-1 +tools/rtems-gcc-4.7.2-newlib-1.20.0-1 +tools/rtems-gdb-7.5.1-1 diff --git a/rtems/config/4.11/rtems-m32r.bset b/rtems/config/4.11/rtems-m32r.bset new file mode 100644 index 0000000..8e7a941 --- /dev/null +++ b/rtems/config/4.11/rtems-m32r.bset @@ -0,0 +1,19 @@ +# +# Tools Set for RTEMS M32R 4.11 Stable +# + +%define _target m32r-rtems4.11 + +%define release 1 + +# +# The RTEMS 4.11 base defines. +# +%include rtems-4.11-base.bset + +# +# Tools configuration. +# +tools/rtems-binutils-2.22-1 +tools/rtems-gcc-4.7.2-newlib-1.20.0-1 +tools/rtems-gdb-7.5.1-1 diff --git a/rtems/config/4.11/rtems-m68k.bset b/rtems/config/4.11/rtems-m68k.bset new file mode 100644 index 0000000..c2b5e0b --- /dev/null +++ b/rtems/config/4.11/rtems-m68k.bset @@ -0,0 +1,19 @@ +# +# Tools Set for RTEMS M68K 4.11 Stable +# + +%define _target m68k-rtems4.11 + +%define release 1 + +# +# The RTEMS 4.11 base defines. +# +%include rtems-4.11-base.bset + +# +# Tools configuration. +# +tools/rtems-binutils-2.22-1 +tools/rtems-gcc-4.7.2-newlib-1.20.0-1 +tools/rtems-gdb-7.5.1-1 diff --git a/rtems/config/4.11/rtems-mips.bset b/rtems/config/4.11/rtems-mips.bset new file mode 100644 index 0000000..fb5c6c0 --- /dev/null +++ b/rtems/config/4.11/rtems-mips.bset @@ -0,0 +1,19 @@ +# +# Tools Set for RTEMS MIPS 4.11 Stable +# + +%define _target mips-rtems4.11 + +%define release 1 + +# +# The RTEMS 4.11 base defines. +# +%include rtems-4.11-base.bset + +# +# Tools configuration. +# +tools/rtems-binutils-2.22-1 +tools/rtems-gcc-4.7.2-newlib-1.20.0-1 +tools/rtems-gdb-7.5.1-1 diff --git a/rtems/config/rtems-nios2-4.11.bset b/rtems/config/4.11/rtems-nios2.bset index f59a282..8b8865f 100644 --- a/rtems/config/rtems-nios2-4.11.bset +++ b/rtems/config/4.11/rtems-nios2.bset @@ -20,6 +20,7 @@ package: rtems-%{rtems_version}-%{_target}-%{release} # # Tools configuration. # -rtems-nios2-binutils-2.20-1 -rtems-nios2-gcc-4.1-newlib-1.19.0-1 -rtems-nios2-gdb-7.0-1 +tools/rtems-nios2-binutils-2.20-1 +tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1 +expat-2.1.0-1 +tools/rtems-nios2-gdb-7.0-1 diff --git a/rtems/config/rtems-sparc-4.11.bset b/rtems/config/4.11/rtems-sparc.bset index 6c2fb6b..c52db91 100644 --- a/rtems/config/rtems-sparc-4.11.bset +++ b/rtems/config/4.11/rtems-sparc.bset @@ -14,6 +14,6 @@ # # Tools configuration. # -rtems-binutils-2.22-1 -rtems-gcc-4.6.3-newlib-1.20.0-1 -rtems-gdb-7.5-1 +tools/rtems-binutils-2.22-1 +tools/rtems-gcc-4.7.2-newlib-1.20.0-1 +tools/rtems-gdb-7.5.1-1 diff --git a/rtems/config/rtems-binutils-2.20.1-1.cfg b/rtems/config/tools/rtems-binutils-2.20.1-1.cfg index d1546d3..d1546d3 100644 --- a/rtems/config/rtems-binutils-2.20.1-1.cfg +++ b/rtems/config/tools/rtems-binutils-2.20.1-1.cfg diff --git a/rtems/config/rtems-binutils-2.22-1.cfg b/rtems/config/tools/rtems-binutils-2.22-1.cfg index 62db467..62db467 100644 --- a/rtems/config/rtems-binutils-2.22-1.cfg +++ b/rtems/config/tools/rtems-binutils-2.22-1.cfg diff --git a/rtems/config/rtems-binutils-2.23.1-1.cfg b/rtems/config/tools/rtems-binutils-2.23.1-1.cfg index 4f39a6b..4f39a6b 100644 --- a/rtems/config/rtems-binutils-2.23.1-1.cfg +++ b/rtems/config/tools/rtems-binutils-2.23.1-1.cfg diff --git a/rtems/config/rtems-gcc-4.4.7-newlib-1.18.0-1.cfg b/rtems/config/tools/rtems-gcc-4.4.7-newlib-1.18.0-1.cfg index 22ee2d8..22ee2d8 100644 --- a/rtems/config/rtems-gcc-4.4.7-newlib-1.18.0-1.cfg +++ b/rtems/config/tools/rtems-gcc-4.4.7-newlib-1.18.0-1.cfg diff --git a/rtems/config/rtems-gcc-4.6.3-newlib-1.20.0-1.cfg b/rtems/config/tools/rtems-gcc-4.6.3-newlib-1.20.0-1.cfg index 5d78587..5d78587 100644 --- a/rtems/config/rtems-gcc-4.6.3-newlib-1.20.0-1.cfg +++ b/rtems/config/tools/rtems-gcc-4.6.3-newlib-1.20.0-1.cfg diff --git a/rtems/config/rtems-gcc-4.7.2-newlib-1.20.0-1.cfg b/rtems/config/tools/rtems-gcc-4.7.2-newlib-1.20.0-1.cfg index 59d7ec8..59d7ec8 100644 --- a/rtems/config/rtems-gcc-4.7.2-newlib-1.20.0-1.cfg +++ b/rtems/config/tools/rtems-gcc-4.7.2-newlib-1.20.0-1.cfg diff --git a/rtems/config/rtems-gdb-7.3.1-1.cfg b/rtems/config/tools/rtems-gdb-7.3.1-1.cfg index b636319..b636319 100644 --- a/rtems/config/rtems-gdb-7.3.1-1.cfg +++ b/rtems/config/tools/rtems-gdb-7.3.1-1.cfg diff --git a/rtems/config/rtems-gdb-7.5-1.cfg b/rtems/config/tools/rtems-gdb-7.5-1.cfg index 27e8b37..27e8b37 100644 --- a/rtems/config/rtems-gdb-7.5-1.cfg +++ b/rtems/config/tools/rtems-gdb-7.5-1.cfg diff --git a/rtems/config/rtems-gdb-7.5.1-1.cfg b/rtems/config/tools/rtems-gdb-7.5.1-1.cfg index 25b8d54..25b8d54 100644 --- a/rtems/config/rtems-gdb-7.5.1-1.cfg +++ b/rtems/config/tools/rtems-gdb-7.5.1-1.cfg diff --git a/rtems/config/rtems-nios2-binutils-2.20-1.cfg b/rtems/config/tools/rtems-nios2-binutils-2.20-1.cfg index 936ad31..936ad31 100644 --- a/rtems/config/rtems-nios2-binutils-2.20-1.cfg +++ b/rtems/config/tools/rtems-nios2-binutils-2.20-1.cfg diff --git a/rtems/config/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg b/rtems/config/tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg index 3b94d02..3b94d02 100644 --- a/rtems/config/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg +++ b/rtems/config/tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg diff --git a/rtems/config/rtems-nios2-gdb-7.0-1.cfg b/rtems/config/tools/rtems-nios2-gdb-7.0-1.cfg index aab3eed..aab3eed 100644 --- a/rtems/config/rtems-nios2-gdb-7.0-1.cfg +++ b/rtems/config/tools/rtems-nios2-gdb-7.0-1.cfg diff --git a/source-builder/config/binutils-2-1.cfg b/source-builder/config/binutils-2-1.cfg index 3105d07..cdb0949 100644 --- a/source-builder/config/binutils-2-1.cfg +++ b/source-builder/config/binutils-2-1.cfg @@ -35,9 +35,7 @@ cd .. export PATH="%{_bindir}:${PATH}" mkdir -p build cd build -%if %{host_force_32bit} == %{nil} - HOST_FORCE_32BIT="-m32" -%endif + %{?host_force_32bit:HOST_FORCE_32BIT="-m32"} %if "%{_build}" != "%{_host}" CFLAGS_FOR_BUILD="-g -O2 -Wall ${HOST_FORCE_32BIT}" \ %endif diff --git a/source-builder/sb/config.py b/source-builder/sb/config.py index a9724dc..b18a646 100644 --- a/source-builder/sb/config.py +++ b/source-builder/sb/config.py @@ -687,6 +687,16 @@ class file: def load(self, name): + def common_end(left, right): + end = '' + while len(left) and len(right): + if left[-1] != right[-1]: + return end + end = left[-1] + end + left = left[:-1] + right = right[:-1] + return end + if self.load_depth == 0: self.in_error = False self.lc = 0 @@ -707,7 +717,7 @@ class file: self.lc = 0 # - # Locate the config file. Expand any macors then Add the + # Locate the config file. Expand any macros then add the # extension. Check if the file exists, therefore directly # referenced. If not see if the file contains ':' or the path # separator. If it does split the path else use the standard config dir @@ -716,12 +726,19 @@ class file: exname = self.expand(name) + # + # Macro could add an extension. + # if exname.endswith('.cfg'): configname = exname else: configname = '%s.cfg' % (exname) + name = '%s.cfg' % (name) - cfgname = path.basename(configname) + if ':' in configname: + cfgname = path.basename(configname) + else: + cfgname = common_end(configname, name) if not path.exists(configname): if ':' in configname: @@ -730,6 +747,7 @@ class file: configdirs = self.define('_configdir').split(':') for cp in configdirs: configname = path.join(path.abspath(cp), cfgname) + print configname if path.exists(configname): break configname = None diff --git a/source-builder/sb/defaults.py b/source-builder/sb/defaults.py index b5daec9..3411911 100644 --- a/source-builder/sb/defaults.py +++ b/source-builder/sb/defaults.py @@ -107,6 +107,7 @@ defaults = { '__automake': ('exe', 'required', 'automake'), '__awk': ('exe', 'required', 'awk'), '__bash': ('exe', 'optional', '/bin/bash'), +'__bison': ('exe', 'required', '/usr/bin/bison'), '__bzip2': ('exe', 'required', '/usr/bin/bzip2'), '__cat': ('exe', 'required', '/bin/cat'), '__cc': ('exe', 'required', '/usr/bin/gcc'), @@ -127,6 +128,7 @@ defaults = { '__ldconfig': ('exe', 'required', '/sbin/ldconfig'), '__ln_s': ('exe', 'none', 'ln -s'), '__make': ('exe', 'required', 'make'), +'__makeinfo': ('exe', 'required', '/usr/bin/makeinfo'), '__mkdir': ('exe', 'required', '/bin/mkdir'), '__mkdir_p': ('exe', 'none', '/bin/mkdir -p'), '__mv': ('exe', 'required', '/bin/mv'), @@ -155,7 +157,7 @@ defaults = { # Directories SB_SOURCE_DIR="%{_sourcedir}" SB_BUILD_DIR="%{_builddir}" -SB_OPT_FLAGS="%{optflags}" +SB_OPT_FLAGS="%{?tmproot:-I%{tmproot}/%{_prefix}/include -L%{tmproot}/%{_prefix}/lib} %{optflags}" SB_ARCH="%{_arch}" SB_OS="%{_os}" export SB_SOURCE_DIR SB_BUILD_DIR SB_OPT_FLAGS SB_ARCH SB_OS |