mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
Clean up 4.9 build issues.
Add support so 4.9 builds on a recent FreeBSD using clang.
This commit is contained in:
parent
c46f212a89
commit
b537e55364
@ -23,6 +23,18 @@
|
|||||||
%source add gcc ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.bz2
|
%source add gcc ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_version}.tar.bz2
|
||||||
%patch add newlib %{rtems_newlib_patches}/newlib-1.16.0-rtems4.9-20090324.diff
|
%patch add newlib %{rtems_newlib_patches}/newlib-1.16.0-rtems4.9-20090324.diff
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checksums.
|
||||||
|
#
|
||||||
|
%hash sha512 gcc-core-4.3.2.tar.bz2 7fa7cfd57b3cb37990f41132037666d511a480df28d6d5a0620520501488abad89c7843067188bbe23f0c4d3eb5d113537a6a9375135596b58b3d7a848dc8a39
|
||||||
|
%hash sha512 gcc-core-4.3.2-rtems4.9-20090825.diff d326372a756a7289404031eb16dcc51c15259342ea3f8697f23cfa754ee38305d5e6aaeef56c83f11cdd28c85711c430d894a87303ad932b024a17fa4aaa4f63
|
||||||
|
%hash sha512 gcc-g++-%{gcc_version}.tar.bz2 b349344a9ea67418cca4b7465263e7c28b28008b9fbd76d7db2fb4ad38e63a943c601bc33e641319d48a48a8848562afff96c9ddaf90141d9ab835be6b955bb7
|
||||||
|
%hash sha512 mpfr-2.4.2.tar.bz2 c004b3dbf86c04960e4a1f8db37a409a7cc4cb76135e76e98dcc5ad93aaa8deb62334ee13ff84447a7c12a5e8cb57f25c62ac908c24920f1fb1a38d79d4a4c5e
|
||||||
|
%hash sha512 mpc-0.8.2.tar.gz dcaac3897adf1411e1199e295e88d7438afc600f412565c3b450b0102b83751eb160f85b7522891195ff0a0a29fccedd07dc011a950969a0979c4e3d4efc1e10
|
||||||
|
%hash sha512 gmp-5.0.5.tar.bz2 64ba88a4a64fefb16eae9c644ea81194011ea0b42664a5af6b014e7da3d0f09605dee518b9a361b06510311cdfd496ab68d09da3d85d6680bdac3f765eb67f61
|
||||||
|
%hash sha512 newlib-1.16.0.tar.gz 40eb96bbc6736a16b6399e0cdb73e853d0d90b685c967e77899183446664d64570277a633fdafdefc351b46ce210a99115769a1d9f47ac749d7e82837d4d1ac3
|
||||||
|
%hash sha512 newlib-1.16.0-rtems4.9-20090324.diff 6222e85dc8a5f49089742b09348b4f9663861d8c41dba79227d0ff343d4a9f71a5a1d7aacd61567401b924c6453f0e44bc8045226f25ded2bd3fa8ede4c9742f
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gcc/newlib build instructions. We use 4.7 Release 1.
|
# The gcc/newlib build instructions. We use 4.7 Release 1.
|
||||||
#
|
#
|
||||||
|
@ -7,12 +7,20 @@
|
|||||||
|
|
||||||
%define gdb_version 6.8
|
%define gdb_version 6.8
|
||||||
|
|
||||||
|
#
|
||||||
|
# Force the standard of C code for GCC.
|
||||||
|
#
|
||||||
|
%define build_cflags %{build_cflags} --std=gnu89 -Wno-return-type
|
||||||
|
|
||||||
#
|
#
|
||||||
# RTEMS Build Set patches.
|
# RTEMS Build Set patches.
|
||||||
#
|
#
|
||||||
%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.bz2
|
%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.bz2
|
||||||
%patch add gdb %{rtems_gdb_patches}/gdb-6.8-rtems4.9-20091111.diff
|
%patch add gdb %{rtems_gdb_patches}/gdb-6.8-rtems4.9-20091111.diff
|
||||||
|
|
||||||
|
%hash sha512 gdb-6.8a.tar.bz2 5114fe14ab25dc085590acff3a6feb75eb93347e501c634548308c4f51b31416ea23b8e612dfc54da466d3e7471e210d8f7a12ff6c050e9e89920884e5a64008
|
||||||
|
%hash sha512 gdb-6.8-rtems4.9-20091111.diff 2e6eb2bdeac4bba7c2fcaf701399148fc5de82dfa81e021111f5a20654afe5aad77d6fd0edbc31965107f2fe9a43738938d79a313836267ad69dc8509fcbf691
|
||||||
|
|
||||||
#
|
#
|
||||||
# The gdb build instructions. We use 6.xx Release 1.
|
# The gdb build instructions. We use 6.xx Release 1.
|
||||||
#
|
#
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
%define rtems_kernel_version 4.9.6
|
%define rtems_kernel_version 4.9.6
|
||||||
%define rtems_kernel_compression bz2
|
%define rtems_kernel_compression bz2
|
||||||
|
|
||||||
|
%hash sha512 rtems-4.9.6.tar.bz2 16ab7b2f9119208a24dc0bd21361a5fd910e73044c42d7b68174490ca9cc5c226543664831f9a036f28d1cf8b61d19a15404516d7a87d424e0bc2c09e60767e3
|
||||||
|
|
||||||
#
|
#
|
||||||
# The RTEMS build instructions. We use 4.xx Release 1.
|
# The RTEMS build instructions. We use 4.xx Release 1.
|
||||||
#
|
#
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
#
|
#
|
||||||
# GCC 4.7 Version 1.
|
# GCC 4.3.1 Version 1.
|
||||||
#
|
#
|
||||||
# This configuration file configure's, make's and install's gcc. It uses
|
# This configuration file configure's, make's and install's gcc. It uses
|
||||||
# newlib, MPFR, MPC, and GMP in a one-tree build configuration.
|
# 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
|
# Source
|
||||||
#
|
#
|
||||||
|
@ -4,6 +4,24 @@
|
|||||||
# This configuration file configure's, make's and install's gdb.
|
# 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
|
%include %{_configdir}/checks.cfg
|
||||||
|
|
||||||
Name: %{_target}-gdb-%{gdb_version}-%{_host}-%{release}
|
Name: %{_target}-gdb-%{gdb_version}-%{_host}-%{release}
|
||||||
@ -18,31 +36,56 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
#
|
#
|
||||||
%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
|
%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.
|
# Prepare the source code.
|
||||||
#
|
#
|
||||||
%prep
|
%prep
|
||||||
%source setup gdb -q -c -n %{name}-%{version}
|
build_top=$(pwd)
|
||||||
cd gdb-%{gdb_version}
|
|
||||||
|
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
|
%patch setup gdb -p1
|
||||||
cd ..
|
|
||||||
|
cd ${build_top}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export PATH="%{_bindir}:${PATH}"
|
build_top=$(pwd)
|
||||||
mkdir -p build
|
|
||||||
cd build
|
%{build_directory}
|
||||||
%if "%{_build}" != "%{_host}"
|
|
||||||
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
|
mkdir -p ${build_dir}
|
||||||
%endif
|
cd ${build_dir}
|
||||||
CFLAGS="$SB_CFLAGS" \
|
|
||||||
../gdb-%{gdb_version}/configure \
|
%{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} \
|
--build=%{_build} --host=%{_host} \
|
||||||
--target=%{_target} \
|
--target=%{_target} \
|
||||||
--verbose --disable-nls \
|
--verbose --disable-nls \
|
||||||
--without-included-gettext \
|
--without-included-gettext \
|
||||||
--disable-win32-registry \
|
--disable-win32-registry \
|
||||||
--disable-werror \
|
--disable-werror \
|
||||||
--enable-sim \
|
%{!?gdb-disable-sim:--enable-sim}%{?gdb-disable-sim:--disable-sim} \
|
||||||
|
%{?gdb-sim-options:%{gdb-sim-options}} \
|
||||||
|
--without-zlib \
|
||||||
--with-expat \
|
--with-expat \
|
||||||
%{!?without_python:--with-python} \
|
%{!?without_python:--with-python} \
|
||||||
--prefix=%{_prefix} --bindir=%{_bindir} \
|
--prefix=%{_prefix} --bindir=%{_bindir} \
|
||||||
@ -51,19 +94,21 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|||||||
--mandir=%{_mandir} --infodir=%{_infodir}
|
--mandir=%{_mandir} --infodir=%{_infodir}
|
||||||
|
|
||||||
%{__make} %{?_smp_mflags} all
|
%{__make} %{?_smp_mflags} all
|
||||||
cd ..
|
|
||||||
|
cd ${build_top}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
export PATH="%{_bindir}:${PATH}"
|
build_top=$(pwd)
|
||||||
rm -rf $SB_BUILD_ROOT
|
|
||||||
|
|
||||||
cd build
|
%{__rmdir} $SB_BUILD_ROOT
|
||||||
|
|
||||||
|
cd ${build_dir}
|
||||||
%{__make} DESTDIR=$SB_BUILD_ROOT install
|
%{__make} DESTDIR=$SB_BUILD_ROOT install
|
||||||
|
|
||||||
# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
|
# 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
|
touch $SB_BUILD_ROOT%{_infodir}/dir
|
||||||
|
|
||||||
cd ..
|
cd ${build_top}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user