* Building gcc 12 cross-compiler with --enable-lto on FreeBSD fails
@ 2022-06-15 9:25 Chris Johns
2022-06-15 9:56 ` Richard Biener
0 siblings, 1 reply; 3+ messages in thread
From: Chris Johns @ 2022-06-15 9:25 UTC (permalink / raw)
To: gcc
Hi,
I am trying to build a cross-compiler on FreeBSD with --enable-lto because a
chip vendor is using it when building controller software that is part of a system.
The build I am using symlinks gmp, mpfr etc as source so they are built as part
of the gcc build.
The mpfr package is reporting ...
build/mpfr/config.log:configure:17408: error: Link Time Optimisation is not
supported (see config.log for details).
Should the enable option be passed to these packages?
I have assumed the enable option for LTO is for the cross compiler and not the
host gcc?
Thanks
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Building gcc 12 cross-compiler with --enable-lto on FreeBSD fails
2022-06-15 9:25 Building gcc 12 cross-compiler with --enable-lto on FreeBSD fails Chris Johns
@ 2022-06-15 9:56 ` Richard Biener
2022-06-15 10:40 ` Chris Johns
0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2022-06-15 9:56 UTC (permalink / raw)
To: Chris Johns; +Cc: GCC Development
On Wed, Jun 15, 2022 at 11:27 AM Chris Johns <chris@contemporary.net.au> wrote:
>
> Hi,
>
> I am trying to build a cross-compiler on FreeBSD with --enable-lto because a
> chip vendor is using it when building controller software that is part of a system.
>
> The build I am using symlinks gmp, mpfr etc as source so they are built as part
> of the gcc build.
>
> The mpfr package is reporting ...
>
> build/mpfr/config.log:configure:17408: error: Link Time Optimisation is not
> supported (see config.log for details).
>
> Should the enable option be passed to these packages?
You shouldn't need --enable-lto, it's effect (adding lto to the set of compiled
languages) is already the default. You can use --enable-languages=default,lto
to achieve the same effect without getting the mpfr side-effect.
> I have assumed the enable option for LTO is for the cross compiler and not the
> host gcc?
it's for the built GCC, enabling LTO support (but not for enabling
building GCC itself
with LTO).
Richard.
>
> Thanks
> Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Building gcc 12 cross-compiler with --enable-lto on FreeBSD fails
2022-06-15 9:56 ` Richard Biener
@ 2022-06-15 10:40 ` Chris Johns
0 siblings, 0 replies; 3+ messages in thread
From: Chris Johns @ 2022-06-15 10:40 UTC (permalink / raw)
To: Richard Biener; +Cc: GCC Development
On 15/6/22 7:56 pm, Richard Biener wrote:
> On Wed, Jun 15, 2022 at 11:27 AM Chris Johns <chris@contemporary.net.au> wrote:
>>
>> Hi,
>>
>> I am trying to build a cross-compiler on FreeBSD with --enable-lto because a
>> chip vendor is using it when building controller software that is part of a system.
>>
>> The build I am using symlinks gmp, mpfr etc as source so they are built as part
>> of the gcc build.
>>
>> The mpfr package is reporting ...
>>
>> build/mpfr/config.log:configure:17408: error: Link Time Optimisation is not
>> supported (see config.log for details).
>>
>> Should the enable option be passed to these packages?
>
> You shouldn't need --enable-lto, it's effect (adding lto to the set of compiled
> languages) is already the default. You can use --enable-languages=default,lto
> to achieve the same effect without getting the mpfr side-effect.
Oh that is great and I had no idea this is how it is controlled. I have rebuilt
my compiler and it is now building. Nice.
>> I have assumed the enable option for LTO is for the cross compiler and not the
>> host gcc?
>
> it's for the built GCC, enabling LTO support (but not for enabling
> building GCC itself
> with LTO).
It now makes sense. I will also update the RTEMS tools builds.
Thanks
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-15 10:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 9:25 Building gcc 12 cross-compiler with --enable-lto on FreeBSD fails Chris Johns
2022-06-15 9:56 ` Richard Biener
2022-06-15 10:40 ` Chris Johns
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).