[PATCH] [RSB] Add support for building rtems-or1k tool-chain.

Chris Johns chrisj at rtems.org
Mon May 26 00:45:23 UTC 2014


On 26/05/2014 10:07 am, Hesham Moustafa wrote:
> On Mon, May 26, 2014 at 12:57 AM, Chris Johns <chris at contemporary.net.au
> <mailto:chris at contemporary.net.au>> wrote:
>
>
>     Just looking at this file I cannot see what has changed ? Why do we
>     need a special gdb build script ?
>
> There is a configuration option added to disable linking with libsim.a.
> The current port for gdb only support remote debugging with or1ksim
> simulator. Can we get it working with if (target==or1k) or something
> similar in the original gdb build script?
>

Ah ok. See below..

>
>         @@ -0,0 +1,95 @@
>         +#
>         +# GDB 7.xx Version 1.
>         +#
>         +# This configuration file configure's, make's and install's gdb.
>         +#
>         +
>         +%include %{_configdir}/checks.cfg
>         +
>         +#
>         +# Select Snapshot Macro Maps
>         +#
>         +%select gdb-snapshot
>         +%select expat-snapshot
>         +
>         +#
>         +# The description.
>         +#
>         +Name:      %{_target}-gdb-%{gdb_version}-__%{release}
>         +Summary:   GDB v%{gdb_version} for target %{_target} on host
>         %{_host}
>         +Version:   %{gdb_version}
>         +Release:   %{release}
>         +URL: http://www.gnu.org/software/__gdb/
>         <http://www.gnu.org/software/gdb/>
>         +BuildRoot: %{_tmppath}/%{name}-root-%(%{____id_u} -n)
>         +
>         +#
>         +# Source
>         +#
>         +%source set gdb
>         http://ftp.gnu.org/gnu/gdb/__gdb-%{gdb_version}.tar.bz2
>         <http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2>
>         +
>         +#
>         +#
>         +# Prepare the source code.
>         +#
>         +%prep
>         +  build_top=$(pwd)
>         +
>         +  source_dir_gdb="gdb-%{gdb___version}"
>         +  %source setup gdb -q -n gdb-%{gdb_version}
>         +  %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 \
>         +    --without-included-gettext \
>         +    --disable-win32-registry \
>         +    --disable-werror \
>         +    --disable-sim \

Is this the change ?

We could make this conditional and enabled by default then disable it in 
the bset file. An example in the gcc configuration is:

http://git.rtems.org/rtems-source-builder/tree/source-builder/config/gcc-common-1.cfg#n145

Chris



More information about the devel mailing list