office-gobmx/external/firebird/configure-c99.patch

46 lines
899 B
Diff
Raw Normal View History

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>
2022-04-25 03:49:33 -05:00
--- configure
+++ configure
@@ -20518,8 +20518,9 @@
external/firebird: Adapt more configure checks to C99 ...similar to f6be6cd82bd84f13d2a597ceb62181111ae0eb80 "external/firebird: Missing include in configure check" and 7e1ff1cee5dd203df679d584512930fb21b97f6e "external/firebird: Implicit int in configure check". With recent Clang on Linux it had still failed to detected > configure:20511: checking for working sem_init() [...] > conftest.c:166:2: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > main () { > ^ > int > conftest.c:168: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(sem_init(&s,0,0)); > ^ > conftest.c:168:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' and > configure:21256: checking for native large file support [...] > conftest.c:167:5: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > main () { > ^ > int > conftest.c:168:5: 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(!(sizeof(off_t) == 8)); > ^ > conftest.c:168:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' And at least the former, which erroneously suppressed setting WORKING_SEM_INIT, sporadically caused CppunitTest_dbaccess_hsql_binary_import to SIGABRT for me at > #10 0x00007f087fce37fc in __GI_abort () > #11 0x00007f085a7e32e8 in Firebird::system_call_failed::system_call_failed(char const*, int) (this=0x55fbb11e5650, syscall=0x7f085a19ac06 "sem_open", error_code=17) at workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp:244 > #12 0x00007f085a7e33ba in Firebird::system_call_failed::raise(char const*) (syscall=0x7f085a19ac06 "sem_open") at workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp:255 > #13 0x00007f085a81ff4e in Firebird::SignalSafeSemaphore::init() (this=0x55fbb1268c80) at workdir/UnpackedTarball/firebird/src/common/classes/semaphore.cpp:138 > #14 0x00007f085a38ee85 in Firebird::SignalSafeSemaphore::SignalSafeSemaphore() (this=0x55fbb1268c80) at workdir/UnpackedTarball/firebird/src/common/classes/semaphore.h:156 > #15 0x00007f085a38c931 in (anonymous namespace)::MappingIpc::MappingIpc(Firebird::MemoryPool&) (this=0x55fbb1268bf0) at workdir/UnpackedTarball/firebird/src/jrd/Mapping.cpp:602 > #16 0x00007f085a38176b in Firebird::GlobalPtr<(anonymous namespace)::MappingIpc, (Firebird::InstanceControl::DtorPriority)2>::GlobalPtr() (this=0x7f085a93e780 <(anonymous namespace)::mappingIpc>) at workdir/UnpackedTarball/firebird/src/common/classes/init.h:143 > #17 0x00007f085a38d270 in __cxx_global_var_init.15(void) () at workdir/UnpackedTarball/firebird/src/jrd/Mapping.cpp:901 [...] > #32 0x00007f085bb37626 in ModuleLoader::loadModule(long*, Firebird::StringBase<Firebird::PathNameComparator> const&) (status=0x7ffd9f8b42a0, modPath=...) at workdir/UnpackedTarball/firebird/src/common/os/posix/mod_loader.cpp:95 [...] Change-Id: I082be878d95a020a7c419d6852614b711754cc23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141549 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-20 03:16:12 -05:00
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdlib.h>
#include <semaphore.h>
- main () {
+ int main () {
sem_t s;
exit(sem_init(&s,0,0));
external/firebird: Adapt more configure checks to C99 ...similar to f6be6cd82bd84f13d2a597ceb62181111ae0eb80 "external/firebird: Missing include in configure check" and 7e1ff1cee5dd203df679d584512930fb21b97f6e "external/firebird: Implicit int in configure check". With recent Clang on Linux it had still failed to detected > configure:20511: checking for working sem_init() [...] > conftest.c:166:2: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > main () { > ^ > int > conftest.c:168: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(sem_init(&s,0,0)); > ^ > conftest.c:168:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' and > configure:21256: checking for native large file support [...] > conftest.c:167:5: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > main () { > ^ > int > conftest.c:168:5: 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(!(sizeof(off_t) == 8)); > ^ > conftest.c:168:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' And at least the former, which erroneously suppressed setting WORKING_SEM_INIT, sporadically caused CppunitTest_dbaccess_hsql_binary_import to SIGABRT for me at > #10 0x00007f087fce37fc in __GI_abort () > #11 0x00007f085a7e32e8 in Firebird::system_call_failed::system_call_failed(char const*, int) (this=0x55fbb11e5650, syscall=0x7f085a19ac06 "sem_open", error_code=17) at workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp:244 > #12 0x00007f085a7e33ba in Firebird::system_call_failed::raise(char const*) (syscall=0x7f085a19ac06 "sem_open") at workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp:255 > #13 0x00007f085a81ff4e in Firebird::SignalSafeSemaphore::init() (this=0x55fbb1268c80) at workdir/UnpackedTarball/firebird/src/common/classes/semaphore.cpp:138 > #14 0x00007f085a38ee85 in Firebird::SignalSafeSemaphore::SignalSafeSemaphore() (this=0x55fbb1268c80) at workdir/UnpackedTarball/firebird/src/common/classes/semaphore.h:156 > #15 0x00007f085a38c931 in (anonymous namespace)::MappingIpc::MappingIpc(Firebird::MemoryPool&) (this=0x55fbb1268bf0) at workdir/UnpackedTarball/firebird/src/jrd/Mapping.cpp:602 > #16 0x00007f085a38176b in Firebird::GlobalPtr<(anonymous namespace)::MappingIpc, (Firebird::InstanceControl::DtorPriority)2>::GlobalPtr() (this=0x7f085a93e780 <(anonymous namespace)::mappingIpc>) at workdir/UnpackedTarball/firebird/src/common/classes/init.h:143 > #17 0x00007f085a38d270 in __cxx_global_var_init.15(void) () at workdir/UnpackedTarball/firebird/src/jrd/Mapping.cpp:901 [...] > #32 0x00007f085bb37626 in ModuleLoader::loadModule(long*, Firebird::StringBase<Firebird::PathNameComparator> const&) (status=0x7ffd9f8b42a0, modPath=...) at workdir/UnpackedTarball/firebird/src/common/os/posix/mod_loader.cpp:95 [...] Change-Id: I082be878d95a020a7c419d6852614b711754cc23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141549 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-20 03:16:12 -05:00
}
@@ -21263,8 +21264,9 @@
external/firebird: Adapt more configure checks to C99 ...similar to f6be6cd82bd84f13d2a597ceb62181111ae0eb80 "external/firebird: Missing include in configure check" and 7e1ff1cee5dd203df679d584512930fb21b97f6e "external/firebird: Implicit int in configure check". With recent Clang on Linux it had still failed to detected > configure:20511: checking for working sem_init() [...] > conftest.c:166:2: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > main () { > ^ > int > conftest.c:168: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(sem_init(&s,0,0)); > ^ > conftest.c:168:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' and > configure:21256: checking for native large file support [...] > conftest.c:167:5: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > main () { > ^ > int > conftest.c:168:5: 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(!(sizeof(off_t) == 8)); > ^ > conftest.c:168:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' And at least the former, which erroneously suppressed setting WORKING_SEM_INIT, sporadically caused CppunitTest_dbaccess_hsql_binary_import to SIGABRT for me at > #10 0x00007f087fce37fc in __GI_abort () > #11 0x00007f085a7e32e8 in Firebird::system_call_failed::system_call_failed(char const*, int) (this=0x55fbb11e5650, syscall=0x7f085a19ac06 "sem_open", error_code=17) at workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp:244 > #12 0x00007f085a7e33ba in Firebird::system_call_failed::raise(char const*) (syscall=0x7f085a19ac06 "sem_open") at workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp:255 > #13 0x00007f085a81ff4e in Firebird::SignalSafeSemaphore::init() (this=0x55fbb1268c80) at workdir/UnpackedTarball/firebird/src/common/classes/semaphore.cpp:138 > #14 0x00007f085a38ee85 in Firebird::SignalSafeSemaphore::SignalSafeSemaphore() (this=0x55fbb1268c80) at workdir/UnpackedTarball/firebird/src/common/classes/semaphore.h:156 > #15 0x00007f085a38c931 in (anonymous namespace)::MappingIpc::MappingIpc(Firebird::MemoryPool&) (this=0x55fbb1268bf0) at workdir/UnpackedTarball/firebird/src/jrd/Mapping.cpp:602 > #16 0x00007f085a38176b in Firebird::GlobalPtr<(anonymous namespace)::MappingIpc, (Firebird::InstanceControl::DtorPriority)2>::GlobalPtr() (this=0x7f085a93e780 <(anonymous namespace)::mappingIpc>) at workdir/UnpackedTarball/firebird/src/common/classes/init.h:143 > #17 0x00007f085a38d270 in __cxx_global_var_init.15(void) () at workdir/UnpackedTarball/firebird/src/jrd/Mapping.cpp:901 [...] > #32 0x00007f085bb37626 in ModuleLoader::loadModule(long*, Firebird::StringBase<Firebird::PathNameComparator> const&) (status=0x7ffd9f8b42a0, modPath=...) at workdir/UnpackedTarball/firebird/src/common/os/posix/mod_loader.cpp:95 [...] Change-Id: I082be878d95a020a7c419d6852614b711754cc23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141549 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-20 03:16:12 -05:00
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdlib.h>
#include <unistd.h>
- main () {
+ int main () {
exit(!(sizeof(off_t) == 8));
external/firebird: Adapt more configure checks to C99 ...similar to f6be6cd82bd84f13d2a597ceb62181111ae0eb80 "external/firebird: Missing include in configure check" and 7e1ff1cee5dd203df679d584512930fb21b97f6e "external/firebird: Implicit int in configure check". With recent Clang on Linux it had still failed to detected > configure:20511: checking for working sem_init() [...] > conftest.c:166:2: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > main () { > ^ > int > conftest.c:168: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(sem_init(&s,0,0)); > ^ > conftest.c:168:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' and > configure:21256: checking for native large file support [...] > conftest.c:167:5: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > main () { > ^ > int > conftest.c:168:5: 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(!(sizeof(off_t) == 8)); > ^ > conftest.c:168:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' And at least the former, which erroneously suppressed setting WORKING_SEM_INIT, sporadically caused CppunitTest_dbaccess_hsql_binary_import to SIGABRT for me at > #10 0x00007f087fce37fc in __GI_abort () > #11 0x00007f085a7e32e8 in Firebird::system_call_failed::system_call_failed(char const*, int) (this=0x55fbb11e5650, syscall=0x7f085a19ac06 "sem_open", error_code=17) at workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp:244 > #12 0x00007f085a7e33ba in Firebird::system_call_failed::raise(char const*) (syscall=0x7f085a19ac06 "sem_open") at workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp:255 > #13 0x00007f085a81ff4e in Firebird::SignalSafeSemaphore::init() (this=0x55fbb1268c80) at workdir/UnpackedTarball/firebird/src/common/classes/semaphore.cpp:138 > #14 0x00007f085a38ee85 in Firebird::SignalSafeSemaphore::SignalSafeSemaphore() (this=0x55fbb1268c80) at workdir/UnpackedTarball/firebird/src/common/classes/semaphore.h:156 > #15 0x00007f085a38c931 in (anonymous namespace)::MappingIpc::MappingIpc(Firebird::MemoryPool&) (this=0x55fbb1268bf0) at workdir/UnpackedTarball/firebird/src/jrd/Mapping.cpp:602 > #16 0x00007f085a38176b in Firebird::GlobalPtr<(anonymous namespace)::MappingIpc, (Firebird::InstanceControl::DtorPriority)2>::GlobalPtr() (this=0x7f085a93e780 <(anonymous namespace)::mappingIpc>) at workdir/UnpackedTarball/firebird/src/common/classes/init.h:143 > #17 0x00007f085a38d270 in __cxx_global_var_init.15(void) () at workdir/UnpackedTarball/firebird/src/jrd/Mapping.cpp:901 [...] > #32 0x00007f085bb37626 in ModuleLoader::loadModule(long*, Firebird::StringBase<Firebird::PathNameComparator> const&) (status=0x7ffd9f8b42a0, modPath=...) at workdir/UnpackedTarball/firebird/src/common/os/posix/mod_loader.cpp:95 [...] Change-Id: I082be878d95a020a7c419d6852614b711754cc23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141549 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-20 03:16:12 -05:00
}
_ACEOF
@@ -21478,8 +21480,9 @@
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>
2022-04-25 03:49:33 -05:00
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdlib.h>
#include <semaphore.h>
-main () {
+int main () {
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>
2022-04-25 03:49:33 -05:00
struct s {
char a;
union { long long x; sem_t y; } b;
@@ -21514,7 +21517,8 @@
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>
2022-04-25 03:49:33 -05:00
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-main () {
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>
2022-04-25 03:49:33 -05:00
+#include <stdlib.h>
+int main () {
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>
2022-04-25 03:49:33 -05:00
struct s {
char a;
double b;