From: Chris Johns <chr...@rtems.org> - Update rtems-bsp support to correctly handle hosts for BSP. - Clean up the options for a BSP. - Check all RTEMS 5 packages and add 5/rtems-packages for all that build. - Update download locations and checksum of all packages.
- The work requires the kernel and Libbsd hacve the same prefix. --- rtems/config/5/rtems-packages.bset | 24 ++++++ rtems/config/databases/sqlite-3.8.8.1-1.cfg | 2 +- rtems/config/ftp/curl-7.65.1-1.cfg | 21 +++++ rtems/config/ftp/curl.bset | 20 +++++ rtems/config/graphics/freetype-2.4.10-1.cfg | 2 +- rtems/config/graphics/graphics-all.bset | 5 +- rtems/config/graphics/libjpeg-9a-1.cfg | 2 +- rtems/config/graphics/libpng-1.6.37-1.cfg | 21 +++++ rtems/config/graphics/libpng.bset | 2 +- rtems/config/graphics/libtiff-4.0.10-1.cfg | 21 +++++ rtems/config/graphics/libtiff-4.0.6-1.cfg | 2 +- rtems/config/graphics/libtiff.bset | 2 +- .../graphics/microwindows-0.93-dev-1.cfg | 12 +-- rtems/config/graphics/t1lib-5.1.2-1.cfg | 4 +- rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg | 6 +- rtems/config/net/lwip-1-1.cfg | 12 ++- rtems/config/net/ntp-4.2.6p5-1.cfg | 6 +- rtems/config/net/protobuf-2.6.1-1.cfg | 2 +- rtems/config/rtems-bsp.cfg | 83 +++++++++++++++---- source-builder/config/curl-1.cfg | 80 ++++++++++++++++++ source-builder/config/libpng-1.cfg | 4 +- source-builder/config/libtiff-1.cfg | 2 +- source-builder/config/lwip-1.cfg | 11 +-- source-builder/config/microwindows-1.cfg | 10 +-- source-builder/config/net-snmp-5-1.cfg | 1 + source-builder/config/t1lib-1.cfg | 2 +- source-builder/defaults.mc | 34 +++++--- source-builder/sb/options.py | 12 ++- source-builder/sb/rtems-build-dep | 2 +- source-builder/sb/setbuilder.py | 2 +- 30 files changed, 335 insertions(+), 74 deletions(-) create mode 100644 rtems/config/5/rtems-packages.bset create mode 100644 rtems/config/ftp/curl-7.65.1-1.cfg create mode 100644 rtems/config/ftp/curl.bset create mode 100644 rtems/config/graphics/libpng-1.6.37-1.cfg create mode 100644 rtems/config/graphics/libtiff-4.0.10-1.cfg create mode 100644 source-builder/config/curl-1.cfg diff --git a/rtems/config/5/rtems-packages.bset b/rtems/config/5/rtems-packages.bset new file mode 100644 index 0000000..edc7e6b --- /dev/null +++ b/rtems/config/5/rtems-packages.bset @@ -0,0 +1,24 @@ +# +# RTEMS Packages that build for this release. +# + +# +# Databases +# +databases/sqlite + +# +# Graphics +# +graphics/freetype2 +graphics/libjpeg +graphics/libpng +graphics/libtiff +graphics/t1lib + +# +# Networking +# +ftp/curl +net/lwip +net/protobuf diff --git a/rtems/config/databases/sqlite-3.8.8.1-1.cfg b/rtems/config/databases/sqlite-3.8.8.1-1.cfg index 609d4c1..aac06be 100644 --- a/rtems/config/databases/sqlite-3.8.8.1-1.cfg +++ b/rtems/config/databases/sqlite-3.8.8.1-1.cfg @@ -19,7 +19,7 @@ %define sqlite_src_version 3080801 %define sqlite_src_year 2015 -%hash md5 sqlite-src-%{sqlite_src_version}.zip 9dde57c312da00cbe791bcba42d1e96a +%hash sha512 sqlite-src-%{sqlite_src_version}.zip 4f09228cb0c9c608e492da6e480afe3d27a63e27ccdcf33a88d5e56427f0846efab8930c81026b8e608f1bbb8d63e8d937dd26571deb828617f7efa27a765950 # # Sqlite configuration diff --git a/rtems/config/ftp/curl-7.65.1-1.cfg b/rtems/config/ftp/curl-7.65.1-1.cfg new file mode 100644 index 0000000..abc7e9d --- /dev/null +++ b/rtems/config/ftp/curl-7.65.1-1.cfg @@ -0,0 +1,21 @@ +# +# Curl 7.65.1 +# + +%if %{release} == %{nil} + %define release 1 +%endif + +%include %{_configdir}/rtems-bsp.cfg + +# +# Curl Version +# +%define curl_version 7.65.1 + +%hash sha512 curl-%{curl_version}.tar.xz aba2d979a416d14a0f0852d595665e49fc4f7bff3bee31f3a52b90ba9dc5ffdb09c092777f124215470b72c47ebca7ddb47844cbf5c0e9142099272b6ac55df4 + +# +# Curl Build configuration +# +%include %{_configdir}/curl-1.cfg diff --git a/rtems/config/ftp/curl.bset b/rtems/config/ftp/curl.bset new file mode 100644 index 0000000..84cac39 --- /dev/null +++ b/rtems/config/ftp/curl.bset @@ -0,0 +1,20 @@ +# +# Build set for Curl +# + +%define release 1 + +# +# RTEMS Version +# +%define rtems_version 5 + +# +# The RTEMS URL paths. +# +%include rtems-urls.bset + +# +# Build Curl +# +ftp/curl-7.65.1-1 diff --git a/rtems/config/graphics/freetype-2.4.10-1.cfg b/rtems/config/graphics/freetype-2.4.10-1.cfg index 524dc3a..3963c98 100644 --- a/rtems/config/graphics/freetype-2.4.10-1.cfg +++ b/rtems/config/graphics/freetype-2.4.10-1.cfg @@ -13,7 +13,7 @@ # %define freetype_version 2.4.10 -%hash md5 freetype-%{freetype_version}.tar.gz 4f255c6ee5d5cc2b5c3d423a07386fcb +%hash sha512 freetype-%{freetype_version}.tar.gz 507d1c03d394b695b5a96041ad7ee03b375964c89f007678db864a7e5bd2ee69d83e6c638f4aadaf348c921d37c16741a03ef9bee03196bda2b94ceea409b688 # # freetype Build configuration diff --git a/rtems/config/graphics/graphics-all.bset b/rtems/config/graphics/graphics-all.bset index 5527ca3..b0ea5fe 100644 --- a/rtems/config/graphics/graphics-all.bset +++ b/rtems/config/graphics/graphics-all.bset @@ -2,8 +2,11 @@ # All RTEMS Graphics Build Sets # +graphics/freetype2 graphics/libjpeg graphics/libpng graphics/libtiff graphics/t1lib -graphics/microwindows.bset + +# Remove as microwindows does not build. Please fix and provide a patch. +# graphics/microwindows diff --git a/rtems/config/graphics/libjpeg-9a-1.cfg b/rtems/config/graphics/libjpeg-9a-1.cfg index a366da9..fef32d6 100644 --- a/rtems/config/graphics/libjpeg-9a-1.cfg +++ b/rtems/config/graphics/libjpeg-9a-1.cfg @@ -13,7 +13,7 @@ # %define libjpeg_version 9a -%hash md5 jpegsrc.v%{libjpeg_version}.tar.gz 3353992aecaee1805ef4109aadd433e7 +%hash sha512 jpegsrc.v%{libjpeg_version}.tar.gz 9b21cc115e22c68bea46db462263c5c7a0d10beb192a919ecccbd801a25982b518ce44d8c301dd582ecaba1850e0e0f20e322be82b0e24ae917b9949b4f10d3b # # libjpeg Build configuration diff --git a/rtems/config/graphics/libpng-1.6.37-1.cfg b/rtems/config/graphics/libpng-1.6.37-1.cfg new file mode 100644 index 0000000..f4717f4 --- /dev/null +++ b/rtems/config/graphics/libpng-1.6.37-1.cfg @@ -0,0 +1,21 @@ +# +# libpng 1.6.37 +# + +%if %{release} == %{nil} + %define release 1 +%endif + +%include %{_configdir}/rtems-bsp.cfg + +# +# libpng Version +# +%define libpng_version 1.6.37 + +%hash sha512 libpng-%{libpng_version}.tar.xz 59e8c1059013497ae616a14c3abbe239322d3873c6ded0912403fc62fb260561768230b6ab997e2cccc3b868c09f539fd13635616b9fa0dd6279a3f63ec7e074 + +# +# libpng Build configuration +# +%include %{_configdir}/libpng-1.cfg diff --git a/rtems/config/graphics/libpng.bset b/rtems/config/graphics/libpng.bset index 4e6db7d..57abeaf 100644 --- a/rtems/config/graphics/libpng.bset +++ b/rtems/config/graphics/libpng.bset @@ -12,4 +12,4 @@ # # Build libpng. # -graphics/libpng-1.6.21-1.cfg +graphics/libpng-1.6.37-1.cfg diff --git a/rtems/config/graphics/libtiff-4.0.10-1.cfg b/rtems/config/graphics/libtiff-4.0.10-1.cfg new file mode 100644 index 0000000..901eed1 --- /dev/null +++ b/rtems/config/graphics/libtiff-4.0.10-1.cfg @@ -0,0 +1,21 @@ +# +# libtiff 4.0.10 +# + +%if %{release} == %{nil} + %define release 1 +%endif + +%include %{_configdir}/rtems-bsp.cfg + +# +# tiff Version +# +%define tiff_version 4.0.10 + +%hash sha512 tiff-%{tiff_version}.tar.gz d213e5db09fd56b8977b187c5a756f60d6e3e998be172550c2892dbdb4b2a8e8c750202bc863fe27d0d1c577ab9de1710d15e9f6ed665aadbfd857525a81eea8 + +# +# tiff Build configuration +# +%include %{_configdir}/libtiff-1.cfg diff --git a/rtems/config/graphics/libtiff-4.0.6-1.cfg b/rtems/config/graphics/libtiff-4.0.6-1.cfg index 946daef..bcd7c5b 100644 --- a/rtems/config/graphics/libtiff-4.0.6-1.cfg +++ b/rtems/config/graphics/libtiff-4.0.6-1.cfg @@ -13,7 +13,7 @@ # %define tiff_version 4.0.6 -%hash md5 tiff-%{tiff_version}.tar.gz d1d2e940dea0b5ad435f21f03d96dd72 +%hash sha512 tiff-%{tiff_version}.tar.gz 2c8dbaaaab9f82a7722bfe8cb6fcfcf67472beb692f1b7dafaf322759e7016dad1bc58457c0f03db50aa5bd088fef2b37358fcbc1524e20e9e14a9620373fdf8 # # tiff Build configuration diff --git a/rtems/config/graphics/libtiff.bset b/rtems/config/graphics/libtiff.bset index 434cdbc..f10e60e 100644 --- a/rtems/config/graphics/libtiff.bset +++ b/rtems/config/graphics/libtiff.bset @@ -12,4 +12,4 @@ # # Build libtiff. # -graphics/libtiff-4.0.6-1.cfg +graphics/libtiff-4.0.10-1.cfg diff --git a/rtems/config/graphics/microwindows-0.93-dev-1.cfg b/rtems/config/graphics/microwindows-0.93-dev-1.cfg index 0ab9da4..7ca8968 100644 --- a/rtems/config/graphics/microwindows-0.93-dev-1.cfg +++ b/rtems/config/graphics/microwindows-0.93-dev-1.cfg @@ -11,15 +11,17 @@ # # microwindows Version # -%define microwindows_version 0.93-dev +%define microwindows_version 56041759161132a94df3e575ae995e53d6b6e1d8 %define rtems_git_tools_4_11 %{rtems_http_git}/rtems-tools/plain/tools/4.11 -%source set microwindows git://github.com/ghaerr/microwindows.git +%hash sha512 microwindows-%{microwindows_version}.tar.gz cf29a9d966a8a5b3926aab7f911c47890c9b1a589ff0ecf098e6be45ae1555958b0e437270fb26e353b8c58f261834a3a7f0fce84bea0fdb9138fc38c8703ddc + %patch add microwindows %{rtems_git_tools_4_11}/microwindows/microwindows-0.93-dev.diff -%hash md5 microwindows-0.93-dev.diff 5b06e77d9ee42c8ff0032bba07d01c1a -%patch add microwindows %{rtems_git_tools_4_11}/microwindows/microwindows-0.93-dev-without-keyboard.diff -%hash md5 microwindows-0.93-dev-without-keyboard.diff a675f55750754e1cd82a17496f0e8fab +%hash sha512 microwindows-0.93-dev.diff 2f575f603ce9ccff5c98e9c434d72fb9952d1385903495bf818d50de6568c57c9ca1d3320388e3bae384388d192a389012baf4d734d2cc8481d56f231d2a93d0 + +#%patch add microwindows %{rtems_git_tools_4_11}/microwindows/microwindows-0.93-dev-without-keyboard.diff +#%hash sha512 microwindows-0.93-dev-without-keyboard.diff c235177fa80035ec70957aee1daa9232c9050abddac08e5f7b2977bd58703224367b4262a2ddc2999b1ac64b5ab838ad3ad740ee1490741293cffe7c16575fb2 # # microwindows Build configuration diff --git a/rtems/config/graphics/t1lib-5.1.2-1.cfg b/rtems/config/graphics/t1lib-5.1.2-1.cfg index 58eaa3b..27de3cf 100644 --- a/rtems/config/graphics/t1lib-5.1.2-1.cfg +++ b/rtems/config/graphics/t1lib-5.1.2-1.cfg @@ -13,13 +13,13 @@ # %define t1lib_version 5.1.2 -%hash md5 t1lib-%{t1lib_version}.tar.gz a5629b56b93134377718009df1435f3c +%hash sha512 t1lib-%{t1lib_version}.tar.gz 9f424b19c6f35cc4f194ff7351a4c2352216462c7d1b1d9650ad3a05cf48c6e90c89ccbcda5ecc47a4169a39a850cf84a1fcbf88b3b15614860c27364b631ae3 # # Patch for RTEMS. # %patch add t1lib https://raw.githubusercontent.com/yangqiao/rtems-tools/graphics/tools/4.11/t1lib/t1lib-5.1.2.diff -%hash md5 t1lib-5.1.2.diff 98eeed85780227adf8525deab3679877 +%hash sha512 t1lib-5.1.2.diff 1afd18182350d7d2426a910c61537f8532e149bf37c616f3a4a84ae0767c4549a2be857db6fd1b1994ed86f8a2e2d4cdfb2abdf67053c8ca1ee83893f4b56d23 # # t1lib Build configuration diff --git a/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg b/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg index 7527871..e4fe63e 100644 --- a/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg +++ b/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg @@ -13,7 +13,7 @@ # %define net_snmp_version 5.7.2.1 -%hash md5 net-snmp-%{net_snmp_version}.tar.gz 7db683faba037249837b226f64d566d4 +%hash sha512 net-snmp-%{net_snmp_version}.tar.gz 6c4dadd145cab9572e2559ad99d6794469685086771c6d757d3667da1a061ab86746d53c28d48381c59a90d92b1812b813f3176cff156c41929177fb585299d0 # # We need some special flags to build this version. @@ -23,8 +23,8 @@ # # Patch for RTEMS support. # -%patch add net-snmp %{rtems_git_tools}/net-snmp/rtems-net-snmp-5.7.2.1-20140623.patch -%hash md5 rtems-net-snmp-5.7.2.1-20140623.patch 9a22fb4366a113f5df71ed2acd672b2b +%patch add net-snmp %{rtems_git_tools}/net-snmp/rtems-net-snmp-5.7.2.1-20190704.patch +#%hash sha512 rtems-net-snmp-5.7.2.1-20140623.patch 4eb987d88c6414f2e07d725c2ebb3e88a40191c7befce879cae9ef67143dc25aa88942cfc525d36cd3683476d1cc0f5882d4a730d3bb9c53be2c7a079874d7dd # # NetSNMP Build configuration diff --git a/rtems/config/net/lwip-1-1.cfg b/rtems/config/net/lwip-1-1.cfg index cf25963..8605f1c 100644 --- a/rtems/config/net/lwip-1-1.cfg +++ b/rtems/config/net/lwip-1-1.cfg @@ -11,15 +11,19 @@ # # LWIP Version # -%define lwip_version lwip-c2ebf5544b4268eac9b32c7f3a689ff646d96eef +%define lwip_version c2ebf5544b4268eac9b32c7f3a689ff646d96eef +%hash sha512 lwip-%{lwip_version}.tar.gz bfa93e050133ca591c628f0e3a04f5082f55a655b099cdd49138ebf74494354a4cbbee56839f5939174b4c965b29ec648c24b7479c73393ac94ec536cb578b70 -#Will be modified to be pointing to RTEMS repo +# +# Will be modified to be pointing to RTEMS repo +# %define rtems_ragu_git https://raw.githubusercontent.com/ragunath3252/lwip-nodrv/master + # # Patch for RTEMS support. # -%patch add lwip %{rtems_ragu_git}/rtems.patch -%hash md5 rtems.patch 489c0def3a89e538fb526a5396bf27ca +%patch add lwip --rsb-file=lwip-nodrv-rtems.patch %{rtems_ragu_git}/rtems.patch +%hash sha512 lwip-nodrv-rtems.patch ba49163e11069cb036280023db064625e5d1aed3a6cf3e51c64e59639580e9f758434e60853242fb924eb5cebc73b478f01ff51f24505e85d4c21bb1963415e1 # # LWIP Build configuration diff --git a/rtems/config/net/ntp-4.2.6p5-1.cfg b/rtems/config/net/ntp-4.2.6p5-1.cfg index 43afbf3..34676b6 100644 --- a/rtems/config/net/ntp-4.2.6p5-1.cfg +++ b/rtems/config/net/ntp-4.2.6p5-1.cfg @@ -13,13 +13,13 @@ # %define ntp_version 4.2.6p5 -%hash md5 ntp-%{ntp_version}.tar.gz 00df80a84ec9528fcfb09498075525bc +%hash sha512 ntp-%{ntp_version}.tar.gz 8d76fc7e92b2ea6dd5031e6030a7aba4ff6fb3e19d3bc0153852509861be5d0960e70604814163caedb81f8315a451d78371f99634a50b55cfe1cbd2c69e3046 # # Patch for RTEMS support. # -%patch add ntp %{rtems_git_tools}/ntp/rtems-ntp-4.2.6p5.diff -%hash md5 rtems-ntp-4.2.6p5.diff 6fce685a73873f924a48b19d6b1700fc +%patch add ntp %{rtems_http_git}/rtems-tools/plain/tools/4.11/ntp/rtems-ntp-4.2.6p5.diff +%hash sha512 rtems-ntp-4.2.6p5.diff 257223d207d0b77cde2b9d7add22e3b9d657b58998411d2e20d0b1adf36910be21f1277386c54c34f5d9616fccd29f721d007295708047ea7ae0270a00be25a0 # # NTP Build configuration diff --git a/rtems/config/net/protobuf-2.6.1-1.cfg b/rtems/config/net/protobuf-2.6.1-1.cfg index 5218eac..2e507f6 100644 --- a/rtems/config/net/protobuf-2.6.1-1.cfg +++ b/rtems/config/net/protobuf-2.6.1-1.cfg @@ -13,7 +13,7 @@ # %define protobuf_version 2.6.1 -%hash md5 protobuf-%{protobuf_version}.tar.gz f3916ce13b7fcb3072a1fa8cf02b2423 +%hash sha512 protobuf-%{protobuf_version}.tar.gz 818ac4ad24aca84d214d14ac860a75c14494528821af144d3cb603f69c94d4500512814be6d62cc82973804ebfa99eb94d9f034b309f53cadb622603a7886a3e # # Protocol Buffers configuration diff --git a/rtems/config/rtems-bsp.cfg b/rtems/config/rtems-bsp.cfg index 28d250f..8e1c12a 100644 --- a/rtems/config/rtems-bsp.cfg +++ b/rtems/config/rtems-bsp.cfg @@ -3,13 +3,21 @@ # # -# The RTEMS BSP support requires the host turple, the RTEMS BSP and the path to +# The RTEMS BSP support requires the host tuple, the RTEMS BSP and the path to # the tools. The prefix is set to an installed RTEMS. The built package is # installed into the prefix. # # Keeping the package's installed path in the RTEMS install path and separate -# to the tools lets the tools version vary independently. If --rtems-tools -# (--with-tools) is not provided use the prefix. +# to the tools lets the tools version vary independently. +# +# Provide the path to the RTEMS tools is not in the prefix with the +# --with-tools option. If --with-tools is not provided use the prefix. +# +# Provide the path to the installed RTEMS kernel is not in the prefix with the +# --with-rtems option. If --with-rtems is not provided use the prefix. +# +# Note, only a single path (--with-rtems) for the RTEMS kernel and any other +# add on or 3rd party libraries is supported. # # @@ -23,14 +31,24 @@ %define rtems_bsp_error 1 %endif -%if %{_target} == %{nil} && %{rtems_bsp_error} - %error No RTEMS target specified: --rtems-bsp=arch/bsp (or --target=target) +# +# The target is used by compilers or Cxc builds. +# +%if %{_target} != %{nil} + %error RTEMS BSP builds use --host and not --target %endif -%if %{_host} != %{_build} - %error Canadian cross building for BSP is not supported. +# +# We need a host from the user to specifiy the RTEMS architecture and major +# version. +# +%if %{_host} == %{nil} && %{rtems_bsp_error} + %error No RTEMS host or BSP specified: --host=<arch>-rtems<ver> %endif +# +# We need a BSP from the user. +# %ifn %{defined with_rtems_bsp} %if %{rtems_bsp_error} %error No RTEMS BSP specified: --rtems-bsp=arch/bsp (or --with-rtems-bsp=bsp) @@ -38,14 +56,16 @@ %define with_rtems_bsp sparc/erc32 %endif +# +# If no tools or RTEMS provided use the prefix. +# %ifn %{defined with_tools} %define with_tools %{_prefix} %endif -# -# Set the host to the target. -# -%define _host %{_target} +%ifn %{defined with_rtems} + %define with_rtems %{_prefix} +%endif # # Set the path to the tools. @@ -57,27 +77,54 @@ # enable support when crosscompiling, and filter specific optimisation and # warning from the flags that RTEMS exports. # -%{pkgconfig prefix %{_prefix}/lib/pkgconfig} +%{pkgconfig prefix %{with_rtems}/lib/pkgconfig} %{pkgconfig crosscompile yes} %{pkgconfig filter-flags yes} # # The RTEMS BSP Flags # -%define rtems_bsp %{with_rtems_bsp} -%define rtems_bsp_ccflags %{pkgconfig ccflags %{_host}-%{rtems_bsp}} -%define rtems_bsp_cflags %{pkgconfig cflags %{_host}-%{rtems_bsp}} -%define rtems_bsp_ldflags %{pkgconfig ldflags %{_host}-%{rtems_bsp}} -%define rtems_bsp_libs %{pkgconfig libs %{_host}-%{rtems_bsp}} +%define rtems_bsp %{with_rtems_bsp} +%define rtems_bsp_ccflags %{pkgconfig ccflags %{_host}-%{rtems_bsp}} +%define rtems_bsp_cflags %{pkgconfig cflags %{_host}-%{rtems_bsp}} +%define rtems_bsp_ldflags %{pkgconfig ldflags %{_host}-%{rtems_bsp}} +%define rtems_bsp_libs %{pkgconfig libs %{_host}-%{rtems_bsp}} %if %{rtems_bsp_cflags} == %{nil} && %{rtems_bsp_error} - %error No RTEMS target CFLAGS found; Please check the --rtems-bsp option. + %error No RTEMS BSP CFLAGS found; Please check the --rtems-bsp option. %endif %if %{rtems_bsp_ccflags} == %{nil} %define rtems_bsp_ccflags %{rtems_bsp_cflags} %endif +# +# RTEMS BSP paths +# +%define rtems_bsp_cc %{_host}-gcc +%define rtems_bsp_incpath %{with_rtems}/%{_host}/%{rtems_bsp}/include +%define rtems_bsp_libpath %{with_rtems}/%{_host}/%{rtems_bsp}/lib + +# +# Check for installed libraries. +# +# - Check is LibBSD is install +# - Add librtemsdefaultconfig so configure scripts work. +# +# Note: default BSP flags include the standard RTEMS libraries. +# +%define rtems-dep-check %(%{_sbdir}/sb/rtems-build-dep -c %{with_tools}/bin/%{rtems_bsp_cc} + +%define rtems-libbsd %{rtems-dep-check} -L %{rtems_bsp_libpath} -l libbsd.a) +%if %{rtems-libbsd} == found + %define rtems_bsp_libs %{rtems_bsp_libs} -lbsd -lm -lz +%endif + +%define rtems-defaultconfig %{rtems-dep-check} -L %{rtems_bsp_libpath} -l librtemsdefaultconfig.a) +%if %{rtems-defaultconfig} == found + %define rtems_bsp_libs %{rtems_bsp_libs} -lrtemsdefaultconfig +%endif + # # Update the configure paths to be BSP specific. # diff --git a/source-builder/config/curl-1.cfg b/source-builder/config/curl-1.cfg new file mode 100644 index 0000000..5c1c682 --- /dev/null +++ b/source-builder/config/curl-1.cfg @@ -0,0 +1,80 @@ +# +# Curl (https://curl.haxx.se) +# +# This configuration file configure's, make's and install's libcurl. +# + +%if %{release} == %{nil} +%define release 1 +%endif + +Name: curl-v%{curl_version}-%{_host}-%{release} +Summary: Curl provides libcurl, a package to manage http etc protocols. +Version: %{curl_version} +Release: %{release} +URL: https://curl.haxx.se + +# +# Curl Source +# +%source set curl https://curl.haxx.se/download/curl-%{curl_version}.tar.xz + +# +# Curl's configures requires includes are in the CPPFLAGS. +# +%define host_cflags_no_includes 1 + +# +# Prepare the source code. +# +%prep + build_top=$(pwd) + + source_dir_curl="curl-%{curl_version}" + %source setup curl -q -n curl-%{curl_version} + + cd ${build_top} + +# +# Build the source code. +# +%build + build_top=$(pwd) + + %{build_directory} + + mkdir -p ${build_dir} + cd ${build_dir} + + %{host_build_flags} + + ../${source_dir_curl}/configure \ + --host=%{_host} \ + --prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --exec_prefix=%{_exec_prefix} \ + --includedir=%{_includedir} \ + --libdir=%{_libdir} \ + --libexecdir=%{_libexecdir} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + --datadir=%{_datadir} + + %{__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} + + # + # Remove any executables created in the build + # + %{__rmdir} ${SB_BUILD_ROOT}/%{_bindir} + %{__rmdir} ${SB_BUILD_ROOT}/%{_mandir}/man1 diff --git a/source-builder/config/libpng-1.cfg b/source-builder/config/libpng-1.cfg index 2644948..dac60fc 100644 --- a/source-builder/config/libpng-1.cfg +++ b/source-builder/config/libpng-1.cfg @@ -17,7 +17,9 @@ URL: http://www.libpng.org/ # # libpng Source # -%source set libpng ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng%{libpng_src_dir_revision}/libpng-%{libpng_version}.tar.gz +#%source set libpng ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng%{libpng_src_dir_revision}/libpng-%{libpng_version}.tar.gz + +%source set libpng --rsb-file=libpng-%{libpng_version}.tar.xz http://prdownloads.sourceforge.net/libpng/libpng-%{libpng_version}.tar.xz?download # # Prepare the source code. diff --git a/source-builder/config/libtiff-1.cfg b/source-builder/config/libtiff-1.cfg index f7fa893..c9da951 100644 --- a/source-builder/config/libtiff-1.cfg +++ b/source-builder/config/libtiff-1.cfg @@ -17,7 +17,7 @@ URL: http://www.libtiff.org/ # # libtiff Source # -%source set libtiff ftp://ftp.remotesensing.org/pub/libtiff/tiff-%{tiff_version}.tar.gz +%source set libtiff http://download.osgeo.org/libtiff/tiff-%{tiff_version}.tar.gz # # Prepare the source code. diff --git a/source-builder/config/lwip-1.cfg b/source-builder/config/lwip-1.cfg index 1dd3bb7..ef736c1 100644 --- a/source-builder/config/lwip-1.cfg +++ b/source-builder/config/lwip-1.cfg @@ -17,15 +17,16 @@ URL: http://git.savannah.gnu.org/cgit/lwip.git # # LWIP Source # -%source set lwip git://git.sv.gnu.org/lwip.git?fetch?reset=hard?branch=master?checkout=c2ebf5544b4268eac9b32c7f3a689ff646d96eef +%source set lwip http://git.savannah.gnu.org/cgit/lwip.git/snapshot/lwip-%{lwip_version}.tar.gz + # # Prepare the source code. # %prep build_top=$(pwd) - source_dir_lwip="%{lwip_version}" - %source setup lwip -q -n %{lwip_version} + source_dir_lwip="lwip-%{lwip_version}" + %source setup lwip -q -n lwip-%{lwip_version} %patch setup lwip -p1 cd ${build_top} @@ -40,13 +41,13 @@ URL: http://git.savannah.gnu.org/cgit/lwip.git %{host_build_flags} - cd ${build_top}/%{lwip_version} + cd ${build_top}/lwip-%{lwip_version} export RTEMS_MAKEFILE_PATH=%{_exec_prefix} %{__make} all # cd ${build_top} #%install - build_top=$(pwd)/%{lwip_version} + build_top=$(pwd)/lwip-%{lwip_version} %{__make} install diff --git a/source-builder/config/microwindows-1.cfg b/source-builder/config/microwindows-1.cfg index d6cfab5..6ec3f30 100644 --- a/source-builder/config/microwindows-1.cfg +++ b/source-builder/config/microwindows-1.cfg @@ -8,16 +8,16 @@ %define release 1 %endif -Name: microwindows-v%{microwindows_version}-%{_host}-%{release} +Name: microwindows-%{microwindows_version}-%{_host}-%{release} Summary: microwindows is an Open Source Window System Version: %{microwindows_version} Release: %{release} -URL: http://www.microwindows.org/ +URL: http://www.microwindows.org/ # # microwindows Source # -%source set microwindows ftp://microwindows.censoft.com/pub/microwindows/microwindows-src-%{microwindows_version}.tar.gz +%source set microwindows --rsb-file=microwindows-%{microwindows_version}.tar.gz https://codeload.github.com/ghaerr/microwindows/tar.gz/%{microwindows_version} # # Prepare the source code. @@ -25,8 +25,8 @@ URL: http://www.microwindows.org/ %prep build_top=$(pwd) - source_dir_microwindows="microwin" - %source setup microwindows -q -n microwin + source_dir_microwindows="microwindows-%{microwindows_version}" + %source setup microwindows -q -n microwindows-%{microwindows_version} %patch setup microwindows -p1 cd ${build_top} diff --git a/source-builder/config/net-snmp-5-1.cfg b/source-builder/config/net-snmp-5-1.cfg index bffe430..c82e310 100644 --- a/source-builder/config/net-snmp-5-1.cfg +++ b/source-builder/config/net-snmp-5-1.cfg @@ -43,6 +43,7 @@ URL: http://www.net-snmp.org/ 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/t1lib-1.cfg b/source-builder/config/t1lib-1.cfg index 3cb02c5..6202306 100644 --- a/source-builder/config/t1lib-1.cfg +++ b/source-builder/config/t1lib-1.cfg @@ -17,7 +17,7 @@ URL: http://www.t1lib.org/ # # t1lib Source # -%source set t1lib ftp://ftp.netbsd.org/pub/pkgsrc/distfiles/t1lib-%{t1lib_version}.tar.gz +%source set t1lib http://ftp.netbsd.org/pub/pkgsrc/distfiles/t1lib-%{t1lib_version}.tar.gz # # Prepare the source code. diff --git a/source-builder/defaults.mc b/source-builder/defaults.mc index 3508877..646be78 100644 --- a/source-builder/defaults.mc +++ b/source-builder/defaults.mc @@ -64,14 +64,16 @@ _uid: none, convert, '%(%{__id_u} -n)' # 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, '' # Extra path a platform can override. _extra_path: none, none, '%{_sbdir}' @@ -203,19 +205,22 @@ SB_SOURCE_DIR="%{_sourcedir}" SB_BUILD_DIR="%{_builddir}" # host == build, use build; host != build, host uses host and build uses build SB_HOST_CPPFLAGS="%{host_includes}" -SB_HOST_CFLAGS="%{host_cflags} %{host_includes}" -SB_HOST_CXXFLAGS="%{host_cxxflags} %{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} %{?_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_CPPFLAGS 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}" @@ -326,11 +331,13 @@ if test "%{_build}" != "%{_host}" ; then CFLAGS="${SB_HOST_CFLAGS}" CXXFLAGS="${SB_HOST_CXXFLAGS}" LDFLAGS="${SB_HOST_LDFLAGS}" + 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}" + 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 ,,') @@ -338,30 +345,33 @@ if test "%{_build}" != "%{_host}" ; then CFLAGS_FOR_BUILD="${SB_BUILD_CFLAGS}" CXXFLAGS_FOR_BUILD="${SB_BUILD_CXXFLAGS}" LDFLAGS_FOR_BUILD="${SB_BUILD_LDFLAGS}" + 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}" + 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 CPPFLAGS CFLAGS CXXFLAGS LDFLAGS -export CC_FOR_HOST CXX_FOR_HOST CPPFLAGS_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 +export CC_FOR_HOST CXX_FOR_HOST CPPFLAGS_FOR_HOST CFLAGS_FOR_HOST CXXFLAGS_FOR_HOST LDFLAGS_FOR_HOST LIBS_FOR_HOST +export CC_FOR_BUILD CXX_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD 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' diff --git a/source-builder/sb/options.py b/source-builder/sb/options.py index ae67eeb..d8e7a88 100644 --- a/source-builder/sb/options.py +++ b/source-builder/sb/options.py @@ -420,10 +420,14 @@ class command_line: _host = self.defaults.expand('%{_host}') _build = self.defaults.expand('%{_build}') _target = self.defaults.expand('%{_target}') - if len(_target): - return len(_host) and len(_build) and (_target) and \ - _host != _build and _host != _target - return len(_host) and len(_build) and _host != _build + # + # This has been removed to fix how RTEMS 3rd party libraries + # are built. This may break Cxc tools builds. + # + # if len(_target): + # return len(_host) and len(_build) and (_target) and \ + # _host != _build and _host != _target + return len(_target) and len(_host) and len(_build) and _host != _build def user_macros(self): # diff --git a/source-builder/sb/rtems-build-dep b/source-builder/sb/rtems-build-dep index 1f795d3..48a0823 100755 --- a/source-builder/sb/rtems-build-dep +++ b/source-builder/sb/rtems-build-dep @@ -141,7 +141,7 @@ fi # Library file # if [ ${op} = "library" ]; then - if [ "${OS}" = "Windows_NT" -a "${OSTYPE}" -ne "cygwin" ]; then + if [ "${OS}" = "Windows_NT" -a "${OSTYPE}" != "cygwin" ]; then sep=';' else sep=':' diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py index c94ff8b..159a673 100644 --- a/source-builder/sb/setbuilder.py +++ b/source-builder/sb/setbuilder.py @@ -413,7 +413,7 @@ class buildset: # Dump post build macros. # log.trace('_bset: macros post-build') - log.trace(str(macros)) + log.trace(str(b.macros)) else: raise error.general('invalid config type: %s' % (configs[s])) except error.general as gerr: -- 2.19.1 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel