bump product version to 7.2.5.1
[LibreOffice.git] / bridges / Library_cpp_uno.mk
blob3a31bf69fc7c9a87c26b3d07965d9834705d43e4
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval $(call gb_Library_Library,$(CPPU_ENV)_uno))
12 ifeq ($(CPUNAME),ARM)
14 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
15 bridges_SELECTED_BRIDGE := gcc3_linux_arm
16 bridge_noopt_objects := cpp2uno except uno2cpp
17 # HACK
18 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,gcc3_uno)) : \
19 $(call gb_CustomTarget_get_workdir,bridges/source/cpp_uno/gcc3_linux_arm)/armhelper.objectlist
20 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,gcc3_uno)) : \
21 EXTRAOBJECTLISTS += $(call gb_CustomTarget_get_workdir,bridges/source/cpp_uno/gcc3_linux_arm)/armhelper.objectlist
22 endif
24 else ifeq ($(CPUNAME),AARCH64)
26 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX MACOSX NETBSD OPENBSD,$(OS)),)
27 bridges_SELECTED_BRIDGE := gcc3_linux_aarch64
28 bridge_asm_objects := vtableslotcall
29 bridge_exception_objects := abi cpp2uno uno2cpp
31 $(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno, \
32 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/callvirtualfunction, \
33 $(if $(HAVE_GCC_STACK_CLASH_PROTECTION),-fno-stack-clash-protection) \
34 $(if $(COM_IS_CLANG),-fasynchronous-unwind-tables) \
37 else ifeq ($(OS),iOS)
38 bridges_SELECTED_BRIDGE := gcc3_ios
39 bridge_noopt_objects := cpp2uno except uno2cpp
40 bridge_asm_objects := ios64_helper
42 else ifeq ($(COM),MSC)
43 bridges_SELECTED_BRIDGE := msvc_win32_arm64
44 bridge_exception_objects := cpp2uno uno2cpp abi
45 bridge_noopt_objects := except
46 bridge_asm_objects := callvirtualfunction vtableslotcall
48 endif
50 else ifeq ($(CPUNAME),AXP)
52 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
53 bridges_SELECTED_BRIDGE := gcc3_linux_alpha
54 bridge_exception_objects := cpp2uno except uno2cpp
55 endif
57 else ifeq ($(CPUNAME),HPPA)
59 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
60 bridges_SELECTED_BRIDGE := gcc3_linux_hppa
61 bridge_noopt_objects := call cpp2uno except uno2cpp
62 endif
64 else ifeq ($(CPUNAME),IA64)
66 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
67 bridges_SELECTED_BRIDGE := gcc3_linux_ia64
68 bridge_asm_objects := call
69 bridge_exception_objects := except
70 bridge_noopt_objects := cpp2uno uno2cpp
71 endif
73 else ifeq ($(CPUNAME),INTEL)
75 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD HAIKU,$(OS)),)
76 bridges_SELECTED_BRIDGE := gcc3_linux_intel
77 bridge_asm_objects := call
78 bridge_exception_objects := cpp2uno except uno2cpp
79 bridge_noncallexception_objects := callvirtualmethod
80 else ifeq ($(OS),SOLARIS)
81 bridges_SELECTED_BRIDGE := gcc3_solaris_intel
82 bridge_exception_objects := cpp2uno except uno2cpp
83 bridge_noncallexception_objects := callvirtualmethod
84 else ifeq ($(COM),MSC)
85 bridges_SELECTED_BRIDGE := msvc_win32_intel
86 bridge_exception_objects := cpp2uno uno2cpp
87 bridge_noopt_objects := except
88 endif
90 else ifeq ($(CPUNAME),M68K)
92 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
93 bridges_SELECTED_BRIDGE := gcc3_linux_m68k
94 bridge_noopt_objects := cpp2uno except uno2cpp
95 endif
97 else ifeq ($(CPUNAME),GODSON)
99 ifneq ($(filter LINUX,$(OS)),)
100 bridges_SELECTED_BRIDGE := gcc3_linux_mips
101 bridge_noopt_objects := cpp2uno uno2cpp
102 bridge_exception_objects := except
103 endif
105 else ifeq ($(CPUNAME),GODSON64)
107 ifneq ($(filter LINUX,$(OS)),)
108 bridges_SELECTED_BRIDGE := gcc3_linux_mips64
109 bridge_asm_objects := call
110 bridge_noopt_objects := cpp2uno uno2cpp
111 bridge_exception_objects := except
112 endif
114 else ifeq ($(CPUNAME),POWERPC)
116 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
117 bridges_SELECTED_BRIDGE := gcc3_linux_powerpc
118 bridge_noopt_objects := uno2cpp
119 bridge_exception_objects := cpp2uno except
120 else ifeq ($(OS),AIX)
121 bridges_SELECTED_BRIDGE := gcc3_aix_powerpc
122 bridge_exception_objects := except
123 bridge_cxx_objects := cpp2uno uno2cpp
124 endif
126 else ifeq ($(CPUNAME),POWERPC64)
128 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
129 bridges_SELECTED_BRIDGE := gcc3_linux_powerpc64
130 bridge_noopt_objects := cpp2uno uno2cpp
131 bridge_exception_objects := except
132 endif
134 else ifeq ($(CPUNAME),S390)
136 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
137 bridges_SELECTED_BRIDGE := gcc3_linux_s390
138 bridge_exception_objects := cpp2uno except uno2cpp
139 endif
141 else ifeq ($(CPUNAME),S390X)
143 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
144 bridges_SELECTED_BRIDGE := gcc3_linux_s390x
145 bridge_exception_objects := cpp2uno except uno2cpp
146 endif
148 else ifeq ($(CPUNAME),SPARC)
150 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
151 bridges_SELECTED_BRIDGE := gcc3_linux_sparc
152 bridge_asm_objects := call
153 bridge_noopt_objects := except
154 bridge_exception_objects := cpp2uno uno2cpp
155 else ifeq ($(OS),SOLARIS)
156 bridges_SELECTED_BRIDGE := gcc3_solaris_sparc
157 bridge_noopt_objects := cpp2uno uno2cpp
158 bridge_exception_objects := except
159 endif
161 else ifeq ($(OS)-$(CPUNAME),LINUX-SPARC64)
163 bridges_SELECTED_BRIDGE := gcc3_linux_sparc64
164 bridge_asm_objects := call
165 bridge_noopt_objects := cpp2uno uno2cpp
166 bridge_exception_objects := except
168 else ifeq ($(CPUNAME),X86_64)
170 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD HAIKU,$(OS)),)
171 bridges_SELECTED_BRIDGE := gcc3_linux_x86-64
172 bridge_asm_objects := call
173 bridge_noncallexception_noopt_objects := callvirtualmethod
174 bridge_exception_objects := abi cpp2uno except rtti uno2cpp
175 else ifneq ($(filter MACOSX iOS,$(OS)),)
176 bridges_SELECTED_BRIDGE := gcc3_macosx_x86-64
177 bridge_exception_objects := abi call cpp2uno except uno2cpp
178 bridge_noncallexception_noopt_objects := callvirtualmethod
179 else ifeq ($(COM),MSC)
180 bridges_SELECTED_BRIDGE := msvc_win32_x86-64
181 bridge_exception_objects := cpp2uno uno2cpp
182 bridge_noopt_objects := except
183 bridge_asm_objects := call
184 endif
186 endif
188 $(eval $(call gb_Library_use_internal_comprehensive_api,$(CPPU_ENV)_uno,\
189 udkapi \
192 ifeq ($(OS),MACOSX)
193 ifeq ($(CPUNAME),AARCH64)
194 $(eval $(call gb_Library_use_internal_comprehensive_api,$(CPPU_ENV)_uno,\
195 offapi \
197 endif
198 endif
200 $(eval $(call gb_Library_set_include,$(CPPU_ENV)_uno,\
201 -I$(SRCDIR)/bridges/inc \
202 $$(INCLUDE) \
205 ifeq ($(HAVE_POSIX_FALLOCATE),YES)
206 $(eval $(call gb_Library_add_defs,$(CPPU_ENV)_uno,\
207 -DHAVE_POSIX_FALLOCATE \
209 endif
211 # In case someone enabled the non-standard -fomit-frame-pointer which does not
212 # work with the .cxx sources of this library.
213 # LTO causes crashes when enabled for this library
214 # In case the compiler supports AVX this code segfaults so specifically turn
215 # it off.
216 ifeq ($(COM),GCC)
217 $(eval $(call gb_Library_add_cxxflags,gcc3_uno,\
218 $(if $(filter armeabi-v7a,$(ANDROID_APP_ABI)),-I$(ANDROID_BINUTILS_PREBUILT_ROOT)/lib/gcc/arm-linux-androideabi/4.9.x/include) \
219 -fno-omit-frame-pointer \
220 -fno-strict-aliasing \
221 -fno-lto \
222 $(if $(filter TRUE,$(HAVE_GCC_AVX)),-mno-avx) \
225 ifeq ($(filter ANDROID WNT DRAGONFLY FREEBSD NETBSD OPENBSD MACOSX iOS HAIKU,$(OS)),)
226 $(eval $(call gb_Library_add_libs,gcc3_uno,\
227 -ldl \
229 endif
230 endif
232 ifeq ($(COM),GCC)
233 ifneq ($(COM_IS_CLANG),TRUE)
234 bridges_NON_CALL_EXCEPTIONS_FLAGS := -fnon-call-exceptions
235 endif
236 endif
238 $(eval $(call gb_Library_use_libraries,$(CPPU_ENV)_uno,\
239 cppu \
240 sal \
243 $(foreach obj,$(bridge_exception_objects),\
244 $(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
245 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
247 $(foreach obj,$(bridge_noncallexception_objects),\
248 $(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
249 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
250 , $(bridges_NON_CALL_EXCEPTIONS_FLAGS) )) \
252 $(foreach obj,$(bridge_noopt_objects),\
253 $(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
254 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
255 , $(gb_COMPILERNOOPTFLAGS))) \
257 $(foreach obj,$(bridge_noncallexception_noopt_objects),\
258 $(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
259 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
260 , $(gb_COMPILERNOOPTFLAGS) $(bridges_NON_CALL_EXCEPTIONS_FLAGS) )) \
262 $(foreach obj,$(bridge_cxx_objects),\
263 $(eval $(call gb_Library_add_cxxobjects,$(CPPU_ENV)_uno,\
264 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
266 $(foreach obj,$(bridge_asm_objects),\
267 $(eval $(call gb_Library_add_asmobjects,$(CPPU_ENV)_uno,\
268 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
271 $(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
272 bridges/source/cpp_uno/shared/bridge \
273 bridges/source/cpp_uno/shared/component \
274 bridges/source/cpp_uno/shared/types \
275 bridges/source/cpp_uno/shared/unointerfaceproxy \
276 bridges/source/cpp_uno/shared/vtablefactory \
277 bridges/source/cpp_uno/shared/vtables \
280 ifeq ($(COM),MSC)
281 $(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
282 bridges/source/cpp_uno/msvc_shared/cpp2uno \
283 bridges/source/cpp_uno/msvc_shared/except \
285 endif
287 $(eval $(call gb_Library_add_cxxobjects,$(CPPU_ENV)_uno,\
288 bridges/source/cpp_uno/shared/cppinterfaceproxy \
289 , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \
292 # vim: set noet sw=4 ts=4: