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/config | |
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/config')
31 files changed, 495 insertions, 360 deletions
diff --git a/source-builder/config/autoconf-2-1.cfg b/source-builder/config/autoconf-2-1.cfg index 5061cfd..2b9466c 100644 --- a/source-builder/config/autoconf-2-1.cfg +++ b/source-builder/config/autoconf-2-1.cfg @@ -6,9 +6,9 @@ %ifn %{defined _internal_autotools} %define _internal_autotools no - %ifn %{defined _internal_autotools_path} - %define _internal_autotools_path %{nil} - %endif +%endif +%ifn %{defined _internal_autotools_path} + %define _internal_autotools_path %{_prefix} %endif Name: autoconf-%{autoconf_version}-%{_host}-%{release} @@ -16,12 +16,11 @@ Summary: Autoconf v%{autoconf_version} for host %{_host} Version: %{autoconf_version} Release: %{release} URL: http://www.gnu.org/software/autoconf/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source # -%source set autoconf ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz +%source set autoconf https://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz # # Prepare the source code. diff --git a/source-builder/config/automake-1-1.cfg b/source-builder/config/automake-1-1.cfg index 6f45928..83473de 100644 --- a/source-builder/config/automake-1-1.cfg +++ b/source-builder/config/automake-1-1.cfg @@ -6,9 +6,9 @@ %ifn %{defined _internal_autotools} %define _internal_autotools no - %ifn %{defined _internal_autotools_path} - %define _internal_autotools_path %{nil} - %endif +%endif +%ifn %{defined _internal_autotools_path} + %define _internal_autotools_path %{_prefix} %endif Name: automake-%{automake_version}-%{_host}-%{release} @@ -16,12 +16,11 @@ Summary: Automake v%{automake_version} for host %{_host} Version: %{automake_version} Release: %{release} URL: http://www.gnu.org/software/automake/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source # -%source set automake ftp://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz +%source set automake https://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz # # Prepare the source code. diff --git a/source-builder/config/binutils-2-1.cfg b/source-builder/config/binutils-2-1.cfg index 397dea5..a49fa2a 100644 --- a/source-builder/config/binutils-2-1.cfg +++ b/source-builder/config/binutils-2-1.cfg @@ -19,7 +19,6 @@ Summary: Binutils v%{binutils_version} for target %{_target} on host %{_host} Version: %{binutils_version} Release: %{release} URL: http://sources.redhat.com/binutils -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Supports Candian Cross (Cxc). @@ -27,9 +26,19 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) %define allow_cxc # +# Default gold and LTO to disable. +# +%ifn %{defined with_gold} + %define with_gold 0 +%endif +%ifn %{defined with_lto} + %define with_lto 0 +%endif + +# # Source # -%source set binutils ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_version}.tar.bz2 +%source set binutils https://ftp.gnu.org/gnu/binutils/binutils-%{binutils_version}.tar.bz2 # # Prepare the source code. @@ -59,7 +68,11 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) --build=%{_build} --host=%{_host} \ --target=%{_target} \ --verbose --disable-nls \ + --disable-gdb --disable-libdecnumber --disable-readline --disable-sim \ %{?with_deterministic_archives:--enable-deterministic-archives} \ + %{?with_64_bit_bfd:--enable-64-bit-bfd} \ + %{?with_gold:--enable-gold=yes} \ + %{?with_lto:--enable-lto --enable-plugins}%{!?with_lto:--disable-lto} \ --without-included-gettext \ --disable-win32-registry \ --disable-werror \ diff --git a/source-builder/config/dtc-1-1.cfg b/source-builder/config/dtc-1-1.cfg index c9cb816..686a1e0 100644 --- a/source-builder/config/dtc-1-1.cfg +++ b/source-builder/config/dtc-1-1.cfg @@ -12,8 +12,7 @@ Name: dtc-%{dtc_version}-%{_host}-%{release} Summary: Device Tree Compiler v%{dtc_version} for target %{_target} on host %{_host} Version: %{dtc_version} Release: %{release} -URL: http://www.jdl.com/software/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) +URL: https://www.devicetree.org/ # # Source diff --git a/source-builder/config/expat-2-1.cfg b/source-builder/config/expat-2-1.cfg index 77774e7..2219d15 100644 --- a/source-builder/config/expat-2-1.cfg +++ b/source-builder/config/expat-2-1.cfg @@ -13,7 +13,6 @@ Summary: Expat XML Parser v%{expat_version} for target %{_target} on host %{_h Version: %{expat_version} Release: %{release} URL: http://expat.sourceforge.net/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source diff --git a/source-builder/config/gcc-4.3-1.cfg b/source-builder/config/gcc-4.3-1.cfg index 4c7a335..69ea367 100644 --- a/source-builder/config/gcc-4.3-1.cfg +++ b/source-builder/config/gcc-4.3-1.cfg @@ -1,28 +1,33 @@ # -# GCC 4.7 Version 1. +# GCC 4.3.1 Version 1. # # This configuration file configure's, make's and install's gcc. It uses # newlib, MPFR, MPC, and GMP in a one-tree build configuration. # # +# Force the standard of C code for GCC. +# +%define build_cflags %{build_cflags} --std=gnu89 + +# # Source # # # GCC core and G++ # -%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2 +%source set gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2 # # Newlib # -%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz +%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz # # Packages GCC requires # -%source set mpfr https://ftp.gnu.org/gnu/mpfr/mpfr-%{mpfr_version}.tar.bz2 -%source set mpc https://ftp.gnu.org/gnu/mpc/mpc-%{mpc_version}.tar.gz +%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2 +%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz %source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2 # diff --git a/source-builder/config/gcc-4.4-1.cfg b/source-builder/config/gcc-4.4-1.cfg index ecfa651..2c70919 100644 --- a/source-builder/config/gcc-4.4-1.cfg +++ b/source-builder/config/gcc-4.4-1.cfg @@ -11,22 +11,22 @@ # # GCC core and G++ # -%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2 +%source set gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2 %if %{enable_cxx} - %source add gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz + %source add gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz %endif # # Newlib # -%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz +%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz # # Packages GCC requires # -%source set mpfr https://ftp.gnu.org/gnu/mpfr/mpfr-%{mpfr_version}.tar.bz2 -%source set mpc https://ftp.gnu.org/gnu/mpc/mpc-%{mpc_version}.tar.gz +%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2 +%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz %source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2 # diff --git a/source-builder/config/gcc-4.5-1.cfg b/source-builder/config/gcc-4.5-1.cfg index acca717..fbff31c 100644 --- a/source-builder/config/gcc-4.5-1.cfg +++ b/source-builder/config/gcc-4.5-1.cfg @@ -11,18 +11,18 @@ # # GCC core and G++ # -%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2 +%source set gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2 # # Newlib # -%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz +%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz # # Packages GCC requires # -%source set mpfr https://ftp.gnu.org/gnu/mpfr/mpfr-%{mpfr_version}.tar.bz2 -%source set mpc https://ftp.gnu.org/gnu/mpc/mpc-%{mpc_version}.tar.gz +%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2 +%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz %source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2 # diff --git a/source-builder/config/gcc-4.6-1.cfg b/source-builder/config/gcc-4.6-1.cfg index 4eff844..98f8d7e 100644 --- a/source-builder/config/gcc-4.6-1.cfg +++ b/source-builder/config/gcc-4.6-1.cfg @@ -11,22 +11,22 @@ # # GCC core and G++ # -%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2 +%source set gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_version}.tar.bz2 %if %{enable_cxx} - %source add gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz + %source add gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.gz %endif # # Newlib # -%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz +%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz # # Packages GCC requires # -%source set mpfr https://ftp.gnu.org/gnu/mpfr/mpfr-%{mpfr_version}.tar.bz2 -%source set mpc https://ftp.gnu.org/gnu/mpc/mpc-%{mpc_version}.tar.gz +%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2 +%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz %source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2 # diff --git a/source-builder/config/gcc-4.7-1.cfg b/source-builder/config/gcc-4.7-1.cfg index 25ac233..0eac21f 100644 --- a/source-builder/config/gcc-4.7-1.cfg +++ b/source-builder/config/gcc-4.7-1.cfg @@ -20,18 +20,18 @@ # # GCC core and G++ # -%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2 +%source set gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2 # # Newlib # -%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz +%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz # # Packages GCC requires # -%source set mpfr https://ftp.gnu.org/gnu/mpfr/mpfr-%{mpfr_version}.tar.bz2 -%source set mpc https://ftp.gnu.org/gnu/mpc/mpc-%{mpc_version}.tar.gz +%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2 +%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz %source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2 # diff --git a/source-builder/config/gcc-4.8-1.cfg b/source-builder/config/gcc-4.8-1.cfg index a090717..aa62837 100644 --- a/source-builder/config/gcc-4.8-1.cfg +++ b/source-builder/config/gcc-4.8-1.cfg @@ -11,18 +11,18 @@ # # GCC core and G++ # -%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2 +%source set gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2 # # Newlib # -%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz +%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz # # Packages GCC requires # -%source set mpfr https://ftp.gnu.org/gnu/mpfr/mpfr-%{mpfr_version}.tar.bz2 -%source set mpc https://ftp.gnu.org/gnu/mpc/mpc-%{mpc_version}.tar.gz +%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2 +%source set mpc http://www.multiprecision.org/downloads/mpc-%{mpc_version}.tar.gz %source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2 # diff --git a/source-builder/config/gcc-4.9-1.cfg b/source-builder/config/gcc-4.9-1.cfg index c73850f..25e4247 100644 --- a/source-builder/config/gcc-4.9-1.cfg +++ b/source-builder/config/gcc-4.9-1.cfg @@ -11,18 +11,18 @@ # # GCC core and G++ # -%source set gcc ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2 +%source set gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2 # # Newlib # -%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz +%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz # # Packages GCC requires # -%source set mpfr https://ftp.gnu.org/gnu/mpfr/mpfr-%{mpfr_version}.tar.bz2 -%source set mpc https://ftp.gnu.org/gnu/mpc/mpc-%{mpc_version}.tar.gz +%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2 +%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz %source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2 # diff --git a/source-builder/config/gcc-common-1.cfg b/source-builder/config/gcc-common-1.cfg index 9154026..4e13efc 100644 --- a/source-builder/config/gcc-common-1.cfg +++ b/source-builder/config/gcc-common-1.cfg @@ -19,7 +19,6 @@ Summary: GCC v%{gcc_version} and Newlib v%{newlib_version} for target %{_targe Version: %{gcc_version} Release: %{release} URL: http://gcc.gnu.org/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Supports Candian Cross (Cxc). @@ -32,6 +31,13 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) %global _gcclibdir %{_prefix}/lib # +# Default LTO to off. +# +%ifn %{defined with_lto} + %define with_lto 0 +%endif + +# # The GCC version depends on the type of build we are doing. # %if %{rsb_released} @@ -41,6 +47,16 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) %endif # +# Packages GCC requires +# +%if %{defined cloog_version} +%source set cloog https://gcc.gnu.org/pub/gcc/infrastructure/cloog-%{cloog_version}.tar.gz +%endif +%if %{defined isl_version} +%source set isl https://gcc.gnu.org/pub/gcc/infrastructure/isl-%{isl_version}.tar.bz2 +%endif + +# # Prepare the source code. # %prep @@ -59,8 +75,8 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) cd ${build_top} # newlib - source_dir_newlib="newlib-%{newlib_version}" - %source setup newlib -q -D -n newlib-%{newlib_version} + source_dir_newlib=%{?newlib_external:%{newlib_expand_name}}%{!?newlib_external:"newlib-%{newlib_version}"} + %source setup newlib -q -D -n ${source_dir_newlib} %patch setup newlib -p1 cd ${build_top} @@ -68,6 +84,28 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) %{__rmfile} ${source_dir_gcc}/newlib %{__ln_s} $PWD/${source_dir_newlib}/newlib ${source_dir_gcc}/newlib +%if %{defined cloog_version} + # CLooG + source_dir_cloog="cloog-%{cloog_version}" + %source setup cloog -q -D -n cloog-%{cloog_version} + %patch setup cloog -p1 + cd ${build_top} + # Build MPFR one-tree style + %{__rmfile} ${source_dir_gcc}/cloog + %{__ln_s} $PWD/${source_dir_cloog} ${source_dir_gcc}/cloog +%endif + +%if %{defined isl_version} + # ISL + source_dir_isl="isl-%{isl_version}" + %source setup isl -q -D -n isl-%{isl_version} + %patch setup isl -p1 + cd ${build_top} + # Build MPFR one-tree style + %{__rmfile} ${source_dir_gcc}/isl + %{__ln_s} $PWD/${source_dir_isl} ${source_dir_gcc}/isl +%endif + # MPFR source_dir_mpfr="mpfr-%{mpfr_version}" %source setup mpfr -q -D -n mpfr-%{mpfr_version} @@ -131,12 +169,6 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) languages="$languages,objc" %endif -%if %{_host_os} == mingw32 - zlib_option="" -%else - zlib_option="--with-system-zlib" -%endif - %{host_build_flags} ../${source_dir_gcc}/configure \ @@ -154,11 +186,10 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) --disable-libstdcxx-pch \ --with-gnu-as --with-gnu-ld --verbose \ --with-newlib \ - "$zlib_option" \ --disable-nls --without-included-gettext \ --disable-win32-registry \ --enable-version-specific-runtime-libs \ - --disable-lto \ + %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \ --enable-newlib-io-c99-formats \ %{?disable_MAKEINFO:MAKEINFO=missing} \ %{?with_iconv:--enable-newlib-iconv} \ diff --git a/source-builder/config/gdb-6-1.cfg b/source-builder/config/gdb-6-1.cfg index deca448..70729b2 100644 --- a/source-builder/config/gdb-6-1.cfg +++ b/source-builder/config/gdb-6-1.cfg @@ -4,6 +4,24 @@ # This configuration file configure's, make's and install's gdb. # +# +# See if the simulator has been disabled for Windows. +# +%if %{_host_os} == win32 + %if %{defined win32-gdb-disable-sim} + %define gdb-disable-sim 1 + %endif +%endif + +# +# Default to building simulators. +# +%ifn %{defined gdb-disable-sim} + %define gdb-disable-sim 0 +%else + %undefine gdb-sim-options +%endif + %include %{_configdir}/checks.cfg Name: %{_target}-gdb-%{gdb_version}-%{_host}-%{release} @@ -11,7 +29,6 @@ Summary: GDB v%{gdb_version} for target %{_target} on host %{_host} Version: %{gdb_version} Release: %{release} URL: http://www.gnu.org/software/gdb/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source @@ -19,30 +36,55 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) %source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2 # +# Disable Python on Cxc builds for now. +# +%if "%{_build}" != "%{_host}" + %define without_python +%endif + +# # Prepare the source code. # %prep - %source setup gdb -q -c -n %{name}-%{version} - cd gdb-%{gdb_version} + build_top=$(pwd) + + gdb_source=%{?gdb_external:%{gdb_expand_name}}%{!?gdb_external:"gdb-%{gdb_version}"} + + source_dir_gdb=${gdb_source} + %source setup gdb -q -n ${gdb_source} %patch setup gdb -p1 - cd .. + + cd ${build_top} %build - export PATH="%{_bindir}:${PATH}" - mkdir -p build - cd build -%if "%{_build}" != "%{_host}" - CFLAGS_FOR_BUILD="-g -O2 -Wall" \ -%endif - CFLAGS="$SB_CFLAGS" \ - ../gdb-%{gdb_version}/configure \ + build_top=$(pwd) + + %{build_directory} + + mkdir -p ${build_dir} + cd ${build_dir} + + %{host_build_flags} + + if test "%{_build}" != "%{_host}" ; then + GDB_LIBS_STATIC="-lexpat" + else + GDB_LIBS_STATIC="-lexpat" + GDB_LIBS="%{_forced_static}" + fi + + LIBS_STATIC=${GDB_LIBS_STATIC} \ + LIBS=${GDB_LIBS} \ + ../${source_dir_gdb}/configure \ --build=%{_build} --host=%{_host} \ --target=%{_target} \ --verbose --disable-nls \ --without-included-gettext \ --disable-win32-registry \ --disable-werror \ - --enable-sim \ + %{!?gdb-disable-sim:--enable-sim}%{?gdb-disable-sim:--disable-sim} \ + %{?gdb-sim-options:%{gdb-sim-options}} \ + --without-zlib \ --with-expat \ %{!?without_python:--with-python} \ --prefix=%{_prefix} --bindir=%{_bindir} \ @@ -51,19 +93,21 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) --mandir=%{_mandir} --infodir=%{_infodir} %{__make} %{?_smp_mflags} all - cd .. + + cd ${build_top} %install - export PATH="%{_bindir}:${PATH}" - rm -rf $SB_BUILD_ROOT + build_top=$(pwd) + + %{__rmdir} $SB_BUILD_ROOT - cd build + cd ${build_dir} %{__make} DESTDIR=$SB_BUILD_ROOT install # Dropped in FSF-binutils-2.9.5, but Cygwin still ships it. - rm -rf $SB_BUILD_ROOT%{_infodir}/configure.info* + %{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info* - rm -f $SB_BUILD_ROOT%{_infodir}/dir + %{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir touch $SB_BUILD_ROOT%{_infodir}/dir - cd .. + cd ${build_top} diff --git a/source-builder/config/gdb-7-1.cfg b/source-builder/config/gdb-7-1.cfg index 21591b5..a415f51 100644 --- a/source-builder/config/gdb-7-1.cfg +++ b/source-builder/config/gdb-7-1.cfg @@ -4,143 +4,4 @@ # This configuration file configure's, make's and install's gdb. # -# -# See if the simulator has been disabled for Windows. -# -# Build using the system's readline, it is in better shape -# than GDB's one with MSYS2. -# -%if %{_host_os} == win32 - %if %{defined win32-gdb-disable-sim} - %define gdb-disable-sim 1 - %endif - %define with_system_readline 1 -%endif - -# -# Default to building simulators. -# -%ifn %{defined gdb-disable-sim} - %define gdb-disable-sim 0 -%else - %undefine gdb-sim-options -%endif - -%include %{_configdir}/checks.cfg - -# -# Select Snapshot Macro Maps -# -%select gdb-snapshot -%select expat-snapshot - -# -# The description. -# -Name: %{_target}-gdb-%{gdb_version}-%{_host}-%{release} -Summary: GDB v%{gdb_version} for target %{_target} on host %{_host} -Version: %{gdb_version} -Release: %{release} -URL: http://www.gnu.org/software/gdb/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) - -# -# GDB has changed it default extension. -# -%ifn %{defined gdb_src_ext} - %define gdb_src_ext gz -%endif - -# -# Source -# -%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.%{gdb_src_ext} - -# -# Disable Python on Cxc builds for now. -# -%if "%{_build}" != "%{_host}" - %define without_python -%endif - -# -# The --with-python option is either the default which is auto or the path to -# the specific python to be used. -# -%if %{defined with_python_path} - %define with_python_option --with-python=%{with_python_path} -%else - %define with_python_option --with-python -%endif - -# -# -# Prepare the source code. -# -%prep - build_top=$(pwd) - - gdb_source=%{?gdb_external:%{gdb_expand_name}}%{!?gdb_external:"gdb-%{gdb_version}"} - - source_dir_gdb=${gdb_source} - %source setup gdb -q -n ${gdb_source} - %patch setup gdb -p1 - - cd ${build_top} - -%build - build_top=$(pwd) - - %{build_directory} - - mkdir -p ${build_dir} - cd ${build_dir} - - %{host_build_flags} - - if test "%{_build}" != "%{_host}" ; then - GDB_LIBS_STATIC="-lexpat" - else - GDB_LIBS_STATIC="-lexpat" - GDB_LIBS="%{_forced_static}" - fi - - LIBS_STATIC=${GDB_LIBS_STATIC} \ - LIBS=${GDB_LIBS} \ - ../${source_dir_gdb}/configure \ - --build=%{_build} --host=%{_host} \ - --target=%{_target} \ - --verbose --disable-nls \ - %{?with_system_readline:--with-system-readline} \ - --without-included-gettext \ - --disable-win32-registry \ - --disable-werror \ - %{!?gdb-disable-sim:--enable-sim}%{?gdb-disable-sim:--disable-sim} \ - %{?gdb-sim-options:%{gdb-sim-options}} \ - --without-zlib \ - --with-expat \ - %{!?without_python:%{with_python_option}} \ - --prefix=%{_prefix} --bindir=%{_bindir} \ - --exec-prefix=%{_exec_prefix} \ - --includedir=%{_includedir} --libdir=%{_libdir} \ - --mandir=%{_mandir} --infodir=%{_infodir} - - %{__make} %{?_smp_mflags} all - - cd ${build_top} - -%install - build_top=$(pwd) - - %{__rmdir} $SB_BUILD_ROOT - - cd ${build_dir} - %{__make} DESTDIR=$SB_BUILD_ROOT install - - # Dropped in FSF-binutils-2.9.5, but Cygwin still ships it. - %{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info* - - %{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir - touch $SB_BUILD_ROOT%{_infodir}/dir - - cd ${build_top} +%include %{_configdir}/gdb-common-1.cfg diff --git a/source-builder/config/gdb-common-1.cfg b/source-builder/config/gdb-common-1.cfg new file mode 100644 index 0000000..cfddf53 --- /dev/null +++ b/source-builder/config/gdb-common-1.cfg @@ -0,0 +1,286 @@ +# +# GDB Common Version 1. +# +# This configuration file configure's, make's and install's gdb. +# + +# +# Python +# +# GDB uses python internally so we need to link to a suitable python +# dev kit. The dev kit for python is the header and a library. These +# files are versioned where the header file is located in a directory +# based on: +# +# pythonM.m/Python.h +# +# where 'M' is the major version number and 'm' is the minor verison +# number. The library is: +# +# libpythonM.m.a +# +# The python command is 'pythonM' which means we need to query it for +# the minor number. +# +# The python running the RSB may not be suitable, for example a MSC, +# MSYS or Cygwin version on Windows when we want the MinGW python dev +# file. A specific version cannot be forced because older versions of +# GDB can only link to 'python2'. +# +# Host support can perform a complex query of the system, for example +# Windows and set '%{gdb_python2}' and '%{gdb_python3}' with the full +# path to that version's executable. +# +# A configuration of GDB can set the version required by setting +# '%{gdb-python-version}' to the versions command, eg python2. +# +# The procedure is: +# +# 1. If the macros '%{gdb_python2}' or '%{gdb_python3}' are present +# use that path they contain. Assume the path is valid. +# +# 2. Does the version of gdb specify a version of python that must be +# used. Override with '%define gdb-python-version python2'. +# +# 3. Search for 'python2' and if not found search for 'python3'. +# +%if !%{defined without_python} + %if %{defined gdb-python2} + %define gdb-enable-python %{gdb_python2} + %else + %if %{defined gdb-python3} + %define gdb-enable-python %{gdb_python3} + %else + %if %{defined gdb-python-version} + %define gdb-enable-python %(command -v %{gdb-python-version} || true) + %else + %define gdb-enable-python %(command -v python2 || true) + %if %{gdb-enable-python} == %{nil} + %define gdb-enable-python %(command -v python3 || true) + %endif + %if %{gdb-enable-python} == %{nil} + %define gdb-enable-python %(command -v python || true}) + %endif + %endif + %if %{gdb-enable-python} == %{nil} + %error "gdb: python: no valid version of python found" + %endif + %endif + %endif + + # + # Get the Python's major and minor version from the python + # command. The headers and libraries are installed under a major/minor + # (mm) version path and name. + # + # The library file name can vary across the hosts so wildcard the search. + # + %if %{!defined gdb-python-config} + %define gdb-python-config %{nil} + %endif + %if %{gdb-python-config} == %{nil} + %define gdb-python-config %(command -v %{gdb-enable-python}-config || true) + %endif + %define gdb-python-ver-mm %(%{gdb-enable-python} --version 2>&1 | sed -e 's/.* //g' | rev | cut -d'.' -f2- | rev) + %define gdb-python-header Python.h + %define gdb-python-ver-header python%{gdb-python-ver-mm}/%{gdb-python-header} + %define gdb-python-ver-lib libpython%{gdb-python-ver-mm}.* + %if %{host_includes} == %{nil} + %define gdb-host-incs %{nil} + %else + %define gdb-host-incs -I '%{host_includes}' + %endif + %if %{gdb-python-config} != %{nil} + %define gdb-python-config-incs -I '%(%{gdb-python-config} --includes)' + %define gdb-python-header-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-incs} %{gdb-python-config-incs} -H %{gdb-python-header}) + %else + %define gdb-python-header-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-incs} -H %{gdb-python-ver-header}) + %endif + %if %{gdb-python-header-check} == not-found && !%{_rsb_getting_source} + %error "gdb: python: header file not found: %{gdb-python-ver-header}, please install" + %endif + # + # Too hard to find on MacOS (darwin), the header is good enough. + # + %ifnos darwin + %if %{host_ldflags} == %{nil} + %define gdb-host-libs %{nil} + %else + %define gdb-host-libs -L '%{host_ldflags}' + %endif + %if %{gdb-python-config} != %{nil} + %define gdb-python-lib-filter awk 'BEGIN{FS=" "}/python/{for(i=1;i<NF;++i)if(match($i,".*lpython.*")) print "lib"substr($i,3)"*";}' + %if %{gdb-python-ver-mm} < 3.8 + %define gdb-python-config-lib-check-flags --ldflags + %else + %define gdb-python-config-lib-check-flags --ldflags --embed + %endif + %define gdb-python-config-libs %(%{gdb-python-config} %{gdb-python-config-lib-check-flags} | %{gdb-python-lib-filter}) + %define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} -l %{gdb-python-config-libs}) + %else + %define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} -l %{gdb-python-ver-lib}) + %endif + %if %{gdb-python-lib-check} == not-found && !%{_rsb_getting_source} + %error "gdb: python: library file not found: %{gdb-python-ver-lib}, please install" + %endif + %endif +%endif + +# +# See if the simulator has been disabled for Windows. +# +# Build using the system's readline, it is in better shape +# than GDB's one with MSYS2. +# +%if %{_host_os} == win32 + %if %{defined win32-gdb-disable-sim} + %define gdb-disable-sim 1 + %endif + %define with_system_readline 1 +%endif + +# +# Default to building simulators. +# +%ifn %{defined gdb-disable-sim} + %define gdb-disable-sim 0 +%else + %undefine gdb-sim-options +%endif + +%include %{_configdir}/checks.cfg + +# +# Select Snapshot Macro Maps +# +%select gdb-snapshot +%select expat-snapshot + +# +# The description. +# +Name: %{_target}-gdb-%{gdb_version}-%{_host}-%{release} +Summary: GDB v%{gdb_version} for target %{_target} on host %{_host} +Version: %{gdb_version} +Release: %{release} +URL: http://www.gnu.org/software/gdb/ + +# +# GDB has changed it default extension. +# +%ifn %{defined gdb_src_ext} + %define gdb_src_ext gz +%endif + +# +# Source +# +%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.%{gdb_src_ext} + +# +# Disable Python on Cxc builds for now. +# +%if "%{_build}" != "%{_host}" + %define without_python +%endif + +# +# The --with-python option is either the default which is auto or the path to +# the specific python to be used. +# +%if !%{defined without_python} + %if %{defined with_python_path} + %define with_python_option --with-python=%{with_python_path} + %else + %if %{defined gdb-enable-python} + %define with_python_option --with-python=%{gdb-enable-python} + %else + %define with_python_option --with-python + %endif + %endif +%endif + +# +# Fix the mess iconv is on FreeBSD 10.0 and higher. +# +%if %{defined iconv_prefix} + %define iconv_opts --with-libiconv-prefix=%{iconv_prefix} +%else + %define iconv_opts %{nil} +%endif + +# +# +# Prepare the source code. +# +%prep + build_top=$(pwd) + + gdb_source=%{?gdb_external:%{gdb_expand_name}}%{!?gdb_external:"gdb-%{gdb_version}"} + + source_dir_gdb=${gdb_source} + %source setup gdb -q -n ${gdb_source} + %patch setup gdb -p1 + + cd ${build_top} + +%build + build_top=$(pwd) + + %{build_directory} + + mkdir -p ${build_dir} + cd ${build_dir} + + %{host_build_flags} + + if test "%{_build}" != "%{_host}" ; then + GDB_LIBS_STATIC="-lexpat" + else + GDB_LIBS_STATIC="-lexpat" + GDB_LIBS="%{_forced_static}" + fi + + LIBS_STATIC=${GDB_LIBS_STATIC} \ + LIBS=${GDB_LIBS} \ + ../${source_dir_gdb}/configure \ + --build=%{_build} --host=%{_host} \ + --target=%{_target} \ + --verbose --disable-nls \ + --disable-gas --disable-binutils --disable-ld --disable-gold --disable-gprof \ + %{?with_system_readline:--with-system-readline} \ + --without-included-gettext \ + --disable-win32-registry \ + --disable-werror \ + %{!?gdb-disable-sim:--enable-sim}%{?gdb-disable-sim:--disable-sim} \ + %{?gdb-sim-options:%{gdb-sim-options}} \ + --without-zlib \ + --with-expat \ + --with-guile=no \ + %{iconv_opts} \ + %{?without_python:--without-python} \ + %{!?without_python:%{with_python_option}} \ + --prefix=%{_prefix} --bindir=%{_bindir} \ + --exec-prefix=%{_exec_prefix} \ + --includedir=%{_includedir} --libdir=%{_libdir} \ + --mandir=%{_mandir} --infodir=%{_infodir} + + %{__make} %{?_smp_mflags} all + + cd ${build_top} + +%install + build_top=$(pwd) + + %{__rmdir} $SB_BUILD_ROOT + + cd ${build_dir} + %{__make} DESTDIR=$SB_BUILD_ROOT install + + # Dropped in FSF-binutils-2.9.5, but Cygwin still ships it. + %{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info* + + %{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir + touch $SB_BUILD_ROOT%{_infodir}/dir + + cd ${build_top} diff --git a/source-builder/config/gettext-0-1.cfg b/source-builder/config/gettext-0-1.cfg index 7758d7b..19402b6 100644 --- a/source-builder/config/gettext-0-1.cfg +++ b/source-builder/config/gettext-0-1.cfg @@ -14,7 +14,6 @@ Summary: GetText offers to programmers, translators, and even users, a well Version: %{gettext_version} Release: %{release} URL: http://www.gnu.org/software/gettext/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source diff --git a/source-builder/config/glib-2-1.cfg b/source-builder/config/glib-2-1.cfg index 6c40be2..09b43fa 100644 --- a/source-builder/config/glib-2-1.cfg +++ b/source-builder/config/glib-2-1.cfg @@ -14,7 +14,6 @@ Summary: GLib provides the core application building blocks for Version: %{glib_version} Release: %{release} URL: https://developer.gnome.org/glib/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source @@ -60,7 +59,8 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) --datadir=%{_datadir} \ --build=%{_build} --host=%{_host} \ --with-sysroot=$SYSROOT \ - --disable-dtrace + --disable-dtrace \ + --with-pcre=internal %{_ld_library_path}=$SYSROOT/lib \ %{__make} %{?_smp_mflags} all diff --git a/source-builder/config/libffi-3-1.cfg b/source-builder/config/libffi-3-1.cfg index d258acb..a201485 100644 --- a/source-builder/config/libffi-3-1.cfg +++ b/source-builder/config/libffi-3-1.cfg @@ -14,12 +14,11 @@ Summary: LibFFI provides a portable, high level programming interface to Version: %{libffi_version} Release: %{release} URL: https://sourceware.org/libffi/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source # -%source set libffi ftp://sourceware.org/pub/libffi/libffi-%{libffi_version}.tar.gz +%source set libffi https://sourceware.org/pub/libffi/libffi-%{libffi_version}.tar.gz # # Prepare the source code. diff --git a/source-builder/config/libiconv-1-1.cfg b/source-builder/config/libiconv-1-1.cfg index 1ccecd4..fd2d738 100644 --- a/source-builder/config/libiconv-1-1.cfg +++ b/source-builder/config/libiconv-1-1.cfg @@ -15,7 +15,6 @@ Summary: Provides an iconv() implementation, for use on systems which Version: %{libiconv_version} Release: %{release} URL: http://www.gnu.org/software/libiconv/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source diff --git a/source-builder/config/libjpeg-1.cfg b/source-builder/config/libjpeg-1.cfg index e6af6ae..6acb02f 100644 --- a/source-builder/config/libjpeg-1.cfg +++ b/source-builder/config/libjpeg-1.cfg @@ -9,11 +9,10 @@ %endif Name: libjpeg-v%{libjpeg_version}-%{_host}-%{release} -Summary: libjpeg is the Independent JPEG Group jpeg library +Summary: libjpeg is the Independent JPEG Group jpeg library Version: %{libjpeg_version} Release: %{release} URL: http://www.ijg.org/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # NTP Source @@ -53,8 +52,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) --mandir=%{_mandir} \ --infodir=%{_infodir} \ --datadir=%{_datadir} \ - --disable-shared \ - --disable-programs + --disable-shared %{__make} %{?_smp_mflags} all diff --git a/source-builder/config/libtool-2-1.cfg b/source-builder/config/libtool-2-1.cfg index 0d1f972..e834e87 100644 --- a/source-builder/config/libtool-2-1.cfg +++ b/source-builder/config/libtool-2-1.cfg @@ -16,12 +16,11 @@ Summary: Libtool v%{libtool_version} for host %{_host} Version: %{libtool_version} Release: %{release} URL: http://www.gnu.org/software/libtool/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source # -%source set libtool ftp://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz +%source set libtool https://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz # # Prepare the source code. @@ -54,6 +53,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) fi export CFLAGS CFLAGS_FOR_BUILD CC + CC=%{__cc} \ CFLAGS="$SB_CFLAGS" \ ./configure \ --build=%{_build} --host=%{_host} \ diff --git a/source-builder/config/libusb-1-1.cfg b/source-builder/config/libusb-1-1.cfg index 271d5e0..803f326 100644 --- a/source-builder/config/libusb-1-1.cfg +++ b/source-builder/config/libusb-1-1.cfg @@ -12,7 +12,6 @@ Summary: LibUSB v%{libusb_version} for target %{_target} on host %{_host} Version: %{libusb_version} Release: %{release} URL: http://libusb.org/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source @@ -34,8 +33,10 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) cd libusb-%{libusb_version} %if "%{_build}" != "%{_host}" - CFLAGS_FOR_BUILD="-g -O2 -Wall" \ + LIBUSB_CFLAGS_FOR_BUILD="-g -O2 -Wall" %endif + + CFLAGS_FOR_BUILD=${LIBUSB_CFLAGS_FOR_BUILD} \ CFLAGS="$SB_CFLAGS" \ ./configure \ --build=%{_build} --host=%{_host} \ diff --git a/source-builder/config/m4-1-1.cfg b/source-builder/config/m4-1-1.cfg index c77e4a3..dc47c6b 100644 --- a/source-builder/config/m4-1-1.cfg +++ b/source-builder/config/m4-1-1.cfg @@ -12,12 +12,11 @@ Summary: M4 v%{m4_version} for host %{_host} Version: %{m4_version} Release: %{release} URL: http://www.gnu.org/software/m4/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source # -%source set m4 ftp://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.gz +%source set m4 https://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.gz # # Prepare the source code. diff --git a/source-builder/config/net-snmp-5-1.cfg b/source-builder/config/net-snmp-5-1.cfg index 3bdaa9f..c82e310 100644 --- a/source-builder/config/net-snmp-5-1.cfg +++ b/source-builder/config/net-snmp-5-1.cfg @@ -13,12 +13,11 @@ Summary: NetSNMP is a SNMP v1, v2c and v3 Management Agent with MIB-II support Version: %{net_snmp_version} Release: %{release} URL: http://www.net-snmp.org/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # NetSNMP Source # -%source set net-snmp https://downloads.sourceforge.net/project/net-snmp/net-snmp/%{net_snmp_version}/net-snmp-%{net_snmp_version}.tar.gz +%source set net-snmp http://downloads.sourceforge.net/project/net-snmp/net-snmp/%{net_snmp_version}/net-snmp-%{net_snmp_version}.tar.gz # # Prepare the source code. @@ -44,6 +43,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) CFLAGS="${CFLAGS} %{net_snmp_cflags}" + LIBS="-lbsd -lm -lz -lrtemsdefaultconfig" \ ../${source_dir_net_snmp}/configure \ --host=%{_host} \ --prefix=%{_prefix} \ diff --git a/source-builder/config/ntp-4-1.cfg b/source-builder/config/ntp-4-1.cfg index 014c935..a7d5982 100644 --- a/source-builder/config/ntp-4-1.cfg +++ b/source-builder/config/ntp-4-1.cfg @@ -13,7 +13,6 @@ Summary: NTP is the Network Time Protocol. Version: %{ntp_version} Release: %{release} URL: http://www.ntp.org/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # NTP Source diff --git a/source-builder/config/or1ksim-1-1.cfg b/source-builder/config/or1ksim-1-1.cfg index fb77567..468f524 100644 --- a/source-builder/config/or1ksim-1-1.cfg +++ b/source-builder/config/or1ksim-1-1.cfg @@ -13,7 +13,6 @@ Summary: or1ksim-github Version: %{or1ksim_version} Release: %{release} URL: https://github.com/openrisc/or1ksim -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source diff --git a/source-builder/config/pixman-0-1.cfg b/source-builder/config/pixman-0-1.cfg index f02c3d6..fc393e8 100644 --- a/source-builder/config/pixman-0-1.cfg +++ b/source-builder/config/pixman-0-1.cfg @@ -15,7 +15,6 @@ Summary: Pixman is a low-level software library for pixel manipulation, Version: %{pixman_version} Release: %{release} URL: http://www.pixman.org/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Source diff --git a/source-builder/config/protobuf-2-1.cfg b/source-builder/config/protobuf-2-1.cfg index f5b49c8..408c56f 100644 --- a/source-builder/config/protobuf-2-1.cfg +++ b/source-builder/config/protobuf-2-1.cfg @@ -15,12 +15,11 @@ Summary: Protocol buffers are Googles language-neutral, Version: %{protobuf_version} Release: %{release} URL: https://developers.google.com/protocol-buffers/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # Protocol Buffers Source # -%source set protobuf https://github.com/google/protobuf/releases/download/v%{protobuf_version}/protobuf-%{protobuf_version}.tar.gz +%source set protobuf https://github.com/protocolbuffers/protobuf/releases/download/v%{protobuf_version}/protobuf-%{protobuf_version}.tar.gz # # Prepare the source code. diff --git a/source-builder/config/qemu-1-1.cfg b/source-builder/config/qemu-1-1.cfg index c19419f..5d78f68 100644 --- a/source-builder/config/qemu-1-1.cfg +++ b/source-builder/config/qemu-1-1.cfg @@ -4,103 +4,6 @@ # This configuration file configure's, make's and install's QEMU. # -%if %{release} == %{nil} -%define release 1 -%endif +%define qemu_disables --disable-smartcard-nss -# -# Select Snapshot Macro Maps -# -%select qemu-snapshot - -# -# The description. -# -Name: qemu-%{qemu_version}-%{_host}-%{release} -Summary: Qemu is a simulator of various processors. -Version: %{qemu_version} -Release: %{release} -URL: http://www.qemu.org/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) - -# -# Source -# -%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2 - -# -# Prepare the source code. -# -%prep - build_top=$(pwd) - - source_dir_qemu="qemu-%{qemu_version}" - %source setup qemu -q -n qemu-%{qemu_version} - %patch setup qemu -p1 - - cd ${build_top} - -%build - build_top=$(pwd) - - %{build_directory} - - mkdir -p ${build_dir} - cd ${build_dir} - - %if %{pkgconfig check vdeplug} - VDE_CONFIG="--enable-vde" - VDE_CFLAGS="%{pkgconfig cflags vdeplug}" - VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}" - %endif - - %{host_build_flags} - - if test "%{_build}" != "%{_host}" ; then - CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-" - fi - - SYSROOT=$SB_TMPPREFIX - - # - # The --extra-cflags and --extra-ldflags do not work as expected. - # - # Hack warning: MSYS2 does not seem to convert the path to - # a shell path from Windows so we keep them - # separate and handle it in the pkgconfig tool. - # - PKG_CONFIG_DEFAULT_PATH=${PKG_CONFIG_PATH} \ - PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \ - PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \ - %{_ld_library_path}=$SYSROOT/lib \ - LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib ${VDE_LDFLAGS}" \ - CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \ - ../${source_dir_qemu}/configure \ - --prefix=%{_prefix} \ - ${CROSS_PREFIX_OPTION} \ - --make=%{__make} \ - ${VDE_CONFIG} \ - --disable-smartcard-nss \ - --disable-werror \ - --disable-tools \ - --disable-pie \ - --disable-vnc \ - --disable-sdl \ - --disable-gtk \ - --disable-opengl \ - --disable-netmap - - %{_ld_library_path}=$SYSROOT/lib \ - %{__make} %{?_smp_mflags} all - - cd ${build_top} - -%install - build_top=$(pwd) - - %{__rmdir} $SB_BUILD_ROOT - - cd ${build_dir} - %{_ld_library_path}=$SYSROOT/lib \ - %{__make} DESTDIR=$SB_BUILD_ROOT install - cd ${build_top} +%include %{_configdir}/qemu-common-1.cfg diff --git a/source-builder/config/sqlite-3-1.cfg b/source-builder/config/sqlite-3-1.cfg index a748848..a0863bd 100644 --- a/source-builder/config/sqlite-3-1.cfg +++ b/source-builder/config/sqlite-3-1.cfg @@ -11,16 +11,16 @@ Name: sqlite-%{sqlite_version}-%{_host}-%{release} Summary: SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, - transactional SQL database engine. + transactional SQL database engine. Version: %{sqlite_version} Release: %{release} -URL: http://www.sqlite.org/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) +URL: https://www.sqlite.org/ # # Sqlite Source # -%source set sqlite http://www.sqlite.org/%{sqlite_src_year}/sqlite-src-%{sqlite_src_version}.zip +%source set sqlite \ + https://www.sqlite.org/%{sqlite_src_year}/sqlite-autoconf-%{sqlite_src_version}.tar.gz # # Prepare the source code. @@ -28,8 +28,8 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) %prep build_top=$(pwd) - source_dir_sqlite="sqlite-src-%{sqlite_src_version}" - %source setup sqlite -q -n sqlite-src-%{sqlite_src_version} + source_dir_sqlite="sqlite-autoconf-%{sqlite_src_version}" + %source setup sqlite -q -n sqlite-autoconf-%{sqlite_src_version} %patch setup sqlite -p1 cd ${build_top} @@ -44,7 +44,21 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) %{host_build_flags} - CFLAGS="${CFLAGS} -DSQLITE_OMIT_WAL=1 -DSQLITE_ENABLE_COLUMN_METADATA=1" + # RTEMS-specific SQLite configuration options. + # See also + # - https://sqlite.org/wal.html#noshm + # - https://sqlite.org/malloc.html + # + # Many other compile-time options may be passed in via CFLAGS. + # See also https://sqlite.org/compile.html + # + # RTEMS filesystems do not support POSIX advisory file locks. Applications + # must choose an appropriate SQLite VFS which avoids them, such as unix-none + # (no locking at all: Application logic must avoid collisions) or + # unix-dotfile. This step must be performed at application startup time. + # See also https://sqlite.org/c3ref/vfs_find.html + # + CFLAGS="${CFLAGS} -DSQLITE_MAX_MMAP_SIZE=0 -DSQLITE_DEFAULT_LOCKING_MODE=1 -DSQLITE_ENABLE_MEMSYS5" ../${source_dir_sqlite}/configure \ --host=%{_host} \ @@ -58,17 +72,10 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) --infodir=%{_infodir} \ --datadir=%{_datadir} \ --disable-largefile \ - --disable-tcl \ - --disable-readline \ - --disable-amalgamation + --disable-readline %{__make} %{?_smp_mflags} sqlite3.h libsqlite3.la - # - # Create the sqlite shell executable so the install works. - # - touch sqlite3 - cd ${build_top} %install @@ -77,10 +84,8 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) %{__rmdir} $SB_BUILD_ROOT cd ${build_dir} - %{__make} DESTDIR=$SB_BUILD_ROOT install + # Warning: The unusual install targets avoid attempting to compile and link + # the SQLite3 command-line shell. The SQLite3 shell is not supported by + # RTEMS. + %{__make} DESTDIR=$SB_BUILD_ROOT install-data install-libLTLIBRARIES cd ${build_top} - - # - # Remove the sqlite shell as it is just a touch. - # - %{__rm} $SB_BUILD_ROOT%{_bindir}/sqlite3 |