Add newlib patch to RTEMS RSB

Gedare Bloom gedare at rtems.org
Fri Jun 21 15:48:50 UTC 2019


On Fri, Jun 21, 2019 at 2:37 AM Vaibhav Gupta <vaibhavgupta40 at gmail.com> wrote:
>
> Hello,
> I figured it out.
> .
> Below is the output given by shell
> ......
> ......
> ......
> config: tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> warning: rtems-gcc-7.4.0-newlib-1d35a003f.cfg:29: invalid format: '%setup patch newlib -p'
> error: gcc-common-1.cfg:80: %patch already setup source: newlib -p1
> Build FAILED
> Build Set: Time 0:06:29.257451
> Build FAILED
> .
> .
> .
> .
> I realized, the name of group of my patch and the source of newlib-source was same in        rtems-gcc-7.4.0-newlib-1d35a003f.cfg. Also, I had put "%patch setup" statement before "%patch add" .
> .

This seems odd. The "rules" around patching need to be clarified in
the documentation.

> .
> .
> Here is the new git-diff. This got compiled successfully
> diff --git a/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg b/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> index b28a4b1..5c5c346 100644
> --- a/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> +++ b/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> @@ -23,6 +23,11 @@
>  %source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
>  %hash sha512 newlib-%{newlib_version}.tar.gz eb5943b207eca05fde4497c29491bbd3d07624e4becb410640ae8e177bd9212ca06cf726ee3882d6db5758cd03daf1462715e4b9b404abcc8f7cee5f811fd48b
>
> +%patch add newlib_ndbm file://0001-Port-ndbm.patch
> +%hash sha512 0001-Port-ndbm.patch 0e05d97d0a6f8a436a233fe4fb3cbda7c0cfeab11cfda1c155d8aa5b80289f386896b0e8c28e5858e1d7409fd22c8d1cbaaccb181bc376845fe6d50b16359db6
> +
> +%patch setup newlib_ndbm -p1
> +
>  %define isl_version 0.16.1
>  %hash sha512 isl-%{isl_version}.tar.bz2 c188667a84dc5bdddb4ab7c35f89c91bf15a8171f4fcaf41301cf285fb7328846d9a367c096012fec4cc69d244f0bc9e95d84c09ec097394cd4093076f2a041b
>
> @@ -40,3 +45,4 @@
>  %define with_iconv   1
>
>  %include %{_configdir}/gcc-7.2-1.cfg
>
>
> On Fri, Jun 21, 2019 at 4:25 AM Chris Johns <chrisj at rtems.org> wrote:
>>
>> On 21/6/19 4:43 am, Gedare Bloom wrote:
>> > On Thu, Jun 20, 2019 at 11:32 AM Vaibhav Gupta <vaibhavgupta40 at gmail.com> wrote:
>> >> + /bin/cat /home/varodek/development/rtems/rsb/rtems/patches/0001-Port-ndbm.patch
>> >> + /usr/bin/patch -p3
>> >
>> > This is the problem, the -p3 is wrong. I don't know where this is
>> > coming from though.
>>
>> This must be from a `%patch` statement. The RSB has no preset patch options and
>> there is no `-p3` in my repo.
>>
>> I suggest you run with --trace and then look at the macro maps to see where is
>> it is coming from.
>>
>> Chris



More information about the devel mailing list