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: unxsols4.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 #*************************************************************************
34 # needs -D__sparcv8plus because it's not defined by the assembler with -xarch=v8plus
35 AFLAGS
=-P
-xarch
=v8plus
-D__sparcv8plus
38 CDEFS
+=-D_PTHREADS
-DSYSV
-DSUN
-DSUN4
-D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS
-DSTLPORT_VERSION
=$(STLPORT_VER
)
41 .IF
"$(SOLAR_JAVA)"!=""
51 # architecture dependent flags for the C and C++ compiler that can be changed by
52 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
58 CFLAGS
=$(PREENVCFLAGS
) -c
-temp
=/tmp
59 # CC defines __sparcv8plus with -xarch=v8plus, cc does not (sigh)
60 CFLAGSCC
=-xCC
-D__sparcv8plus
$(ARCH_FLAGS
)
61 CFLAGSCXX
=-features
=no
%altspell
-library
=no
%Cstd
$(ARCH_FLAGS
)
63 # flags to enable build with symbols; required for crashdump feature
64 CFLAGSENABLESYMBOLS
=-g0
-xs
# was temporarily commented out, reenabled before Beta
65 CFLAGSENABLESYMBOLS_CC_ONLY
=-g
-xs
# was temporarily commented out, reenabled before Beta
68 CFLAGS_NO_EXCEPTIONS
=-noex
70 CFLAGSOBJGUIMT
=-KPIC
-mt
71 CFLAGSOBJCUIMT
=-KPIC
-mt
72 CFLAGSSLOGUIMT
=-KPIC
-mt
73 CFLAGSSLOCUIMT
=-KPIC
-mt
77 # -m32 -xarch=sparc restrict target to 32 bit sparc
78 # -xO3 optimization level 3
79 # -xspace don't do optimizations which do increase binary size
80 # -xprefetch=yes do prefetching (helps on UltraSparc III)
81 CFLAGSOPT
=-m32
-xarch
=sparc
-xO3
-xspace
-xprefetch
=yes
85 # Warnings switched off for CXX:
86 # - doubunder: we have many identifiers containing double underscores, some of
87 # them in the stable UDK API we cannot change
88 # - identexpected: Identifier expected instead of "}"
89 # if an enum ends with a comma before the '}'
90 # this warning does not seem to heed #pragma disable_warn, and is not helpful
91 # - inllargeuse: "function is too large and will not be expanded inline" is
93 # - inllargeint: "function is too large to generate inline, consider writing
94 # it yourself" is merely a hint
95 # - notemsource: "could not find source for function" appears to be spurious
96 # - reftotemp: warns about calling non-const functions on temporary objects,
97 # something legally done by boost::scoped_array<T>::reset, for example
98 # (this_type(p).swap(*this))
99 # - truncwarn: "conversion of 64 bit type value to smaller type causes
100 # truncation" at least with CC 5.8 is reported only at the end of a
101 # compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see
102 # sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be
104 # - wnoretvalue: warning about the last statement of a function not
105 # returning a value. Unfortunately triggers on perfectly acceptable
106 # code, for example if the last statement in is a throw statement
107 # - anonnotype: Warns if a type is declared in an anonymous union. Temporary
108 # disabled until issue i97325 is fixed. Note: The compiler is actually
109 # right about this warning, the C++ standard is explicit about this.
111 CFLAGSWARNCXX
=+w2
-erroff
=doubunder
,identexpected
,inllargeuse
,inllargeint
,notemsource
,reftotemp
,truncwarn
,wnoretvalue
,anonnotype
112 CFLAGSWALLCC
=$(CFLAGSWARNCC
)
113 CFLAGSWALLCXX
=$(CFLAGSWARNCXX
)
114 CFLAGSWERRCC
=-errwarn
=%all
117 # Once all modules on this platform compile without warnings, set
118 # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
120 MODULES_WITH_WARNINGS
:= \
123 STDOBJVCL
=$(L
)/salmain.o
127 LINK
=/usr
/local
/purify-4.2
-solaris2
/purify CC
133 # link against set of baseline libraries
135 C_RESTRICTIONFLAGS
*=-xc99
=none
136 #LD_OPTIONS+:=-L$(SYSBASE)/usr/lib
137 CDEFS
+=-DSYSBASE
="$(SYSBASE)"
138 CFLAGSCC
+=$(C_RESTRICTIONFLAGS
)
139 #.EXPORT : LD_OPTIONS
140 .ENDIF
# "$(SYSBASE)"!=""
142 # -z combreloc combines multiple relocation sections. Reduces overhead on startup
143 # -norunpath prevents the compiler from recording his own libs in the runpath
144 LINKFLAGSRUNPATH_URELIB
=-R
\''$$ORIGIN'\'
145 LINKFLAGSRUNPATH_UREBIN
=-R
\''$$ORIGIN/../lib:$$ORIGIN'\'
146 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
147 LINKFLAGSRUNPATH_OOO
=-R
\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
148 LINKFLAGSRUNPATH_SDK
=-R
\''$$ORIGIN/../../ure-link/lib'\'
149 LINKFLAGSRUNPATH_BRAND
=-R
\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
150 LINKFLAGSRUNPATH_OXT
=
151 LINKFLAGSRUNPATH_NONE
=
152 LINKFLAGS
=-w
-mt
-z combreloc
-PIC
-temp
=/tmp
-norunpath
-library
=no
%Cstd
153 .IF
"$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
154 LINKFLAGS
+= -Wl
,--as-needed
156 LINKCFLAGS
=-w
-mt
-z combreloc
-norunpath
158 # -z text force fatal error if non PIC code is linked into shared library. Such code
159 # would be expensive on startup
161 LINKFLAGSSHLGUI
=$(CHECKFORPIC
) -G
162 LINKFLAGSSHLCUI
=$(CHECKFORPIC
) -G
164 # switches for dynamic and static linking
165 LINKFLAGSDEFS
*= -z defs
167 DIRECT
= -Bdirect
$(LINKFLAGSDEFS
)
170 LINKFLAGSAPPGUI
+=$(DIRECT
)
171 LINKFLAGSAPPCUI
+=$(DIRECT
)
172 LINKFLAGSSHLGUI
+=$(DIRECT
)
173 LINKFLAGSSHLCUI
+=$(DIRECT
)
176 LINKFLAGSPROF
=-L
$(COMPATH
)/WS6U1
/lib
/libp
-xpg
-z allextract
179 LINKVERSIONMAPFLAG
=-M
181 # mapfile for non-executable stack
182 LINKFLAGSNOEXSTK
*=$(LINKVERSIONMAPFLAG
) $(SOLARENV
)/src
/solaris_noexstk.map
183 LINKFLAGSAPPGUI
+=$(LINKFLAGSNOEXSTK
)
184 LINKFLAGSAPPCUI
+=$(LINKFLAGSNOEXSTK
)
186 APPLINKSTATIC
=$(STATIC
)
187 APPLINKSHARED
=$(DIRECT
)
192 # reihenfolge der libs NICHT egal!
202 # CPPRUNTIME - define where to place C++ runtime if required
203 STDLIBGUIMT
=$(DYNAMIC
) -lpthread
-lm
204 STDLIBCUIMT
=$(DYNAMIC
) -lpthread
-lm
205 STDSHLGUIMT
=$(DYNAMIC
) -lpthread CPPRUNTIME
-lm
-lc
206 STDSHLCUIMT
=$(DYNAMIC
) -lpthread CPPRUNTIME
-lm
-lc
208 # libdl.so - no really an GUI library but required in this context
211 X11LINK_DYNAMIC
= -lX11
213 # @@@ interposer needed for -Bdirect @@@
214 # LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract
217 .IF
"$(USE_STLP_DEBUG)" != ""
218 LIBSTLPORT
=$(DYNAMIC
) -lstlport_sunpro_debug
219 LIBSTLPORTST
=$(STATIC
) -lstlport_sunpro_debug
$(DYNAMIC
)
221 LIBSTLPORT
=$(DYNAMIC
) -lstlport_sunpro
222 LIBSTLPORTST
=$(STATIC
) -lstlport_sunpro
$(DYNAMIC
)
223 .ENDIF
# "$(USE_STLP_DEBUG)" != ""
233 IGNORE_SYMBOLS
=S-LP64
236 RCFLAGS
=-fo
$@
$(RCFILES
)
246 LDUMP
=cppfilt
/b
/n
/o
/p