On Wed, Mar 27, 2024 at 3:53 AM Christophe Lyon via Gcc <gcc@gcc.gnu.org>
wrote:

> Hi!
>
> On 3/26/24 22:52, Joel Sherrill via Gcc wrote:
> > Hi
> >
> > For RTEMS, we normally build a multilib'ed gcc+newlib, but I have a case
> > where the CPU model is something not covered by our multilibs and not one
> > we are keen to add. I've looked around but not found anything that makes
> me
> > feel confident.
> >
> > What's the magic for building a gcc+newlib with a single set of libraries
> > that are built for a specific CPU CFLAGS?
> >
> > I am trying --disable-multlibs on the gcc configure and adding
> > CFLAGS_FOR_TARGET to make.
> >
> > Advice appreciated.
> >
>
> I would configure GCC with --disable-multilibs --with-cpu=XXX
> --with-mode=XXX --with-float=XXX [maybe --with-fpu=XXX]
> This way GCC defaults to what you want.
>

Thanks. Is there any documentation or even a good example? I found
--with-mode=[arm|thumb] but am having trouble mapping the others back
to GCC options.

I have this for CFLAGS_FOR_TARGET

"-mcpu=cortex-m7 -mthumb -mlittle-endian -mfloat-abi=hard -mfpu=fpv5-sp-d16
-march=armv7e-m+fpv5"

I think that means...

--with-mode=thumb   for -mthumb
--with-cpu=cortex-m7 for -mcortex-m7
--with-float=hard         for -mfloat-abi=hard

That leaves a few options I don't know how to map.

--joel

>
> Thanks,
>
> Christophe
>
>
> > Thanks.
> >
> > --joel
>

Reply via email to