connectivity/inc/pch/precompiled_firebird_sdbc.hxx | 11 download.lst | 4 external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 | 41 ++ external/firebird/0001-Fix-warning-on-Win64-build-231.patch.1 | 37 ++ external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1 | 180 ---------- external/firebird/0001-extern-cloop-Missing-dependencies-of-compilations-on.patch.1 | 41 ++ external/firebird/ExternalPackage_firebird.mk | 4 external/firebird/ExternalProject_firebird.mk | 4 external/firebird/UnpackedTarball_firebird.mk | 20 - external/firebird/asan.patch | 12 external/firebird/configure-c99.patch | 12 external/firebird/firebird-cygwin-msvc-warnings.patch | 36 -- external/firebird/firebird-cygwin-msvc.patch | 102 ++--- external/firebird/firebird-macosx-sandbox.patch.1 | 13 external/firebird/firebird-macosx.patch.1 | 16 external/firebird/mold.patch | 17 external/firebird/sanitizer.patch | 8 external/firebird/ubsan.patch | 32 - 18 files changed, 251 insertions(+), 339 deletions(-)
New commits: commit 26cfd0d6997ebbad10049a5b6e38b73653553377 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Jan 17 15:31:57 2024 +0100 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Jan 18 13:39:13 2024 +0100 Revert "tdf#134526 Firebird: upgrade to release 3.0.11" Win daily builds are failing since then. Also Jenkins is failing intermittently so it needs more investigation Revert "New UBSan failure with Firebird 3.0.11" This reverts commit 345f8cc9de49f573b60f9dc63e7df17ce3c2f93c. Revert "external/firebird: Reinstate UBSan function-type-mismatch fix" This reverts commit d5445a8c470a661fac81a3f6fc55f6895a8ed9bc. Revert "mold: fatal: cannot open loader_path/../Debug/firebird" This reverts commit f2ba02eee98d04b3e473393d2647201ed2549b30. Revert "firebird: set -mmacosx-version-min to 10.15" This reverts commit 6998eacf542e6d6d9ec587aff3a38c3644e83c7f. Revert "tdf#134526 Firebird: upgrade to release 3.0.11" This reverts commit 00eae23267bf64e07cf057f828cd85f3c38ac669. Change-Id: Id4b0600965953051f6947f570c9b9a1f56044502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162200 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/connectivity/inc/pch/precompiled_firebird_sdbc.hxx b/connectivity/inc/pch/precompiled_firebird_sdbc.hxx index 7860e0b4af4e..bd628cf76a9a 100644 --- a/connectivity/inc/pch/precompiled_firebird_sdbc.hxx +++ b/connectivity/inc/pch/precompiled_firebird_sdbc.hxx @@ -13,7 +13,7 @@ manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). - Generated on 2023-10-28 10:48:29 using: + Generated on 2021-03-08 13:12:28 using: ./bin/update_pch connectivity firebird_sdbc --cutoff=2 --exclude:system --exclude:module --exclude:local If after updating build fails, use the following command to locate conflicting headers: @@ -30,24 +30,22 @@ #endif // PCH_LEVEL >= 1 #if PCH_LEVEL >= 2 #include <osl/diagnose.h> +#include <osl/file.h> #include <osl/file.hxx> #include <osl/mutex.hxx> #include <osl/process.h> #include <osl/thread.h> +#include <osl/time.h> #include <rtl/alloc.h> #include <rtl/bootstrap.hxx> -#include <rtl/character.hxx> -#include <rtl/math.h> #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> -#include <rtl/ustring.h> #include <rtl/ustring.hxx> #include <sal/log.hxx> #include <sal/types.h> #endif // PCH_LEVEL >= 2 #if PCH_LEVEL >= 3 #include <com/sun/star/embed/ElementModes.hpp> -#include <com/sun/star/io/XStream.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/sdbc/ColumnValue.hpp> @@ -61,11 +59,10 @@ #include <com/sun/star/uno/Reference.hxx> #include <comphelper/comphelperdllapi.h> #include <comphelper/sequence.hxx> -#include <comphelper/servicehelper.hxx> -#include <comphelper/types.hxx> #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/supportsservice.hxx> #include <resource/sharedresources.hxx> +#include <unotools/localfilehelper.hxx> #endif // PCH_LEVEL >= 3 #if PCH_LEVEL >= 4 #include <TConnection.hxx> diff --git a/download.lst b/download.lst index 0b20f2be83d0..968f734bb3a2 100644 --- a/download.lst +++ b/download.lst @@ -116,8 +116,8 @@ EXPAT_TARBALL := expat-2.5.0.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -FIREBIRD_SHA256SUM := c716fc1c788ed614050f5469e1ba0ff442c2f1f7b907a2c808a8bac1dc3d6f83 -FIREBIRD_TARBALL := Firebird-3.0.11.33703-0.tar.bz2 +FIREBIRD_SHA256SUM := acb85cedafa10ce106b1823fb236b1b3e5d942a5741e8f8435cc8ccfec0afe76 +FIREBIRD_TARBALL := Firebird-3.0.7.33374-0.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 b/external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 new file mode 100644 index 000000000000..22cc1e119a32 --- /dev/null +++ b/external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 @@ -0,0 +1,41 @@ +From f4c0aa3ba070e5c3ce996b33a31323a3a6820f0c Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann <sberg...@redhat.com> +Date: Wed, 2 Dec 2020 10:44:28 +0100 +Subject: Fix checks for null HANDLE in Windows-only code + +clang-cl failed with "error: unordered comparison between pointer and zero +('HANDLE' (aka 'void *') and 'int')" in these two places introduced with +f219283b72ab537c2b5938222708f35227c1ebde "Sub-task CORE-4463: Windows +implementation for CORE-4462 (Make it possible to restore compressed .nbk files +without explicitly decompressing them)" and +c2cfa7824189ed7c3e5a19721effdf97c07dadfd "Prevent child process hung if it +writes too much data to the pipe and overflow the pipe buffer". +--- + src/utilities/nbackup/nbackup.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/utilities/nbackup/nbackup.cpp b/src/utilities/nbackup/nbackup.cpp +index 6598b6e331..4703079d67 100644 +--- a/src/utilities/nbackup/nbackup.cpp ++++ b/src/utilities/nbackup/nbackup.cpp +@@ -385,7 +385,7 @@ FB_SIZE_T NBackup::read_file(FILE_HANDLE &file, void *buffer, FB_SIZE_T bufsize) + #ifdef WIN_NT + // Read child's stderr often to prevent child process hung if it writes + // too much data to the pipe and overflow the pipe buffer. +- const bool checkChild = (childStdErr > 0 && file == backup); ++ const bool checkChild = (childStdErr != 0 && file == backup); + if (checkChild) + print_child_stderr(); + +@@ -790,7 +790,7 @@ void NBackup::close_backup() + return; + #ifdef WIN_NT + CloseHandle(backup); +- if (childId > 0) ++ if (childId != 0) + { + const bool killed = (WaitForSingleObject(childId, 5000) != WAIT_OBJECT_0); + if (killed) +-- +2.28.0 + diff --git a/external/firebird/0001-Fix-warning-on-Win64-build-231.patch.1 b/external/firebird/0001-Fix-warning-on-Win64-build-231.patch.1 new file mode 100644 index 000000000000..0e21f9e27925 --- /dev/null +++ b/external/firebird/0001-Fix-warning-on-Win64-build-231.patch.1 @@ -0,0 +1,37 @@ +From 60cb8e07b17ad8533d7d13f52435aa11e48f4659 Mon Sep 17 00:00:00 2001 +From: Dimitry Sibiryakov <s...@ibphoenix.com> +Date: Tue, 12 Nov 2019 13:42:49 +0100 +Subject: [PATCH] Fix warning on Win64 build (#231) + +--- + src/common/ThreadStart.cpp | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/common/ThreadStart.cpp b/src/common/ThreadStart.cpp +index 184c93a32b..758056432f 100644 +--- a/src/common/ThreadStart.cpp ++++ b/src/common/ThreadStart.cpp +@@ -309,13 +309,16 @@ Thread Thread::start(ThreadEntryPoint* routine, void* arg, int priority_arg, Han + * Advanced Windows by Richter pg. # 109. */ + + unsigned thread_id; +- unsigned long real_handle = +- _beginthreadex(NULL, 0, THREAD_ENTRYPOINT, THREAD_ARG, CREATE_SUSPENDED, &thread_id); +- if (!real_handle) ++ HANDLE handle = ++ reinterpret_cast<HANDLE>(_beginthreadex(NULL, 0, THREAD_ENTRYPOINT, THREAD_ARG, CREATE_SUSPENDED, &thread_id)); ++ if (!handle) + { ++ // Though MSDN says that _beginthreadex() returns error in errno, ++ // GetLastError() still works because RTL call no other system ++ // functions after CreateThread() in the case of error. ++ // Watch out if it is ever changed. + Firebird::system_call_failed::raise("_beginthreadex", GetLastError()); + } +- HANDLE handle = reinterpret_cast<HANDLE>(real_handle); + + SetThreadPriority(handle, priority); + +-- +2.20.1 + diff --git a/external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1 b/external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1 deleted file mode 100644 index 625ab20ef440..000000000000 --- a/external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1 +++ /dev/null @@ -1,180 +0,0 @@ -From f1d64f5eb4569fe722f312d84a3c084c2255e03f Mon Sep 17 00:00:00 2001 -From: Taichi Haradaguchi <20001...@ymail.ne.jp> -Date: Wed, 22 Nov 2023 21:34:00 +0900 -Subject: [PATCH] Revert "Backported fix for #7122: Invalid state of mapping - cache after replacement of database" - -This reverts commit 585b2d133a3891b58b7aeb4ddd3ccd124168abf0. ---- - src/include/consts_pub.h | 1 - - src/include/gen/Firebird.pas | 1 - - src/jrd/Mapping.h | 2 +- - src/jrd/jrd.cpp | 14 -------------- - src/jrd/shut.cpp | 7 ------- - src/utilities/nbackup/nbackup.cpp | 14 +------------- - 6 files changed, 2 insertions(+), 37 deletions(-) - -diff --git a/src/include/consts_pub.h b/src/include/consts_pub.h -index 769a3e372b..6107e0975a 100644 ---- a/src/include/consts_pub.h -+++ b/src/include/consts_pub.h -@@ -123,7 +123,6 @@ - #define isc_dpb_nolinger 88 - #define isc_dpb_reset_icu 89 - #define isc_dpb_map_attach 90 --#define isc_dpb_clear_map 96 - - /**************************************************/ - /* clumplet tags used inside isc_dpb_address_path */ -diff --git a/src/include/gen/Firebird.pas b/src/include/gen/Firebird.pas -index a891103b53..66be146060 100644 ---- a/src/include/gen/Firebird.pas -+++ b/src/include/gen/Firebird.pas -@@ -3233,7 +3233,6 @@ const - isc_dpb_nolinger = byte(88); - isc_dpb_reset_icu = byte(89); - isc_dpb_map_attach = byte(90); -- isc_dpb_clear_map = byte(96); - isc_dpb_address = byte(1); - isc_dpb_addr_protocol = byte(1); - isc_dpb_addr_endpoint = byte(2); -diff --git a/src/jrd/Mapping.h b/src/jrd/Mapping.h -index b5e068d5a0..3ab1c70c92 100644 ---- a/src/jrd/Mapping.h -+++ b/src/jrd/Mapping.h -@@ -44,7 +44,7 @@ bool mapUser(Firebird::string& name, Firebird::string& trusted_role, Firebird::s - void clearMap(const char* dbName); - void shutdownMappingIpc(); - --class GlobalMappingScan : public VirtualTableScan -+class GlobalMappingScan: public VirtualTableScan - { - public: - GlobalMappingScan(CompilerScratch* csb, const Firebird::string& alias, -diff --git a/src/jrd/jrd.cpp b/src/jrd/jrd.cpp -index 43be48c5a6..4200780aa6 100644 ---- a/src/jrd/jrd.cpp -+++ b/src/jrd/jrd.cpp -@@ -958,7 +958,6 @@ public: - bool dpb_reset_icu; - bool dpb_map_attach; - ULONG dpb_remote_flags; -- bool dpb_clear_map; - - // here begin compound objects - // for constructor to work properly dpb_user_name -@@ -1473,12 +1472,6 @@ JAttachment* JProvider::internalAttach(CheckStatusWrapper* user_status, const ch - if (ISC_check_if_remote(expanded_name, true)) - ERR_post(Arg::Gds(isc_unavailable)); - -- // Clear old mapping cache data on request. -- // Unfortunately have to do it w/o access rights check - to check access rights engine -- // needs correct mapping which sometimes can't be guaranteed before cleaning cache. -- if (options.dpb_clear_map) -- clearMap(expanded_name.c_str()); -- - // Check for correct credentials supplied - if (existingId) - userId = *existingId; -@@ -2726,9 +2719,6 @@ JAttachment* JProvider::createDatabase(CheckStatusWrapper* user_status, const ch - - dbb->dbb_tip_cache = FB_NEW_POOL(*dbb->dbb_permanent) TipCache(dbb); - -- // Clear old mapping cache data (if present) -- clearMap(dbb->dbb_filename.c_str()); -- - // Initialize backup difference subsystem. This must be done before WAL and shadowing - // is enabled because nbackup it is a lower level subsystem - dbb->dbb_backup_manager = FB_NEW_POOL(*dbb->dbb_permanent) BackupManager(tdbb, -@@ -6043,10 +6033,6 @@ void DatabaseOptions::get(const UCHAR* dpb, USHORT dpb_length, bool& invalid_cli - getString(rdr, dpb_config); - break; - -- case isc_dpb_clear_map: -- dpb_clear_map = rdr.getBoolean(); -- break; -- - default: - break; - } -diff --git a/src/jrd/shut.cpp b/src/jrd/shut.cpp -index acfd5e136d..9783e2cab3 100644 ---- a/src/jrd/shut.cpp -+++ b/src/jrd/shut.cpp -@@ -26,7 +26,6 @@ - #include "../jrd/scl.h" - #include "../jrd/nbak.h" - #include "../jrd/ods.h" --#include "../jrd/Mapping.h" - #include "../jrd/cch_proto.h" - #include "../jrd/cmp_proto.h" - #include "../jrd/err_proto.h" -@@ -223,9 +222,6 @@ void SHUT_database(thread_db* tdbb, SSHORT flag, SSHORT delay, Sync* guard) - check_backup_state(tdbb); - } - -- // Clear old mapping cache data (if present) -- clearMap(dbb->dbb_filename.c_str()); -- - attachment->att_flags |= ATT_shutdown_manager; - - // Database is being shutdown. First notification gives shutdown type and delay in seconds. -@@ -409,9 +405,6 @@ void SHUT_online(thread_db* tdbb, SSHORT flag, Sync* guard) - check_backup_state(tdbb); - } - -- // Clear old mapping cache data (if present) -- clearMap(dbb->dbb_filename.c_str()); -- - // Reset shutdown flag on database header page - - WIN window(HEADER_PAGE_NUMBER); -diff --git a/src/utilities/nbackup/nbackup.cpp b/src/utilities/nbackup/nbackup.cpp -index e5384bf67a..4703079d67 100644 ---- a/src/utilities/nbackup/nbackup.cpp -+++ b/src/utilities/nbackup/nbackup.cpp -@@ -281,7 +281,7 @@ public: - username(_username), role(_role), password(_password), - run_db_triggers(_run_db_triggers), direct_io(_direct_io), - dbase(0), backup(0), decompress(_deco), childId(0), db_size_pages(0), -- m_odsNumber(0), m_silent(false), m_printed(false), m_flash_map(false) -+ m_odsNumber(0), m_silent(false), m_printed(false) - { - // Recognition of local prefix allows to work with - // database using TCP/IP loopback while reading file locally. -@@ -347,7 +347,6 @@ private: - USHORT m_odsNumber; - bool m_silent; // are we already handling an exception? - bool m_printed; // pr_error() was called to print status vector -- bool m_flash_map; // clear mapping cache on attach - - // IO functions - FB_SIZE_T read_file(FILE_HANDLE &file, void *buffer, FB_SIZE_T bufsize); -@@ -954,9 +953,6 @@ void NBackup::attach_database() - if (!run_db_triggers) - dpb.insertByte(isc_dpb_no_db_triggers, 1); - -- if (m_flash_map) -- dpb.insertByte(isc_dpb_clear_map, 1); -- - if (m_silent) - { - ISC_STATUS_ARRAY temp; -@@ -1578,14 +1574,6 @@ void NBackup::restore_database(const BackupFiles& files) - { - close_database(); - fixup_database(); -- -- m_silent = true; -- m_flash_map = true; -- run_db_triggers = false; -- -- attach_database(); -- detach_database(); -- - delete[] page_buffer; - return; - } --- -2.42.1 - diff --git a/external/firebird/0001-extern-cloop-Missing-dependencies-of-compilations-on.patch.1 b/external/firebird/0001-extern-cloop-Missing-dependencies-of-compilations-on.patch.1 new file mode 100644 index 000000000000..a59e70e06abc --- /dev/null +++ b/external/firebird/0001-extern-cloop-Missing-dependencies-of-compilations-on.patch.1 @@ -0,0 +1,41 @@ +From 8305b41bb262b6e249f2551639fa88392e152287 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann <sberg...@redhat.com> +Date: Tue, 7 Sep 2021 08:47:32 +0200 +Subject: [PATCH] extern/cloop: Missing dependencies of compilations on output + directories + +When building Firebird 3.0.7 as part of LibreOffice, we noticed occasional build +failures like <https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/96392/> + +> error: unable to open output file '/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/UnpackedTarball/firebird/temp/Debug/cloop/release/tests/test1/CTest.o': 'No such file or directory' +> 1 error generated. +> Makefile:72: recipe for target '/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/UnpackedTarball/firebird/temp/Debug/cloop/release/tests/test1/CTest.o' failed + +and while target "all" depends on target "mkdirs" (which would create all those +directories) in extern/cloop/Makefile, there is no order among the dependencies +of "all", so no guarantee that the directories are already created when the +compilation recipes are executed. +--- + extern/cloop/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/extern/cloop/Makefile b/extern/cloop/Makefile +index 3fca0c7356..c5a2b52628 100644 +--- a/extern/cloop/Makefile ++++ b/extern/cloop/Makefile +@@ -54,10 +54,10 @@ vpath %.c $(SRC_DIRS) + vpath %.cpp $(SRC_DIRS) + + define compile +-$1/%.o: %.c ++$1/%.o: %.c | $1 + $(CC) -c $$(C_FLAGS) $$< -o $$@ + +-$1/%.o: %.cpp ++$1/%.o: %.cpp | $1 + $(CXX) -c $$(CXX_FLAGS) $$< -o $$@ + endef + +-- +2.31.1 + diff --git a/external/firebird/ExternalPackage_firebird.mk b/external/firebird/ExternalPackage_firebird.mk index 895f3d344f06..2416c13d61e6 100644 --- a/external/firebird/ExternalPackage_firebird.mk +++ b/external/firebird/ExternalPackage_firebird.mk @@ -15,10 +15,10 @@ ifeq ($(OS),WNT) $(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/ifbclient.dll,gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.dll)) $(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/Engine12.dll,gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/plugins/Engine12.dll)) else ifeq ($(OS),MACOSX) -$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.dylib.3.0.11,gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.dylib.3.0.11)) +$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.dylib.3.0.7,gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.dylib.3.0.7)) $(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libEngine12.dylib,gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/plugins/libEngine12.dylib)) else ifeq ($(DISABLE_DYNLOADING),) -$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.so.2,gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.so.3.0.11)) +$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libfbclient.so.2,gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.so.3.0.7)) $(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/libEngine12.so,gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/plugins/libEngine12.so)) endif diff --git a/external/firebird/ExternalProject_firebird.mk b/external/firebird/ExternalProject_firebird.mk index 09c5bbd69272..29a71763600f 100644 --- a/external/firebird/ExternalProject_firebird.mk +++ b/external/firebird/ExternalProject_firebird.mk @@ -23,7 +23,7 @@ $(eval $(call gb_ExternalProject_register_targets,firebird,\ )) firebird_BUILDDIR = $(EXTERNAL_WORKDIR)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird -firebird_VERSION := 3.0.11 +firebird_VERSION := 3.0.7 $(call gb_ExternalProject_get_state_target,firebird,build): $(call gb_Trace_StartRange,firebird,EXTERNAL) @@ -88,7 +88,7 @@ $(call gb_ExternalProject_get_state_target,firebird,build): && LC_ALL=C $(MAKE) \ $(if $(ENABLE_DEBUG),Debug) SHELL='$(SHELL)' $(if $(filter LINUX,$(OS)),CXXFLAGS="$$CXXFLAGS -std=gnu++11") \ MATHLIB="$(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_LIBS),-L$(call gb_UnpackedTarball_get_dir,libtommath) -ltommath)" \ - LIBO_TUNNEL_LIBRARY_PATH='$(subst ','\'',$(subst $$,$$$$,$(call gb_Helper_extend_ld_path,$(call gb_UnpackedTarball_get_dir,icu)/source/lib)$(call gb_Helper_extend_ld_path,$(firebird_BUILDDIR)/lib)))' \ + LIBO_TUNNEL_LIBRARY_PATH='$(subst ','\'',$(subst $$,$$$$,$(call gb_Helper_extend_ld_path,$(call gb_UnpackedTarball_get_dir,icu)/source/lib)))' \ $(if $(filter MACOSX,$(OS)), \ && install_name_tool -id @__________________________________________________OOO/libfbclient.dylib.$(firebird_VERSION) \ -delete_rpath @loader_path/.. \ diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk index 84b82de8b906..4a4d00fa0a76 100644 --- a/external/firebird/UnpackedTarball_firebird.mk +++ b/external/firebird/UnpackedTarball_firebird.mk @@ -21,12 +21,15 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,firebird,\ # * external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1 is upstream at # <https://github.com/FirebirdSQL/firebird/pull/227> "Make comparison operator member functions # const"; +# * external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 is upstream at +# <https://github.com/FirebirdSQL/firebird/pull/301> "Fix checks for null HANDLE in Windows-only +# code", # * external/firebird/0001-extern-cloop-Missing-dependency-of-BIN_DIR-cloop-on-.patch.1 is upstream # at <https://github.com/FirebirdSQL/firebird/pull/302> "extern/cloop: Missing dependency of # $(BIN_DIR)/cloop on $(BIN_DIR)", -# * external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1 is a revert -# of <https://github.com/FirebirdSQL/firebird/commit/585b2d133a3891b58b7aeb4ddd3ccd124168abf0> -# "Backported fix for #7122: Invalid state of mapping cache after replacement of database": +# * external/firebird/0001-extern-cloop-Missing-dependencies-of-compilations-on.patch.1 is upstream +# at <https://github.com/FirebirdSQL/firebird/pull/6948> "extern/cloop: Missing dependencies of +# compilations on output directories": $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ external/firebird/firebird.disable-ib-util-not-found.patch.1 \ external/firebird/firebird-Engine12.patch \ @@ -37,16 +40,17 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ external/firebird/asan.patch \ external/firebird/firebird-tdf125284.patch.1 \ external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1 \ + external/firebird/0001-Fix-warning-on-Win64-build-231.patch.1 \ external/firebird/macos-arm64.patch.0 \ external/firebird/firebird-btyacc-add-explicit-rule.patch \ external/firebird/firebird-307.patch.1 \ + external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 \ external/firebird/0001-extern-cloop-Missing-dependency-of-BIN_DIR-cloop-on-.patch.1 \ external/firebird/msvc.patch \ external/firebird/wnt-per-process-trace-storage.patch.1 \ + external/firebird/0001-extern-cloop-Missing-dependencies-of-compilations-on.patch.1 \ external/firebird/configure-c99.patch \ external/firebird/Wincompatible-function-pointer-types.patch \ - external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1 \ - external/firebird/mold.patch \ external/firebird/c++26.patch \ )) @@ -65,6 +69,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ )) endif +ifeq ($(ENABLE_MACOSX_SANDBOX),TRUE) +$(eval $(call gb_UnpackedTarball_add_patches,firebird,\ + external/firebird/firebird-macosx-sandbox.patch.1 \ +)) +endif + ifneq ($(filter -fsanitize=%,$(CC)),) $(eval $(call gb_UnpackedTarball_add_patches,firebird, \ external/firebird/sanitizer.patch \ diff --git a/external/firebird/asan.patch b/external/firebird/asan.patch index 30d430466cfb..2564c54d46ea 100644 --- a/external/firebird/asan.patch +++ b/external/firebird/asan.patch @@ -1,6 +1,6 @@ --- builds/posix/Makefile.in +++ builds/posix/Makefile.in -@@ -364,8 +364,8 @@ +@@ -323,8 +323,8 @@ metadata.fdb: $(RUN_ISQL) $(SRC_ROOT)/dbs/metadata.sql -$(RM) $@ @@ -11,16 +11,16 @@ $(CHMOD) 0444 $@ $(HELP_FDB): help.fdb -@@ -374,7 +374,7 @@ +@@ -333,7 +333,7 @@ $(CHMOD) 0444 $@ help.fdb: $(BLD_ROOT)/misc/help.gbak -- $(RUN_GBAK) -MODE read_only -replace $< $@ -+ $(LIBO_TUNNEL_LIBRARY_PATH) $(RUN_GBAK) -MODE read_only -replace $< $@ +- $(RUN_GBAK) -MODE read_only -R $< $@ ++ $(LIBO_TUNNEL_LIBRARY_PATH) $(RUN_GBAK) -MODE read_only -R $< $@ $(CHMOD) 0444 $@ $(SECURITY_FDB): security.fdb -@@ -384,18 +384,18 @@ +@@ -343,18 +343,18 @@ security.fdb: $(SRC_ROOT)/dbs/security.sql -$(RM) $@ -$(RM) $(SECURITY_TMP) @@ -46,7 +46,7 @@ $(TOUCH) $@ -@@ -603,7 +603,7 @@ +@@ -560,7 +560,7 @@ message_file: $(FIREBIRD_MSG) $(FIREBIRD_MSG): $(BUILD_FILE) msg.timestamp diff --git a/external/firebird/configure-c99.patch b/external/firebird/configure-c99.patch index 3b5569b8c7c1..a62a63fb024e 100644 --- a/external/firebird/configure-c99.patch +++ b/external/firebird/configure-c99.patch @@ -1,6 +1,6 @@ --- configure +++ configure -@@ -20687,8 +20687,9 @@ +@@ -20518,8 +20518,9 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9,9 +9,9 @@ - main () { + int main () { sem_t s; - return sem_init(&s,0,0); + exit(sem_init(&s,0,0)); } -@@ -21432,8 +21433,9 @@ +@@ -21263,8 +21264,9 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19,10 +19,10 @@ #include <unistd.h> - main () { + int main () { - return !(sizeof(off_t) == 8); + exit(!(sizeof(off_t) == 8)); } _ACEOF -@@ -21647,8 +21649,9 @@ +@@ -21478,8 +21480,9 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -33,7 +33,7 @@ struct s { char a; union { long long x; sem_t y; } b; -@@ -21683,7 +21686,8 @@ +@@ -21514,7 +21517,8 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ diff --git a/external/firebird/firebird-cygwin-msvc-warnings.patch b/external/firebird/firebird-cygwin-msvc-warnings.patch index 8665b4d8d523..942522439bac 100644 --- a/external/firebird/firebird-cygwin-msvc-warnings.patch +++ b/external/firebird/firebird-cygwin-msvc-warnings.patch @@ -47,9 +47,9 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults # Clear out dependancies files created by the gcc compiler # since when .o and other files are deleted the dependant diff -ur builds/posix/make.rules builds/posix/make.rules ---- builds/posix/make.rules 2023-11-11 16:29:34.391837300 +0900 -+++ builds/posix/make.rules 2023-11-11 17:08:33.694764600 +0900 -@@ -85,24 +85,24 @@ +--- builds/posix/make.rules 2016-07-07 13:56:13.036235166 +0200 ++++ builds/posix/make.rules 2016-07-07 14:31:16.116291485 +0200 +@@ -92,21 +92,21 @@ $(LIBO_TUNNEL_LIBRARY_PATH) $(GPRE_CURRENT) $(GPRE_FLAGS) $(firstword $<) $@ @@ -64,10 +64,6 @@ diff -ur builds/posix/make.rules builds/posix/make.rules +$(OBJ)/%.$(OBJ_EXT): $(SRC_ROOT)/%.c $(CC) $(WCFLAGS) -c $(firstword $<) -o $@ --$(OBJ)/%.o: $(SRC_ROOT)/%.m -+$(OBJ)/%.$(OBJ_EXT): $(SRC_ROOT)/%.m - $(CC) $(WCFLAGS) -c $(firstword $<) -o $@ - -$(OBJ)/%.o: $(OBJ)/%.cpp +$(OBJ)/%.$(OBJ_EXT): $(OBJ)/%.cpp $(CXX) $(WCXXFLAGS) -c $(firstword $<) -o $@ @@ -81,15 +77,15 @@ diff -ur builds/posix/make.rules builds/posix/make.rules $(CC) $(WCFLAGS) -c $(firstword $<) -o $@ .SUFFIXES: .epp .e ---- builds/posix/make.shared.variables.orig 2023-08-03 22:46:32.000000000 +0900 -+++ builds/posix/make.shared.variables 2023-11-11 17:11:03.453261500 +0900 +--- builds/posix/make.shared.variables.orig 2020-11-12 19:36:29.773409900 +0100 ++++ builds/posix/make.shared.variables 2020-11-12 19:37:14.976503300 +0100 @@ -1,5 +1,5 @@ # Helper functions --doObjects= $(patsubst %.m,%.o,$(patsubst %.y,%.o,$(patsubst %.epp,%.o,$(patsubst %.c,%.o,$(1:.cpp=.o))))) -+doObjects= $(patsubst %.m,%.$(OBJ_EXT),$(patsubst %.y,%.$(OBJ_EXT),$(patsubst %.epp,%.$(OBJ_EXT),$(patsubst %.c,%.$(OBJ_EXT),$(1:.cpp=.$(OBJ_EXT)))))) +-doObjects= $(patsubst %.y,%.o,$(patsubst %.epp,%.o,$(patsubst %.c,%.o,$(1:.cpp=.o)))) ++doObjects= $(patsubst %.y,%.$(OBJ_EXT),$(patsubst %.epp,%.$(OBJ_EXT),$(patsubst %.c,%.$(OBJ_EXT),$(1:.cpp=.$(OBJ_EXT))))) makeObjects= $(addprefix $(OBJ)/$(patsubst ../%,%,$(1))/,$(call doObjects,$2)) dirFiles= $(notdir $(wildcard ../src/$(1)/*.cpp)) $(notdir $(wildcard ../src/$(1)/*.c)) \ - $(notdir $(wildcard ../src/$(1)/*.epp)) $(notdir $(wildcard ../src/$(1)/*.y)) \ + $(notdir $(wildcard ../src/$(1)/*.epp)) $(notdir $(wildcard ../src/$(1)/*.y)) --- src/include/gen/autoconfig.h.in.orig 2020-11-12 20:52:49.835722200 +0100 +++ src/include/gen/autoconfig.h.in 2020-11-12 20:53:18.148311100 +0100 @@ -773,7 +773,9 @@ @@ -167,8 +163,8 @@ diff -ur builds/posix/make.rules builds/posix/make.rules +symtab.obj: defs.h +verbose.obj: defs.h +warshall.obj: defs.h ---- extern/cloop/Makefile.orig 2023-11-11 15:59:43.477031600 +0900 -+++ extern/cloop/Makefile 2023-11-11 17:22:56.976163500 +0900 +--- extern/cloop/Makefile.orig 2020-11-13 10:59:53.282923700 +0100 ++++ extern/cloop/Makefile 2020-11-13 11:00:24.267079900 +0100 @@ -24,8 +24,8 @@ SRCS_C := $(foreach sdir,$(SRC_DIRS),$(wildcard $(sdir)/*.c)) SRCS_CPP := $(foreach sdir,$(SRC_DIRS),$(wildcard $(sdir)/*.cpp)) @@ -193,7 +189,7 @@ diff -ur builds/posix/make.rules builds/posix/make.rules $(CXX) -c $$(CXX_FLAGS) $$< -o $$@ endef -@@ -79,11 +79,11 @@ +@@ -75,11 +75,11 @@ -include $(addsuffix .d,$(basename $(OBJS_CPP))) $(BIN_DIR)/cloop$(EXE_EXT): \ @@ -210,7 +206,7 @@ diff -ur builds/posix/make.rules builds/posix/make.rules | $(BIN_DIR) $(LD) $^ -o $@ -@@ -110,24 +110,24 @@ +@@ -105,24 +105,24 @@ $(SRC_DIR)/tests/test1/CppTest.cpp: $(SRC_DIR)/tests/test1/CalcCppApi.h $(BIN_DIR)/test1-c$(SHRLIB_EXT): \ @@ -254,9 +250,9 @@ diff -ur builds/posix/make.rules builds/posix/make.rules #ifdef _MSC_VER // don't know if this is useful for MinGW #define NOATOM diff -ur builds/posix/Makefile.in.examples builds/posix/Makefile.in.examples ---- builds/posix/Makefile.in.examples 2023-08-03 22:46:32.000000000 +0900 -+++ builds/posix/Makefile.in.examples 2023-11-11 17:50:22.666278400 +0900 -@@ -67,9 +67,9 @@ +--- builds/posix/Makefile.in.examples 2016-07-07 13:56:13.048235166 +0200 ++++ builds/posix/Makefile.in.examples 2016-07-07 14:37:36.904301682 +0200 +@@ -65,9 +65,9 @@ EXAMPLES_SRC= $(ROOT)/examples @@ -268,7 +264,7 @@ diff -ur builds/posix/Makefile.in.examples builds/posix/Makefile.in.examples INPUT_Files = empddl.sql empdml.sql indexoff.sql indexon.sql \ job.inp lang.inp proj.inp qtr.inp -@@ -173,3 +173,6 @@ +@@ -172,3 +175,6 @@ $(EXAMPLES_DEST)/%.h: $(EXAMPLES_SRC)/common/%.h $(CP) $^ $@ diff --git a/external/firebird/firebird-cygwin-msvc.patch b/external/firebird/firebird-cygwin-msvc.patch index 9e7349073a47..c59c614ba5da 100644 --- a/external/firebird/firebird-cygwin-msvc.patch +++ b/external/firebird/firebird-cygwin-msvc.patch @@ -16,7 +16,7 @@ +++ src/misc/writeBuildNum.sh 2016-07-13 11:31:18.132820200 +0200 @@ -95,9 +95,9 @@ createMakeVersion() { - + OdsH="${Root}/src/jrd/ods.h" -Mini="/tmp/miniods.h" -TestCpp="/tmp/test.cpp" @@ -24,12 +24,12 @@ +Mini=$(cygpath -m "/tmp/miniods.h") +TestCpp=$(cygpath -m "/tmp/test.cpp") +AOut=$(cygpath -m "/tmp/a.out") - + grep ODS_VERSION $OdsH | grep -v ENCODE_ODS >$Mini - ---- configure 2023-11-11 02:44:14.576802800 +0900 -+++ configure 2023-11-11 02:59:09.005211200 +0900 -@@ -21650,11 +21650,10 @@ + +--- configure 2016-07-07 15:57:04.538983200 +0200 ++++ configure 2016-07-13 11:31:18.132820200 +0200 +@@ -21490,13 +21490,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> @@ -40,8 +40,10 @@ - union { long long x; sem_t y; } b; + long long b; }; - return (int)&((struct s*)1024)->b - 1024; + exit((int)&((struct s*)1024)->b - 1024); } + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : --- builds/make.new/config/config.h.in 2016-07-07 15:55:55.693112800 +0200 +++ builds/make.new/config/config.h.in 2016-07-08 13:38:49.994986400 +0200 @@ -211,7 +211,7 @@ @@ -120,8 +122,8 @@ /***************************************************** diff -ur builds/posix/make.defaults builds/posix/make.defaults ---- builds/posix/make.defaults 2023-11-11 14:37:21.822343900 +0900 -+++ builds/posix/make.defaults 2023-11-11 15:13:06.175152700 +0900 +--- builds/posix/make.defaults 2016-07-07 13:56:13.036235166 +0200 ++++ builds/posix/make.defaults 2016-07-07 14:29:52.368289242 +0200 @@ -56,7 +56,7 @@ else FIREBIRD=$(FB_BUILD) @@ -153,7 +155,7 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults SHRLIB_FOREIGN_EXT= $(SHRLIB_EXT) #_____________________________________________________________________________ -@@ -201,9 +201,8 @@ +@@ -201,9 +202,8 @@ # Search path for libraries @@ -164,7 +166,7 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults #_____________________________________________________________________________ -@@ -217,9 +216,9 @@ +@@ -217,9 +217,9 @@ # #LibraryFileName=libfbclient @@ -177,7 +179,7 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults LibraryBaseName=$(LibraryFileName).${SHRLIB_EXT} LIBFIREBIRD_FULLNAME = $(LIB)/$(LibraryFullName) -@@ -228,7 +227,7 @@ +@@ -228,7 +228,7 @@ # The firebird engine library name @@ -186,7 +188,7 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults EngineSoName=$(EngineFileName).${SHRLIB_EXT} ENGINE_SONAME = $(PLUGINS)/$(EngineSoName) -@@ -242,7 +241,7 @@ +@@ -242,7 +242,7 @@ ifeq ($(STD_EDITLINE), true) LIBEDITLINE := -l$(READLINE) else @@ -195,16 +197,16 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults endif endif -@@ -313,7 +312,7 @@ +@@ -313,7 +313,7 @@ LIB_LINK_SONAME= -Wl,-soname,$(1) LIB_LINK_MAPFILE= -Wl,--version-script,$(1) -FIREBIRD_LIBRARY_LINK= -L$(LIB) -lfbclient $(MATHLIB) +FIREBIRD_LIBRARY_LINK= -L$(LIB) -lifbclient $(MATHLIB) - EXE_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) $(call LINK_DARWIN_RPATH,..) $(LINK_EMPTY_SYMBOLS) + EXE_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) $(LINK_EMPTY_SYMBOLS) LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) -shared -@@ -355,7 +354,7 @@ +@@ -355,7 +355,7 @@ # Pay attention - we place common library into obj, not lib dir # It's just a set of object files, prepared to be used by ld, not an output library @@ -213,18 +215,18 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults # From utilities CREATE_DB = $(RBIN)/create_db$(EXEC_EXT) ---- builds/posix/Makefile.in 2023-11-11 14:40:14.036728600 +0900 -+++ builds/posix/Makefile.in 2023-11-11 15:27:30.810728700 +0900 +--- builds/posix/Makefile.in 2016-07-07 15:56:06.459221300 +0200 ++++ builds/posix/Makefile.in 2016-07-13 12:44:57.134217200 +0200 @@ -33,7 +33,7 @@ # Alex Peshkoff - created single makefile based on Mark's files # - + -ROOT=$(shell cd ..; pwd) +ROOT=$(shell cygpath -m '$(shell cd ..; pwd)') - + include make.defaults ifeq ($(CROSS_OUT), Y) -@@ -183,7 +183,7 @@ +@@ -178,7 +178,7 @@ .PHONY: cross1 cross2 boot yvalve engine fbintl gpre utilities plugins rest codes ids examples cross_rest preliminaryCheck master_process: @@ -233,16 +235,16 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults $(MAKE) updateBuildNum $(MAKE) export_lists $(MAKE) extern -@@ -219,7 +219,7 @@ +@@ -214,7 +215,7 @@ $(MAKE) CROSS_OUT=Y cross2 - + cross1: - ln -sf $(SRC_ROOT)/include/gen/autoconfig.auto $(SRC_ROOT)/include/gen/autoconfig.h + cp -f $(SRC_ROOT)/include/gen/autoconfig.auto $(SRC_ROOT)/include/gen/autoconfig.h $(MAKE) updateBuildNum $(MAKE) export_lists $(MAKE) extern -@@ -244,7 +244,7 @@ +@@ -239,7 +240,7 @@ $(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/ cross2: @@ -251,7 +253,7 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults $(MAKE) prerequisites $(MAKE) tommath $(MAKE) yvalve -@@ -315,7 +315,7 @@ +@@ -310,7 +311,7 @@ # remote redirector is statically linked in main FB library $(LIBFIREBIRD_FULLNAME): $(YValve_Objects) $(Remote_Client_Objects) $(COMMON_LIB) @@ -260,7 +262,7 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults #___________________________________________________________________________ -@@ -324,8 +324,8 @@ +@@ -320,8 +321,8 @@ engine: $(ENGINE_SONAME) @@ -271,7 +273,7 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults #___________________________________________________________________________ -@@ -334,8 +334,8 @@ +@@ -330,8 +331,8 @@ fbintl: $(LIBFBINTL_SO) @@ -282,7 +284,7 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults #___________________________________________________________________________ -@@ -434,12 +434,13 @@ +@@ -427,12 +429,13 @@ .PHONY: firebird_server fb_lock_print fbguard fbsvcmgr fbtracemgr gbak gfix gsec gsplit gstat isql nbackup @@ -293,13 +295,13 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults firebird_server: $(FB_DAEMON) -$(FB_DAEMON): $(Remote_Server_Objects) $(COMMON_LIB) -- $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) +- $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..) +$(FB_DAEMON): $(Remote_Server_Objects) $(Remote_Client_Objects) $(COMMON_LIB) -+ $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(LIB_GUI) ++ $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(LIB_GUI) $(call LINK_DARWIN_RPATH,..) fb_lock_print: $(LOCKPRINT) -@@ -638,7 +639,7 @@ +@@ -633,7 +635,7 @@ IBASE_ExtraFiles = include/types_pub.h include/consts_pub.h dsql/sqlda_pub.h common/dsc_pub.h jrd/ibase.h jrd/inf_pub.h jrd/blr.h include/gen/iberror.h SRC_IBASE_ExtraFiles = $(addprefix $(SRC_ROOT)/, $(IBASE_ExtraFiles)) MAKE_HEADER_Src = $(addprefix $(SRC_ROOT)/, misc/makeHeader.cpp) @@ -309,18 +311,14 @@ diff -ur builds/posix/make.defaults builds/posix/make.defaults $(INCLUDE_DEST)/ibase.h: $(SRC_IBASE_ExtraFiles) $(STATICEXE_LINK) -o $(MAKE_HEADER_Bin) $(MAKE_HEADER_Src) diff -ur builds/posix/make.rules builds/posix/make.rules ---- builds/posix/make.rules 2023-08-03 22:46:32.000000000 +0900 -+++ builds/posix/make.rules 2023-11-11 15:41:57.592482300 +0900 -@@ -92,30 +92,26 @@ +--- builds/posix/make.rules 2016-07-07 13:56:13.036235166 +0200 ++++ builds/posix/make.rules 2016-07-07 14:31:16.116291485 +0200 +@@ -92,26 +92,23 @@ $(OBJ)/%.o: $(SRC_ROOT)/%.c $(CC) $(WCFLAGS) -c $(firstword $<) -o $@ - @sed $(INLINE_EDIT_SED) -e "1,2s/:/: \$$(wildcard/" -e "\$$s/\(.*\)/\1)/" $(patsubst %.o,%.d,$@) - $(OBJ)/%.o: $(SRC_ROOT)/%.m - $(CC) $(WCFLAGS) -c $(firstword $<) -o $@ -- @sed $(INLINE_EDIT_SED) -e "1,2s/:/: \$$(wildcard/" -e "\$$s/\(.*\)/\1)/" $(patsubst %.o,%.d,$@) - $(OBJ)/%.o: $(OBJ)/%.cpp $(CXX) $(WCXXFLAGS) -c $(firstword $<) -o $@ - @sed $(INLINE_EDIT_SED) -e "1,2s/:/: \$$(wildcard/" -e "\$$s/\(.*\)/\1)/" $(patsubst %.o,%.d,$@) @@ -375,7 +373,7 @@ diff -ur builds/posix/prefix.mingw builds/posix/prefix.mingw +++ builds/posix/prefix.mingw 2016-07-07 14:50:54.704323046 +0200 @@ -20,8 +20,8 @@ # - + # -Wno-unused-variable is used due to unused gpre generated variables -PROD_FLAGS=-O2 -DMINGW -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD -mthreads -Wno-non-virtual-dtor -DEV_FLAGS=-ggdb -DMINGW -Wall -Wshadow -Wundef -Wno-long-long -Wno-unused-variable -Wno-sign-compare -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD -mthreads -Wno-non-virtual-dtor @@ -386,7 +384,7 @@ diff -ur builds/posix/prefix.mingw builds/posix/prefix.mingw @@ -29,6 +29,7 @@ LIB_LINK=$(LD) - + LIB_LINK_OPTIONS+=-Wl,--enable-stdcall-fixup +LIB_PLATFORM_RPATH= @@ -395,7 +393,7 @@ diff -ur builds/posix/prefix.mingw builds/posix/prefix.mingw @@ -36,6 +37,9 @@ LIB_LINK_OPTIONS+=-Wl,-s endif - + +LIB_LINK_OPTIONS= +LINK_OPTS= + @@ -404,13 +402,13 @@ diff -ur builds/posix/prefix.mingw builds/posix/prefix.mingw LIB_GUI:= -mwindows -lcomctl32 -lgdi32 @@ -55,7 +59,9 @@ ClientLibrarySoName := $(ClientLibraryName) - + # Looks like MinGW 3 does not support version scripts but support def-files -LINK_FIREBIRD_SYMBOLS = $(BLD_ROOT)/win32/defs/fbclient_s.def $(BLD_ROOT)/win32/defs/fbclient.def +LINK_FIREBIRD_SYMBOLS = /def:$(BLD_ROOT)/win32/defs/fbclient_s.def /def:$(BLD_ROOT)/win32/defs/firebird.def +LINK_PLUGIN_SYMBOLS = /def:$(BLD_ROOT)/win32/defs/plugin.def +LINK_IBUTIL_SYMBOLS = /def:$(BLD_ROOT)/win32/defs/ib_util.def - + # This is required for newly built executable to find newly built shared # libraries because on Win32 there is no such thing as LD_LIBRARY_PATH --- builds/posix/make.shared.variables 2016-07-22 17:07:46.650672300 +0200 @@ -429,7 +427,7 @@ diff -ur configure configure @@ -3337,6 +3337,14 @@ SHRLIB_EXT=dll ;; - + + *-*-cygwin*) + MAKEFILE_PREFIX=mingw + PLATFORM=win32 @@ -504,8 +502,8 @@ diff -ur extern/btyacc/Makefile extern/btyacc/Makefile #ifdef WIN32 #include <windows.h> #define DLL_EXPORT __declspec(dllexport) ---- extern/cloop/Makefile 2023-11-11 14:40:41.522517700 +0900 -+++ extern/cloop/Makefile 2023-11-11 15:59:43.477031600 +0900 +--- extern/cloop/Makefile 2016-07-07 15:56:28.279136300 +0200 ++++ extern/cloop/Makefile 2016-07-13 16:22:38.493479800 +0200 @@ -11,8 +11,8 @@ SRC_DIR := src BUILD_DIR := build @@ -546,7 +544,7 @@ diff -ur extern/btyacc/Makefile extern/btyacc/Makefile $(OBJ_DIRS) $(BIN_DIR) $(LIB_DIR): @mkdir -p $@ -@@ -74,7 +78,7 @@ +@@ -74,7 +74,7 @@ -include $(addsuffix .d,$(basename $(OBJS_C))) -include $(addsuffix .d,$(basename $(OBJS_CPP))) @@ -555,7 +553,7 @@ diff -ur extern/btyacc/Makefile extern/btyacc/Makefile $(OBJ_DIR)/cloop/Expr.o \ $(OBJ_DIR)/cloop/Generator.o \ $(OBJ_DIR)/cloop/Lexer.o \ -@@ -84,20 +88,20 @@ +@@ -83,20 +83,20 @@ $(LD) $^ -o $@ @@ -584,7 +582,7 @@ diff -ur extern/btyacc/Makefile extern/btyacc/Makefile --uses "SysUtils" \ --interfaceFile $(SRC_DIR)/tests/test1/CalcPascalApi.interface.pas \ --implementationFile $(SRC_DIR)/tests/test1/CalcPascalApi.implementation.pas \ -@@ -109,23 +113,23 @@ +@@ -108,23 +108,23 @@ $(OBJ_DIR)/tests/test1/CalcCApi.o \ $(OBJ_DIR)/tests/test1/CTest.o \ @@ -640,9 +638,9 @@ diff -ur src/misc/makeHeader.cpp src/misc/makeHeader.cpp #include <unistd.h> -//#endif +#endif - - - + + + --- builds/posix/Makefile.in.plugins_examples.orig 2020-11-13 18:07:52.515550600 +0100 +++ builds/posix/Makefile.in.plugins_examples 2020-11-13 18:08:33.218626500 +0100 @@ -28,7 +28,7 @@ diff --git a/external/firebird/firebird-macosx-sandbox.patch.1 b/external/firebird/firebird-macosx-sandbox.patch.1 new file mode 100644 index 000000000000..3bf246c682ba --- /dev/null +++ b/external/firebird/firebird-macosx-sandbox.patch.1 @@ -0,0 +1,13 @@ +-*- Mode: Diff -*- + +--- firebird/src/common/isc_s_proto.h ++++ firebird/src/common/isc_s_proto.h +@@ -37,6 +37,8 @@ + // Firebird platform-specific synchronization data structures + + #if defined(DARWIN) ++#define USE_POSIX_SEMAPHORE ++#define USE_SHARED_FUTEX + #define USE_FILELOCKS + #endif + diff --git a/external/firebird/firebird-macosx.patch.1 b/external/firebird/firebird-macosx.patch.1 index a9877b98fd43..676f2195ad55 100644 --- a/external/firebird/firebird-macosx.patch.1 +++ b/external/firebird/firebird-macosx.patch.1 @@ -20,22 +20,18 @@ - #DYLD_PRINT_ENV=1 #export DYLD_PRINT_ENV - -@@ -36,11 +33,11 @@ - #DYLD_PRINT_LIBRARIES=1 - #export DYLD_PRINT_LIBRARIES - --MACOSX_DEPLOYMENT_TARGET=10.9 -+MACOSX_DEPLOYMENT_TARGET=10.15 + +@@ -31,8 +31,8 @@ + MACOSX_DEPLOYMENT_TARGET=10.9 export MACOSX_DEPLOYMENT_TARGET -PROD_FLAGS=-DDARWIN -pipe -O2 -MMD -fPIC -fno-common -mmacosx-version-min=10.9 -DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-omit-frame-pointer -fno-common -Wall -fno-optimize-sibling-calls -mmacosx-version-min=10.9 -Wno-non-virtual-dtor -+PROD_FLAGS=-DDARWIN -pipe -O2 -MMD -fPIC -fno-common -mmacosx-version-min=10.15 -+DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-omit-frame-pointer -fno-common -Wall -fno-optimize-sibling-calls -mmacosx-version-min=10.15 -Wno-non-virtual-dtor ++PROD_FLAGS=-DDARWIN -pipe -O2 -MMD -fPIC -fno-common ++DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-omit-frame-pointer -fno-common -Wall -fno-optimize-sibling-calls -Wno-non-virtual-dtor CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden -stdlib=libc++ -msse4 - UNDEF_PLATFORM= + EXE_LINK_OPTIONS:= --- firebird.org/src/common/unicode_util.cpp 2016-07-07 13:55:55.992234709 +0200 +++ firebird/src/common/unicode_util.cpp 2016-08-10 11:25:46.422331020 +0200 @@ -63,8 +63,8 @@ diff --git a/external/firebird/mold.patch b/external/firebird/mold.patch deleted file mode 100644 index 4e39f3f913ec..000000000000 --- a/external/firebird/mold.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- builds/posix/Makefile.in.examples.before 2024-01-07 20:16:41.073172761 +0000 -+++ builds/posix/Makefile.in.examples 2024-01-07 20:17:23.768143528 +0000 -@@ -59,8 +59,13 @@ - #endif - GPRE_FLAGS= -m -z -n - --LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(if $(subst intl,,$(1)),$(LIB),$(LIB)/../intl)) -+ifeq ($(PLATFORM),DARWIN) -+LIB_LINK_RPATH = - LINK_DARWIN_RPATH = -Wl,-rpath,@loader_path/../$(TARGET)/firebird -+else -+LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(if $(subst intl,,$(1)),$(LIB),$(LIB)/../intl)) -+LINK_DARWIN_RPATH = -+endif - LIB_LINK_MAPFILE = - - EXAMPLES_DEST= $(GEN_ROOT)/examples diff --git a/external/firebird/sanitizer.patch b/external/firebird/sanitizer.patch index 52ff5ddddfc7..3707b5bf54af 100644 --- a/external/firebird/sanitizer.patch +++ b/external/firebird/sanitizer.patch @@ -21,7 +21,7 @@ +_ZTI* --- builds/posix/make.defaults +++ builds/posix/make.defaults -@@ -263,7 +263,7 @@ +@@ -252,7 +252,7 @@ # LINKER OPTIONS # @@ -30,12 +30,12 @@ ifeq ($(TARGET),Debug) UNDEF_FLAGS = $(UNDEF_PLATFORM) endif -@@ -315,7 +315,7 @@ +@@ -291,7 +291,7 @@ LIB_LINK_MAPFILE= -Wl,--version-script,$(1) FIREBIRD_LIBRARY_LINK= -L$(LIB) -lfbclient $(MATHLIB) --EXE_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) $(call LINK_DARWIN_RPATH,..) $(LINK_EMPTY_SYMBOLS) -+EXE_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) $(call LINK_DARWIN_RPATH,..) +-EXE_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) $(LINK_EMPTY_SYMBOLS) ++EXE_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) -shared FB_DAEMON = $(BIN)/firebird$(EXEC_EXT) diff --git a/external/firebird/ubsan.patch b/external/firebird/ubsan.patch index 78c45ed6b1bd..fa296108d3d6 100644 --- a/external/firebird/ubsan.patch +++ b/external/firebird/ubsan.patch @@ -1,20 +1,20 @@ --- configure +++ configure -@@ -21637,7 +21637,7 @@ +@@ -21506,7 +21468,7 @@ char a; union { long long x; sem_t y; } b; }; -- return (int)&((struct s*)0)->b; -+ return (int)&((struct s*)1024)->b - 1024; +- exit((int)&((struct s*)0)->b); ++ exit((int)&((struct s*)1024)->b - 1024); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : -@@ -21672,7 +21672,7 @@ +@@ -21541,7 +21503,7 @@ char a; double b; }; -- return (int)&((struct s*)0)->b; -+ return (int)&((struct s*)1024)->b - 1024; +- exit((int)&((struct s*)0)->b); ++ exit((int)&((struct s*)1024)->b - 1024); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -106,15 +106,6 @@ int32_t (U_EXPORT2 *ulocCountAvailable)(); const char* (U_EXPORT2 *ulocGetAvailable)(int32_t n); -@@ -1378,7 +1378,7 @@ - - for (int prefixLen = 1; prefixLen < len; ++prefixLen) - { -- const Array<USHORT> str(strChars, prefixLen); -+ const Array<USHORT> str(reinterpret_cast<USHORT *>(strChars), prefixLen); - SortKeyArray* keySet = obj->contractionsPrefix.get(str); - - if (!keySet) --- src/dsql/StmtNodes.cpp +++ src/dsql/StmtNodes.cpp @@ -6643,7 +6643,7 @@ @@ -250,17 +241,6 @@ } ---- src/jrd/scl.epp -+++ src/jrd/scl.epp -@@ -218,8 +218,6 @@ - if ((tdbb->tdbb_flags & TDBB_trusted_ddl) && (mask != SCL_references)) - return true; - -- const MetaName& userName = s_class->sclClassUser.second; -- - if (s_class && (s_class->scl_flags & SCL_corrupt)) - { - Arg::StatusVector status; --- src/lock/lock.cpp +++ src/lock/lock.cpp @@ -441,7 +441,7 @@