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
))
14 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
15 bridges_SELECTED_BRIDGE
:= gcc3_linux_arm
16 bridge_noopt_objects
:= cpp2uno except uno2cpp
18 $(call gb_Library_get_linktarget_target
,gcc3_uno
) : \
19 $(call gb_CustomTarget_get_workdir
,bridges
/source
/cpp_uno
/gcc3_linux_arm
)/armhelper.objectlist
20 $(call gb_Library_get_linktarget_target
,gcc3_uno
) : \
21 EXTRAOBJECTLISTS
+= $(call gb_CustomTarget_get_workdir
,bridges
/source
/cpp_uno
/gcc3_linux_arm
)/armhelper.objectlist
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
) \
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
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
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
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
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 else ifeq ($(OS
),EMSCRIPTEN
)
89 bridges_SELECTED_BRIDGE
:= gcc3_wasm
90 bridge_noopt_objects
:= cpp2uno except uno2cpp
93 else ifeq ($(CPUNAME
),M68K
)
95 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
96 bridges_SELECTED_BRIDGE
:= gcc3_linux_m68k
97 bridge_noopt_objects
:= cpp2uno except uno2cpp
100 else ifeq ($(CPUNAME
),MIPS
)
102 ifneq ($(filter LINUX
,$(OS
)),)
103 bridges_SELECTED_BRIDGE
:= gcc3_linux_mips
104 bridge_noopt_objects
:= cpp2uno uno2cpp
105 bridge_exception_objects
:= except
108 else ifeq ($(CPUNAME
),MIPS64
)
110 ifneq ($(filter LINUX
,$(OS
)),)
111 bridges_SELECTED_BRIDGE
:= gcc3_linux_mips64
112 bridge_asm_objects
:= call
113 bridge_noopt_objects
:= cpp2uno uno2cpp
114 bridge_exception_objects
:= except
117 else ifeq ($(CPUNAME
),LOONGARCH64
)
119 ifneq ($(filter LINUX
,$(OS
)),)
120 bridges_SELECTED_BRIDGE
:= gcc3_linux_loongarch64
121 bridge_asm_objects
:= call
122 bridge_noopt_objects
:= abi cpp2uno uno2cpp
123 bridge_exception_objects
:= except
126 else ifeq ($(CPUNAME
),RISCV64
)
128 ifneq ($(filter LINUX
,$(OS
)),)
129 bridges_SELECTED_BRIDGE
:= gcc3_linux_riscv64
130 bridge_asm_objects
:= call
131 bridge_noopt_objects
:= abi cpp2uno uno2cpp
132 bridge_exception_objects
:= except
135 else ifeq ($(CPUNAME
),POWERPC
)
137 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
138 bridges_SELECTED_BRIDGE
:= gcc3_linux_powerpc
139 bridge_noopt_objects
:= uno2cpp
140 bridge_exception_objects
:= cpp2uno except
141 else ifeq ($(OS
),AIX
)
142 bridges_SELECTED_BRIDGE
:= gcc3_aix_powerpc
143 bridge_exception_objects
:= except
144 bridge_cxx_objects
:= cpp2uno uno2cpp
147 else ifeq ($(CPUNAME
),POWERPC64
)
149 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
150 bridges_SELECTED_BRIDGE
:= gcc3_linux_powerpc64
151 bridge_noopt_objects
:= cpp2uno uno2cpp
152 bridge_exception_objects
:= except
155 else ifeq ($(CPUNAME
),S390
)
157 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
158 bridges_SELECTED_BRIDGE
:= gcc3_linux_s390
159 bridge_exception_objects
:= cpp2uno except uno2cpp
162 else ifeq ($(CPUNAME
),S390X
)
164 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
165 bridges_SELECTED_BRIDGE
:= gcc3_linux_s390x
166 bridge_exception_objects
:= cpp2uno except uno2cpp
169 else ifeq ($(CPUNAME
),SPARC
)
171 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD
,$(OS
)),)
172 bridges_SELECTED_BRIDGE
:= gcc3_linux_sparc
173 bridge_asm_objects
:= call
174 bridge_noopt_objects
:= except
175 bridge_exception_objects
:= cpp2uno uno2cpp
176 else ifeq ($(OS
),SOLARIS
)
177 bridges_SELECTED_BRIDGE
:= gcc3_solaris_sparc
178 bridge_noopt_objects
:= cpp2uno uno2cpp
179 bridge_exception_objects
:= except
182 else ifeq ($(OS
)-$(CPUNAME
),LINUX-SPARC64
)
184 bridges_SELECTED_BRIDGE
:= gcc3_linux_sparc64
185 bridge_asm_objects
:= call
186 bridge_noopt_objects
:= cpp2uno uno2cpp
187 bridge_exception_objects
:= except
189 else ifeq ($(CPUNAME
),X86_64
)
191 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD HAIKU
,$(OS
)),)
192 bridges_SELECTED_BRIDGE
:= gcc3_linux_x86-64
193 bridge_asm_objects
:= call
194 bridge_noncallexception_noopt_objects
:= callvirtualmethod
195 bridge_exception_objects
:= abi cpp2uno except rtti uno2cpp
196 else ifneq ($(filter MACOSX iOS
,$(OS
)),)
197 bridges_SELECTED_BRIDGE
:= gcc3_macosx_x86-64
198 bridge_exception_objects
:= abi call cpp2uno except uno2cpp
199 bridge_noncallexception_noopt_objects
:= callvirtualmethod
200 else ifeq ($(COM
),MSC
)
201 bridges_SELECTED_BRIDGE
:= msvc_win32_x86-64
202 bridge_exception_objects
:= cpp2uno uno2cpp
203 bridge_noopt_objects
:= except
204 bridge_asm_objects
:= call
209 $(eval
$(call gb_Library_use_internal_comprehensive_api
,$(CPPU_ENV
)_uno
,\
214 ifeq ($(CPUNAME
),AARCH64
)
215 $(eval
$(call gb_Library_use_internal_comprehensive_api
,$(CPPU_ENV
)_uno
,\
221 $(eval
$(call gb_Library_set_include
,$(CPPU_ENV
)_uno
,\
222 -I
$(SRCDIR
)/bridges
/inc \
226 ifeq ($(HAVE_POSIX_FALLOCATE
),YES
)
227 $(eval
$(call gb_Library_add_defs
,$(CPPU_ENV
)_uno
,\
228 -DHAVE_POSIX_FALLOCATE \
232 # In case someone enabled the non-standard -fomit-frame-pointer which does not
233 # work with the .cxx sources of this library.
234 # LTO causes crashes when enabled for this library
235 # In case the compiler supports AVX this code segfaults so specifically turn
238 $(eval
$(call gb_Library_add_cxxflags
,gcc3_uno
,\
239 $(if
$(filter armeabi-v7a
,$(ANDROID_APP_ABI
)),-I
$(ANDROID_BINUTILS_PREBUILT_ROOT
)/lib
/gcc
/arm-linux-androideabi
/4.9.x
/include) \
240 -fno-omit-frame-pointer \
241 -fno-strict-aliasing \
243 $(if
$(filter TRUE
,$(HAVE_GCC_AVX
)),-mno-avx
) \
246 ifeq ($(filter ANDROID WNT DRAGONFLY FREEBSD NETBSD OPENBSD MACOSX iOS HAIKU
,$(OS
)),)
247 $(eval
$(call gb_Library_add_libs
,gcc3_uno
,\
254 ifneq ($(COM_IS_CLANG
),TRUE
)
255 bridges_NON_CALL_EXCEPTIONS_FLAGS
:= -fnon-call-exceptions
259 $(eval
$(call gb_Library_use_libraries
,$(CPPU_ENV
)_uno
,\
264 $(foreach obj
,$(bridge_exception_objects
),\
265 $(eval
$(call gb_Library_add_exception_objects
,$(CPPU_ENV
)_uno
,\
266 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
))) \
268 $(foreach obj
,$(bridge_noncallexception_objects
),\
269 $(eval
$(call gb_Library_add_exception_objects
,$(CPPU_ENV
)_uno
,\
270 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
) \
271 , $(bridges_NON_CALL_EXCEPTIONS_FLAGS
) )) \
273 $(foreach obj
,$(bridge_noopt_objects
),\
274 $(eval
$(call gb_Library_add_exception_objects
,$(CPPU_ENV
)_uno
,\
275 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
) \
276 , $(gb_COMPILERNOOPTFLAGS
))) \
278 $(foreach obj
,$(bridge_noncallexception_noopt_objects
),\
279 $(eval
$(call gb_Library_add_exception_objects
,$(CPPU_ENV
)_uno
,\
280 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
) \
281 , $(gb_COMPILERNOOPTFLAGS
) $(bridges_NON_CALL_EXCEPTIONS_FLAGS
) )) \
283 $(foreach obj
,$(bridge_cxx_objects
),\
284 $(eval
$(call gb_Library_add_cxxobjects
,$(CPPU_ENV
)_uno
,\
285 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
))) \
287 $(foreach obj
,$(bridge_asm_objects
),\
288 $(eval
$(call gb_Library_add_asmobjects
,$(CPPU_ENV
)_uno
,\
289 bridges
/source
/cpp_uno
/$(bridges_SELECTED_BRIDGE
)/$(obj
))) \
292 $(eval
$(call gb_Library_add_exception_objects
,$(CPPU_ENV
)_uno
,\
293 bridges
/source
/cpp_uno
/shared
/bridge \
294 bridges
/source
/cpp_uno
/shared
/component \
295 bridges
/source
/cpp_uno
/shared
/types \
296 bridges
/source
/cpp_uno
/shared
/unointerfaceproxy \
297 bridges
/source
/cpp_uno
/shared
/vtablefactory \
298 bridges
/source
/cpp_uno
/shared
/vtables \
302 $(eval
$(call gb_Library_add_exception_objects
,$(CPPU_ENV
)_uno
,\
303 bridges
/source
/cpp_uno
/msvc_shared
/cpp2uno \
304 bridges
/source
/cpp_uno
/msvc_shared
/except \
308 $(eval
$(call gb_Library_add_cxxobjects
,$(CPPU_ENV
)_uno
,\
309 bridges
/source
/cpp_uno
/shared
/cppinterfaceproxy \
310 , $(gb_COMPILERNOOPTFLAGS
) $(gb_LinkTarget_EXCEPTIONFLAGS
) \
313 ifeq ($(DISABLE_DYNLOADING
),TRUE
)
314 $(eval
$(call gb_Library_set_plugin_for_nodep
,$(CPPU_ENV
)_uno
,cppu
))
317 # vim: set noet sw=4 ts=4: