[PATCH RSB] rtems-gcc-10-newlib-head.cfg: Add newlib patch

Ryan Long ryan.long at oarcorp.com
Wed Sep 8 16:32:14 UTC 2021


I’ve just changed the optimization flags for rtems-tools, but I think I found where to go to change that.

Using the Xilinx_zynq_a9_qemu BSP for example


  *   Go to bsps/arm/xilinx-zynqmp/config/xilinx_zynqmp.inc
  *   Change the “-O2” value to the different optimization flag in the CFLAGS_OPTIMIZE_V list

From: Joel Sherrill <joel at rtems.org>
Sent: Tuesday, September 7, 2021 12:27 PM
To: Mr. Andrei Chichak <groups at chichak.ca>
Cc: Ryan Long <ryan.long at oarcorp.com>; rtems-devel at rtems.org <devel at rtems.org>
Subject: Re: [PATCH RSB] rtems-gcc-10-newlib-head.cfg: Add newlib patch


On Tue, Sep 7, 2021, 12:18 PM Mr. Andrei Chichak <groups at chichak.ca<mailto:groups at chichak.ca>> wrote:
Hey Joel,

I don’t suppose this update will be in the places where the build system decides on the instruction set that newlib uses for Cortex-M4????

No. This one is just to patch over a big in some of the aarch64 assembly language methods in newlib.

I don't know that it does much as a flag except pick the C versions over assembly language ones.

You'd be better off trying to change the target gcc flags to -Os. I think Ryan knows how to do that. Chris can answer that also

It is a shame that AFAIK every multilib gets the same optimisation flags and macros  some of the smaller parts would be better off defaulting to size over speed.

--joel

A

> On 2021-September-07, at 08:56, Joel Sherrill <joel at rtems.org<mailto:joel at rtems.org>> wrote:
>
> On Tue, Sep 7, 2021 at 8:04 AM Ryan Long <ryan.long at oarcorp.com<mailto:ryan.long at oarcorp.com>> wrote:
>>
>> Alright, I’ll have that in the next version.
>
> I have a patch ready for this and already posted. Just ran out of disk space
> testing it on all architectures on CentOS.
>
> When that build finishes, unless someone complains, I will push it.
>
> --joel
>
>
>>
>>
>> From: Joel Sherrill <joel at rtems.org<mailto:joel at rtems.org>>
>> Sent: Saturday, September 4, 2021 3:31 PM
>> To: Chris Johns <chrisj at rtems.org<mailto:chrisj at rtems.org>>
>> Cc: Ryan Long <ryan.long at oarcorp.com<mailto:ryan.long at oarcorp.com>>; rtems-devel at rtems.org<mailto:rtems-devel at rtems.org> <devel at rtems.org<mailto:devel at rtems.org>>
>> Subject: Re: [PATCH RSB] rtems-gcc-10-newlib-head.cfg: Add newlib patch
>>
>>
>>
>>
>>
>> On Fri, Sep 3, 2021, 9:05 PM Chris Johns <chrisj at rtems.org<mailto:chrisj at rtems.org>> wrote:
>>
>> Can we please join onto this an rtems-tools update so the recent fixes I pushed
>> can be picked up?
>>
>>
>>
>> Ryan can you make that a second patch in this series?
>>
>>
>>
>> --joel
>>
>>
>> Thanks
>> Chris
>>
>> On 4/9/21 2:40 am, Joel Sherrill wrote:
>>> You also should add the patch in the gcc-head-newlib-head
>>> configuration as well for rtems7 tools.
>>>
>>> --joel
>>>
>>> On Fri, Sep 3, 2021 at 11:01 AM Joel Sherrill <joel at rtems.org<mailto:joel at rtems.org>> wrote:
>>>>
>>>> On Fri, Sep 3, 2021 at 9:27 AM Ryan Long <ryan.long at oarcorp.com<mailto:ryan.long at oarcorp.com>> wrote:
>>>>>
>>>>> Adds patch to add the -DPREFER_SIZE_OVER_SPEED flag to aarch64 tool
>>>>> builds with newlib.
>>>>
>>>> This doesn't explain why. This patch is needed to prevent the use of
>>>> the assembly
>>>> versions of some methods in newlib which are incorrect for ilp32. This
>>>> can be removed
>>>> when those methods are updated from ARM. Newlib is quite behind ARM for these
>>>> methods and that will require work from an ARM Newlib person.
>>>>
>>>> Updates #4215,
>>>>
>>>> Improve the comment and ensure the ticket is clear that this is temporary for
>>>> those reasons.
>>>>
>>>>> ---
>>>>> rtems/config/tools/rtems-gcc-10-newlib-head.cfg | 3 +++
>>>>> 1 file changed, 3 insertions(+)
>>>>>
>>>>> diff --git a/rtems/config/tools/rtems-gcc-10-newlib-head.cfg b/rtems/config/tools/rtems-gcc-10-newlib-head.cfg
>>>>> index 69c4fb5..3594d1c 100644
>>>>> --- a/rtems/config/tools/rtems-gcc-10-newlib-head.cfg
>>>>> +++ b/rtems/config/tools/rtems-gcc-10-newlib-head.cfg
>>>>> @@ -13,6 +13,9 @@
>>>>> %patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4215/0001-nios2-Remove-custom-instruction-warnings.patch
>>>>> %hash sha512 0001-nios2-Remove-custom-instruction-warnings.patch afd8a5e6bdcc5b75d5fbbf558bdf56ccac400521a6eec9d88cc95f6be67c481f2dbf8faa0f6ddc1e4ac7c56a84938714d80e46e9cf80ec4b8fcd739986449881
>>>>>
>>>>> +%patch add newlib -p1 https://devel.rtems.org/raw-attachment/ticket/4510/0001-configure.host-Add-DPREFER_SIZE_OVER_SPEED.patch
>>>>> +%hash sha512 0001-configure.host-Add-DPREFER_SIZE_OVER_SPEED.patch ad183b6c9a168d1d751505e64873f117c11fb059819d341c5d715619985b285c324ef27c1177c6300088df7bbe3aebd7fa034034c3892f2bf6ec57324c9b1e2a
>>>>> +
>>>>
>>>> Looks like you forgot to use sha512-base64
>>>>
>>>>
>>>>> %define newlib_version 4f81149
>>>>> %define newlib_external 1
>>>>> %define newlib_expand_name sourceware-mirror-newlib-cygwin-%{newlib_version}
>>>>> --
>>>>> 1.8.3.1
>>>>>
>>>>> _______________________________________________
>>>>> devel mailing list
>>>>> devel at rtems.org<mailto:devel at rtems.org>
>>>>> http://lists.rtems.org/mailman/listinfo/devel
>>> _______________________________________________
>>> devel mailing list
>>> devel at rtems.org<mailto:devel at rtems.org>
>>> http://lists.rtems.org/mailman/listinfo/devel
>>>
> _______________________________________________
> devel mailing list
> devel at rtems.org<mailto:devel at rtems.org>
> http://lists.rtems.org/mailman/listinfo/devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210908/430ed86e/attachment-0001.html>


More information about the devel mailing list