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: unxsolu4.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 #*************************************************************************
33 # 64 bit (LP64) platform
40 CDEFS
+=-D_PTHREADS
-DSYSV
-DSUN
-DSUN4
-D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS
-DIS_LP64
43 .IF
"$(SOLAR_JAVA)"!=""
53 # architecture dependent flags for the C and C++ compiler that can be changed by
54 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
60 CFLAGS
=$(PREENVCFLAGS
) -c
-temp
=/tmp
61 CFLAGSCC
=-xCC
$(ARCH_FLAGS
)
62 CFLAGSCXX
= -features
=no
%altspell
-library
=stlport4
$(ARCH_FLAGS
)
64 # flags to enable build with symbols; required for crashdump feature
65 CFLAGSENABLESYMBOLS
=-g0
-xs
# was temporarily commented out, reenabled before Beta
66 CFLAGSENABLESYMBOLS_CC_ONLY
=-g
-xs
# was temporarily commented out, reenabled before Beta
69 CFLAGS_NO_EXCEPTIONS
=-noex
71 CFLAGSOBJGUIMT
=-KPIC
-mt
72 CFLAGSOBJCUIMT
=-KPIC
-mt
73 CFLAGSSLOGUIMT
=-KPIC
-mt
74 CFLAGSSLOCUIMT
=-KPIC
-mt
78 # -xO3 optimization level 3
79 CFLAGSOPT
= -xO3
-xalias_level
=compatible
83 # Warnings switched off for CXX:
84 # - doubunder: we have many identifiers containing double underscores, some of
85 # them in the stable UDK API we cannot change
86 # - identexpected: Identifier expected instead of "}"
87 # if an enum ends with a comma before the '}'
88 # this warning does not seem to heed #pragma disable_warn, and is not helpful
89 # - inllargeuse: "function is too large and will not be expanded inline" is
91 # - inllargeint: "function is too large to generate inline, consider writing
92 # it yourself" is merely a hint
93 # - notemsource: "could not find source for function" appears to be spurious
94 # - reftotemp: warns about calling non-const functions on temporary objects,
95 # something legally done by boost::scoped_array<T>::reset, for example
96 # (this_type(p).swap(*this))
97 # - truncwarn: "conversion of 64 bit type value to smaller type causes
98 # truncation" at least with CC 5.8 is reported only at the end of a
99 # compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see
100 # sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be
102 # - wnoretvalue: "The last statement should return a value."
103 # CC 5.9: the compiler does often not notice that there is no way
104 # to reach the closing brace of a function without either returning a proper
105 # value or throwing an exception.
106 # - hidef: "d::foo() hides the function b::foo()." We got still some cases of mixed
107 # sal_uInt32 and ULONG usages which needs to be fixed. We can then remove this one
109 CFLAGSWARNCXX
=+w2
-erroff
=doubunder
,identexpected
,inllargeuse
,inllargeint
,notemsource
,reftotemp
,truncwarn
,wnoretvalue
,hidef
,anonnotype
,unassigned
,badargtype2w
110 CFLAGSWALLCC
=$(CFLAGSWARNCC
)
111 CFLAGSWALLCXX
=$(CFLAGSWARNCXX
)
112 CFLAGSWERRCC
=-errwarn
=%all
115 # Once all modules on this platform compile without warnings, set
116 # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
118 MODULES_WITH_WARNINGS
:= \
121 STDOBJVCL
=$(L
)/salmain.o
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
)
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_BRAND
=-R
\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
143 LINKFLAGSRUNPATH_OXT
=
144 LINKFLAGS
=-m64
-w
-mt
-z combreloc
-PIC
-temp
=/tmp
-norunpath
-library
=stlport4
145 LINKCFLAGS
=-m64
-w
-mt
-z combreloc
-norunpath
146 .IF
"$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
147 LINKFLAGS
+= -Wl
,--as-needed
150 # -z text force fatal error if non PIC code is linked into shared library. Such code
151 # would be expensive on startup
153 LINKFLAGSSHLGUI
=$(CHECKFORPIC
) -G
154 LINKFLAGSSHLCUI
=$(CHECKFORPIC
) -G
156 # switches for dynamic and static linking
157 LINKFLAGSDEFS
*= -z defs
159 DIRECT
= -Bdirect
$(LINKFLAGSDEFS
)
162 LINKFLAGSAPPGUI
+=$(DIRECT
)
163 LINKFLAGSAPPCUI
+=$(DIRECT
)
164 LINKFLAGSSHLGUI
+=$(DIRECT
)
165 LINKFLAGSSHLCUI
+=$(DIRECT
)
171 LINKVERSIONMAPFLAG
=-M
173 # mapfile for non-executable stack
174 LINKFLAGSNOEXSTK
*=$(LINKVERSIONMAPFLAG
) $(SOLARENV
)/src
/solaris_noexstk.map
175 LINKFLAGSAPPGUI
+=$(LINKFLAGSNOEXSTK
)
176 LINKFLAGSAPPCUI
+=$(LINKFLAGSNOEXSTK
)
178 APPLINKSTATIC
=$(STATIC
)
179 APPLINKSHARED
=$(DIRECT
)
184 # reihenfolge der libs NICHT egal!
194 # CPPRUNTIME - define where to place C++ runtime if required
195 STDLIBGUIMT
=$(DYNAMIC
) -lpthread
-lm
196 STDLIBCUIMT
=$(DYNAMIC
) -lpthread
-lm
197 STDSHLGUIMT
=$(DYNAMIC
) -lpthread CPPRUNTIME
-lm
-lc
198 STDSHLCUIMT
=$(DYNAMIC
) -lpthread CPPRUNTIME
-lm
-lc
200 # libdl.so - no really an GUI library but required in this context
201 STDLIBGUIMT
+=-lX11
-ldl
202 STDSHLGUIMT
+=-lX11
-ldl
204 # @@@ interposer needed for -Bdirect @@@
205 # LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract
208 .IF
"$(USE_STLP_DEBUG)" != ""
209 LIBSTLPORT
=$(DYNAMIC
) -lstlport_sunpro_debug
210 LIBSTLPORTST
=$(STATIC
) -lstlport_sunpro_debug
$(DYNAMIC
)
212 LIBSTLPORT
=$(DYNAMIC
) -lstlport_sunpro
213 LIBSTLPORTST
=$(STATIC
) -lstlport_sunpro
$(DYNAMIC
)
214 .ENDIF
# "$(USE_STLP_DEBUG)" != ""
224 IGNORE_SYMBOLS
=S-ILP32
227 RCFLAGS
=-fo
$@
$(RCFILES
)
237 LDUMP
=cppfilt
/b
/n
/o
/p