https://bz.apache.org/ooo/show_bug.cgi?id=125475

truckman <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |g

--- Comment #8 from truckman <[email protected]> ---
Created attachment 84898
  --> https://bz.apache.org/ooo/attachment.cgi?id=84898&action=edit
another workaround that works by disabling optimization of the two affected
files

I ran into this problem when working on the FreeBSD port.  I did some searching
for a solution and saw that the LibreOffice folks were proposing a solution
similar to the patch in attachment 84310.  I tried it, but didn't have good
luck.  I think it fixed the problem on x86_64, but not intel.  There are two
files that trigger the bug when compiled with gcc 4.9 and -Os optimization.  On
FreeBSD (and I believe Linux as well), only one of them is compiled with -Os on
x86_64, and both are compiled with -Os on intel.

Trying to force the compiler to export these symbols also seems to be the wrong
approach since these symbols are for inline class methods, so they should be
private to the object file.

My initial fix in the FreeBSD port was to patch solenv/inc/unxfbsdi.mk and
solenv/gbuild/platform/freebsd.mk on the fly when gcc 4.9 was detected,
replacing "-Os" with "-O0".  I also filed this gcc bug report:
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65009>.

More recently, I modified the FreeBSD port to re-enable most optimization by
replacing "-Os" with "-Os -fno-devirtualize -fno-devirtualize-speculatively".

Another possibility is to disable optimization only on the two files that are
affected by this gcc bug, which I implemented in the attached patch.  With it I
was able to get clean builds with gcc 4.9 on both intel and x86_64.

The last time I tried, the bug was still present in the latest gcc 4.9, but a
comment in gcc bug report says that it is fixed in the trunk version of gcc
(5?).

-- 
You are receiving this mail because:
You are the assignee for the issue.

Reply via email to