diff --git a/solenv/gbuild/templates/CppunitTest.mk b/solenv/gbuild/templates/CppunitTest.mk index 87f04d7db94e..56f3452ede14 100644 --- a/solenv/gbuild/templates/CppunitTest.mk +++ b/solenv/gbuild/templates/CppunitTest.mk @@ -31,6 +31,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,MODULE_NAME, \ )) $(eval $(call gb_CppunitTest_add_linked_libs,MODULE_NAME, \ + $(gb_STDLIBS) \ )) $(eval $(call gb_CppunitTest_set_include,MODULE_NAME,\ diff --git a/solenv/gbuild/templates/Executable.mk b/solenv/gbuild/templates/Executable.mk index e54d5ed36afb..691e53012d58 100644 --- a/solenv/gbuild/templates/Executable.mk +++ b/solenv/gbuild/templates/Executable.mk @@ -36,26 +36,10 @@ $(eval $(call gb_Executable_set_cxxflags,EXEC,\ )) $(eval $(call gb_Executable_add_linked_libs,EXEC,\ + $(gb_STDLIBS) \ )) $(eval $(call gb_Executable_add_exception_objects,EXEC,\ )) -ifeq ($(OS),WNT) -$(eval $(call gb_Executable_add_linked_libs,mkunroll,\ - kernel32 \ - msvcrt \ - oldnames \ - user32 \ - uwinapi \ -)) -endif - -ifeq ($(OS),LINUX) -$(eval $(call gb_Executable_add_linked_libs,mkunroll,\ - dl \ - pthread \ -)) -endif - # vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/templates/Library.mk b/solenv/gbuild/templates/Library.mk index ad9854d7db10..2e62cfe9a64b 100644 --- a/solenv/gbuild/templates/Library.mk +++ b/solenv/gbuild/templates/Library.mk @@ -56,26 +56,9 @@ $(eval $(call gb_Library_set_defs,LIB,\ # add libraries to be linked to LIB; again these names need to be given as # specified in Repository.mk $(eval $(call gb_Library_add_linked_libs,LIB,\ + $(gb_STDLIBS) \ )) -# this code usually will be platform specific; these libraries are also defined in Repository.mk -ifeq ($(OS),LINUX) -$(eval $(call gb_Library_add_linked_libs,LIB,\ - dl \ - m \ - pthread \ -)) -endif - -ifeq ($(OS),WNT) -$(eval $(call gb_Library_add_linked_libs,LIB,\ - kernel32 \ - msvcrt \ - oldnames \ - user32 \ -)) -endif - # add all source files that shall be compiled with exceptions enabled # the name is relative to $(SRCROOT) and must not contain an extension $(eval $(call gb_Library_add_exception_objects,LIB,\ @@ -91,14 +74,13 @@ $(eval $(call gb_SdiTarget_set_include,MODULE/sdi/ROOT_SDI_FILE,\ $$(INCLUDE) \ )) -# this is an example how files can be added that require special compiler settings +# this is an example how files can be added that require special compiler settings, e.g. building without optimizing ifeq ($(OS),WNT) $(eval $(call gb_Library_add_cxxobjects,LIB,\ MODULE/source/foo/bar \ - , $(gb_LinkTarget_EXCEPTIONFLAGS) -nologo -UPRECOMPILED_HEADERS \ + , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \ )) endif # vim: set noet sw=4 ts=4: -