Re: noopt not working
* Shawn Sörbom <shawn@sorbom.com>, 2016-04-23, 15:28:
The problem is that optimization appears to cause a segfault during
runtime.
I'd normally advise fixing the root cause of segfault, instead of
disabling optimization, ...
https://github.com/devshane/zork
... but trying to wrap your head around this code is almost certainly
not worth the trouble. :-)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all noopt
"noopt" doesn't work in DEB_BUILD_MAINT_OPTIONS.
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -g
export DEB_CFLAGS_MAINT_STRIP = -O2
This should normally do the trick, although probably appending -O0 would
be more robust that stripping -O2.
CFLAGS = -O2 #-static
So this upstream makefile doesn't honour CFLAGS from environment.
Luckily, this is trivial to fix: just use "?=" instead of "=".
(This makefile doesn't honour CPPFLAGS or LDFLAGS either; fixing this
would be a bit more work.)
--
Jakub Wilk
Reply to: