Hi,

yeah, well, Makefiles, … in T2 we use wrappers for compilers et al. to inject 
everywhere deterministically the compiler flags we want, …

While at it I wanted to make my life easier and base CXXFLAGS on CFLAGS. For 
some magic that did not work with

CXXFLAGS ?= $(CFLAGS) …

so I ended up committing this for now:

--- Makefile    (revision 2056)
+++ Makefile    (revision 2057)
@@ -7,10 +7,8 @@
 X_BUILD_IMPLICIT=1
 
 # -s silcently corrupts binaries on OS X, sigh -ReneR
-CFLAGS = -Wall -O2
-CXXFLAGS = -Wall -O2 -Wno-sign-compare
-#CFLAGS = -Wall -O0 -ggdb
-#CXXFLAGS = -Wall -O0 -ggdb
+CFLAGS ?= -Wall -O2 # -O1 -ggdb # -fsanitize=address -fsanitize=undefined
+CXXFLAGS = $(CFLAGS) -Wno-sign-compare
 
 # for config.h
 CPPFLAGS += -I .

I hope it works for you.

I will review the other patches a bit later when I have more time.

        René

On Feb 27, 2015, at 11:03, Sven Eckelmann <[email protected]> wrote:

> From: Jakub Wilk <[email protected]>
> 
> Build environments (like the ones from Distributions like Debian) may want
> to overwrite the CFLAGS/CXXFLAGS to introduce things like hardening flags or
> prepare special debug builds. This is not cleanly possible when the Makefile
> presets a value unconditionally.
> ---
> Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index d4e3cce..8b2c69d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -7,8 +7,8 @@ include utility/Makefile
> X_BUILD_IMPLICIT=1
> 
> # -s silcently corrupts binaries on OS X, sigh -ReneR
> -CFLAGS = -Wall -O2
> -CXXFLAGS = -Wall -O2 -Wno-sign-compare
> +CFLAGS ?= -Wall -O2
> +CXXFLAGS = $(CFLAGS) -Wno-sign-compare
> #CFLAGS = -Wall -O0 -ggdb
> #CXXFLAGS = -Wall -O0 -ggdb
> 
> -- 
> 2.1.4
> 

-- 
 ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
 http://exactcode.com | http://exactscan.com | http://ocrkit.com | 
http://t2-project.org | http://rene.rebe.de

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe exact-image

Reply via email to