[Libreoffice-commits] .: configure.in solenv/gbuild

2012-09-07 Thread Libreoffice Gerrit user
 configure.in  |   20 ++--
 solenv/gbuild/gbuild.help.txt |   16 +---
 2 files changed, 19 insertions(+), 17 deletions(-)

New commits:
commit d53400c0b9f9205ebdabdf31df05d660aee59520
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Sep 7 09:32:19 2012 +0200

Clarify --enable-symbols misnomer

Change-Id: Id3c206219385d6ab4673d1c8f6236a6cb665512a

diff --git a/configure.in b/configure.in
index 5291f0f..c5a9357 100644
--- a/configure.in
+++ b/configure.in
@@ -745,9 +745,9 @@ AC_ARG_ENABLE(atl,
 
 AC_ARG_ENABLE(symbols,
 AS_HELP_STRING([--enable-symbols],
-[Include debugging symbols in output. WARNING - a complete build needs
- a lot of space (roughly 10 GiB) and takes much longer (enables -g
- compiler flag for GCC or equivalent).]),
+[Include debugging information in output (symbols is misleading here;
+ enables -g compiler option or equivalent).  WARNING: A complete build
+ needs a lot of space (roughly 10 GiB) and takes much longer.]),
 ,)
 
 AC_ARG_ENABLE(werror,
@@ -758,13 +758,13 @@ AC_ARG_ENABLE(werror,
 
 AC_ARG_ENABLE(debug,
 AS_HELP_STRING([--enable-debug],
-[Include debugging symbols like with --enable-symbols, disable compiler
- optimization and inlining plus extra debugging code like assertions.
- Extra large build! (enables -g compiler flag and dmake debug=true)
- If you need even more verbose output, build a module with
+[Include debugging information like with --enable-symbols, disable
+ compiler optimization and inlining plus extra debugging code like
+ assertions. Extra large build! (enables -g compiler flag and dmake
+ debug=true) If you need even more verbose output, build a module with
  build -- debug=true dbglevel=2.
  You can also use this switch as follows:
- --enable-debug=all -sw/ -Library_sc to enable symbols only for
+ --enable-debug=all -sw/ -Library_sc to enable debugging only for
  the specified gbuild-build targets (all means everything, - prepended
  means not to enable, / appended means everything in the directory,
  there is no ordering, more specific overrides more general, and
@@ -4041,9 +4041,9 @@ else
 fi
 AC_SUBST(ENABLE_LTO)
 
-dnl whether to include symbols into final build.
+dnl whether to include debgugging information into final build.
 dnl ===
-AC_MSG_CHECKING([whether to include symbols])
+AC_MSG_CHECKING([whether to include debugging information])
 if test -n $enable_symbols -a $enable_symbols != no; then
 ENABLE_SYMBOLS=TRUE
 AC_MSG_RESULT([yes])
diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index 6802206..b658867 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -50,18 +50,20 @@ AVAILABLE TARGETS
 INTERACTIVE VARIABLES:
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.
+   If not empty, build with debugging information.
+   Automatically enabled by DEBUG/debug.
DBGLEVEL / dbglevel
If not empty, force the debug level to the specified 
value. The
debug level is passed to the source code through 
OSL_DEBUG_LEVEL
macro.
0 = no debug
-   1 = symbols + no optimizations
-   2 = symbols + no optimizations + extra debug output. 
OSL_TRACE
-   starts being active on this level.
-   3... = symbols + no optimizations + extra debug output 
(usually
-  extremely verbose). Levels  2 are not used very 
much.
+   1 = debugging information + no optimizations
+   2 = degugging information + no optimizations + extra
+   debug output. OSL_TRACE starts being active on this
+   level.
+   3... = degugging information + no optimizations + extra
+  debug output (usually extremely verbose). Levels
+   2 are not used very much.
 
TIMELOG / timelog
If not empty enable the RTL_LOGFILE_* time logging 
facility.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in solenv/gbuild

2012-05-10 Thread Tor Lillqvist
 configure.in |   46 +--
 solenv/gbuild/platform/macosx.mk |   14 +++
 2 files changed, 54 insertions(+), 6 deletions(-)

New commits:
commit a24a980424ec2ec81b13c8e5a95394d62cbf7406
Author: Tor Lillqvist t...@iki.fi
Date:   Thu May 10 22:59:30 2012 +0300

Make visibility tests work as intended on Mac OS X

If the tests detect that visibiliy works, then use it also in
gbuild. In the old build system, -fvisibility=hidden was already
being used on Mac OS X if HAVE_GCC_VISIBILITY_FEATURE had been
detected.

In configure.in, let's not hardcode the -shared, -fpic and -Wl,-z,defs
options or the .so suffix used in visibility-related tests. Factor
them out and use platform-specific options. Done just for Mac OS X so
far. Using the Linux options for Mac OS X caused visibility tests to
silently and misleadingly fail.

Yes, it is silly to now define some platform-specific options in three
places: configure.in, solenv/inc/* for the old build system, and
solenv/gbuild/platform/* for gbuild.

At least with my Xcode3 installation, I need to pass an -isysroot flag
pointing to the SDK when running $CC -E, otherwise headers weren't
found. This was then misinterpreted as the visibility tests failing.

Pass -DHAVE_GCC_VISIBILITY_FEATURE to the compiler if configure
detected visibility working. In that case also pass
-fvisibility=hidden. HAVE_GCC_VISIBILITY_FEATURE being defined is
supposed to mean that the -fvisibility=hidden option is used, I think.

Pass also -fvisibility-inlines-hidden if that was detected to work.

Change-Id: I I I58d566fcb07584246e91f45e683ce9b31208edba

diff --git a/configure.in b/configure.in
index b09a935..4322a07 100644
--- a/configure.in
+++ b/configure.in
@@ -140,6 +140,18 @@ test_xrender=yes
 test_cups=yes
 test_fontconfig=yes
 
+# Default values, as such probably valid just for Linux, set
+# differently below just for Mac OS X,but at least better than
+# hardcoding these as we used to do. Much of this is duplicated also
+# in solenv for old build system and for gbuild, ideally we should
+# perhaps define stuff like this only here in configure.in?
+
+LINKFLAGSSHL=-shared
+PICSWITCH=-fpic
+DLLPOST=.so
+
+LINKFLAGSNOUNDEFS=-Wl,-z,defs
+
 case $host_os in
 
 solaris*)
@@ -244,6 +256,16 @@ darwin*) # Mac OS X or iOS
 _os=Darwin
 fi
 enable_systray=no
+# See comment above the case $host_os
+LINKFLAGSSHL=-dynamiclib -single_module
+
+# -fPIC is default
+PICSWITCH=
+
+DLLPOST=.dylib
+
+# -undefined error is the default
+LINKFLAGSNOUNDEFS=
 ;;
 
 freebsd*)
@@ -4661,6 +4683,11 @@ if test \( $_os != WINNT -o $WITH_MINGW = yes 
\); then
 
 AC_LANG_PUSH([C++])
 
+save_CPPFLAGS=$CPPFLAGS
+if test -n $MACOSX_SDK_PATH; then
+CPPFLAGS=-isysroot $MACOSX_SDK_PATH $CPPFLAGS
+fi
+
 if test $HAVE_GCC_VISIBILITY_FEATURE = TRUE; then
 AC_MSG_CHECKING([if STL headers are visibility safe])
 AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
@@ -4674,7 +4701,7 @@ if test \( $_os != WINNT -o $WITH_MINGW = yes \); 
then
 
 if test $HAVE_GCC_VISIBILITY_FEATURE = TRUE; then
 sharedlink_ldflags_save=$LDFLAGS
-LDFLAGS=$LDFLAGS -fvisibility-inlines-hidden -fpic -shared
+LDFLAGS=$LDFLAGS -fvisibility-inlines-hidden $PICSWITCH $LINKFLAGSSHL
 
 AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL 
headers])
 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
@@ -4682,7 +4709,13 @@ if test \( $_os != WINNT -o $WITH_MINGW = yes 
\); then
 using namespace std;
 ]], [[
 istringstream strm( test ); return 0;
-]])],[$EGREP -q  unresolvable conftest.err;
+]])],
+# Ugh, surely bad to assume an error message will contain
+# the word unresolvable, a problem with
+# -fvisibility-inlines-hidden and STL headers might cause
+# some more obscure message on some platform, and anway,
+# the error message could be localised.
+[$EGREP -q unresolvable conftest.err;
 if test $? -eq 0; then gccvisok=no; else gccvisok=yes; 
fi],[gccvisok=no
 ])
 AC_MSG_RESULT([$gccvisok])
@@ -4708,16 +4741,15 @@ struct S2: S1int { virtual ~S2(); };
 struct S3: S2 { virtual ~S3(); }; S3::~S3() {}
 _ACEOF
 gccvisinlineshiddenok=yes
-if ! $CXX $CXXFLAGS $CPPFLAGS -shared -fPIC 
-fvisibility-inlines-hidden conftestlib1.cc -o libconftest1.so /dev/null 
2/dev/null; then
+if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC 
-fvisibility-inlines-hidden conftestlib1.cc -o libconftest1$DLLPOST; then
 gccvisinlineshiddenok=no
 else
-if ! $CXX $CXXFLAGS $CPPFLAGS -shared -fPIC 
-fvisibility-inlines-hidden conftestlib2.cc -L. -lconftest1 -Wl,-z,defs -o 
libconftest2.so