On Thu, Apr 14, 2022 at 06:49:12PM +0100, Stuart Henderson wrote:
> On 2022/04/08 22:14, Mikhail wrote:
> > On Fri, Apr 08, 2022 at 08:03:14PM +0100, Stuart Henderson wrote:
> > > It's too late for 7.1 release.
> > > 
> > > Re: the -O2 issue, does setting -std=c89 fix the problem?
> > 
> > I think epic developers won't take the risk, the software has very old
> > history and we didn't receive any random crashes reports while being
> > simply with '-O' (epic4 and epic5 are still actively maintained, all
> > efforts are on the later, though).
> > 
> > I've plans to submit net/epic5 port, because it has gained pledge/unveil
> > support, does -O will be considered as an issue by committers?
> 
> - don't set MODPY_MAJOR_VERSION

Thanks for review. Fixed.

> - my previous comments about the CFLAGS handing stand:
> 
> # You must not try to compile epic with "gcc -O2" because -O2 will
> # generate bad code that leads to random crashes.  When you use -O2, gcc
> # assumes the source is conformant to ISO C99's requirements about
> # alias-safety, and EPIC, being a C90 program, does not conform, so the
> # result is undefined behavior (which means it crashes randomly.)
> CFLAGS:=        ${CFLAGS:C/-O2/-O/g}
> 
> --snip--
> My thinking is that, if the code has behaviour which is considered
> undefined by the C standard assumed by the compiler, no level of
> optimization is safe. Maybe now you get lucky and -O works (on whichever
> architecture you've tested) but I don't think it's reasonable to assume
> that this is the case everywhere, or will be the case following compiler
> updates.
> 
> (Of course on many OpenBSD architectures the relevant compiler is not
> GCC anyway).
> --snip--

I've changed -O to -O0.

> and your proposal doesn't work if the user builds from ports with CFLAGS=-O3

Such change has to go to net/epic4 too, because currently it builds with
-O2, so I added such lines to Makefile:
CFLAGS:=        ${CFLAGS:C/-O1/-O0/g}
CFLAGS:=        ${CFLAGS:C/-O2/-O0/g}
CFLAGS:=        ${CFLAGS:C/-O3/-O0/g}
CFLAGS:=        ${CFLAGS:C/-O4/-O0/g}
CFLAGS:=        ${CFLAGS:C/-Ofast/-O0/g}
CFLAGS:=        ${CFLAGS:C/-Os/-O0/g}
CFLAGS:=        ${CFLAGS:C/-Oz/-O0/g}

New tgz is attached.

Attachment: epic5.tar.gz
Description: application/gzip

Reply via email to