public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joel Sherrill <joel@rtems.org>
To: Christophe Lyon <christophe.lyon@arm.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Building Single Tree for a Specific Set of CFLAGS
Date: Wed, 27 Mar 2024 14:07:28 -0500	[thread overview]
Message-ID: <CAF9ehCXjbReC4UgUf7_wBOAHLgeT==pSti1H-nwHMSKuGiXDtA@mail.gmail.com> (raw)
In-Reply-To: <8813b548-3356-4059-b642-38dcfde6f19d@arm.com>

[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]

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
>

  parent reply	other threads:[~2024-03-27 19:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 21:52 Joel Sherrill
2024-03-27  8:52 ` Christophe Lyon
2024-03-27 10:35   ` Kai Ruottu
2024-03-27 19:07   ` Joel Sherrill [this message]
2024-03-28  9:17     ` Christophe Lyon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF9ehCXjbReC4UgUf7_wBOAHLgeT==pSti1H-nwHMSKuGiXDtA@mail.gmail.com' \
    --to=joel@rtems.org \
    --cc=christophe.lyon@arm.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).