summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-04-25 10:49:33 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-04-25 16:50:59 +0200
commitf6be6cd82bd84f13d2a597ceb62181111ae0eb80 (patch)
tree5efacb8e2aeb7b4ce98894f0f012358d837ff063 /external
parentdec2c5f3ca4d149bf5fefd573a5e64c650b61b19 (diff)
external/firebird: Missing include in configure check
...so that with Clang 15 trunk after <https://github.com/llvm/llvm-project/commit/7d644e1215b376ec5e915df9ea2eeb56e2d94626> "[C11/C2x] Change the behavior of the implicit function declaration warning" the check now failed to compile with > configure:21471: checking alignment of long [...] > conftest.c:177:3: error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > exit((int)&((struct s*)1024)->b - 1024); > ^ > conftest.c:177:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' and an exit code of 1 from the compiler invocation, which the check than silently mistook as an alignment requirement of 1. (Which then caused the somewhat obscure fallout of > workdir/UnpackedTarball/firebird/src/gpre/msc.cpp:463:10: runtime error: member access within misaligned address 0x7f59d8e68196 for type 'gpre_sym', which requires 8 byte alignment while building ExternalProject_firebird with UBSan.) The corresponding "checking alignment of double" a few lines further down had already been modified in ccd0e5f445d4a7d0e7aca6c23c02c61bf14510b2 "Make firebird build for macOS on arm64", but without stating what actual problem (if any) it fixed. I thus moved that patch into the new external/firebird/configure-include.patch too, to have them grouped together. (An alternative fix could be to replace the use of exit with return from main in those configure checks.) Change-Id: Iefa02a06d45c83add5f56fad5d726aaecee6d815 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133368 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r--external/firebird/UnpackedTarball_firebird.mk1
-rw-r--r--external/firebird/configure-include.patch18
-rw-r--r--external/firebird/firebird-cygwin-msvc.patch4
-rw-r--r--external/firebird/macos-arm64.patch.08
4 files changed, 21 insertions, 10 deletions
diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk
index cc84b5f139e7..e86276e6744a 100644
--- a/external/firebird/UnpackedTarball_firebird.mk
+++ b/external/firebird/UnpackedTarball_firebird.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
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-include.patch \
))
ifeq ($(OS),WNT)
diff --git a/external/firebird/configure-include.patch b/external/firebird/configure-include.patch
new file mode 100644
index 000000000000..fe2935f139d7
--- /dev/null
+++ b/external/firebird/configure-include.patch
@@ -0,0 +1,18 @@
+--- configure
++++ configure
+@@ -21478,6 +21478,7 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++#include <stdlib.h>
+ #include <semaphore.h>
+ main () {
+ struct s {
+@@ -21514,6 +21515,7 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++#include <stdlib.h>
+ main () {
+ struct s {
+ char a;
diff --git a/external/firebird/firebird-cygwin-msvc.patch b/external/firebird/firebird-cygwin-msvc.patch
index 7f4332633316..a19a2798f405 100644
--- a/external/firebird/firebird-cygwin-msvc.patch
+++ b/external/firebird/firebird-cygwin-msvc.patch
@@ -29,10 +29,10 @@
--- configure 2016-07-07 15:57:04.538983200 +0200
+++ configure 2016-07-13 11:31:18.132820200 +0200
-@@ -21473,13 +21473,12 @@
- else
+@@ -21490,13 +21490,12 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+ #include <stdlib.h>
-#include <semaphore.h>
main () {
struct s {
diff --git a/external/firebird/macos-arm64.patch.0 b/external/firebird/macos-arm64.patch.0
index 12a845c57ce9..ab2596dbd987 100644
--- a/external/firebird/macos-arm64.patch.0
+++ b/external/firebird/macos-arm64.patch.0
@@ -24,14 +24,6 @@
i*86-*-darwin*)
MAKEFILE_PREFIX=darwin_i386
MAKEFILE_POSTFIX=darwin
-@@ -21344,6 +21344,7 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-+#include <stdlib.h>
- main () {
- struct s {
- char a;
--- src/common/common.h
+++ src/common/common.h
@@ -234,6 +234,12 @@