| @@ -1,16 +1,22 @@ | | | @@ -1,16 +1,22 @@ |
1 | $NetBSD: patch-ab,v 1.7 2016/08/26 12:40:25 richard Exp $ | | 1 | $NetBSD: patch-ab,v 1.8 2019/02/19 15:18:19 hauke Exp $ |
2 | | | 2 | |
3 | --- dist/configure.orig 2012-05-11 17:57:48.000000000 +0000 | | 3 | Fix bashisms. |
| | | 4 | |
| | | 5 | FreeBSD 10 is not FreeBSD 1. |
| | | 6 | |
| | | 7 | Add support for mutexes on aarch64 with GCC. |
| | | 8 | |
| | | 9 | --- dist/configure.orig 2013-09-09 15:35:02.000000000 +0000 |
4 | +++ dist/configure | | 10 | +++ dist/configure |
5 | @@ -5112,7 +5112,7 @@ bsdi3*) CC=${CC-"shlicc2"} | | 11 | @@ -5112,7 +5112,7 @@ bsdi3*) CC=${CC-"shlicc2"} |
6 | LIBSO_LIBS="$LIBSO_LIBS -lipc";; | | 12 | LIBSO_LIBS="$LIBSO_LIBS -lipc";; |
7 | cygwin*) | | 13 | cygwin*) |
8 | CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_REENTRANT";; | | 14 | CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_REENTRANT";; |
9 | -freebsd*) | | 15 | -freebsd*) |
10 | +freebsd*|dragonfly*) | | 16 | +freebsd*|dragonfly*) |
11 | CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" | | 17 | CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" |
12 | LDFLAGS="$LDFLAGS -pthread";; | | 18 | LDFLAGS="$LDFLAGS -pthread";; |
13 | gnu*|k*bsd*-gnu|linux*) | | 19 | gnu*|k*bsd*-gnu|linux*) |
14 | @@ -6905,7 +6905,7 @@ fi | | 20 | @@ -6905,7 +6905,7 @@ fi |
15 | # we're using. | | 21 | # we're using. |
16 | case "$host_os" in | | 22 | case "$host_os" in |
| @@ -91,13 +97,56 @@ $NetBSD: patch-ab,v 1.7 2016/08/26 12:40 | | | @@ -91,13 +97,56 @@ $NetBSD: patch-ab,v 1.7 2016/08/26 12:40 |
91 | + freebsd*|dragonfly*) _JNI_INC_SUBDIRS="freebsd";; | | 97 | + freebsd*|dragonfly*) _JNI_INC_SUBDIRS="freebsd";; |
92 | hp*) _JNI_INC_SUBDIRS="hp-ux";; | | 98 | hp*) _JNI_INC_SUBDIRS="hp-ux";; |
93 | linux*) _JNI_INC_SUBDIRS="linux genunix";; | | 99 | linux*) _JNI_INC_SUBDIRS="linux genunix";; |
94 | osf*) _JNI_INC_SUBDIRS="alpha";; | | 100 | osf*) _JNI_INC_SUBDIRS="alpha";; |
95 | @@ -20565,7 +20565,7 @@ if test "$db_cv_mutex" = no; then | | 101 | @@ -20565,7 +20565,7 @@ if test "$db_cv_mutex" = no; then |
96 | # avoid these probes for multiprocess pthreads. | | 102 | # avoid these probes for multiprocess pthreads. |
97 | ;; | | 103 | ;; |
98 | *) | | 104 | *) |
99 | - if test "$db_cv_mutex" = no -o "$db_cv_mutex" = posix_only; then | | 105 | - if test "$db_cv_mutex" = no -o "$db_cv_mutex" = posix_only; then |
100 | + if test "$ac_cv_lib_pthread_main" = yes -a "$db_cv_mutex" = no -o "$db_cv_mutex" = posix_only; then | | 106 | + if test "$ac_cv_lib_pthread_main" = yes -a "$db_cv_mutex" = no -o "$db_cv_mutex" = posix_only; then |
101 | LIBS="$LIBS -lpthread" | | 107 | LIBS="$LIBS -lpthread" |
102 | | | 108 | |
103 | if test "$cross_compiling" = yes; then : | | 109 | if test "$cross_compiling" = yes; then : |
| | | 110 | @@ -21796,6 +21796,31 @@ fi |
| | | 111 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| | | 112 | fi |
| | | 113 | |
| | | 114 | +# AARCH64/gcc: Linux |
| | | 115 | +if test "$db_cv_mutex" = no; then |
| | | 116 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| | | 117 | +/* end confdefs.h. */ |
| | | 118 | + |
| | | 119 | +int |
| | | 120 | +main () |
| | | 121 | +{ |
| | | 122 | + |
| | | 123 | +#if defined(__aarch64__) && defined(__GNUC__) |
| | | 124 | + exit(0); |
| | | 125 | +#else |
| | | 126 | + FAIL TO COMPILE/LINK |
| | | 127 | +#endif |
| | | 128 | + |
| | | 129 | + ; |
| | | 130 | + return 0; |
| | | 131 | +} |
| | | 132 | +_ACEOF |
| | | 133 | +if ac_fn_c_try_compile "$LINENO"; then : |
| | | 134 | + db_cv_mutex=AARCH64/gcc-assembly |
| | | 135 | +fi |
| | | 136 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| | | 137 | +fi |
| | | 138 | + |
| | | 139 | # MIPS/gcc: Linux |
| | | 140 | if test "$db_cv_mutex" = no; then |
| | | 141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| | | 142 | @@ -22124,6 +22149,10 @@ ARM/gcc-assembly) ADDITIONAL_OBJS="mut_t |
| | | 143 | $as_echo "#define HAVE_MUTEX_ARM_GCC_ASSEMBLY 1" >>confdefs.h |
| | | 144 | |
| | | 145 | ;; |
| | | 146 | +AARCH64/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS" |
| | | 147 | + $as_echo "#define HAVE_MUTEX_AARCH64_GCC_ASSEMBLY 1" >>confdefs.h |
| | | 148 | + |
| | | 149 | + ;; |
| | | 150 | HP/msem_init) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS" |
| | | 151 | $as_echo "#define HAVE_MUTEX_HPPA_MSEM_INIT 1" >>confdefs.h |
| | | 152 | |