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

Hesham Moustafa heshamelmatary at gmail.com
Mon May 26 01:06:34 UTC 2014


On Mon, May 26, 2014 at 2:45 AM, Chris Johns <chrisj at rtems.org> wrote:

> 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

Great! Before submitting the next fixed patch, I would like you give a
feedback regarding this change.
1- I have added a new "%define gdb-disable-sim 1" line to rtems-or1k.bset
2- Add "%{!?gdb-disable-sim:--enable-sim}%{?gdb-disable-sim:--disable-sim}"
to gdb-7-1.cfg (the common gdb file)

Should gdb-disable-sim be defined (with 0 or 1) for all targets? or not
defining it is OK (means that it's 0) ?

>
>
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20140526/6145781c/attachment-0001.html>


More information about the devel mailing list