unit/auto
Alejandro Colomar 60a584cfab Workarounded Clang bug triggered by Ruby.
Add -fdeclspec to NXT_RUBY_CFLAGS for Clang, if it's available.

Clang incorrectly reports 1 for __has_declspec_attribute(x) in
some cases, such as MacOS or Cygwin.  That causes ruby code to
break.  ruby added -fdeclspec to their CFLAGS in 2019 to
workaround this bug, since it enables __declspec() and therefore,
the compiler behavior matches what it reports.

Since we don't know what are all the architectures that trigger
the clang bug, let's add the flag for all of them (especially
since it should be harmless).

Add this workaround only at the time of configuring the ruby
module.  This way we don't clutter the global NXT_CFLAGS with an
unnecessary flag.

Link: unit bug <https://github.com/nginx/unit/issues/653>
Link: ruby bug <https://bugs.ruby-lang.org/issues/18616>
Link: LLVM bug <https://github.com/llvm/llvm-project/issues/49958>
Commit: LLVM: Add -fdeclspec <d170c4b57a91adc74ca89c6d4af616a00323b12c>
Commit: ruby: Use -fdeclspec <0958e19ffb047781fe1506760c7cbd8d7fe74e57>
2022-04-28 20:02:30 +02:00
..
cc Using compiler capability to generate dependencies. 2017-12-01 16:28:06 +03:00
echo Fixed displaying "echo" program building failure. 2017-09-22 20:13:55 +03:00
modules Workarounded Clang bug triggered by Ruby. 2022-04-28 20:02:30 +02:00
os Printing version in "./configure" output. 2021-12-03 03:11:06 +03:00
atomic Macros for atomic 'OR' and 'AND' operations introduced. 2017-04-21 16:55:13 +03:00
capability Initial applications isolation support using Linux namespaces. 2019-09-19 15:25:23 +03:00
clang Added NXT_MAYBE_UNUSED for __attribute__((__unused__)). 2022-04-27 01:14:22 +02:00
events Initial version. 2017-01-17 20:00:00 +03:00
feature PHP: fixed building on MacOSX with --ld-opt= option. 2018-05-30 18:31:26 +03:00
files Static: support for openat2() features. 2021-04-29 22:04:34 +08:00
have Initial version. 2017-01-17 20:00:00 +03:00
help Added build system support for a man page. 2021-03-24 18:45:45 +03:00
isolation Isolation: fixed build when features aren't detected. 2020-06-23 12:11:27 +01:00
make Introduced SCM_CREDENTIALS / SCM_CREDS in the socket control msgs. 2021-11-09 15:48:44 +03:00
malloc Checking mallopt() during configure. 2017-09-25 17:53:10 +03:00
mmap Initial version. 2017-01-17 20:00:00 +03:00
options Added build system support for a man page. 2021-03-24 18:45:45 +03:00
pcre Router: matching regular expressions support. 2020-11-17 15:03:30 +00:00
save Using disk file to store large request body. 2020-03-12 17:54:29 +03:00
sendfile Supporting platforms without sendfile() implementation. 2020-08-17 12:28:48 +03:00
shmem Added support for shm_open(SHM_ANON) extension. 2018-03-06 13:55:51 +00:00
sockets Disabling SCM_CREDS usage on DragonFly BSD. 2021-12-01 18:06:38 +03:00
sources Introduced SCM_CREDENTIALS / SCM_CREDS in the socket control msgs. 2021-11-09 15:48:44 +03:00
ssltls Added TLS session tickets support. 2021-08-17 16:52:32 -07:00
summary Added build system support for a man page. 2021-03-24 18:45:45 +03:00
test_build Initial version. 2017-01-17 20:00:00 +03:00
threads Removed deprecated MacOSX OSSpinLockLock(). 2018-09-17 16:37:17 +03:00
time Better checking for shm_open() during configure. 2017-09-27 18:34:23 +03:00
types Initial version. 2017-01-17 20:00:00 +03:00
unix Changed the group listing to run unprivileged when possible. 2019-11-26 16:15:23 +00:00