| @@ -1,35 +1,35 @@ | | | @@ -1,35 +1,35 @@ |
1 | $NetBSD: patch-configure,v 1.2 2021/07/15 09:39:17 adam Exp $ | | 1 | $NetBSD: patch-configure,v 1.3 2022/06/27 01:19:40 gutteridge Exp $ |
2 | | | 2 | |
3 | Skip compiler detection magic. | | 3 | Skip compiler detection magic. |
4 | | | 4 | |
5 | Avoid choosing aligned_alloc() when it's not present, such as CentOS 6 | | 5 | Avoid choosing aligned_alloc() when it's not present, such as CentOS 6 |
6 | with lang/gcc7. | | 6 | with lang/gcc7 and older Solaris releases. |
7 | | | 7 | |
8 | --- configure.orig 2021-07-14 20:55:34.000000000 +0000 | | 8 | --- configure.orig 2021-07-14 20:55:34.000000000 +0000 |
9 | +++ configure | | 9 | +++ configure |
10 | @@ -563,8 +563,6 @@ else | | 10 | @@ -563,8 +563,6 @@ else |
11 | fi | | 11 | fi |
12 | done | | 12 | done |
13 | fi # icc | | 13 | fi # icc |
14 | -test -z "$cc_vendor" && die "compiler not found" | | 14 | -test -z "$cc_vendor" && die "compiler not found" |
15 | -test "$cc_fail" = "yes" && die "unsupported compiler version" | | 15 | -test "$cc_fail" = "yes" && die "unsupported compiler version" |
16 | | | 16 | |
17 | log_start "compiler working with default options" | | 17 | log_start "compiler working with default options" |
18 | if ! cc_check_cflag; then | | 18 | if ! cc_check_cflag; then |
19 | @@ -660,6 +658,16 @@ elif test "$OPT_OPENSSL" = "auto" || tes | | 19 | @@ -660,6 +658,16 @@ elif test "$OPT_OPENSSL" = "auto" || tes |
20 | finish_check "$ALLOW_RUNTIME_LINKING" | | 20 | finish_check "$ALLOW_RUNTIME_LINKING" |
21 | fi | | 21 | fi |
22 | | | 22 | |
23 | +start_check "libc provides aligned_alloc" | | 23 | +start_check "libc provides aligned_alloc" |
24 | +HAS_STDC_ALIGNED_ALLOC=no | | 24 | +HAS_STDC_ALIGNED_ALLOC=no |
25 | +if cc_check_statement "stdlib.h" 'aligned_alloc(256, 1024);' "-Werror -Wno-unused-result"; then | | 25 | +if cc_check_statement "stdlib.h" 'aligned_alloc(256, 1024);' "-Werror -Wno-unused-result"; then |
26 | + HAS_STDC_ALIGNED_ALLOC=yes | | 26 | + HAS_STDC_ALIGNED_ALLOC=yes |
27 | +fi | | 27 | +fi |
28 | +if test "$HAS_STDC_ALIGNED_ALLOC" = "no"; then | | 28 | +if test "$HAS_STDC_ALIGNED_ALLOC" = "no"; then |
29 | + BUILD_EXTRA_CFLAGS=$(join_params $BUILD_EXTRA_CFLAGS -DNOPE_DOES_NOT_HAS_STDC_ALIGNED_ALLOC) | | 29 | + BUILD_EXTRA_CFLAGS=$(join_params $BUILD_EXTRA_CFLAGS -DNO_STDC_ALIGNED_ALLOC) |
30 | +fi | | 30 | +fi |
31 | +finish_check "$HAS_STDC_ALIGNED_ALLOC" | | 31 | +finish_check "$HAS_STDC_ALIGNED_ALLOC" |
32 | + | | 32 | + |
33 | SHARED_VSCRIPT= | | 33 | SHARED_VSCRIPT= |
34 | if ! darwin; then | | 34 | if ! darwin; then |
35 | start_check "linker support for --version-script" | | 35 | start_check "linker support for --version-script" |