summaryrefslogtreecommitdiffhomepage
path: root/auto
diff options
context:
space:
mode:
Diffstat (limited to 'auto')
-rw-r--r--auto/clang18
-rw-r--r--auto/modules/go3
-rw-r--r--auto/modules/ruby28
-rw-r--r--auto/os/test3
4 files changed, 49 insertions, 3 deletions
diff --git a/auto/clang b/auto/clang
index 8639457a..1a05b5a3 100644
--- a/auto/clang
+++ b/auto/clang
@@ -176,3 +176,21 @@ nxt_feature_test="struct s {
return 1;
}"
. auto/feature
+
+
+nxt_feature="GCC __attribute__ unused"
+nxt_feature_name=NXT_HAVE_GCC_ATTRIBUTE_UNUSED
+nxt_feature_run=
+nxt_feature_incs=
+nxt_feature_libs=
+nxt_feature_test="static void f(void) __attribute__ ((__unused__));
+
+ static void f(void)
+ {
+ return;
+ }
+
+ int main(void) {
+ return 0;
+ }"
+. auto/feature
diff --git a/auto/modules/go b/auto/modules/go
index 7324ffbe..a8596bf3 100644
--- a/auto/modules/go
+++ b/auto/modules/go
@@ -111,7 +111,8 @@ install: ${NXT_GO}-install
${NXT_GO}:
${NXT_GO}-install: ${NXT_GO}-install-src ${NXT_GO}-install-env
- GOPATH=\$(DESTDIR)\$(GOPATH) GO111MODULE=auto ${NXT_GO} build ${NXT_GO_PKG}
+ cd \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG} && \
+ GOPATH=\$(DESTDIR)\$(GOPATH) ${NXT_GO} build ${NXT_GO_PKG}
${NXT_GO}-install-src:
install -d \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG}
diff --git a/auto/modules/ruby b/auto/modules/ruby
index 68324b44..dbedfd72 100644
--- a/auto/modules/ruby
+++ b/auto/modules/ruby
@@ -56,6 +56,7 @@ nxt_found=no
if /bin/sh -c "$NXT_RUBY -v" >> $NXT_AUTOCONF_ERR 2>&1; then
+ NXT_RUBY_CFLAGS=
NXT_RUBY_RUBYHDRDIR=`$NXT_RUBY -rrbconfig -e 'print RbConfig::CONFIG["rubyhdrdir"]'`
NXT_RUBY_ARCHHDRDIR=`$NXT_RUBY -rrbconfig -e 'print RbConfig::CONFIG["rubyarchhdrdir"]'`
NXT_RUBY_SITEDIR=`$NXT_RUBY -rrbconfig -e 'print RbConfig::CONFIG["sitedir"]'`
@@ -72,6 +73,31 @@ if /bin/sh -c "$NXT_RUBY -v" >> $NXT_AUTOCONF_ERR 2>&1; then
NXT_RUBY_LIBPATH=`$NXT_RUBY -rrbconfig -e 'print RbConfig::CONFIG["libdir"]'`
NXT_RUBY_LIBS="-l$NXT_RUBY_LIBNAME $NXT_RUBY_LIBSCONF"
+ if [ $NXT_CC_NAME = clang ]; then
+ # Workaround Clang bug
+ nxt_feature="-fdeclspec"
+ nxt_feature_name=
+ nxt_feature_run=
+ nxt_feature_incs="-fdeclspec"
+ nxt_feature_libs=
+ nxt_feature_test="#include <stdlib.h>
+
+ __declspec(noreturn) static void f(void);
+
+ static void f(void) {
+ exit(0);
+ }
+
+ int main(void) {
+ f();
+ }"
+ . auto/feature
+
+ if [ $nxt_found = yes ]; then
+ NXT_RUBY_CFLAGS="$NXT_RUBY_CFLAGS -fdeclspec"
+ fi
+ fi
+
nxt_feature="Ruby library"
nxt_feature_name=""
nxt_feature_run=value
@@ -205,7 +231,7 @@ for nxt_src in $NXT_RUBY_MODULE_SRCS; do
$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
mkdir -p $NXT_BUILD_DIR/src/ruby
- \$(CC) -c \$(CFLAGS) -DNXT_RUBY_MOUNTS_H=\"$NXT_RUBY_MOUNTS_HEADER\" \\
+ \$(CC) -c \$(CFLAGS) $NXT_RUBY_CFLAGS -DNXT_RUBY_MOUNTS_H=\"$NXT_RUBY_MOUNTS_HEADER\" \\
\$(NXT_INCS) $NXT_RUBY_INCPATH \\
$nxt_dep_flags \\
-o $NXT_BUILD_DIR/$nxt_obj $nxt_src
diff --git a/auto/os/test b/auto/os/test
index c37700a6..b7e73299 100644
--- a/auto/os/test
+++ b/auto/os/test
@@ -97,4 +97,5 @@ case "$NXT_SYSTEM" in
esac
-$echo configuring for $NXT_SYSTEM $NXT_SYSTEM_VERSION $NXT_SYSTEM_PLATFORM
+$echo "configuring Unit $NXT_VERSION" \
+ "for $NXT_SYSTEM $NXT_SYSTEM_VERSION $NXT_SYSTEM_PLATFORM"