[Libreoffice-commits] .: solenv/gbuild
Jan Holesovsky
kendy at kemper.freedesktop.org
Wed Mar 30 02:10:24 PDT 2011
solenv/gbuild/gbuild.mk | 42 ++++++++++++++++++++++---------------
solenv/gbuild/platform/macosx.mk | 2 -
solenv/gbuild/platform/solaris.mk | 2 -
solenv/gbuild/platform/unxgcc.mk | 5 +---
solenv/gbuild/platform/windows.mk | 2 -
solenv/gbuild/platform/winmingw.mk | 12 +++++++---
6 files changed, 38 insertions(+), 27 deletions(-)
New commits:
commit 9d91d41bc8696a5bad461211d60eea58297a6a67
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed Mar 30 10:31:36 2011 +0200
Build with no optimizations already with dbglevel == 1.
Based on talk with David Tardod, the dbglevels are supposed to be:
0 - product
1 - debug
2 - advanced debug (with additional code)
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 1dca295..2306f8f 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -87,17 +87,10 @@ else
gb_SYMBOL := $(false)
endif
-
-ifneq ($(strip $(DEBUG)$(debug)),)
-gb_DEBUGLEVEL := 1
-gb_SYMBOL := $(true)
-else
-ifeq ($(gb_PRODUCT),$(true))
gb_DEBUGLEVEL := 0
-else
+ifneq ($(strip $(DEBUG)$(debug)),)
gb_DEBUGLEVEL := 1
endif
-endif
ifneq ($(strip $(DBGLEVEL)$(dbglevel)),)
ifneq ($(strip $(dbglevel)),)
@@ -105,6 +98,9 @@ gb_DEBUGLEVEL := $(strip $(dbglevel))
else
gb_DEBUGLEVEL := $(strip $(DBGLEVEL))
endif
+endif
+
+ifneq ($(gb_DEBUGLEVEL),0)
gb_SYMBOL := $(true)
endif
@@ -303,21 +299,27 @@ SYNOPSIS
make [ -f makefile ] [ options ] [ variable=value ... ] [ targets ] ...
IMPORTANT OPTIONS
- -r Eliminate use of the built-in implicit rules. Improves performance, please use always.
+ -r Eliminate use of the built-in implicit rules. Improves performance,
+ please use always.
-s Silent operation; do not print the commands as they are executed.
-n Print the commands that would be executed, but do not execute them.
-k Continue as much as possible after an error.
-j Specifies the number of jobs (commands) to run simultaneously.
- -l Specifies that no new jobs (commands) should be started if there are others jobs running and the load average is at least load.
+ -l Specifies that no new jobs (commands) should be started if there are
+ others jobs running and the load average is at least load.
- -t Touch files (mark them up to date without really changing them) instead of running their commands.
+ -t Touch files (mark them up to date without really changing them)
+ instead of running their commands.
-W Pretend that the target file has just been modified.
- -o Do not remake the file file even if it is older than its dependencies, and do not remake anything on account of changes in file.
+ -o Do not remake the file file even if it is older than its
+ dependencies, and do not remake anything on account of changes in file.
- -p Print the data base (rules and variable values) that results from reading the makefiles.
+ -p Print the data base (rules and variable values) that results from
+ reading the makefiles.
--debug=b debug make run, see GNU make man page for details
+
(descriptions from GNU make man page)
AVAILABLE TARGETS
@@ -328,10 +330,16 @@ AVAILABLE TARGETS
clean remove all generated files
INTERACTIVE VARIABLES:
- DEBUG If not empty, build with OSL_DEBUG_LEVEL=2 and symbols.
- debug
- ENABLE_SYMBOLS If not empty, build with debug symbols. Automatically enabled by DEBUG/debug.
- enable_symbols
+ DEBUG / debug If not empty, build with DBGLEVEL=1 (see below).
+ ENABLE_SYMBOLS / enable_symbols
+ If not empty, build with debug symbols. Automatically
+ enabled by DEBUG/debug.
+ DBGLEVEL / dbglevel
+ If not empty, force the debug level to the specified value.
+ 0 = no debug
+ 1 = symbols + no optimizations
+ 2 = symbols + no optimizations + extra debug output
+ (OSL_DEBUG_LEVEL is set to 2)
ENABLE_PCH If not empty, use precompiled headers (Windows only).
CFLAGS Add as compiler flags for plain c compilation.
CXXFLAGSX Add as compiler flags for c++ compilation.
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index bbf842d..cc577cb 100755
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -130,7 +130,7 @@ gb_LinkTarget_LDFLAGS := \
$(subst -L../lib , ,$(SOLARLIB)) \
#man ld says: obsolete -Wl,-multiply_defined,suppress \
-ifeq ($(gb_DEBUGLEVEL),2)
+ifneq ($(gb_DEBUGLEVEL),0)
gb_COMPILEROPTFLAGS := -O0
else
gb_COMPILEROPTFLAGS := -O2
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 959ed2f..65b71a3 100755
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -106,7 +106,7 @@ gb_LinkTarget_LDFLAGS := \
-PIC \
-library=no%Cstd \
-ifeq ($(gb_DEBUGLEVEL),2)
+ifneq ($(gb_DEBUGLEVEL),0)
gb_COMPILEROPTFLAGS :=
else
ifeq ($(CPUNAME),INTEL)
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 0985547..5b5d76f 100755
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -141,7 +141,7 @@ gb_LinkTarget_LDFLAGS += \
endif
-ifeq ($(gb_DEBUGLEVEL),2)
+ifneq ($(gb_DEBUGLEVEL),0)
gb_COMPILEROPTFLAGS := -O0
else
gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
@@ -215,10 +215,9 @@ gb_LinkTarget__RPATHS := \
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
-ifeq ($(gb_DEBUGLEVEL),2)
+ifneq ($(gb_DEBUGLEVEL),0)
gb_LinkTarget_CXXFLAGS += -finline-limit=0 -fno-inline -fno-default-inline
gb_LinkTarget_CFLAGS += -finline-limit=0 -fno-inline -fno-default-inline
-
endif
ifeq ($(gb_SYMBOL),$(true))
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 740ecc4..52dffb4 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -204,7 +204,7 @@ gb_CXXFLAGS +=-Zi
gb_CFLAGS +=-Zi
endif
-ifeq ($(gb_DEBUGLEVEL),2)
+ifneq ($(gb_DEBUGLEVEL),0)
gb_COMPILEROPTFLAGS :=
gb_LinkTarget_LDFLAGS += -DEBUG
else
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index 3845eae..2ad299d 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -158,7 +158,7 @@ ifeq ($(MINGW_GCCLIB_EH),YES)
gb_LinkTarget_LDFLAGS += -shared-libgcc
endif
-ifeq ($(gb_DEBUGLEVEL),2)
+ifneq ($(gb_DEBUGLEVEL),0)
gb_COMPILEROPTFLAGS := -O0
else
gb_COMPILEROPTFLAGS := -Os
@@ -370,10 +370,14 @@ endef
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
-ifeq ($(gb_DEBUGLEVEL),2)
-gb_LinkTarget_CXXFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
-gb_LinkTarget_CFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
+ifneq ($(gb_DEBUGLEVEL),0)
+gb_LinkTarget_CXXFLAGS += -finline-limit=0 -fno-inline -fno-default-inline
+gb_LinkTarget_CFLAGS += -finline-limit=0 -fno-inline -fno-default-inline
+endif
+ifeq ($(gb_SYMBOL),$(true))
+gb_LinkTarget_CXXFLAGS += -ggdb3
+gb_LinkTarget_CFLAGS += -ggdb3
endif
gb_LinkTarget_INCLUDE :=\
More information about the Libreoffice-commits
mailing list