diff options
Diffstat (limited to 'solenv')
33 files changed, 471 insertions, 260 deletions
diff --git a/solenv/bin/add-modelines b/solenv/bin/add-modelines index 5984c8fe53e0..ea0f2dee3074 100755 --- a/solenv/bin/add-modelines +++ b/solenv/bin/add-modelines @@ -31,7 +31,7 @@ set -o posix # Change these to taste FirstLine='/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */' LastLine='/* vim:set shiftwidth=4 softtabstop=4 expandtab: */' -SourceFiles='*.cxx *.cpp *.hxx *.hpp *.c *.h *.m *.mm *.idl' +SourceFiles='*.cxx *.cpp *.hxx *.hpp *.c *.h *.m *.mm *.idl *.src *.hrc' # Set defaults (don't change these) ModelineReplace="false" diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 74d0f32ee087..b754f1665e02 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -556,9 +556,10 @@ sub expand_dependencies { sub get_tail_build_modules { my $tail_build_prj = shift; my $make = $ENV{'GNUMAKE'}; + my $build_type = $ENV{'BUILD_TYPE'}; my $tail_build_mk = "$tail_build_module_dir/Module_$tail_build_prj.mk"; - my $modules_str = `$make --no-print-directory -r -f $tail_build_modules_mk get_modules TAIL_BUILD_MK=$tail_build_mk`; + my $modules_str = `$make --no-print-directory -r -f $tail_build_modules_mk get_modules TAIL_BUILD_MK=$tail_build_mk BUILD_TYPE='$build_type'`; chomp $modules_str; my %modules = (); diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index 5180f46a6a78..81a47929a266 100644 --- a/solenv/bin/concat-deps.c +++ b/solenv/bin/concat-deps.c @@ -109,9 +109,9 @@ #define FALSE 0 #endif -static char* base_dir_var = "$(SRCDIR)"; -#define kBASE_DIR_VAR_LENGTH 9 +int internal_boost = 0; static char* base_dir; +static char* out_dir; #ifdef __GNUC__ #define clz __builtin_clz @@ -710,11 +710,76 @@ static inline void eat_space(char ** token) } } +/* + * Find substring in bounded length string + */ +static inline const char *find_substr(const char *key, int key_len, + const char *substr, int substr_len) +{ +} + +/* + * Prune LibreOffice specific duplicate dependencies to improve + * gnumake startup time, and shrink the disk-space footprint. + */ +static inline int elide_dependency(const char* key, int key_len, int *boost_count) +{ +#if 0 + { + int i; + fprintf (stderr, "elide?%d!: '", internal_boost); + for (i = 0; i < key_len; i++) { + fprintf (stderr, "%c", key[i]); + } + fprintf (stderr, "'\n"); + } +#endif + + /* .hdl files are always matched by .hpp */ + if (key_len > 4 && !strncmp(key + key_len - 4, ".hdl", 4)) + return 1; + + /* boost brings a plague of header files */ + if (internal_boost) + { + int i; + int hit = 0; + /* walk down path elements */ + for (i = 0; i < key_len - 1; i++) + { + if (key[i] == '/') + { + if (!strncmp(key + i + 1, "solver/", 7)) + hit++; + if (hit > 0 && !strncmp(key + i + 1, "inc/external/boost/", 19)) + { + if (boost_count) + (*boost_count)++; + return 1; + } + } + } + } + + return 0; +} + +/* + * We collapse tens of internal boost headers to a single one, such + * that you can re-compile / install boost and all is well. + */ +static void emit_single_boost_header(void) +{ +#define BOOST_HEADER "/inc/external/boost/bind.hpp" + fprintf(stdout, "%s" BOOST_HEADER " ", out_dir); +} + /* prefix paths to absolute */ static inline void print_fullpaths(char* line) { -char* token; -char* end; + char* token; + char* end; + int boost_count = 0; token = line; eat_space(&token); @@ -724,23 +789,37 @@ char* end; while (*end && (' ' != *end) && ('\t' != *end)) { ++end; } - if(*token == ':' || *token == '\\' || *token == '/' || *token == '$' - || ':' == token[1]) + int token_len = end - token; + if(elide_dependency(token, token_len, &boost_count)) { - fwrite(token, end - token, 1, stdout); + if (boost_count == 1) + emit_single_boost_header(); + else + { + /* don't output, and swallow trailing \\\n if any */ + token = end; + eat_space(&token); + if (token[0] == '\\' && token[1] == '\n') + end = token + 2; + } + } + else if(*token == ':' || *token == '\\' || *token == '/' || + *token == '$' || ':' == token[1]) + { + fwrite(token, token_len, 1, stdout); + fputc(' ', stdout); } else { - fputs(base_dir_var, stdout); - fputc('/', stdout); fwrite(token, end - token, 1, stdout); + fputc(' ', stdout); } - fputc(' ', stdout); token = end; eat_space(&token); } } + static int _process(struct hash* dep_hash, char* fn) { int rc; @@ -795,7 +874,9 @@ off_t size; * these are the one for which we want to filter * duplicate out */ - if(hash_store(dep_hash, base, (int)(cursor_out - base))) + int key_len = cursor_out - base; + if(!elide_dependency(base,key_len - 1, NULL) && + hash_store(dep_hash, base, key_len)) { /* DO NOT modify base after it has been added as key by hash_store */ @@ -860,6 +941,17 @@ static void _usage(void) #define kDEFAULT_HASH_SIZE 4096 +static int get_var(char **var, const char *name) +{ + *var = (char *)getenv(name); + if(!*var) + { + fprintf(stderr,"Error: %s is missing in the environement\n", name); + return 1; + } + return 0; +} + int main(int argc, char** argv) { int rc = 0; @@ -868,18 +960,18 @@ char* in_list; char* in_list_cursor; char* in_list_base; struct hash* dep_hash; +const char *env_str; if(argc < 2) { _usage(); return 1; } - base_dir = getenv("SRCDIR"); - if(!base_dir) - { - fputs("Error: SRCDIR is missing in the environement\n", stderr); + if(get_var(&base_dir, "SRCDIR") || get_var(&out_dir, "OUTDIR")) return 1; - } + + env_str = getenv("SYSTEM_BOOST"); + internal_boost = !env_str || strcmp(env_str,"TRUE"); in_list = file_load(argv[1], &in_list_size, &rc); if(!rc) diff --git a/solenv/bin/modules/installer/ziplist.pm b/solenv/bin/modules/installer/ziplist.pm index 4a3e4767a0bd..c9ba2388ae92 100644 --- a/solenv/bin/modules/installer/ziplist.pm +++ b/solenv/bin/modules/installer/ziplist.pm @@ -828,6 +828,8 @@ sub overwrite_branding $variableshashref->{'PROGRESSSIZE'} = $ENV{'PROGRESSSIZE'} , if( defined $ENV{'PROGRESSSIZE'} && $ENV{'PROGRESSSIZE'} ne "" ); $variableshashref->{'PROGRESSPOSITION'} = $ENV{'PROGRESSPOSITION'} , if( defined $ENV{'PROGRESSPOSITION'} && $ENV{'PROGRESSPOSITION'} ne "" ); $variableshashref->{'PROGRESSFRAMECOLOR'} = $ENV{'PROGRESSFRAMECOLOR'} , if( defined $ENV{'PROGRESSFRAMECOLOR'} && $ENV{'PROGRESSFRAMECOLOR'} ne "" ); + $variableshashref->{'PROGRESSTEXTCOLOR'} = $ENV{'PROGRESSTEXTCOLOR'} , if( defined $ENV{'PROGRESSTEXTCOLOR'} && $ENV{'PROGRESSTEXTCOLOR'} ne "" ); + $variableshashref->{'PROGRESSTEXTBASELINE'} = $ENV{'PROGRESSTEXTBASELINE'} , if( defined $ENV{'PROGRESSTEXTBASELINE'} && $ENV{'PROGRESSTEXTBASELINE'} ne "" ); } ########################################################### diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index 5d0788aab372..f4145dc297bc 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -196,6 +196,16 @@ $(foreach rdb,$(2),$(call gb_CppunitTest__use_api,$(1),$(rdb))) endef +define gb_CppunitTest_use_udk_api +$(call gb_CppunitTest_use_api,$(1),udkapi) + +endef + +define gb_CppunitTest_use_sdk_api +$(call gb_CppunitTest_use_api,$(1),udkapi offapi) + +endef + define gb_CppunitTest_add_service_rdb $$(call gb_Output_error,\ gb_CppunitTest_add_service_rdb: use gb_CppunitTest_use_rdb instead.) @@ -345,8 +355,6 @@ $(eval $(foreach method,\ disable_standard_system_libs \ use_system_darwin_frameworks \ use_system_win32_libs \ - use_sdk_api \ - use_udk_api \ use_internal_api \ use_internal_bootstrap_api \ use_internal_comprehensive_api \ diff --git a/solenv/gbuild/ExternalProject.mk b/solenv/gbuild/ExternalProject.mk index d35d238316d8..ff504bb38200 100644 --- a/solenv/gbuild/ExternalProject.mk +++ b/solenv/gbuild/ExternalProject.mk @@ -103,10 +103,80 @@ $(foreach target,$(2),$(call gb_ExternalProject_register_target,$(1),$(target))) endef -# Make an external Project depend on another external project -define gb_ExternalProject_use_external +# Make an external Project depend on another ExternalProject +define gb_ExternalProject_use_external_project $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_ExternalProject_get_target,$(2)) endef +# Make an ExternalProject depend on an external +# +# this forwards to functions that must be defined in RepositoryExternal.mk. +# $(eval $(call gb_ExternalProject_use_external,library,external)) +define gb_ExternalProject_use_external +$(if $(filter undefined,$(origin gb_ExternalProject__use_$(2))),\ + $(error gb_ExternalProject_use_external: unknown external: $(2)),\ + $(call gb_ExternalProject__use_$(2),$(1))) +endef + +define gb_ExternalProject_use_externals +$(foreach external,$(2),$(call gb_ExternalProject_use_external,$(1),$(external))) +endef + +# Make an external project depend on a package +# +# This is most useful for depending on output files created by another +# ExternalProject. +# +# gb_ExternalProject_use_package external package +define gb_ExternalProject_use_package +$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Package_get_target,$(2)) + +endef + +# Make an external project depend on several packages at once +# +# gb_ExternalProject_use_packages external package(s) +define gb_ExternalProject_use_packages +$(foreach package,$(2),$(call gb_ExternalProject_use_package,$(1),$(package))) + +endef + +# Make an external project depend on a StaticLibrary +# +# Realistically there are some externals that do not have a usable build +# system, and other externals that do may depend on those. +# +# gb_ExternalProject_use_static_libraries external staticlibraries +define gb_ExternalProject_use_static_libraries +ifneq (,$$(filter-out $(gb_StaticLibrary_KNOWNLIBS),$(2))) +$$(eval $$(call gb_Output_info, currently known static libraries are: $(sort $(gb_StaticLibrary_KNOWNLIBS)),ALL)) +$$(eval $$(call gb_Output_error,Cannot link against static library/libraries $$(filter-out $(gb_StaticLibrary_KNOWNLIBS),$(2)). Static libraries must be registered in Repository.mk)) +endif + +$(call gb_ExternalProject_get_preparation_target,$(1)) : \ + $(foreach lib,$(2),$(call gb_StaticLibrary_get_target,$(lib))) + +endef + +# Make an external project depend on a Library +# +# Realistically there are some externals that do not have a usable build +# system, and other externals that do may depend on those. +# +# gb_ExternalProject_use_libraries external libraries +define gb_ExternalProject_use_libraries +ifneq (,$$(filter-out $(gb_Library_KNOWNLIBS),$(2))) +$$(eval $$(call gb_Output_info,currently known libraries are: $(sort $(gb_Library_KNOWNLIBS)),ALL)) +$$(eval $$(call gb_Output_error,Cannot link against library/libraries $$(filter-out $(gb_Library_KNOWNLIBS),$(2)). Libraries must be registered in Repository.mk)) +endif +ifneq (,$$(filter $$(gb_MERGEDLIBS),$(2))) +$$(eval $$(call gb_Output_error,Cannot link against library/libraries $$(filter $$(gb_MERGEDLIBS),$(2)) because they are merged.)) +endif + +$(call gb_ExternalProject_get_preparation_target,$(1)) : \ + $(foreach lib,$(2),$(call gb_Library_get_target,$(lib))) + +endef + # vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/InternalUnoApi.mk b/solenv/gbuild/InternalUnoApi.mk index 8949323b9c12..587e62456620 100644 --- a/solenv/gbuild/InternalUnoApi.mk +++ b/solenv/gbuild/InternalUnoApi.mk @@ -117,11 +117,6 @@ $(foreach dep,$(3),$(call gb_InternalUnoApi_define_api_dependency,$(1),$(2),$(de endef -define gb_InternalUnoApi_set_xmlfile -$(call gb_UnoApiTarget_set_xmlfile,$(1)_out,$(2)) - -endef - define gb_InternalUnoApi_set_include $(call gb_UnoApiTarget_set_include,$(1)_out,$(2)) diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk index 3f65099802f7..b5b743995e50 100644 --- a/solenv/gbuild/JavaClassSet.mk +++ b/solenv/gbuild/JavaClassSet.mk @@ -26,7 +26,7 @@ # #************************************************************************* -gb_JavaClassSet_JAVACCOMMAND := $(JAVACOMPILER) $(JAVAFLAGS) \ +gb_JavaClassSet_JAVACCOMMAND := $(ICECREAM_RUN) $(JAVACOMPILER) $(JAVAFLAGS) \ -source $(JAVA_SOURCE_VER) -target $(JAVA_TARGET_VER) gb_JavaClassSet_JAVACDEBUG := diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index 90ff07926ce2..11ca2a01c632 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -163,12 +163,18 @@ gb_UITarget_get_target = $(WORKDIR)/UITarget/$(1).done gb_UnoApiTarget_get_external_headers_target = $(WORKDIR)/UnoApiTarget/$(1).external gb_UnoApiTarget_get_headers_target = $(WORKDIR)/UnoApiTarget/$(1).headers gb_UnoApiTarget_get_target = $(WORKDIR)/UnoApiTarget/$(1).rdb -gb_UnoApiHeadersTarget_get_bootstrap_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/bootstrap$(2) -gb_UnoApiHeadersTarget_get_comprehensive_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/comprehensive$(2) -gb_UnoApiHeadersTarget_get_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/normal$(2) -gb_UnoApiHeadersTarget_get_bootstrap_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/bootstrap.done -gb_UnoApiHeadersTarget_get_comprehensive_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/comprehensive.done -gb_UnoApiHeadersTarget_get_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/normal.done +gb_UnoApiHeadersTarget_get_bootstrap_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/$(call gb_UnoApiHeadersTarget_select_variant,$(1),bootstrap) +gb_UnoApiHeadersTarget_get_comprehensive_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/$(call gb_UnoApiHeadersTarget_select_variant,$(1),comprehensive) +gb_UnoApiHeadersTarget_get_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/$(call gb_UnoApiHeadersTarget_select_variant,$(1),normal) +gb_UnoApiHeadersTarget_get_real_bootstrap_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/bootstrap +gb_UnoApiHeadersTarget_get_real_comprehensive_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/comprehensive +gb_UnoApiHeadersTarget_get_real_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/normal +gb_UnoApiHeadersTarget_get_real_bootstrap_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/bootstrap.done +gb_UnoApiHeadersTarget_get_real_comprehensive_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/comprehensive.done +gb_UnoApiHeadersTarget_get_real_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/normal.done +gb_UnoApiHeadersTarget_get_bootstrap_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/$(call gb_UnoApiHeadersTarget_select_variant,$(1),bootstrap).done +gb_UnoApiHeadersTarget_get_comprehensive_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/$(call gb_UnoApiHeadersTarget_select_variant,$(1),comprehensive).done +gb_UnoApiHeadersTarget_get_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/$(call gb_UnoApiHeadersTarget_select_variant,$(1),normal).done gb_UnoApiPartTarget_get_target = $(WORKDIR)/UnoApiPartTarget/$(1) gb_UnpackedTarball_get_dir = $(WORKDIR)/UnpackedTarball/$(1) gb_UnpackedTarball_get_pristine_dir = $(WORKDIR)/UnpackedTarball/$(1).org diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk index fd7a0a333a59..98734ab34b75 100644 --- a/solenv/gbuild/UnoApiTarget.mk +++ b/solenv/gbuild/UnoApiTarget.mk @@ -82,46 +82,25 @@ endif # UnoApiTarget -gb_UnoApiTarget_RDBMAKERTARGET := $(call gb_Executable_get_target_for_build,rdbmaker) -gb_UnoApiTarget_RDBMAKERCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_RDBMAKERTARGET) gb_UnoApiTarget_REGCOMPARETARGET := $(call gb_Executable_get_target_for_build,regcompare) gb_UnoApiTarget_REGCOMPARECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGCOMPARETARGET) gb_UnoApiTarget_REGMERGETARGET := $(call gb_Executable_get_target_for_build,regmerge) gb_UnoApiTarget_REGMERGECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGMERGETARGET) -gb_UnoApiTarget_XML2CMPTARGET := $(call gb_Executable_get_target_for_build,xml2cmp) -gb_UnoApiTarget_XML2CMPCOMMAND := $(gb_Helper_set_ld_path) $(gb_UnoApiTarget_XML2CMPTARGET) -gb_UnoApiTarget_XMLRDB := $(call gb_UnoApiTarget_get_target,types) - -define gb_UnoApiTarget__get_types -$(if $(1),$(foreach type,$(shell $(gb_UnoApiTarget_XML2CMPCOMMAND) -types stdout $(1)),$(addprefix -T,$(type)))) -endef +gb_UnoApiTarget_TYPESRDB := $(call gb_UnoApiTarget_get_target,types) define gb_UnoApiTarget__command_impl -RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,$(2)) && \ -$(1) @$${RESPONSEFILE} && \ +RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,$(1) $(2) $(3)) && \ +$(gb_UnoApiTarget_REGMERGECOMMAND) @$${RESPONSEFILE} && \ rm -f $${RESPONSEFILE} endef -define gb_UnoApiTarget__regmerge_command_impl -$(call gb_UnoApiTarget__command_impl,$(gb_UnoApiTarget_REGMERGECOMMAND),$(1) $(2) $(3)) -endef - -define gb_UnoApiTarget__rdbmaker_command_impl -$(call gb_UnoApiTarget__command_impl,$(gb_UnoApiTarget_RDBMAKERCOMMAND),-O$(1) -B$(2) -b$(3) $(4) $(5)) -endef - define gb_UnoApiTarget__command -$(call gb_Output_announce,$*,$(true),UNO,4) +$(call gb_Output_announce,$(2),$(true),UNO,4) mkdir -p $(dir $(1)) && \ -$(if $(UNOAPI_FILES),\ - $(call gb_UnoApiTarget__regmerge_command_impl,$(1),$(UNOAPI_ROOT),$(UNOAPI_FILES)),\ - $(if $(UNOAPI_MERGE),\ - $(call gb_UnoApiTarget__regmerge_command_impl,$(1),$(UNOAPI_ROOT),$(UNOAPI_MERGE)),\ - $(call gb_UnoApiTarget__rdbmaker_command_impl,$(1),UCR,$(UNOAPI_ROOT),\ - $(call gb_UnoApiTarget__get_types,$(UNOAPI_XML)),$(gb_UnoApiTarget_XMLRDB)))) \ +$(call gb_UnoApiTarget__command_impl,$(1),$(UNOAPI_ROOT),$(if $(UNOAPI_FILES),$(UNOAPI_FILES),$(UNOAPI_MERGE))) \ $(if $(UNOAPI_REFERENCE), \ - $(call gb_Output_announce,$*,$(true),DBc,3) \ + $(call gb_Output_announce,$(2),$(true),DBc,3) \ && $(gb_UnoApiTarget_REGCOMPARECOMMAND) \ -f -t \ -r1 $(UNOAPI_REFERENCE) \ @@ -129,11 +108,11 @@ $(if $(UNOAPI_REFERENCE), \ endef define gb_UnoApiTarget__check_mode -$(if $(or $(and $(1),$(2),$(3)),$(and $(1),$(2)),$(and $(2),$(3)),$(and $(1),$(3))),\ - $(error More than one mode of function of UnoApiTarget used: this is not supported),\ - $(if $(or $(1),$(2),$(3)),,\ - $(error Neither IDL files nor merged RDBs nor XML desc. were used: nothing will be produced))) -$(if $(4),,$(error No root has been set for the rdb file)) +$(if $(and $(UNOAPI_FILES),$(UNOAPI_MERGE)),\ + $(error Both IDL files and merged RDBs were used: this is not supported)) +$(if $(or $(UNOAPI_FILES),$(UNOAPI_MERGE)),,\ + $(error Neither IDL files nor merged RDBs were used: nothing will be produced)) +$(if $(UNOAPI_ROOT),,$(error No root has been set for the rdb file)) endef $(call gb_UnoApiTarget_get_external_headers_target,%) : @@ -143,7 +122,7 @@ $(call gb_UnoApiTarget_get_headers_target,%) : $(call gb_UnoApiTarget_get_extern mkdir -p $(dir $@) && touch $@ $(call gb_UnoApiTarget_get_target,%) : - $(call gb_UnoApiTarget__check_mode,$(UNOAPI_FILES),$(UNOAPI_MERGE),$(UNOAPI_XML),$(UNOAPI_ROOT)) + $(call gb_UnoApiTarget__check_mode) $(call gb_UnoApiTarget__command,$@,$*) .PHONY : $(call gb_UnoApiTarget_get_clean_target,%) @@ -180,7 +159,6 @@ define gb_UnoApiTarget_UnoApiTarget $(call gb_UnoApiTarget_get_target,$(1)) : INCLUDE := $(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_FILES := $(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_MERGE := -$(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_XML := $(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_REFERENCE := $(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_ROOT := @@ -253,16 +231,6 @@ $(call gb_UnoApiTarget_get_target,$(1)) : $(call gb_UnoApiTarget_get_target,$(2) endef -# Set XML component dependencies description. -define gb_UnoApiTarget_set_xmlfile -$(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_XML := $(SRCDIR)/$(2) -$(call gb_UnoApiTarget_get_target,$(1)) : $(SRCDIR)/$(2) -$(call gb_UnoApiTarget_get_target,$(1)) : $(gb_UnoApiTarget_XMLRDB) -$(call gb_UnoApiTarget_get_target,$(1)) : $(gb_UnoApiTarget_XML2CMPTARGET) -$(call gb_UnoApiTarget_get_target,$(1)) : $(gb_UnoApiTarget_RDBMAKERTARGET) - -endef - define gb_UnoApiTarget_add_reference_rdbfile $$(call gb_Output_error,gb_UnoApiTarget_add_reference_rdbfile: use gb_UnoApiTarget_set_reference_rdbfile instead.) endef @@ -285,6 +253,45 @@ endef # UnoApiHeadersTarget +# defined by platform +# gb_UnoApiHeadersTarget_select_variant + +# Allow to redefine header variant. +# +# On iOS we use static linking because dynamic loading of own code +# isn't allowed by the iOS App Store rules, and we want our code to be +# eventually distributable there as part of apps. +# +# To avoid problems that this causes together with the lovely +# intentional breaking of the One Definition Rule, for iOS we always +# generate comprehensive headers for certain type RDBS. (The ODR +# breakage doesn't harm, by accident or careful design, on platforms +# where shared libraries are used.) To avoid generating the same headers +# more than once, we are silently "redirecting" the target to point to +# comprehensive headers instead. +# +# Example: +# If gb_UnoApiHeadersTarget_select_variant is defined as +# +# ifeq ($(DISABLE_DYNLOADING),YES) +# gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive,$(2)) +# else +# gb_UnoApiHeadersTarget_select_variant = $(2) +# endif +# +# then, for the DISABLE_DYNLOADING case, whenever a makefile uses +# $(call gb_UnoApiHeadersTarget_get_target,udkapi) or $(call +# gb_UnoApiHeadersTarget_get_dir,udkapi), it will get target or dir for +# comprehensive headers instead. +# +# We are experimenting with static linking on Android, too. There for +# technical reasons to get around silly limitations in the OS, sigh. +# +# gb_UnoApiHeadersTarget_select_variant api default-variant +ifeq ($(origin gb_UnoApiHeadersTarget_select_variant),undefined) +$(eval $(call gb_Output_error,gb_UnoApiHeadersTarget_select_variant must be defined by platform)) +endif + gb_UnoApiHeadersTarget_CPPUMAKERTARGET := $(call gb_Executable_get_target_for_build,cppumaker) gb_UnoApiHeadersTarget_CPPUMAKERCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiHeadersTarget_CPPUMAKERTARGET) @@ -300,52 +307,32 @@ define gb_UnoApiHeadersTarget__command endef -# On iOS we use static linking because dynamic loading of own code -# isn't allowed by the iOS App Store rules, and we want our code to be -# eventually distributable there as part of apps. - -# To avoid problems that this causes together with the lovely -# intentional breaking of the One Definition Rule, for iOS we always -# generate comprehensive headers for udkapi. (The ODR breakage doesn't -# harm, by accident or careful design, on platforms where shared -# libraries are used.) - -$(call gb_UnoApiHeadersTarget_get_bootstrap_target,%) : \ +$(call gb_UnoApiHeadersTarget_get_real_bootstrap_target,%) : \ $(gb_UnoApiHeadersTarget_CPPUMAKERTARGET) - $(if $(filter TRUEudkapi,$(DISABLE_DYNLOADING)$*), \ - $(call gb_Output_announce,$*,$(true),HPB,3) \ - $(call gb_UnoApiHeadersTarget__command,$@,$*,$(call gb_UnoApiHeadersTarget_get_bootstrap_dir,$*),-C), \ - \ - $(call gb_Output_announce,$*,$(true),HPB,3) \ - $(call gb_UnoApiHeadersTarget__command,$@,$*,$(call gb_UnoApiHeadersTarget_get_bootstrap_dir,$*)) \ - ) - -$(call gb_UnoApiHeadersTarget_get_comprehensive_target,%) : \ + $(call gb_Output_announce,$*,$(true),HPB,3) \ + $(call gb_UnoApiHeadersTarget__command,$@,$*,$(call gb_UnoApiHeadersTarget_get_bootstrap_dir,$*)) + +$(call gb_UnoApiHeadersTarget_get_real_comprehensive_target,%) : \ $(gb_UnoApiHeadersTarget_CPPUMAKERTARGET) $(call gb_Output_announce,$*,$(true),HPC,3) $(call gb_UnoApiHeadersTarget__command,$@,$*,$(call gb_UnoApiHeadersTarget_get_comprehensive_dir,$*),-C) -$(call gb_UnoApiHeadersTarget_get_target,%) : \ +$(call gb_UnoApiHeadersTarget_get_real_target,%) : \ $(gb_UnoApiHeadersTarget_CPPUMAKERTARGET) - $(if $(filter TRUEudkapi,$(DISABLE_DYNLOADING)$*), \ - $(call gb_Output_announce,$*,$(true),HPP,3) \ - $(call gb_UnoApiHeadersTarget__command,$@,$*,$(call gb_UnoApiHeadersTarget_get_dir,$*),-C), \ - \ - $(call gb_Output_announce,$*,$(true),HPP,3) \ - $(call gb_UnoApiHeadersTarget__command,$@,$*,$(call gb_UnoApiHeadersTarget_get_dir,$*),-L) \ - ) + $(call gb_Output_announce,$*,$(true),HPP,3) \ + $(call gb_UnoApiHeadersTarget__command,$@,$*,$(call gb_UnoApiHeadersTarget_get_dir,$*),-L) .PHONY : $(call gb_UnoApiHeadersTarget_get_clean_target,%) $(call gb_UnoApiHeadersTarget_get_clean_target,%) : $(call gb_Output_announce,$*,$(false),HPP,3) $(call gb_Helper_abbreviate_dirs,\ rm -rf \ - $(call gb_UnoApiHeadersTarget_get_dir,$*) \ - $(call gb_UnoApiHeadersTarget_get_bootstrap_dir,$*) \ - $(call gb_UnoApiHeadersTarget_get_comprehensive_dir,$*) \ - $(call gb_UnoApiHeadersTarget_get_target,$*) \ - $(call gb_UnoApiHeadersTarget_get_bootstrap_target,$*)) \ - $(call gb_UnoApiHeadersTarget_get_comprehensive_target,$*) + $(call gb_UnoApiHeadersTarget_get_real_dir,$*) \ + $(call gb_UnoApiHeadersTarget_get_real_bootstrap_dir,$*) \ + $(call gb_UnoApiHeadersTarget_get_real_comprehensive_dir,$*) \ + $(call gb_UnoApiHeadersTarget_get_real_target,$*) \ + $(call gb_UnoApiHeadersTarget_get_real_bootstrap_target,$*)) \ + $(call gb_UnoApiHeadersTarget_get_real_comprehensive_target,$*) define gb_UnoApiHeadersTarget_UnoApiHeadersTarget $(call gb_UnoApiHeadersTarget_get_target,$(1)) : $(call gb_UnoApiTarget_get_target,$(1)) @@ -360,29 +347,29 @@ $(call gb_UnoApiHeadersTarget_get_comprehensive_target,$(1)) : UNOAPI_DEPS := # need dummy recipes so that header files are delivered in Package_inc; # otherwise make will consider the header to be up-to-date because it was # actually built by the recipe for gb_UnoApiHeadersTarget_get_target -$(call gb_UnoApiHeadersTarget_get_dir,$(1),/%.hdl) : +$(call gb_UnoApiHeadersTarget_get_real_dir,$(1))/%.hdl : touch $$@ -$(call gb_UnoApiHeadersTarget_get_dir,$(1),/%.hpp) : +$(call gb_UnoApiHeadersTarget_get_real_dir,$(1))/%.hpp : touch $$@ -$(call gb_UnoApiHeadersTarget_get_bootstrap_dir,$(1),/%.hdl) : +$(call gb_UnoApiHeadersTarget_get_real_bootstrap_dir,$(1))/%.hdl : touch $$@ -$(call gb_UnoApiHeadersTarget_get_bootstrap_dir,$(1),/%.hpp) : +$(call gb_UnoApiHeadersTarget_get_real_bootstrap_dir,$(1))/%.hpp : touch $$@ -$(call gb_UnoApiHeadersTarget_get_comprehensive_dir,$(1),/%.hdl) : - touch $$@ +$(call gb_UnoApiHeadersTarget_get_real_comprehensive_dir,$(1))/%.hdl : + mkdir -p `dirname $$@` && touch $$@ -$(call gb_UnoApiHeadersTarget_get_comprehensive_dir,$(1),/%.hpp) : - touch $$@ +$(call gb_UnoApiHeadersTarget_get_real_comprehensive_dir,$(1))/%.hpp : + mkdir -p `dirname $$@` && touch $$@ endef # ensure that new urd triggers the dummy rule to rebuild the headers define gb_UnoApiHeadersTarget_add_headerfile -$(call gb_UnoApiHeadersTarget_get_dir,$(1),/$(3)) : \ +$(call gb_UnoApiHeadersTarget_get_dir,$(1))/$(3) : \ $(call gb_UnoApiPartTarget_get_target,$(basename $(2)).urd) endef diff --git a/solenv/gbuild/UnpackedTarball.mk b/solenv/gbuild/UnpackedTarball.mk index c96d4ced7cc2..73123622c2d4 100644 --- a/solenv/gbuild/UnpackedTarball.mk +++ b/solenv/gbuild/UnpackedTarball.mk @@ -100,7 +100,7 @@ endef # This is what dmake patches use. Once all external modules are # converted, it is better to be changed to 1. -gb_UnpackedTarball_PATCHLEVEL_DEFAULT := 3 +gb_UnpackedTarball_PATCHLEVEL_DEFAULT := 2 gb_UnpackedTarball_CONVERTTODOS = \ $(gb_AWK) 'sub("$$","\r")' $(1) > $(1).TEMP && mv $(1).TEMP $(1) diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt index 3b15639bd326..b6707ebd8ff0 100644 --- a/solenv/gbuild/gbuild.help.txt +++ b/solenv/gbuild/gbuild.help.txt @@ -39,6 +39,7 @@ AVAILABLE TARGETS debugrun starts the dev-install instance and allows tests to be run against it <module> build the named module + <module>.check run unittests of the named module <module>.clean clean the named module <module>.all build the named module and the pre-requisite modules for it <module>.deliver for dmake modules only, deliver the named module diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index a83bd305b2db..0f73a7422ed7 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -188,18 +188,18 @@ include $(SRCDIR)/RepositoryFixes.mk # RepositoryExternal.mk ? ifeq ($(SYSTEM_LIBXSLT_FOR_BUILD),YES) gb_XSLTPROCTARGET := -gb_XSLTPROC := xsltproc +gb_XSLTPROC := $(ICECREAM_RUN) xsltproc else gb_XSLTPROCTARGET := $(call gb_Executable_get_target_for_build,xsltproc) -gb_XSLTPROC := $(gb_Helper_set_ld_path) $(gb_XSLTPROCTARGET) +gb_XSLTPROC := $(gb_Helper_set_ld_path) $(ICECREAM_RUN) $(gb_XSLTPROCTARGET) endif ifeq ($(SYSTEM_LIBXML_FOR_BUILD),YES) gb_XMLLINTTARGET := -gb_XMLLINT := xsltproc +gb_XMLLINT := $(ICECREAM_RUN) xsltproc else gb_XMLLINTTARGET := $(call gb_Executable_get_target_for_build,xsltproc) -gb_XMLLINT := $(gb_Helper_set_ld_path) $(gb_XMLLINTTARGET) +gb_XMLLINT := $(gb_Helper_set_ld_path) $(ICECREAM_RUN) $(gb_XMLLINTTARGET) endif ifeq ($(SYSTEM_PYTHON),YES) diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk index 21301fa95e84..c7d40d34bed9 100644 --- a/solenv/gbuild/platform/IOS_ARM_GCC.mk +++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk @@ -79,6 +79,9 @@ gb_OBJCXXFLAGS := -x objective-c++ $(gb_OBJC_OBJCXX_COMMON_FLAGS) gb_OBJCFLAGS := -x objective-c $(gb_OBJC_OBJCXX_COMMON_FLAGS) +gb_COMPILERDEFS += \ + -DBOOST_DETAIL_NO_CONTAINER_FWD + gb_LinkTarget_LDFLAGS := \ $(subst -L../lib , ,$(SOLARLIB)) \ #man ld says: obsolete -Wl,-multiply_defined,suppress \ @@ -159,6 +162,7 @@ define gb_LinkTarget__command_dynamiclink $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ $(foreach object,$(OBJCOBJECTS),$(call gb_ObjCObject_get_target,$(object))) \ $(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_target,$(object))) \ + $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \ $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat $(extraobjectlist)`) \ @@ -177,6 +181,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ $(foreach object,$(OBJCOBJECTS),$(call gb_ObjCObject_get_target,$(object))) \ $(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_target,$(object))) \ + $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \ $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),@$(extraobjectlist)) \ @@ -313,6 +318,14 @@ gb_ExtensionTarget_LICENSEFILE_DEFAULT := $(OUTDIR)/bin/osl/LICENSE gb_UnpackedTarget_TARFILE_LOCATION := $(TARFILE_LOCATION) +# UnoApiHeadersTarget class + +ifeq ($(DISABLE_DYNLOADING),TRUE) +gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive,$(2)) +else +gb_UnoApiHeadersTarget_select_variant = $(2) +endif + # Python gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk index 427c622326ad..46f4e70d2462 100644 --- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk @@ -420,6 +420,14 @@ gb_ExtensionTarget_LICENSEFILE_DEFAULT := $(OUTDIR)/bin/osl/license.txt gb_UnpackedTarget_TARFILE_LOCATION := $(TARFILE_LOCATION) +# UnoApiHeadersTarget class + +ifeq ($(DISABLE_DYNLOADING),TRUE) +gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive,$(2)) +else +gb_UnoApiHeadersTarget_select_variant = $(2) +endif + # Python gb_PYTHON_PRECOMMAND := PATH="$${PATH}:$(OUTDIR_FOR_BUILD)/bin" PYTHONHOME="$(OUTDIR_FOR_BUILD)/lib/python" PYTHONPATH="$(OUTDIR_FOR_BUILD)/lib/python;$(OUTDIR_FOR_BUILD)/lib/python/lib-dynload" diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk index a232b661eb93..151327eb0d5b 100644 --- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk @@ -157,6 +157,7 @@ gb_CXXFLAGS := \ -wd4351 \ -wd4355 \ -wd4365 \ + -wd4435 \ -wd4503 \ -wd4505 \ -wd4511 \ @@ -340,6 +341,13 @@ gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) gb_LinkTarget_get_pdbfile = $(call gb_LinkTarget_get_target,)pdb/$(1).pdb +# avoid fatal error LNK1170 for Library_merged +define gb_LinkTarget_MergedResponseFile +cut -f -1000 -d ' ' $${RESPONSEFILE} > $${RESPONSEFILE}.1 && \ +cut -f 1001- -d ' ' $${RESPONSEFILE} >> $${RESPONSEFILE}.1 && \ +mv $${RESPONSEFILE}.1 $${RESPONSEFILE} && +endef + define gb_LinkTarget__command $(call gb_Output_announce,$(2),$(true),LNK,4) $(call gb_Helper_abbreviate_dirs,\ @@ -353,6 +361,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \ $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),$(shell cat $(extraobjectlist))) \ $(NATIVERES)) && \ + $(if $(filter $(call gb_Library_get_linktargetname,merged),$(2)),$(call gb_LinkTarget_MergedResponseFile)) \ unset INCLUDE && \ $(if $(filter YES,$(LIBRARY_X64)), $(LINK_X64_BINARY), $(gb_LINK)) \ $(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ @@ -360,7 +369,8 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \ $(if $(filter YES,$(TARGETGUI)), -SUBSYSTEM:WINDOWS, -SUBSYSTEM:CONSOLE) \ $(if $(filter YES,$(LIBRARY_X64)), -MACHINE:X64, -MACHINE:IX86) \ - $(if $(filter YES,$(LIBRARY_X64)), -LIBPATH:$(OUTDIR)/lib/x64 -LIBPATH:$(COMPATH)/lib/amd64 -LIBPATH:$(WINDOWS_SDK_HOME)/lib/x64,) \ + $(if $(filter YES,$(LIBRARY_X64)), -LIBPATH:$(OUTDIR)/lib/x64 -LIBPATH:$(COMPATH)/lib/amd64 -LIBPATH:$(WINDOWS_SDK_HOME)/lib/x64 \ + $(if $(filter 80,$(WINDOWS_SDK_VERSION)),-LIBPATH:$(WINDOWS_SDK_HOME)/lib/win8/um/x64,),) \ $(T_LDFLAGS) \ @$${RESPONSEFILE} \ $(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))) \ @@ -713,6 +723,14 @@ gb_ExtensionTarget_LICENSEFILE_DEFAULT := $(OUTDIR)/bin/osl/license.txt gb_UnpackedTarget_TARFILE_LOCATION := $(shell cygpath -u $(TARFILE_LOCATION)) +# UnoApiHeadersTarget class + +ifeq ($(DISABLE_DYNLOADING),TRUE) +gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive,$(2)) +else +gb_UnoApiHeadersTarget_select_variant = $(2) +endif + # Python gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME="$(OUTDIR_FOR_BUILD)/lib/python" PYTHONPATH="$(OUTDIR_FOR_BUILD)/lib/python;$(OUTDIR_FOR_BUILD)/lib/python/lib-dynload" diff --git a/solenv/gbuild/platform/android.mk b/solenv/gbuild/platform/android.mk index 58e7029f9851..4b8886470d8b 100644 --- a/solenv/gbuild/platform/android.mk +++ b/solenv/gbuild/platform/android.mk @@ -7,10 +7,22 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # +ifeq ($(DISABLE_DYNLOADING),TRUE) +# Link with -lgnustl_static +gb_STDLIBS := \ + gnustl_static + +gb_Library_PLAINLIBS_NONE := \ + android \ + gnustl_static \ + +else # Link almost everything with -lgnustl_shared gb_STDLIBS := \ -lgnustl_shared \ +endif + # No unit testing can be run gb_CppunitTest_CPPTESTPRECOMMAND := : @@ -45,6 +57,28 @@ $(call gb_Helper_abbreviate_dirs,\ -o $(1)) endef +ifeq ($(DISABLE_DYNLOADING),TRUE) + +# Library class + +gb_Library_DEFS := +gb_Library_SYSPRE := lib +gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_ +gb_Library_PLAINEXT := .a +gb_Library_DLLEXT := .a +gb_Library_RTEXT := gcc3$(gb_Library_PLAINEXT) + +gb_Library_OOOEXT := $(gb_Library_DLLPOSTFIX)$(gb_Library_PLAINEXT) +gb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT) + +gb_Library_PLAINLIBS_NONE += \ + jpeg \ + m \ + pthread \ + z \ + +endif + # Prefix UNO library filenames with "lib" gb_Library_FILENAMES := \ $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \ @@ -58,6 +92,38 @@ gb_Library_FILENAMES := \ $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_PLAINEXT)) \ +ifeq ($(DISABLE_DYNLOADING),TRUE) + +gb_Library_FILENAMES += \ + $(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):$(lib)$(gb_Library_UNOEXT)) \ + +gb_Library_LAYER := \ + $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \ + $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \ + $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \ + $(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \ + $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \ + $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \ + $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \ + $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \ + $(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):OXT) \ + +define gb_Library_Library_platform +$(call gb_LinkTarget_get_target,$(2)) : LAYER := $(call gb_Library_get_layer,$(1)) + +endef + +# CppunitTest class + +gb_CppunitTest_EXT := .a + +define gb_LinkTarget__command +$(call gb_Output_announce,$(2),$(true),LNK,4) +$(call gb_LinkTarget__command_staticlink,$(1)) +endef + +endif + # No DT_RPATH or DT_RUNPATH support in the Bionic dynamic linker so # don't bother generating such. diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk index 630eed78c560..aa00267222f0 100644 --- a/solenv/gbuild/platform/com_GCC_class.mk +++ b/solenv/gbuild/platform/com_GCC_class.mk @@ -60,6 +60,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \ $(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ + $(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \ $(T_CFLAGS) \ -c $(3) \ -o $(1) \ @@ -82,6 +83,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \ $(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \ + $(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \ $(T_CXXFLAGS) \ -c $(3) \ -o $(1) \ diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 0cc86e3c73d2..0cc32b52505b 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -81,6 +81,10 @@ gb_CXXFLAGS_COMMON := \ -fno-common \ -pipe \ +ifneq ($(HAVE_THREADSAFE_STATICS),TRUE) +gb_CXXFLAGS_COMMON += -fno-threadsafe-statics +endif + ifeq ($(HAVE_GCC_VISIBILITY_FEATURE),TRUE) gb_VISIBILITY_FLAGS := -DHAVE_GCC_VISIBILITY_FEATURE -fvisibility=hidden ifneq ($(HAVE_GCC_VISIBILITY_BROKEN),TRUE) @@ -149,6 +153,12 @@ gb_DEBUG_CXXFLAGS := $(FNO_DEFAULT_INLINE) gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) +ifeq ($(COM_GCC_IS_CLANG),TRUE) +gb_COMPILER_PLUGINS :=-Xclang -load -Xclang $(SRCDIR)/compilerplugins/obj/compileplugin.so -Xclang -add-plugin -Xclang loplugin +else +gb_COMPILER_PLUGINS := +endif + # Executable class gb_Executable_EXT_for_build := diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index 1aad554722ba..c013bf57ab96 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -87,10 +87,6 @@ ifeq ($(HAVE_GCC_NO_LONG_DOUBLE),TRUE) gb_CXXFLAGS += -Wno-long-double endif -ifneq ($(HAVE_THREADSAFE_STATICS),TRUE) -gb_CXXFLAGS += -fno-threadsafe-statics -endif - # these are to get g++ to switch to Objective-C++ mode # (see toolkit module for a case where it is necessary to do it this way) gb_OBJCXXFLAGS := -x objective-c++ -fobjc-exceptions @@ -212,10 +208,10 @@ $(call gb_Helper_abbreviate_dirs,\ $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat $(extraobjectlist)`) \ - $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \ + `cat $${DYLIB_FILE}` \ $(LIBS) \ - -o $(if $(SOVERSION),$(1).$(SOVERSION),$(1)) \ - `cat $${DYLIB_FILE}` && \ + $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \ + -o $(if $(SOVERSION),$(1).$(SOVERSION),$(1)) && \ $(if $(SOVERSION),ln -sf $(notdir $(1)).$(SOVERSION) $(1),:) && \ $(if $(filter Executable,$(TARGETTYPE)), \ $(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl Executable \ @@ -413,6 +409,18 @@ gb_ExtensionTarget_LICENSEFILE_DEFAULT := $(OUTDIR)/bin/osl/LICENSE gb_UnpackedTarget_TARFILE_LOCATION := $(TARFILE_LOCATION) +# UnoApiHeadersTarget class + +# It seems that when using the latest Xcode and Clang for OS X, we +# also neeed to always generate comprehensive headers for +# udkapi. Otherwise we get assertion failures in saxparser when doing +# i18npool, at least. +ifneq ($(filter TRUE,$(COM_GCC_IS_CLANG) $(DISABLE_DYNLOADING)),) +gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive,$(2)) +else +gb_UnoApiHeadersTarget_select_variant = $(2) +endif + # Python gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk index 47c12d2c1292..2abac87c6b4c 100644 --- a/solenv/gbuild/platform/solaris.mk +++ b/solenv/gbuild/platform/solaris.mk @@ -301,12 +301,16 @@ gb_Executable_LAYER := \ $(foreach exe,$(gb_Executable_NONE),$(exe):NONE) \ -define gb_Executable_get_rpath -'-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))' \ --L$(gb_Library_OUTDIRLOCATION) +define gb_Executable__get_rpath +$(strip $(if $(1),'-Wl$(COMMA)-rpath$(COMMA)$(1)') \ +-L$(gb_Library_OUTDIRLOCATION)) #JAD#-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION) endef +define gb_Executable_get_rpath +$(call gb_Executable__get_rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))) +endef + define gb_Executable_Executable_platform $(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Executable_get_rpath,$(1)) @@ -396,6 +400,14 @@ gb_ExtensionTarget_LICENSEFILE_DEFAULT := $(OUTDIR)/bin/osl/LICENSE gb_UnpackedTarget_TARFILE_LOCATION := $(TARFILE_LOCATION) +# UnoApiHeadersTarget class + +ifeq ($(DISABLE_DYNLOADING),TRUE) +gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive,$(2)) +else +gb_UnoApiHeadersTarget_select_variant = $(2) +endif + # Python gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index d996bd46107d..2b0612080a3b 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -262,7 +262,7 @@ gb_Library_LAYER := \ $(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):OXT) \ define gb_Library__get_rpath -$(if $(1),$(strip -Wl,-z,origin '-Wl,-rpath,$(1)' '-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)')) +$(if $(1),$(strip -Wl,-z,origin '-Wl,-rpath,$(1)' -Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION))) endef define gb_Library_get_rpath @@ -299,9 +299,12 @@ gb_Executable_LAYER := \ $(foreach exe,$(gb_Executable_NONE),$(exe):NONE) \ +define gb_Executable__get_rpath +$(strip -Wl,-z,origin $(if $(1),'-Wl$(COMMA)-rpath$(COMMA)$(1)') -Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)) +endef + define gb_Executable_get_rpath --Wl,-z,origin '-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))' \ --Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION) +$(call gb_Executable__get_rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))) endef define gb_Executable_Executable_platform @@ -399,6 +402,14 @@ gb_ExtensionTarget_LICENSEFILE_DEFAULT := $(OUTDIR)/bin/osl/LICENSE gb_UnpackedTarget_TARFILE_LOCATION := $(TARFILE_LOCATION) +# UnoApiHeadersTarget class + +ifeq ($(DISABLE_DYNLOADING),TRUE) +gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive,$(2)) +else +gb_UnoApiHeadersTarget_select_variant = $(2) +endif + # Python gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload diff --git a/solenv/gbuild/tail_build_modules.mk b/solenv/gbuild/tail_build_modules.mk index e5301f4d9728..2ce60fd6af1f 100644 --- a/solenv/gbuild/tail_build_modules.mk +++ b/solenv/gbuild/tail_build_modules.mk @@ -29,6 +29,10 @@ TAIL_BUILD_MODULES := gb_Module_Module := +define gb_Helper_optional +$(if $(filter $(1),$(BUILD_TYPE)),$(2)) +endef + define gb_Module_add_moduledirs TAIL_BUILD_MODULES += $(2) diff --git a/solenv/inc/libs.mk b/solenv/inc/libs.mk index 0f25a6b6fbfb..f705d5f0b8fb 100644 --- a/solenv/inc/libs.mk +++ b/solenv/inc/libs.mk @@ -193,11 +193,7 @@ MINIZIP3RDLIB=$(MINIZIP_LIBS) # internally, minizip is included in zlib MINIZIP3RDLIB= .ENDIF -.IF "$(SYSTEM_JPEG)"=="YES" JPEG3RDLIB=-ljpeg -.ELSE -JPEG3RDLIB=-ljpeglib -.ENDIF .IF "$(SYSTEM_DB)" == "YES" BERKELEYLIB=-l$(DB_LIB) .ELIF "$(GUI)$(COM)"=="WNTGCC" @@ -445,7 +441,7 @@ CLUCENELIB=iclucene.lib EXPAT3RDLIB=expat_xmltok.lib expat_xmlparse.lib EXPATASCII3RDLIB=expat_xmltok.lib ascii_expat_xmlparse.lib ZLIB3RDLIB=zlib.lib -JPEG3RDLIB=jpeglib.lib +JPEG3RDLIB=jpeg.lib BERKELEYLIB=libdb47.lib CURLLIB=libcurl.lib CHAOSLIB=ichaos.lib diff --git a/solenv/inc/rules.mk b/solenv/inc/rules.mk index 327955fde0f5..02ed21d17ce6 100644 --- a/solenv/inc/rules.mk +++ b/solenv/inc/rules.mk @@ -623,10 +623,6 @@ $(MISC)/%.mk : $(MISC)/%$($(WINVERSIONNAMES)_MAJOR).xml @$(TOUCH) $@ @echo XML2MK_FILES += $(@:b) >> $@ -#generate descriptions from xml -$(MISC)/%$($(WINVERSIONNAMES)_MAJOR)_description.cxx : $(MISC)/%$($(WINVERSIONNAMES)_MAJOR).xml - xml2cmp -func $(MISC)/$*$($(WINVERSIONNAMES)_MAJOR)_description.cxx $< - #generate private rdb $(BIN)/%.rdb: $(MISC)/%$($(WINVERSIONNAMES)_MAJOR).xml $(COMMAND_ECHO)$(RDBMAKER) -BUCR -O$(BIN)/$*.rdb @$(mktmp $(foreach,i,$($(@:b)_XML2CMPTYPES) -T$i ) $(COMPRDB)) diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk index 15bd3f0c7eb0..b9db9fd38b56 100644 --- a/solenv/inc/settings.mk +++ b/solenv/inc/settings.mk @@ -1245,53 +1245,6 @@ TRUSTED_MANIFEST_LOCATION*=$(SOLARENV)/inc # --- Compiler ----------------------------------------------------- .INCLUDE : rules.mk -# --- include typelists -------------------------------------------- - -.IF "$(COMP1TYPELIST)"!="" -.INCLUDE .IGNORE : $(MISC)/$(COMP1TYPELIST).mk -$(COMP1TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP1TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml) -.ENDIF - -.IF "$(COMP2TYPELIST)"!="" -.INCLUDE .IGNORE : $(MISC)/$(COMP2TYPELIST).mk -$(COMP2TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP2TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml) -.ENDIF - -.IF "$(COMP3TYPELIST)"!="" -.INCLUDE .IGNORE : $(MISC)/$(COMP3TYPELIST).mk -$(COMP3TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP3TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml) -.ENDIF - -.IF "$(COMP4TYPELIST)"!="" -.INCLUDE .IGNORE : $(MISC)/$(COMP4TYPELIST).mk -$(COMP4TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP4TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml) -.ENDIF - -.IF "$(COMP5TYPELIST)"!="" -.INCLUDE .IGNORE : $(MISC)/$(COMP5TYPELIST).mk -$(COMP5TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP5TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml) -.ENDIF - -.IF "$(COMP6TYPELIST)"!="" -.INCLUDE .IGNORE : $(MISC)/$(COMP6TYPELIST).mk -$(COMP6TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP6TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml) -.ENDIF - -.IF "$(COMP7TYPELIST)"!="" -.INCLUDE .IGNORE : $(MISC)/$(COMP7TYPELIST).mk -$(COMP7TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP7TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml) -.ENDIF - -.IF "$(COMP8TYPELIST)"!="" -.INCLUDE .IGNORE : $(MISC)/$(COMP8TYPELIST).mk -$(COMP8TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP8TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml) -.ENDIF - -.IF "$(COMP9TYPELIST)"!="" -.INCLUDE .IGNORE : $(MISC)/$(COMP9TYPELIST).mk -$(COMP9TYPELIST)_XML2CMPTYPES:=$(shell @$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/xml2cmp -types stdout $(MISC)/$(COMP9TYPELIST)$($(WINVERSIONNAMES)_MAJOR).xml) -.ENDIF - # some place to define these jars for SO environment XML_APIS_JAR*=$(SOLARBINDIR)/xml-apis.jar XERCES_JAR*=$(SOLARBINDIR)/xercesImpl.jar diff --git a/solenv/inc/target.mk b/solenv/inc/target.mk index d5b4ce195806..8f20e72d8e43 100644 --- a/solenv/inc/target.mk +++ b/solenv/inc/target.mk @@ -657,70 +657,8 @@ SHL9BASEX=/BASE:$(SHL9BASE) .ENDIF .ENDIF -.IF "$(COMP1TYPELIST)$(COMP2TYPELIST)$(COMP3TYPELIST)$(COMP4TYPELIST)$(COMP5TYPELIST)$(COMP6TYPELIST)$(COMP7TYPELIST)$(COMP8TYPELIST)$(COMP9TYPELIST)"!="" -.IF "$(UNOUCRRDB)"!="" -COMPRDB*:=$(UNOUCRRDB) -.ELSE # "$(UNOUCRRDB)"!="" -COMPRDB*:=$(SOLARBINDIR)/types.rdb -.ENDIF # "$(UNOUCRRDB)"!="" -.ENDIF # "$(COMP1TYPELIST)$(COMP2TYPELIST)$(COMP3TYPELIST)$(COMP4TYPELIST)$(COMP5TYPELIST)$(COMP6TYPELIST)$(COMP7TYPELIST)$(COMP8TYPELIST)$(COMP9TYPELIST)"!="" -.IF "$(COMP1TYPELIST)"!="" -UNOTYPES+=$($(COMP1TYPELIST)_XML2CMPTYPES) -COMP1RDBTARGETN:=$(BIN)/$(COMP1TYPELIST).rdb -#COMP1TYPELISTN:=$(MISC)/$(COMP1TYPELIST).xml -.ENDIF - -.IF "$(COMP2TYPELIST)"!="" -UNOTYPES+=$($(COMP2TYPELIST)_XML2CMPTYPES) -COMP2RDBTARGETN:=$(BIN)/$(COMP2TYPELIST).rdb -#COMP2TYPELISTN:=$(MISC)/$(COMP2TYPELIST).xml -.ENDIF - -.IF "$(COMP3TYPELIST)"!="" -UNOTYPES+=$($(COMP3TYPELIST)_XML2CMPTYPES) -COMP3RDBTARGETN:=$(BIN)/$(COMP3TYPELIST).rdb -#COMP3TYPELISTN:=$(MISC)/$(COMP3TYPELIST).xml -.ENDIF - -.IF "$(COMP4TYPELIST)"!="" -UNOTYPES+=$($(COMP4TYPELIST)_XML2CMPTYPES) -COMP4RDBTARGETN:=$(BIN)/$(COMP4TYPELIST).rdb -#COMP4TYPELISTN:=$(MISC)/$(COMP4TYPELIST).xml -.ENDIF - -.IF "$(COMP5TYPELIST)"!="" -UNOTYPES+=$($(COMP5TYPELIST)_XML2CMPTYPES) -COMP5RDBTARGETN:=$(BIN)/$(COMP5TYPELIST).rdb -#COMP5TYPELISTN:=$(MISC)/$(COMP5TYPELIST).xml -.ENDIF - -.IF "$(COMP6TYPELIST)"!="" -UNOTYPES+=$($(COMP6TYPELIST)_XML2CMPTYPES) -COMP6RDBTARGETN:=$(BIN)/$(COMP6TYPELIST).rdb -#COMP6TYPELISTN:=$(MISC)/$(COMP6TYPELIST).xml -.ENDIF - -.IF "$(COMP7TYPELIST)"!="" -UNOTYPES+=$($(COMP7TYPELIST)_XML2CMPTYPES) -COMP7RDBTARGETN:=$(BIN)/$(COMP7TYPELIST).rdb -#COMP7TYPELISTN:=$(MISC)/$(COMP7TYPELIST).xml -.ENDIF - -.IF "$(COMP8TYPELIST)"!="" -UNOTYPES+=$($(COMP8TYPELIST)_XML2CMPTYPES) -COMP8RDBTARGETN:=$(BIN)/$(COMP8TYPELIST).rdb -#COMP8TYPELISTN:=$(MISC)/$(COMP8TYPELIST).xml -.ENDIF - -.IF "$(COMP9TYPELIST)"!="" -UNOTYPES+=$($(COMP9TYPELIST)_XML2CMPTYPES) -COMP9RDBTARGETN:=$(BIN)/$(COMP9TYPELIST).rdb -#COMP9TYPELISTN:=$(MISC)/$(COMP9TYPELIST).xml -.ENDIF - UNOTYPES!:=$(strip $(UNOTYPES)) -#moved here to get UNOTYPES from COMPxTYPELIST .IF "$(UNOTYPES)" != "" UNOUCRHEADER=$(foreach,j,$(subst,.,/ $(UNOTYPES)) $(UNOUCROUT)/$(j:+".hpp")) UNOUCRTARGET:=$(INCCOM)/$(TARGET)_headergen.done diff --git a/solenv/inc/tg_dep.mk b/solenv/inc/tg_dep.mk index eac13e84f247..3819a71464bd 100644 --- a/solenv/inc/tg_dep.mk +++ b/solenv/inc/tg_dep.mk @@ -16,14 +16,13 @@ # the License at http://www.apache.org/licenses/LICENSE-2.0 . # -.IF "$(SLOFILES)$(OBJFILES)$(DEPOBJFILES)$(SRCFILES)$(SRC1FILES)$(SRC2FILES)$(SRC3FILES)$(RCFILES)$(HDBDEPNTARGET)$(IDLFILES)$(PARFILES)$(ZIP1TARGET)$(ZIP2TARGET)$(ZIP3TARGET)$(ZIP4TARGET)$(ZIP5TARGET)$(ZIP6TARGET)$(ZIP7TARGET)$(ZIP8TARGET)$(ZIP9TARGET)$(COMP1TYPELIST)$(COMP2TYPELIST)$(COMP3TYPELIST)$(COMP4TYPELIST)$(COMP5TYPELIST)$(COMP6TYPELIST)$(COMP7TYPELIST)$(COMP8TYPELIST)$(COMP9TYPELIST)"!="" +.IF "$(SLOFILES)$(OBJFILES)$(DEPOBJFILES)$(SRCFILES)$(SRC1FILES)$(SRC2FILES)$(SRC3FILES)$(RCFILES)$(HDBDEPNTARGET)$(IDLFILES)$(PARFILES)$(ZIP1TARGET)$(ZIP2TARGET)$(ZIP3TARGET)$(ZIP4TARGET)$(ZIP5TARGET)$(ZIP6TARGET)$(ZIP7TARGET)$(ZIP8TARGET)$(ZIP9TARGET)"!="" ALLDEP .PHONY: @-$(IFEXIST) $(SRS)/$(TARGET).*.dpr $(THEN) $(RM:s/+//) $(SRS)/$(TARGET).*.dpr >& $(NULLDEV) $(FI) @@-$(RM) $(MISC)/$(TARGET).dpr @@-$(RM) $(MISC)/$(TARGET).*.dprr @@-$(RM) $(MISC)/$(TARGET).dpj @@-$(RM) $(MISC)/$(TARGET).dpz - @@-$(RM) $(MISC)/$(COMP1TYPELIST).mk $(MISC)/$(COMP2TYPELIST).mk $(MISC)/$(COMP3TYPELIST).mk $(MISC)/$(COMP4TYPELIST).mk $(MISC)/$(COMP5TYPELIST).mk $(MISC)/$(COMP6TYPELIST).mk $(MISC)/$(COMP7TYPELIST).mk $(MISC)/$(COMP8TYPELIST).mk $(MISC)/$(COMP9TYPELIST).mk .IF "$(nodep)"=="" .IF "$(DEPFILE_SLO)"!="" @@-$(RM) $(DEPFILE_SLO) diff --git a/solenv/inc/unxand.mk b/solenv/inc/unxand.mk index 8025388a9f64..60f389b63bb6 100644 --- a/solenv/inc/unxand.mk +++ b/solenv/inc/unxand.mk @@ -76,3 +76,5 @@ LINKFLAGSRUNPATH_URELIB= LINKFLAGSRUNPATH_UREBIN= LINKFLAGSRUNPATH_OOO= LINKFLAGSRUNPATH_SDKBIN= + +DLLPOST=.a diff --git a/solenv/inc/unxgcc.mk b/solenv/inc/unxgcc.mk index 3ac4956ff216..04419863f32a 100644 --- a/solenv/inc/unxgcc.mk +++ b/solenv/inc/unxgcc.mk @@ -93,6 +93,9 @@ CFLAGS_NO_EXCEPTIONS=-fno-exceptions # -fpermissive should be removed as soon as possible CFLAGSCXX= -pipe $(ARCH_FLAGS) +.IF "$(HAVE_THREADSAFE_STATICS)" != "TRUE" +CFLAGSCXX += -fno-threadsafe-statics +.END .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" && "$(HAVE_GCC_VISIBILITY_BROKEN)" != "TRUE" CFLAGSCXX+=-fvisibility-inlines-hidden .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" diff --git a/solenv/inc/unxiosr.mk b/solenv/inc/unxiosr.mk index 089dc3d588aa..f1a64929e20c 100644 --- a/solenv/inc/unxiosr.mk +++ b/solenv/inc/unxiosr.mk @@ -64,6 +64,9 @@ CFLAGS_NO_EXCEPTIONS=-fno-exceptions # Normal C++ compilation flags CFLAGSCXX=-pipe -fsigned-char $(ARCH_FLAGS) -Wno-ctor-dtor-privacy +.IF "$(HAVE_THREADSAFE_STATICS)" != "TRUE" +CFLAGSCXX += -fno-threadsafe-statics +.END # No PIC needed as we don't build dynamic objects PICSWITCH:= diff --git a/solenv/inc/unxsogs.mk b/solenv/inc/unxsogs.mk index a4151439beb8..f75c4aa0883e 100644 --- a/solenv/inc/unxsogs.mk +++ b/solenv/inc/unxsogs.mk @@ -58,6 +58,10 @@ CFLAGSEXCEPTIONS=-fexceptions CFLAGS_NO_EXCEPTIONS=-fno-exceptions CFLAGSCXX= -pipe $(ARCH_FLAGS) +.IF "$(HAVE_THREADSAFE_STATICS)" != "TRUE" +CFLAGSCXX += -fno-threadsafe-statics +.END + PICSWITCH:=-fPIC CFLAGSOBJGUIMT= CFLAGSOBJCUIMT= diff --git a/solenv/inc/wntgcci.mk b/solenv/inc/wntgcci.mk index c8e39d1570bb..496e8c22c319 100644 --- a/solenv/inc/wntgcci.mk +++ b/solenv/inc/wntgcci.mk @@ -46,6 +46,9 @@ CFLAGS+=-fmessage-length=0 -c CFLAGSCC=-pipe $(ARCH_FLAGS) CFLAGSCXX=-pipe $(ARCH_FLAGS) +.IF "$(HAVE_THREADSAFE_STATICS)" != "TRUE" +CFLAGSCXX += -fno-threadsafe-statics +.END .IF "$(HAVE_CXX0X)" == "TRUE" # FIXME still does not compile fully CFLAGSCXX+=-std=gnu++0x |