Opened 7 years ago

Closed 6 years ago

#12044 closed Bugs (fixed)

Passing -Ofast to pathscale toolchain is unsafe and break stuff

Reported by: Michał Górny <mgorny@…> Owned by: Vladimir Prus
Milestone: To Be Determined Component: build
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

When attempting to bootstrap boost-build with pathscale toolset, the build fails with internal compiler problem. It turns out it happens because of -Ofast being passed to the compiler.

It is unclear to me why -Ofast -O3 is being used there (no other toolset does that) but it sounds like a really bad idea. Besides to triggering compiler bugs like the one mentioned there, it also enables various insecure optimizations.

Please consider 'lowering' the flags down to regular -O3. I'm attaching a bootstrap.log with the failure and a proposed patch.

Attachments (2)

bootstrap.log (22.8 KB ) - added by Michał Górny <mgorny@…> 7 years ago.
Boostrap log
0001-Do-not-pass-Ofast-to-pathscale-toolset.patch (998 bytes ) - added by Michał Górny <mgorny@…> 7 years ago.
The patch

Download all attachments as: .zip

Change History (4)

by Michał Górny <mgorny@…>, 7 years ago

Attachment: bootstrap.log added

Boostrap log

by Michał Górny <mgorny@…>, 7 years ago

The patch

comment:1 by Vladimir Prus, 7 years ago

Hi Michał,

I have applied your patch, thanks. It should be included in 1.61.

No idea why -Ofast was used for pathscale in the first place, but since no core Boost.Build developers work on that toolset, and this option is there since 2007, I would imagine it was a workaround for some other issue.

comment:2 by Vladimir Prus, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.