From 8dd674d6399b5543f589d3b770c97209e3e31c3b Mon Sep 17 00:00:00 2001 From: Kostadin Damyanov Date: Thu, 28 May 2015 00:59:41 +0300 Subject: Haiku: enable debug support --- platform/haiku/detect.py | 12 +++++++++++- platform/haiku/platform_config.h | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py index b443469d8d..0c4d091824 100644 --- a/platform/haiku/detect.py +++ b/platform/haiku/detect.py @@ -39,6 +39,16 @@ def configure(env): env["CC"] = "gcc-x86" env["CXX"] = "g++-x86" - env.Append(CPPFLAGS = ['-DDEBUG_METHODS_ENABLED']) + if (env["target"]=="release"): + if (env["debug_release"]=="yes"): + env.Append(CCFLAGS=['-g2','-fomit-frame-pointer']) + else: + env.Append(CCFLAGS=['-O2','-ffast-math','-fomit-frame-pointer']) + elif (env["target"]=="release_debug"): + env.Append(CCFLAGS=['-O2','-ffast-math','-DDEBUG_ENABLED']) + elif (env["target"]=="debug"): + env.Append(CCFLAGS=['-g2', '-Wall','-DDEBUG_ENABLED','-DDEBUG_MEMORY_ENABLED']) + + #env.Append(CPPFLAGS = ['-DDEBUG_METHODS_ENABLED']) env.Append(CPPFLAGS = ['-DUNIX_ENABLED']) env.Append(LIBS = ['be', 'z', 'network', 'bnetapi']) diff --git a/platform/haiku/platform_config.h b/platform/haiku/platform_config.h index dad24432a5..d37873ca8b 100644 --- a/platform/haiku/platform_config.h +++ b/platform/haiku/platform_config.h @@ -1 +1,4 @@ #include + +// for ifaddrs.h needed in drivers/unix/ip_unix.cpp +#define _BSD_SOURCE 1 -- cgit v1.2.3