1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: unxsoli4.mk,v $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
37 CDEFS
+=-D_PTHREADS
-DSYSV
-DSUN
-DSUN4
-D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS
-DSTLPORT_VERSION
=$(STLPORT_VER
)
40 .IF
"$(SOLAR_JAVA)"!=""
50 # architecture dependent flags for the C and C++ compiler that can be changed by
51 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
57 CFLAGS
=$(PREENVCFLAGS
) -c
-temp
=/tmp
58 CFLAGSCC
=-xCC
$(ARCH_FLAGS
)
59 CFLAGSCXX
=-features
=no
%altspell
-library
=no
%Cstd
$(ARCH_FLAGS
)
61 # flags to enable build with symbols; required for crashdump feature
62 CFLAGSENABLESYMBOLS
=-g0
-xs
# was temporarily commented out, reenabled before Beta
63 CFLAGSENABLESYMBOLS_CC_ONLY
=-g
-xs
# was temporarily commented out, reenabled before Beta
66 CFLAGS_NO_EXCEPTIONS
=-noex
68 CFLAGSOBJGUIMT
=-KPIC
-mt
69 CFLAGSOBJCUIMT
=-KPIC
-mt
70 CFLAGSSLOGUIMT
=-KPIC
-mt
71 CFLAGSSLOCUIMT
=-KPIC
-mt
75 CFLAGSOPT
=-xarch
=generic
-xO3
79 # Warnings switched off for CXX:
80 # - doubunder: we have many identifiers containing double underscores, some of
81 # them in the stable UDK API we cannot change
82 # - identexpected: Identifier expected instead of "}"
83 # if an enum ends with a comma before the '}'
84 # this warning does not seem to heed #pragma disable_warn, and is not helpful
85 # - inllargeuse: "function is too large and will not be expanded inline" is
87 # - inllargeint: "function is too large to generate inline, consider writing
88 # it yourself" is merely a hint
89 # - notemsource: "could not find source for function" appears to be spurious
90 # - reftotemp: warns about calling non-const functions on temporary objects,
91 # something legally done by boost::scoped_array<T>::reset, for example
92 # (this_type(p).swap(*this))
93 # - truncwarn: "conversion of 64 bit type value to smaller type causes
94 # truncation" at least with CC 5.8 is reported only at the end of a
95 # compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see
96 # sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be
98 # - wnoretvalue: warning about the last statement of a function not
99 # returning a value. Unfortunately triggers on perfectly acceptable
100 # code, for example if the last statement in is a throw statement
101 # - anonnotype: Warns if a type is declared in an anonymous union. Temporary
102 # disabled until issue i97325 is fixed. Note: The compiler is actually
103 # right about this warning, the C++ standard is explicit about this.
105 CFLAGSWARNCXX
=+w2
-erroff
=doubunder
,identexpected
,inllargeuse
,inllargeint
,notemsource
,reftotemp
,truncwarn
,wnoretvalue
,anonnotype
106 CFLAGSWALLCC
=$(CFLAGSWARNCC
)
107 CFLAGSWALLCXX
=$(CFLAGSWARNCXX
)
108 CFLAGSWERRCC
=-errwarn
=%all
111 # Once all modules on this platform compile without warnings, set
112 # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
114 MODULES_WITH_WARNINGS
:= \
117 STDOBJVCL
=$(L
)/salmain.o
121 LINK
=/usr
/local
/purify-4.2
-solaris2
/purify CC
127 # link against set of baseline libraries
129 C_RESTRICTIONFLAGS
*=-xc99
=none
130 #LD_OPTIONS+:=-L$(SYSBASE)/usr/lib
131 CDEFS
+=-DSYSBASE
="$(SYSBASE)"
132 CFLAGSCC
+=$(C_RESTRICTIONFLAGS
)
133 #.EXPORT : LD_OPTIONS
134 .ENDIF
# "$(SYSBASE)"!=""
136 # -z combreloc combines multiple relocation sections. Reduces overhead on startup
137 # -norunpath prevents the compiler from recording his own libs in the runpath
138 LINKFLAGSRUNPATH_URELIB
=-R
\''$$ORIGIN'\'
139 LINKFLAGSRUNPATH_UREBIN
=-R
\''$$ORIGIN/../lib:$$ORIGIN'\'
140 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
141 LINKFLAGSRUNPATH_OOO
=-R
\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
142 LINKFLAGSRUNPATH_SDK
=-R
\''$$ORIGIN/../../ure-link/lib'\'
143 LINKFLAGSRUNPATH_BRAND
=-R
\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
144 LINKFLAGSRUNPATH_OXT
=
145 LINKFLAGSRUNPATH_NONE
=
146 LINKFLAGS
=-w
-mt
-z combreloc
-PIC
-temp
=/tmp
-norunpath
-library
=no
%Cstd
147 .IF
"$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
148 LINKFLAGS
+= -Wl
,--as-needed
150 LINKCFLAGS
=-w
-mt
-z combreloc
-norunpath
152 # -z text force fatal error if non PIC code is linked into shared library. Such code
153 # would be expensive on startup
155 LINKFLAGSSHLGUI
=$(CHECKFORPIC
) -G
156 LINKFLAGSSHLCUI
=$(CHECKFORPIC
) -G
158 # switches for dynamic and static linking
159 LINKFLAGSDEFS
*= -z defs
161 DIRECT
= -Bdirect
$(LINKFLAGSDEFS
)
164 LINKFLAGSAPPGUI
+=$(DIRECT
)
165 LINKFLAGSAPPCUI
+=$(DIRECT
)
166 LINKFLAGSSHLGUI
+=$(DIRECT
)
167 LINKFLAGSSHLCUI
+=$(DIRECT
)
170 LINKFLAGSPROF
=-L
$(COMPATH
)/WS6U1
/lib
/libp
-xpg
-z allextract
173 LINKVERSIONMAPFLAG
=-M
175 # mapfile for non-executable stack
176 LINKFLAGSNOEXSTK
*=$(LINKVERSIONMAPFLAG
) $(SOLARENV
)/src
/solaris_noexstk.map
177 LINKFLAGSAPPGUI
+=$(LINKFLAGSNOEXSTK
)
178 LINKFLAGSAPPCUI
+=$(LINKFLAGSNOEXSTK
)
180 APPLINKSTATIC
=$(STATIC
)
181 APPLINKSHARED
=$(DIRECT
)
186 # reihenfolge der libs NICHT egal!
196 # CPPRUNTIME - define where to place C++ runtime if required
197 STDLIBGUIMT
=$(DYNAMIC
) -lpthread
-lm
198 STDLIBCUIMT
=$(DYNAMIC
) -lpthread
-lm
199 STDSHLGUIMT
=$(DYNAMIC
) -lpthread CPPRUNTIME
-lm
-lc
200 STDSHLCUIMT
=$(DYNAMIC
) -lpthread CPPRUNTIME
-lm
-lc
202 # libdl.so - no really an GUI library but required in this context
203 STDLIBGUIMT
+=-lX11
-ldl
204 STDSHLGUIMT
+=-lX11
-ldl
206 # @@@ interposer needed for -Bdirect @@@
207 # LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract
210 .IF
"$(USE_STLP_DEBUG)" != ""
211 LIBSTLPORT
=$(DYNAMIC
) -lstlport_sunpro_debug
212 LIBSTLPORTST
=$(STATIC
) -lstlport_sunpro_debug
$(DYNAMIC
)
214 LIBSTLPORT
=$(DYNAMIC
) -lstlport_sunpro
215 LIBSTLPORTST
=$(STATIC
) -lstlport_sunpro
$(DYNAMIC
)
216 .ENDIF
# "$(USE_STLP_DEBUG)" != ""
226 IGNORE_SYMBOLS
=S-LP64
229 RCFLAGS
=-fo
$@
$(RCFILES
)
239 LDUMP
=cppfilt
/b
/n
/o
/p