diff options
author | Chris Johns <chrisj@rtems.org> | 2020-10-03 21:53:04 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2020-10-06 12:00:21 +1100 |
commit | 158ad680aed1c4fd00f00d5b0e269391597872ef (patch) | |
tree | b3c448838c3471d418cfbc8a49b38b1ba32a7211 /source-builder/defaults.mc | |
parent | freebsd: FreeBSD 12.1 does not build gcc (diff) | |
download | rtems-source-builder-158ad680aed1c4fd00f00d5b0e269391597872ef.tar.bz2 |
sb: Back port the RTEMS 5 and 6 RSB engine.
- Build GDb first as we do for RTEMS 5 and later
- Update GDB to 9.1 for all archs expect SPARC. The SIS patches
only apply to 7.9. Disable Python for SPARC
Closes #4111
Diffstat (limited to 'source-builder/defaults.mc')
-rw-r--r-- | source-builder/defaults.mc | 110 |
1 files changed, 82 insertions, 28 deletions
diff --git a/source-builder/defaults.mc b/source-builder/defaults.mc index c65fa22..8ed7003 100644 --- a/source-builder/defaults.mc +++ b/source-builder/defaults.mc @@ -40,6 +40,7 @@ nil: none, none, '' # Set to invalid values. _bset: none, none, '' +_bset_tmp: none, none, '' name: none, none, '' version: none, none, '' release: none, none, '' @@ -55,20 +56,37 @@ _build: triplet, required, '' _target: none, optional, '' # RTEMS release URL -rtems_release_url: none, none, 'ftp://ftp.rtems.org/pub/rtems/releases/%{rtems_version}' +rtems_release_url: none, none, 'https://ftp.rtems.org/pub/rtems/releases/%{rtems_version}' # The user -_uid: none, convert, '%(%{__id_u} -n)' +_uid: none, convert, '%(%{__id_u})' # Default flags that can be overridded to supply specific host or build # flags and include paths to the tools. The host is the final platform # the tools will run on and build is the host building the tools. -host_cflags: none, convert, '-O2 -pipe' -host_cxxflags: none, convert, '-O2 -pipe' +host_cflags: none, convert, '-O2 -g -pipe' +host_cxxflags: none, convert, '-O2 -g -pipe' +host_ldflags: none, convert, '' host_includes: none, convert, '' -build_cflags: none, convert, '-O2 -pipe' -build_cxxflags: none, convert, '-O2 -pipe' +host_libs: none, convert, '' +build_cflags: none, convert, '-O2 -g -pipe' +build_cxxflags: none, convert, '-O2 -g -pipe' +build_ldflags: none, convert, '' build_includes: none, convert, '' +build_libs: none, convert, '' + +# +# Build and staging paths. +# +buildroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}' +buildcxcroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}-cxc' +buildxcroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}-xx' +stagingroot: dir, none, '%{_tmppath}/sb-%{_uid}-staging' + +# +# Install mode can be installing or staging. Defaults to installing. +# +install_mode: none, none, 'installing' # Extra path a platform can override. _extra_path: none, none, '%{_sbdir}' @@ -89,13 +107,11 @@ _buildcxcdir: dir, optional, '%{_topdir}/build/%{buildname}-cxc' _buildxcdir: dir, optional, '%{_topdir}/build/%{buildname}-xc' _docdir: dir, none, '%{_defaultdocdir}' _tmppath: dir, none, '%{_topdir}/build/tmp' -_tmproot: dir, none, '%{_tmppath}/sb-%{_uid}/%{_bset}' -_tmpcxcroot: dir, none, '%{_tmppath}/sb-%{_uid}-cxc/%{_bset}' -buildroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}' -buildcxcroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}-cxc' -buildxcroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}-xx' +_tmproot: dir, none, '%{_tmppath}/sb-%{_uid}/%{_bset_tmp}' +_tmpcxcroot: dir, none, '%{_tmppath}/sb-%{_uid}-cxc/%{_bset_tmp}' _datadir: dir, none, '%{_prefix}/share' _defaultdocdir: dir, none, '%{_prefix}/share/doc' +_dry_run: none, none, '0' _exeext: none, none, '' _exec_prefix: dir, none, '%{_prefix}' _bindir: dir, none, '%{_exec_prefix}/bin' @@ -123,6 +139,9 @@ _usrsrc: dir, none, '%{_usr}/src' _var: dir, none, '/usr/local/var' _varrun: dir, none, '%{_var}/run' +# Get source state +_rsb_getting_source: none, none, '0' + # Defaults, override in platform specific modules. ___setup_shell: exe, required, '/bin/sh' __aclocal: exe, optional, 'aclocal' @@ -138,15 +157,16 @@ __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' +__cc: exe, required, 'gcc' __chgrp: exe, required, '/usr/bin/chgrp' __chmod: exe, required, '/bin/chmod' __chown: exe, required, '/usr/sbin/chown' +__cmake: exe, optional, '/usr/bin/cmake' __cp: exe, required, '/bin/cp' __cpp: exe, none, '%{__cc} -E' __cvs: exe, optional, '/usr/bin/cvs' __cvs_z: none, none, '%{__cvs} -z 9' -__cxx: exe, required, '/usr/bin/g++' +__cxx: exe, required, 'g++' __flex: exe, required, '/usr/bin/flex' __git: exe, required, '/usr/bin/git' __grep: exe, required, '/usr/bin/grep' @@ -179,7 +199,7 @@ __sed: exe, required, '/usr/bin/sed' __setup_post: exe, none, '%{__chmod} -R a+rX,g-w,o-w .' __sh: exe, required, '/bin/sh' __tar: exe, required, '/usr/bin/tar' -__tar_extract: exe, none, '%{__tar} -xvvf' +__tar_extract: exe, none, '%{__tar} -xvv' __touch: exe, required, '/usr/bin/touch' __unzip: exe, required, '/usr/bin/unzip' __xz: exe, required, '/usr/bin/xz' @@ -190,7 +210,7 @@ ___build_cmd: none, none, '%{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} ___build_post: none, none, 'exit 0' # Prebuild set up script. -___build_pre: none, none, '''# ___build_pre in as set up in defaults.py +___build_pre: none, none, '''# ___build_pre as set up in defaults.py # Save the original path away. export SB_ORIG_PATH=${PATH} # Directories @@ -198,20 +218,24 @@ export SB_ORIG_PATH=${PATH} %{?_prefix:SB_PREFIX_CLEAN=$(echo "%{_prefix}" | %{__sed} -e 's/^\///')} SB_SOURCE_DIR="%{_sourcedir}" SB_BUILD_DIR="%{_builddir}" -# host == build, use build; host != build , host uses host and build uses build -SB_HOST_CFLAGS="%{host_cflags} %{host_includes}" -SB_HOST_CXXFLAGS="%{host_cxxflags} %{host_includes}" -SB_HOST_LDFLAGS="%{?host_ldflags:%{host_ldflags}}%{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}" +# host == build, use build; host != build, host uses host and build uses build +SB_HOST_CPPFLAGS="%{host_includes}" +# Optionally do not add includes to c/cxx flags as newer configure's complain +SB_HOST_CFLAGS="%{host_cflags} %{!?host_cflags_no_includes %{host_includes}}" +SB_HOST_CXXFLAGS="%{host_cxxflags} %{!?host_cflags_no_includes %{host_includes}}" +SB_HOST_LDFLAGS="%{host_ldflags} %{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}" +SB_HOST_LIBS="%{host_libs}" SB_BUILD_CFLAGS="%{build_cflags} %{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include}" SB_BUILD_CXXFLAGS="%{build_cxxflags} %{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include}" -SB_BUILD_LDFLAGS="%{?build_ldflags:%{build_ldflags}}%{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}" +SB_BUILD_LDFLAGS="%{build_ldflags} %{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}" +SB_BUILD_LBS="%{build_libs}" SB_CFLAGS="${SB_BUILD_CFLAGS} %{build_includes}" SB_CXXFLAGS="${SB_BUILD_CXXFLAGS} %{build_includes}" SB_ARCH="%{_arch}" SB_OS="%{_os}" export SB_SOURCE_DIR SB_BUILD_DIR SB_ARCH SB_OS -export SB_HOST_CFLAGS SB_HOST_CXXFLAGS SB_HOST_LDFLAGS -export SB_BUILD_CFLAGS SB_BUILD_CXXFLAGS SB_BUILD_LDFLAGS +export SB_HOST_CPPFLAGS SB_HOST_CFLAGS SB_HOST_CXXFLAGS SB_HOST_LDFLAGS SB_HOST_LIBS +export SB_BUILD_CFLAGS SB_BUILD_CXXFLAGS SB_BUILD_LDFLAGS SB_BUILD_LIBS export SB_CFLAGS SB_CXXFLAGS # Documentation SB_DOC_DIR="%{_docdir}" @@ -298,7 +322,9 @@ FFLAGS="${FFLAGS:-${SB_CFLAGS}}" ; export FFLAGS ; # Build script support. build_directory: none, none, ''' if test "%{_build}" != "%{_host}" ; then - if test -z "%{_target}" ; then + # Cross-build (Xc) if no target or the host and target match. + # Canadian-cross (Cxc) if build, host and target are all different. + if test -z "%{_target}" -o "%{_host}" == "%{_target}" ; then build_dir="build-xc" else build_dir="build-cxc" @@ -316,13 +342,19 @@ if test "%{_build}" != "%{_host}" ; then # Cross build CC=$(echo "%{_host}-%{_host_cc}" | sed -e 's,-std=gnu99 ,,') CXX=$(echo "%{_host}-%{_host_cxx}" | sed -e 's,-std=gnu99 ,,') + CPPFLAGS="${SB_HOST_CPPFLAGS}" CFLAGS="${SB_HOST_CFLAGS}" CXXFLAGS="${SB_HOST_CXXFLAGS}" LDFLAGS="${SB_HOST_LDFLAGS}" + LDLIBS="${SB_HOST_LIBS}" + LIBS="${SB_HOST_LIBS}" # Host + CPPFLAGS_FOR_HOST="${SB_HOST_CPPFLAGS}" CFLAGS_FOR_HOST="${SB_HOST_CFLAGS}" CXXFLAGS_FOR_HOST="${SB_HOST_CXXFLAGS}" LDFLAGS_FOR_HOST="${SB_HOST_LDFLAGS}" + LDLIBS_FOR_HOST="${SB_HOST_LIBS}" + LIBS_FOR_HOST="${SB_HOST_LIBS}" CXXFLAGS_FOR_HOST="${SB_HOST_CFLAGS}" CC_FOR_HOST=$(echo "%{_host_cc} ${SB_HOST_CFLAGS}" | sed -e 's,-std=gnu99 ,,') CXX_FOR_HOST=$(echo "%{_host_cxx} ${SB_HOST_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,') @@ -330,30 +362,35 @@ if test "%{_build}" != "%{_host}" ; then CFLAGS_FOR_BUILD="${SB_BUILD_CFLAGS}" CXXFLAGS_FOR_BUILD="${SB_BUILD_CXXFLAGS}" LDFLAGS_FOR_BUILD="${SB_BUILD_LDFLAGS}" + LDLIBS_FOR_BUILD="${SB_BUILD_LIBS}" + LIBS_FOR_BUILD="${SB_BUILD_LIBS}" CXXFLAGS_FOR_BUILD="${SB_BUILD_CFLAGS}" CC_FOR_BUILD=$(echo "%{__cc} ${SB_BUILD_CFLAGS}" | sed -e 's,-std=gnu99 ,,') CXX_FOR_BUILD=$(echo "%{__cxx} ${SB_BUILD_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,') else LDFLAGS="${SB_BUILD_LDFLAGS}" + LDLIBS="${SB_BUILD_LIBS}" + LIBS="${SB_BUILD_LIBS}" CC=$(echo "%{__cc} ${SB_BUILD_CFLAGS}" | sed -e 's,-std=gnu99 ,,') CXX=$(echo "%{__cxx} ${SB_BUILD_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,') CC_FOR_BUILD=${CC} CXX_FOR_BUILD=${CXX} fi -export CC CXX CFLAGS CXXFLAGS LDFLAGS -export CC_FOR_HOST CXX_FOR_HOST CFLAGS_FOR_HOST CXXFLAGS_FOR_HOST LDFLAGS_FOR_HOST -export CC_FOR_BUILD CXX_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD''' +export CC CXX CPPFLAGS CFLAGS CXXFLAGS LDFLAGS LIBS LDLIBS +export CC_FOR_HOST CXX_FOR_HOST CPPFLAGS_FOR_HOST CFLAGS_FOR_HOST CXXFLAGS_FOR_HOST LDFLAGS_FOR_HOST LDLIBS_FOR_HOST LIBS_FOR_HOST +export CC_FOR_BUILD CXX_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD LDLIBS_FOR_BUILS LIBS_FOR_BUILS''' # Build/build flags. build_build_flags: none, none, ''' # Build and build flags means force build == host # gcc is not ready to be compiled with -std=gnu99 LDFLAGS="${SB_HOST_LDFLAGS}" +LIBS="${SB_HOST_LIBS}" CC=$(echo "%{__cc} ${SB_CFLAGS}" | sed -e 's,-std=gnu99 ,,') CXX=$(echo "%{__cxx} ${SB_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,') CC_FOR_BUILD=${CC} CXX_FOR_BUILD=${CXX} -export CC CXX CC_FOR_BUILD CXX_FOR_BUILD CFLAGS LDFLAGS''' +export CC CXX CC_FOR_BUILD CXX_FOR_BUILD CFLAGS LDFLAGS LIBS''' # Default package settings _forced_static: none, none, '-Xlinker -Bstatic ${LIBS_STATIC} -Xlinker -Bdynamic' @@ -361,7 +398,7 @@ __xz: exe, required, '/usr/bin/xz' # Mail Support _mail_smtp_host: none, none, 'localhost' -_mail_tools_to: none, none, 'rtems-tooltestresults@rtems.org' +_mail_tools_to: none, none, 'build@rtems.org' # Newlib ICONV encodings _newlib_iconv_encodings: none, none, '''big5,cp775,cp850,cp852,cp855,\ @@ -372,3 +409,20 @@ iso_ir_111,koi8_r,koi8_ru,koi8_u,koi8_uni,ucs_2,ucs_2_internal,\ ucs_2be,ucs_2le,ucs_4,ucs_4_internal,ucs_4be,ucs_4le,us_ascii,\ utf_16,utf_16be,utf_16le,utf_8,win_1250,win_1251,win_1252,\ win_1253,win_1254,win_1255,win_1256,win_1257,win_1258''' + +# Waf build root suffix, only use for win32 mingw ming32 OSs +# +# If on Windows we need to add the driver prefix to the built root as waf +# strips the driver prefix from the prefix path when joining it to the +# destdir path. Waf is correct in doing this and the RSB is design to match +# the configure behaviour which treats the whole path including the drive +# prefix as part of the path as just a path. +# +waf_build_root_suffix: none, none, ' %(echo %{_prefix} | cut -c 1-2)' + +# Makefile.inc support for staging +rtems_makefile_inc: none, none, ''' +export RTEMS_ROOT=%{rtems_bsp_rtems_root} +export PROJECT_RELEASE=%{rtems_bsp_prefix} +export RTEMS_MAKEFILE_PATH=%{rtems_bsp_prefix} +''' |