summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/apr
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/apr')
-rw-r--r--meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch135
-rw-r--r--meta/recipes-support/apr/apr-util/0001-test_transformation-Check-if-transform-is-supported-.patch37
-rw-r--r--meta/recipes-support/apr/apr-util/configure_fixes.patch31
-rw-r--r--meta/recipes-support/apr/apr-util_1.6.3.bb (renamed from meta/recipes-support/apr/apr-util_1.6.1.bb)33
-rw-r--r--meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch25
-rw-r--r--meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch57
-rw-r--r--meta/recipes-support/apr/apr/0001-dso-Check-for-NULL-handle-in-apr_dso_sym.patch37
-rw-r--r--meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch24
-rw-r--r--meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch63
-rw-r--r--meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch11
-rw-r--r--meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch76
-rw-r--r--meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch50
-rw-r--r--meta/recipes-support/apr/apr/autoconf-2.73.patch26
-rw-r--r--meta/recipes-support/apr/apr/autoconf270.patch22
-rw-r--r--meta/recipes-support/apr/apr/libtoolize_check.patch28
-rw-r--r--meta/recipes-support/apr/apr_1.7.6.bb (renamed from meta/recipes-support/apr/apr_1.7.0.bb)58
16 files changed, 236 insertions, 477 deletions
diff --git a/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch b/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch
deleted file mode 100644
index 57e7453312..0000000000
--- a/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch
+++ /dev/null
@@ -1,135 +0,0 @@
1From 6b638fa9afbeb54dfa19378e391465a5284ce1ad Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 12 Sep 2018 17:16:36 +0800
4Subject: [PATCH] Fix error handling in gdbm
5
6Only check for gdbm_errno if the return value of the called gdbm_*
7function says so. This fixes apr-util with gdbm 1.14, which does not
8seem to always reset gdbm_errno.
9
10Also make the gdbm driver return error codes starting with
11APR_OS_START_USEERR instead of always returning APR_EGENERAL. This is
12what the berkleydb driver already does.
13
14Also ensure that dsize is 0 if dptr == NULL.
15
16Upstream-Status: Backport[https://svn.apache.org/viewvc?
17view=revision&amp;revision=1825311]
18
19Signed-off-by: Changqing Li <changqing.li@windriver.com>
20---
21 dbm/apr_dbm_gdbm.c | 47 +++++++++++++++++++++++++++++------------------
22 1 file changed, 29 insertions(+), 18 deletions(-)
23
24diff --git a/dbm/apr_dbm_gdbm.c b/dbm/apr_dbm_gdbm.c
25index 749447a..1c86327 100644
26--- a/dbm/apr_dbm_gdbm.c
27+++ b/dbm/apr_dbm_gdbm.c
28@@ -36,13 +36,25 @@
29 static apr_status_t g2s(int gerr)
30 {
31 if (gerr == -1) {
32- /* ### need to fix this */
33- return APR_EGENERAL;
34+ if (gdbm_errno == GDBM_NO_ERROR)
35+ return APR_SUCCESS;
36+ return APR_OS_START_USEERR + gdbm_errno;
37 }
38
39 return APR_SUCCESS;
40 }
41
42+static apr_status_t gdat2s(datum d)
43+{
44+ if (d.dptr == NULL) {
45+ if (gdbm_errno == GDBM_NO_ERROR || gdbm_errno == GDBM_ITEM_NOT_FOUND)
46+ return APR_SUCCESS;
47+ return APR_OS_START_USEERR + gdbm_errno;
48+ }
49+
50+ return APR_SUCCESS;
51+}
52+
53 static apr_status_t datum_cleanup(void *dptr)
54 {
55 if (dptr)
56@@ -53,22 +65,15 @@ static apr_status_t datum_cleanup(void *dptr)
57
58 static apr_status_t set_error(apr_dbm_t *dbm, apr_status_t dbm_said)
59 {
60- apr_status_t rv = APR_SUCCESS;
61
62- /* ### ignore whatever the DBM said (dbm_said); ask it explicitly */
63+ dbm->errcode = dbm_said;
64
65- if ((dbm->errcode = gdbm_errno) == GDBM_NO_ERROR) {
66+ if (dbm_said == APR_SUCCESS)
67 dbm->errmsg = NULL;
68- }
69- else {
70- dbm->errmsg = gdbm_strerror(gdbm_errno);
71- rv = APR_EGENERAL; /* ### need something better */
72- }
73-
74- /* captured it. clear it now. */
75- gdbm_errno = GDBM_NO_ERROR;
76+ else
77+ dbm->errmsg = gdbm_strerror(dbm_said - APR_OS_START_USEERR);
78
79- return rv;
80+ return dbm_said;
81 }
82
83 /* --------------------------------------------------------------------------
84@@ -107,7 +112,7 @@ static apr_status_t vt_gdbm_open(apr_dbm_t **pdb, const char *pathname,
85 NULL);
86
87 if (file == NULL)
88- return APR_EGENERAL; /* ### need a better error */
89+ return APR_OS_START_USEERR + gdbm_errno; /* ### need a better error */
90
91 /* we have an open database... return it */
92 *pdb = apr_pcalloc(pool, sizeof(**pdb));
93@@ -141,10 +146,12 @@ static apr_status_t vt_gdbm_fetch(apr_dbm_t *dbm, apr_datum_t key,
94 if (pvalue->dptr)
95 apr_pool_cleanup_register(dbm->pool, pvalue->dptr, datum_cleanup,
96 apr_pool_cleanup_null);
97+ else
98+ pvalue->dsize = 0;
99
100 /* store the error info into DBM, and return a status code. Also, note
101 that *pvalue should have been cleared on error. */
102- return set_error(dbm, APR_SUCCESS);
103+ return set_error(dbm, gdat2s(rd));
104 }
105
106 static apr_status_t vt_gdbm_store(apr_dbm_t *dbm, apr_datum_t key,
107@@ -201,9 +208,11 @@ static apr_status_t vt_gdbm_firstkey(apr_dbm_t *dbm, apr_datum_t *pkey)
108 if (pkey->dptr)
109 apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup,
110 apr_pool_cleanup_null);
111+ else
112+ pkey->dsize = 0;
113
114 /* store any error info into DBM, and return a status code. */
115- return set_error(dbm, APR_SUCCESS);
116+ return set_error(dbm, gdat2s(rd));
117 }
118
119 static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey)
120@@ -221,9 +230,11 @@ static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey)
121 if (pkey->dptr)
122 apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup,
123 apr_pool_cleanup_null);
124+ else
125+ pkey->dsize = 0;
126
127 /* store any error info into DBM, and return a status code. */
128- return set_error(dbm, APR_SUCCESS);
129+ return set_error(dbm, gdat2s(rd));
130 }
131
132 static void vt_gdbm_freedatum(apr_dbm_t *dbm, apr_datum_t data)
133--
1342.7.4
135
diff --git a/meta/recipes-support/apr/apr-util/0001-test_transformation-Check-if-transform-is-supported-.patch b/meta/recipes-support/apr/apr-util/0001-test_transformation-Check-if-transform-is-supported-.patch
new file mode 100644
index 0000000000..261b78736f
--- /dev/null
+++ b/meta/recipes-support/apr/apr-util/0001-test_transformation-Check-if-transform-is-supported-.patch
@@ -0,0 +1,37 @@
1From 3a97f58cfb40fc1911bbfd067e8457a472613d75 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 18 Apr 2023 22:58:00 -0700
4Subject: [PATCH] test_transformation: Check if transform is supported before
5 using it
6
7This helps in excluding these tests on systems where these are not
8available e.g. musl
9
10Upstream-Status: Submitted [https://bz.apache.org/bugzilla/show_bug.cgi?id=66570]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 test/testxlate.c | 8 ++++++--
14 1 file changed, 6 insertions(+), 2 deletions(-)
15
16diff --git a/test/testxlate.c b/test/testxlate.c
17index 6981eff..de00fa4 100644
18--- a/test/testxlate.c
19+++ b/test/testxlate.c
20@@ -116,8 +116,12 @@ static void test_transformation(abts_case *tc, void *data)
21 }
22
23 /* 4. Transformation using charset aliases */
24- one_test(tc, "UTF-8", "UTF-7", test_utf8, test_utf7, p);
25- one_test(tc, "UTF-7", "UTF-8", test_utf7, test_utf8, p);
26+ if (is_transform_supported(tc, "UTF-8", "UTF-7", p)) {
27+ one_test(tc, "UTF-8", "UTF-7", test_utf8, test_utf7, p);
28+ }
29+ if (is_transform_supported(tc, "UTF-7", "UTF-8", p)) {
30+ one_test(tc, "UTF-7", "UTF-8", test_utf7, test_utf8, p);
31+ }
32 }
33
34 #endif /* APR_HAS_XLATE */
35--
362.40.0
37
diff --git a/meta/recipes-support/apr/apr-util/configure_fixes.patch b/meta/recipes-support/apr/apr-util/configure_fixes.patch
deleted file mode 100644
index 91e244ce2c..0000000000
--- a/meta/recipes-support/apr/apr-util/configure_fixes.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: apr-util-1.4.1/configure.in
4===================================================================
5--- apr-util-1.4.1.orig/configure.in 2009-12-18 03:15:19.000000000 +0800
6+++ apr-util-1.4.1/configure.in 2011-12-30 13:32:07.000000000 +0800
7@@ -8,15 +8,15 @@
8 AC_CONFIG_HEADER(include/private/apu_config.h)
9 AC_CONFIG_AUX_DIR(build)
10
11-sinclude(build/apu-conf.m4)
12-sinclude(build/apu-iconv.m4)
13-sinclude(build/apu-hints.m4)
14-sinclude(build/apr_common.m4)
15-sinclude(build/find_apr.m4)
16-sinclude(build/crypto.m4)
17-sinclude(build/dbm.m4)
18-sinclude(build/dbd.m4)
19-sinclude(build/dso.m4)
20+#sinclude(build/apu-conf.m4)
21+#sinclude(build/apu-iconv.m4)
22+#sinclude(build/apu-hints.m4)
23+#sinclude(build/apr_common.m4)
24+#sinclude(build/find_apr.m4)
25+#sinclude(build/crypto.m4)
26+#sinclude(build/dbm.m4)
27+#sinclude(build/dbd.m4)
28+#sinclude(build/dso.m4)
29
30 dnl Generate ./config.nice for reproducing runs of configure
31 dnl
diff --git a/meta/recipes-support/apr/apr-util_1.6.1.bb b/meta/recipes-support/apr/apr-util_1.6.3.bb
index 4e183ca374..b5e3d2fc8a 100644
--- a/meta/recipes-support/apr/apr-util_1.6.1.bb
+++ b/meta/recipes-support/apr/apr-util_1.6.3.bb
@@ -11,13 +11,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=158aa0b1efe0c12f23d4b007ddb9a5db \
11 11
12SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \ 12SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
13 file://configfix.patch \ 13 file://configfix.patch \
14 file://configure_fixes.patch \ 14 file://0001-test_transformation-Check-if-transform-is-supported-.patch \
15 file://run-ptest \ 15 file://run-ptest \
16 file://0001-Fix-error-handling-in-gdbm.patch \ 16 "
17"
18 17
19SRC_URI[md5sum] = "bd502b9a8670a8012c4d90c31a84955f" 18SRC_URI[sha256sum] = "2b74d8932703826862ca305b094eef2983c27b39d5c9414442e9976a9acf1983"
20SRC_URI[sha256sum] = "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459"
21 19
22EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ 20EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
23 --without-odbc \ 21 --without-odbc \
@@ -25,42 +23,41 @@ EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
25 --without-sqlite2 \ 23 --without-sqlite2 \
26 --with-expat=${STAGING_DIR_HOST}${prefix}" 24 --with-expat=${STAGING_DIR_HOST}${prefix}"
27 25
28
29inherit autotools lib_package binconfig multilib_script 26inherit autotools lib_package binconfig multilib_script
30 27
31MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apu-1-config" 28MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apu-1-config"
32 29
33OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" 30OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
34 31
35do_configure_append() { 32do_configure:append() {
36 if [ "${CLASSOVERRIDE}" = "class-target" ]; then 33 if [ "${CLASSOVERRIDE}" = "class-target" ]; then
37 cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk 34 cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk
38 sed -i -e 's#^CFLAGS=.*#CFLAGS=${TARGET_CFLAGS}#g' ${B}/build/rules.mk 35 sed -i -e 's#^CFLAGS=.*#CFLAGS=${TARGET_CFLAGS}#g' ${B}/build/rules.mk
39 fi 36 fi
40} 37}
41do_configure_prepend_class-native() { 38do_configure:prepend:class-native() {
42 mkdir ${B}/build 39 mkdir ${B}/build
43 cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk 40 cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk
44} 41}
45do_configure_append_class-native() { 42do_configure:append:class-native() {
46 sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk 43 sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
47 # sometimes there isn't SHELL 44 # sometimes there isn't SHELL
48 sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk 45 sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
49} 46}
50 47
51do_configure_prepend_class-nativesdk() { 48do_configure:prepend:class-nativesdk() {
52 cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk 49 cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
53 sed -i -e 's#^CFLAGS=.*#CFLAGS=${TARGET_CFLAGS}#g' ${S}/build/rules.mk 50 sed -i -e 's#^CFLAGS=.*#CFLAGS=${TARGET_CFLAGS}#g' ${S}/build/rules.mk
54} 51}
55 52
56do_configure_append_class-nativesdk() { 53do_configure:append:class-nativesdk() {
57 sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk 54 sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
58 sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk 55 sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
59 sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk 56 sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
60 sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk 57 sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk
61} 58}
62 59
63do_install_append_class-target() { 60do_install:append:class-target() {
64 sed -i -e 's,${STAGING_DIR_HOST},,g' \ 61 sed -i -e 's,${STAGING_DIR_HOST},,g' \
65 -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \ 62 -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
66 -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config 63 -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config
@@ -73,16 +70,16 @@ PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-
73PACKAGECONFIG[gdbm] = "--with-dbm=gdbm --with-gdbm=${STAGING_DIR_HOST}${prefix},--without-gdbm,gdbm" 70PACKAGECONFIG[gdbm] = "--with-dbm=gdbm --with-gdbm=${STAGING_DIR_HOST}${prefix},--without-gdbm,gdbm"
74 71
75#files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN} 72#files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN}
76FILES_${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}" 73FILES:${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}"
77FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la" 74FILES:${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la"
78FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a" 75FILES:${PN}-staticdev += "${libdir}/apr-util-1/*.a"
79 76
80INSANE_SKIP_${PN} += "dev-so" 77INSANE_SKIP:${PN} += "dev-so"
81 78
82inherit ptest 79inherit ptest
83 80
84RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7" 81RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7"
85RDEPENDS_${PN}-ptest += "libgcc" 82RDEPENDS:${PN}-ptest += "libgcc"
86 83
87do_compile_ptest() { 84do_compile_ptest() {
88 cd ${B}/test 85 cd ${B}/test
diff --git a/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch b/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch
index abff4e9331..72a2ab777e 100644
--- a/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch
+++ b/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch
@@ -1,13 +1,13 @@
1From 2bbe20b4f69e84e7a18bc79d382486953f479328 Mon Sep 17 00:00:00 2001 1From dc02ac2f43e47178a9b1f35ef6906d7835dc121b Mon Sep 17 00:00:00 2001
2From: Jeremy Puhlman <jpuhlman@mvista.com> 2From: Jeremy Puhlman <jpuhlman@mvista.com>
3Date: Thu, 26 Mar 2020 18:30:36 +0000 3Date: Thu, 26 Mar 2020 18:30:36 +0000
4Subject: [PATCH] Add option to disable timed dependant tests 4Subject: [PATCH] Add option to disable timed dependant tests
5 5
6The disabled tests rely on timing to pass correctly. On a virtualized 6The disabled tests rely on timing to pass correctly. On a virtualized
7system under heavy load, these tests randomly fail because they miss 7system under heavy load, these tests randomly fail because they miss
8a timer or other timing related issues. 8a timer or other timing related issues.
9 9
10Upstream-Status: Pending 10Upstream-Status: Submitted [https://github.com/apache/apr/pull/54]
11Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> 11Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
12--- 12---
13 configure.in | 6 ++++++ 13 configure.in | 6 ++++++
@@ -16,10 +16,10 @@ Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
16 3 files changed, 9 insertions(+), 2 deletions(-) 16 3 files changed, 9 insertions(+), 2 deletions(-)
17 17
18diff --git a/configure.in b/configure.in 18diff --git a/configure.in b/configure.in
19index d9f32d6..f0c5661 100644 19index 0ce20ab..3d42953 100644
20--- a/configure.in 20--- a/configure.in
21+++ b/configure.in 21+++ b/configure.in
22@@ -2886,6 +2886,12 @@ AC_ARG_ENABLE(timedlocks, 22@@ -3119,6 +3119,12 @@ AC_ARG_ENABLE(timedlocks,
23 ) 23 )
24 AC_SUBST(apr_has_timedlocks) 24 AC_SUBST(apr_has_timedlocks)
25 25
@@ -33,10 +33,10 @@ index d9f32d6..f0c5661 100644
33 # so getaddrinfo/gai_strerror are not used. 33 # so getaddrinfo/gai_strerror are not used.
34 if test $have_ipv6 = 0; then 34 if test $have_ipv6 = 0; then
35diff --git a/include/apr.h.in b/include/apr.h.in 35diff --git a/include/apr.h.in b/include/apr.h.in
36index ee99def..c46a5f4 100644 36index 637ed38..e7cb9b9 100644
37--- a/include/apr.h.in 37--- a/include/apr.h.in
38+++ b/include/apr.h.in 38+++ b/include/apr.h.in
39@@ -298,6 +298,7 @@ extern "C" { 39@@ -307,6 +307,7 @@ extern "C" {
40 #define APR_HAS_XTHREAD_FILES @apr_has_xthread_files@ 40 #define APR_HAS_XTHREAD_FILES @apr_has_xthread_files@
41 #define APR_HAS_OS_UUID @osuuid@ 41 #define APR_HAS_OS_UUID @osuuid@
42 #define APR_HAS_TIMEDLOCKS @apr_has_timedlocks@ 42 #define APR_HAS_TIMEDLOCKS @apr_has_timedlocks@
@@ -45,10 +45,10 @@ index ee99def..c46a5f4 100644
45 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@ 45 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@
46 46
47diff --git a/test/testlock.c b/test/testlock.c 47diff --git a/test/testlock.c b/test/testlock.c
48index a43f477..6233d0b 100644 48index e3437c1..04e01b9 100644
49--- a/test/testlock.c 49--- a/test/testlock.c
50+++ b/test/testlock.c 50+++ b/test/testlock.c
51@@ -396,13 +396,13 @@ abts_suite *testlock(abts_suite *suite) 51@@ -535,7 +535,7 @@ abts_suite *testlock(abts_suite *suite)
52 abts_run_test(suite, threads_not_impl, NULL); 52 abts_run_test(suite, threads_not_impl, NULL);
53 #else 53 #else
54 abts_run_test(suite, test_thread_mutex, NULL); 54 abts_run_test(suite, test_thread_mutex, NULL);
@@ -56,6 +56,8 @@ index a43f477..6233d0b 100644
56+#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS 56+#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS
57 abts_run_test(suite, test_thread_timedmutex, NULL); 57 abts_run_test(suite, test_thread_timedmutex, NULL);
58 #endif 58 #endif
59 abts_run_test(suite, test_thread_nestedmutex, NULL);
60@@ -543,7 +543,7 @@ abts_suite *testlock(abts_suite *suite)
59 abts_run_test(suite, test_thread_rwlock, NULL); 61 abts_run_test(suite, test_thread_rwlock, NULL);
60 abts_run_test(suite, test_cond, NULL); 62 abts_run_test(suite, test_cond, NULL);
61 abts_run_test(suite, test_timeoutcond, NULL); 63 abts_run_test(suite, test_timeoutcond, NULL);
@@ -63,7 +65,4 @@ index a43f477..6233d0b 100644
63+#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS 65+#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS
64 abts_run_test(suite, test_timeoutmutex, NULL); 66 abts_run_test(suite, test_timeoutmutex, NULL);
65 #endif 67 #endif
66 #endif 68 #ifdef WIN32
67--
682.23.0
69
diff --git a/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch
new file mode 100644
index 0000000000..7e22270b88
--- /dev/null
+++ b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch
@@ -0,0 +1,57 @@
1From 84990901ba642238779c74a003c1f5e572ab8d38 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 26 Aug 2022 00:28:08 -0700
4Subject: [PATCH] configure: Remove runtime test for mmap that can map
5 /dev/zero
6
7This never works for cross-compile moreover it ends up disabling
8ac_cv_file__dev_zero which then results in compiler errors in shared
9mutexes
10
11Upstream-Status: Inappropriate [Cross-compile specific]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 configure.in | 30 ------------------------------
15 1 file changed, 30 deletions(-)
16
17diff --git a/configure.in b/configure.in
18index 3d42953..7e43b0f 100644
19--- a/configure.in
20+++ b/configure.in
21@@ -1391,36 +1391,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \
22 APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
23 AC_CHECK_FILE(/dev/zero)
24
25-# Not all systems can mmap /dev/zero (such as HP-UX). Check for that.
26-if test "$ac_cv_func_mmap" = "yes" &&
27- test "$ac_cv_file__dev_zero" = "yes"; then
28- AC_CACHE_CHECK([for mmap that can map /dev/zero],
29- [ac_cv_mmap__dev_zero],
30- [AC_TRY_RUN([#include <sys/types.h>
31-#include <sys/stat.h>
32-#include <fcntl.h>
33-#ifdef HAVE_SYS_MMAN_H
34-#include <sys/mman.h>
35-#endif
36- int main(int argc, const char *argv[])
37- {
38- int fd;
39- void *m;
40- fd = open("/dev/zero", O_RDWR);
41- if (fd < 0) {
42- return 1;
43- }
44- m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
45- if (m == (void *)-1) { /* aka MAP_FAILED */
46- return 2;
47- }
48- if (munmap(m, sizeof(void*)) < 0) {
49- return 3;
50- }
51- return 0;
52- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])])
53-fi
54-
55 # Now we determine which one is our anonymous shmem preference.
56 haveshmgetanon="0"
57 havemmapzero="0"
diff --git a/meta/recipes-support/apr/apr/0001-dso-Check-for-NULL-handle-in-apr_dso_sym.patch b/meta/recipes-support/apr/apr/0001-dso-Check-for-NULL-handle-in-apr_dso_sym.patch
new file mode 100644
index 0000000000..8ba181b887
--- /dev/null
+++ b/meta/recipes-support/apr/apr/0001-dso-Check-for-NULL-handle-in-apr_dso_sym.patch
@@ -0,0 +1,37 @@
1From a25be1aaa92a6d2e7f4cc3fdfbb92e5a10b63035 Mon Sep 17 00:00:00 2001
2From: Greg Beard <gmbeard@googlemail.com>
3Date: Sat, 25 Mar 2023 08:31:36 +0000
4Subject: [PATCH] dso: Check for NULL handle in apr_dso_sym
5
6Upstream-Status: Backport [https://github.com/apache/apr/pull/40/commits/0efce00093b1ba405d91c7f0eab9755c8527eead]
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 dso/unix/dso.c | 12 ++++++++++++
10 1 file changed, 12 insertions(+)
11
12diff --git a/dso/unix/dso.c b/dso/unix/dso.c
13index fdd56f1..583d5de 100644
14--- a/dso/unix/dso.c
15+++ b/dso/unix/dso.c
16@@ -173,6 +173,18 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
17 apr_dso_handle_t *handle,
18 const char *symname)
19 {
20+ /* This is necessary for `testdso.c`. For some reason, musl
21+ * builds fail the `test_unload_library` test if the below
22+ * check isn't in place. `test_unload_library` unloads the
23+ * library and then immediately calls this function. Maybe
24+ * musl's `dlsym()` assumes the handle is never NULL and
25+ * some UB is being invoked here...
26+ */
27+ if (handle->handle == NULL) {
28+ handle->errormsg = "library not loaded";
29+ return APR_ESYMNOTFOUND;
30+ }
31+
32 #if defined(DSO_USE_SHL)
33 void *symaddr = NULL;
34 int status;
35--
362.42.0
37
diff --git a/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch b/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
index 72e706f966..2a9cfb0f3d 100644
--- a/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
+++ b/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
@@ -1,8 +1,7 @@
1From 5925b20da8bbc34d9bf5a5dca123ef38864d43c6 Mon Sep 17 00:00:00 2001 1From 5050645e626a8ee91a7f45070ef2d3911e1870d7 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Tue, 30 Jan 2018 09:39:06 +0800 3Date: Tue, 30 Jan 2018 09:39:06 +0800
4Subject: [PATCH 2/7] apr: Remove workdir path references from installed apr 4Subject: [PATCH] apr: Remove workdir path references from installed apr files
5 files
6 5
7Upstream-Status: Inappropriate [configuration] 6Upstream-Status: Inappropriate [configuration]
8 7
@@ -15,19 +14,21 @@ Rebase to 1.6.3
15 14
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17--- 16---
18 apr-config.in | 26 ++------------------------ 17 apr-config.in | 32 ++------------------------------
19 1 file changed, 2 insertions(+), 24 deletions(-) 18 1 file changed, 2 insertions(+), 30 deletions(-)
20 19
21diff --git a/apr-config.in b/apr-config.in 20diff --git a/apr-config.in b/apr-config.in
22index 84b4073..bbbf651 100644 21index 626d3b0..42be269 100644
23--- a/apr-config.in 22--- a/apr-config.in
24+++ b/apr-config.in 23+++ b/apr-config.in
25@@ -152,14 +152,7 @@ while test $# -gt 0; do 24@@ -179,16 +179,7 @@ while test $# -gt 0; do
26 flags="$flags $LDFLAGS" 25 flags="$flags $LDFLAGS"
27 ;; 26 ;;
28 --includes) 27 --includes)
29- if test "$location" = "installed"; then 28- if test "$location" = "installed"; then
30 flags="$flags -I$includedir $EXTRA_INCLUDES" 29 flags="$flags -I$includedir $EXTRA_INCLUDES"
30- elif test "$location" = "crosscompile"; then
31- flags="$flags -I$APR_TARGET_DIR/$includedir $EXTRA_INCLUDES"
31- elif test "$location" = "source"; then 32- elif test "$location" = "source"; then
32- flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES" 33- flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
33- else 34- else
@@ -37,13 +38,15 @@ index 84b4073..bbbf651 100644
37 ;; 38 ;;
38 --srcdir) 39 --srcdir)
39 echo $APR_SOURCE_DIR 40 echo $APR_SOURCE_DIR
40@@ -181,29 +174,14 @@ while test $# -gt 0; do 41@@ -212,33 +203,14 @@ while test $# -gt 0; do
41 exit 0 42 exit 0
42 ;; 43 ;;
43 --link-ld) 44 --link-ld)
44- if test "$location" = "installed"; then 45- if test "$location" = "installed"; then
45- ### avoid using -L if libdir is a "standard" location like /usr/lib 46- ### avoid using -L if libdir is a "standard" location like /usr/lib
46- flags="$flags -L$libdir -l${APR_LIBNAME}" 47- flags="$flags -L$libdir -l${APR_LIBNAME}"
48- elif test "$location" = "crosscompile"; then
49- flags="$flags -L$APR_TARGET_DIR/$libdir -l${APR_LIBNAME}"
47- else 50- else
48- ### this surely can't work since the library is in .libs? 51- ### this surely can't work since the library is in .libs?
49- flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}" 52- flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
@@ -62,6 +65,8 @@ index 84b4073..bbbf651 100644
62- # Since the user is specifying they are linking with libtool, we 65- # Since the user is specifying they are linking with libtool, we
63- # *know* that -R will be recognized by libtool. 66- # *know* that -R will be recognized by libtool.
64- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}" 67- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
68- elif test "$location" = "crosscompile"; then
69- flags="$flags -L${APR_TARGET_DIR}/$libdir -l${APR_LIBNAME}"
65- else 70- else
66- flags="$flags $LA_FILE" 71- flags="$flags $LA_FILE"
67- fi 72- fi
@@ -69,6 +74,3 @@ index 84b4073..bbbf651 100644
69 ;; 74 ;;
70 --shlib-path-var) 75 --shlib-path-var)
71 echo "$SHLIBPATH_VAR" 76 echo "$SHLIBPATH_VAR"
72--
731.8.3.1
74
diff --git a/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch b/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
deleted file mode 100644
index 4dd53bd8eb..0000000000
--- a/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
+++ /dev/null
@@ -1,63 +0,0 @@
1From d5028c10f156c224475b340cfb1ba025d6797243 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 2 Feb 2018 15:51:42 +0800
4Subject: [PATCH 3/7] Makefile.in/configure.in: support cross compiling
5
6While cross compiling, the tools/gen_test_char could not
7be executed at build time, use AX_PROG_CC_FOR_BUILD to
8build native tools/gen_test_char
9
10Upstream-Status: Submitted [https://github.com/apache/apr/pull/8]
11
12Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
13---
14 Makefile.in | 10 +++-------
15 configure.in | 3 +++
16 2 files changed, 6 insertions(+), 7 deletions(-)
17
18diff --git a/Makefile.in b/Makefile.in
19index 5fb760e..8675f90 100644
20--- a/Makefile.in
21+++ b/Makefile.in
22@@ -46,7 +46,7 @@ LT_VERSION = @LT_VERSION@
23
24 CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
25 build/apr_rules.out tools/gen_test_char@EXEEXT@ \
26- tools/gen_test_char.o tools/gen_test_char.lo \
27+ tools/gen_test_char.o \
28 include/private/apr_escape_test_char.h
29 DISTCLEAN_TARGETS = config.cache config.log config.status \
30 include/apr.h include/arch/unix/apr_private.h \
31@@ -131,13 +131,9 @@ check: $(TARGET_LIB)
32 etags:
33 etags `find . -name '*.[ch]'`
34
35-OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
36-tools/gen_test_char.lo: tools/gen_test_char.c
37+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
38 $(APR_MKDIR) tools
39- $(LT_COMPILE)
40-
41-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
42- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
43+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
44
45 include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
46 $(APR_MKDIR) include/private
47diff --git a/configure.in b/configure.in
48index 719f331..361120f 100644
49--- a/configure.in
50+++ b/configure.in
51@@ -183,6 +183,9 @@ dnl can only be used once within a configure script, so this prevents a
52 dnl preload section from invoking the macro to get compiler info.
53 AC_PROG_CC
54
55+dnl Check build CC for gen_test_char compiling which is executed at build time.
56+AX_PROG_CC_FOR_BUILD
57+
58 dnl AC_PROG_SED is only avaliable in recent autoconf versions.
59 dnl Use AC_CHECK_PROG instead if AC_PROG_SED is not present.
60 ifdef([AC_PROG_SED],
61--
621.8.3.1
63
diff --git a/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch b/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
index 02634e6fde..bd8e7786ba 100644
--- a/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
+++ b/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
@@ -1,7 +1,7 @@
1From 2e66cece0c3adff92733332111204ddc1d730a07 Mon Sep 17 00:00:00 2001 1From 2f5db35d6c6b4d40e04591c98d297ef764777aa3 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com> 2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Thu, 19 Nov 2015 18:25:38 -0800 3Date: Thu, 19 Nov 2015 18:25:38 -0800
4Subject: [PATCH 5/7] configure.in: fix LTFLAGS to make it work with ccache 4Subject: [PATCH] configure.in: fix LTFLAGS to make it work with ccache
5 5
6When ccache is enabled, libtool requires --tag=CC when use ccache, 6When ccache is enabled, libtool requires --tag=CC when use ccache,
7otherwise when building apr-util with ccache enabled: 7otherwise when building apr-util with ccache enabled:
@@ -19,10 +19,10 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
19 1 file changed, 1 insertion(+), 1 deletion(-) 19 1 file changed, 1 insertion(+), 1 deletion(-)
20 20
21diff --git a/configure.in b/configure.in 21diff --git a/configure.in b/configure.in
22index 361120f..3b10422 100644 22index b0457e2..0ce20ab 100644
23--- a/configure.in 23--- a/configure.in
24+++ b/configure.in 24+++ b/configure.in
25@@ -249,7 +249,7 @@ case $host in 25@@ -266,7 +266,7 @@ case $host in
26 ;; 26 ;;
27 *) 27 *)
28 if test "x$LTFLAGS" = "x"; then 28 if test "x$LTFLAGS" = "x"; then
@@ -31,6 +31,3 @@ index 361120f..3b10422 100644
31 fi 31 fi
32 if test "$experimental_libtool" = "yes"; then 32 if test "$experimental_libtool" = "yes"; then
33 # Use a custom-made libtool replacement 33 # Use a custom-made libtool replacement
34--
351.8.3.1
36
diff --git a/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch b/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
deleted file mode 100644
index d1a2ebe881..0000000000
--- a/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
+++ /dev/null
@@ -1,76 +0,0 @@
1From 49661ea3858cf8494926cccf57d3e8c6dcb47117 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Wed, 14 Dec 2016 18:13:08 +0800
4Subject: [PATCH] apr: fix off_t size doesn't match in glibc when cross
5 compiling
6
7In configure.in, it contains the following:
8
9 APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
10
11the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4,
12it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross
13compiling enable.
14
15So it was hardcoded for cross compiling, we should detect it dynamic based on
16the sysroot's glibc. We change it to the following:
17
18 AC_CHECK_SIZEOF(off_t)
19
20The same for the following hardcoded types for cross compiling:
21
22 pid_t 8
23 ssize_t 8
24 size_t 8
25 off_t 8
26
27Change the above correspondingly.
28
29Signed-off-by: Dengke Du <dengke.du@windriver.com>
30
31Upstream-Status: Pending
32
33---
34 configure.in | 8 ++++----
35 1 file changed, 4 insertions(+), 4 deletions(-)
36
37diff --git a/configure.in b/configure.in
38index 27b8539..fb408d1 100644
39--- a/configure.in
40+++ b/configure.in
41@@ -1801,7 +1801,7 @@ else
42 socklen_t_value="int"
43 fi
44
45-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
46+AC_CHECK_SIZEOF(pid_t)
47
48 if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
49 pid_t_fmt='#define APR_PID_T_FMT "hd"'
50@@ -1873,7 +1873,7 @@ APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned long, lu, [size_t_fmt="lu"], [
51 APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned int, u, [size_t_fmt="u"])
52 ])
53
54-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
55+AC_CHECK_SIZEOF(ssize_t)
56
57 dnl the else cases below should no longer occur;
58 AC_MSG_CHECKING([which format to use for apr_ssize_t])
59@@ -1891,7 +1891,7 @@ fi
60
61 ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
62
63-APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
64+AC_CHECK_SIZEOF(size_t)
65
66 # else cases below should no longer occur;
67 AC_MSG_CHECKING([which format to use for apr_size_t])
68@@ -1909,7 +1909,7 @@ fi
69
70 size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
71
72-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
73+AC_CHECK_SIZEOF(off_t)
74
75 if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
76 # Enable LFS
diff --git a/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch b/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch
deleted file mode 100644
index 8760b0140c..0000000000
--- a/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1From c6afc4a4a766478cb6aa6b43a50051881b6318d7 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Fri, 3 Mar 2017 22:24:17 +0100
4Subject: [PATCH 7/7] explicitly link libapr against phtread to make gold happy
5 on test
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_init'
11| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_settype'
12| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_destroy'
13| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutex_trylock'
14| ../.libs/libapr-1.so: error: undefined reference to 'pthread_attr_setstacksize'
15| ../.libs/libapr-1.so: error: undefined reference to 'pthread_create'
16| ../.libs/libapr-1.so: error: undefined reference to 'pthread_join'
17| ../.libs/libapr-1.so: error: undefined reference to 'pthread_detach'
18| ../.libs/libapr-1.so: error: undefined reference to 'pthread_sigmask'
19| ../.libs/libapr-1.so: error: undefined reference to 'pthread_once'
20| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_create'
21| ../.libs/libapr-1.so: error: undefined reference to 'pthread_getspecific'
22| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_delete'
23| ../.libs/libapr-1.so: error: undefined reference to 'pthread_setspecific'
24| collect2: error: ld returned 1 exit status
25| Makefile:114: recipe for target 'globalmutexchild' failed
26| make[1]: *** [globalmutexchild] Error 1
27| make[1]: Leaving directory '/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/apr/1.5.2-r0/apr-1.5.2/test'
28
29Upstream-Status: Pending
30
31Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
32---
33 configure.in | 1 +
34 1 file changed, 1 insertion(+)
35
36diff --git a/configure.in b/configure.in
37index a227e72..cbc0f90 100644
38--- a/configure.in
39+++ b/configure.in
40@@ -784,6 +784,7 @@ else
41 APR_PTHREADS_CHECK_RESTORE ] )
42 fi
43 if test "$pthreadh" = "1"; then
44+ APR_ADDTO(LIBS,[-lpthread])
45 APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
46 APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
47 APR_CHECK_PTHREAD_RECURSIVE_MUTEX
48--
491.8.3.1
50
diff --git a/meta/recipes-support/apr/apr/autoconf-2.73.patch b/meta/recipes-support/apr/apr/autoconf-2.73.patch
new file mode 100644
index 0000000000..a8b7a77566
--- /dev/null
+++ b/meta/recipes-support/apr/apr/autoconf-2.73.patch
@@ -0,0 +1,26 @@
1To work with autoconf 2.73, tweak the macro ordering in configure.in.
2
3Upstream-Status: Pending
4Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5
6Index: apr-1.7.2/configure.in
7===================================================================
8--- apr-1.7.2.orig/configure.in
9+++ apr-1.7.2/configure.in
10@@ -430,6 +430,8 @@ if test "$host" = "i586-pc-beos"; then
11 ) dnl
12 fi
13
14+APR_CHECK_DEFINE(LOCK_EX, sys/file.h)
15+
16 # this is the place to put specific options for platform/compiler
17 # combinations
18 case "$host:$CC" in
19@@ -2384,7 +2386,6 @@ AC_MSG_RESULT([$msg])
20 AC_SUBST(have_union_semun)
21
22 dnl Checks for libraries.
23-APR_CHECK_DEFINE(LOCK_EX, sys/file.h)
24 APR_CHECK_DEFINE(F_SETLK, fcntl.h)
25 APR_CHECK_DEFINE(SEM_UNDO, sys/sem.h)
26
diff --git a/meta/recipes-support/apr/apr/autoconf270.patch b/meta/recipes-support/apr/apr/autoconf270.patch
deleted file mode 100644
index 9f7b5c624c..0000000000
--- a/meta/recipes-support/apr/apr/autoconf270.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1With autoconf 2.70 confdefs.h is already included. Including it twice generates
2compiler warnings and since this macros is to error on warnings, it breaks.
3
4Fix by not including the file.
5
6Upstream-Status: Pending
7RP - 2021/1/28
8
9Index: apr-1.7.0/build/apr_common.m4
10===================================================================
11--- apr-1.7.0.orig/build/apr_common.m4
12+++ apr-1.7.0/build/apr_common.m4
13@@ -505,8 +505,7 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
14 fi
15 AC_COMPILE_IFELSE(
16 [AC_LANG_SOURCE(
17- [#include "confdefs.h"
18- ]
19+ []
20 [[$1]]
21 [int main(int argc, const char *const *argv) {]
22 [[$2]]
diff --git a/meta/recipes-support/apr/apr/libtoolize_check.patch b/meta/recipes-support/apr/apr/libtoolize_check.patch
deleted file mode 100644
index 740792e6b0..0000000000
--- a/meta/recipes-support/apr/apr/libtoolize_check.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From: Helmut Grohne <helmut@subdivi.de>
2Subject: check for libtoolize rather than libtool
3Last-Update: 2014-09-19
4
5libtool is now in package libtool-bin, but apr only needs libtoolize.
6
7Upstream-Status: Pending [ from debian: https://sources.debian.org/data/main/a/apr/1.6.5-1/debian/patches/libtoolize_check.patch ]
8
9Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
10
11--- apr.orig/build/buildcheck.sh
12+++ apr/build/buildcheck.sh
13@@ -39,11 +39,11 @@ fi
14 # ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
15 # output is multiline from 1.5 onwards
16
17-# Require libtool 1.4 or newer
18-libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
19-lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
20+# Require libtoolize 1.4 or newer
21+libtoolize=`build/PrintPath glibtoolize1 glibtoolize libtoolize libtoolize15 libtoolize14`
22+lt_pversion=`$libtoolize --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
23 if test -z "$lt_pversion"; then
24- echo "buildconf: libtool not found."
25+ echo "buildconf: libtoolize not found."
26 echo " You need libtool version 1.4 or newer installed"
27 echo " to build APR from SVN."
28 res=1
diff --git a/meta/recipes-support/apr/apr_1.7.0.bb b/meta/recipes-support/apr/apr_1.7.6.bb
index f879e2864a..13fa5daa3c 100644
--- a/meta/recipes-support/apr/apr_1.7.0.bb
+++ b/meta/recipes-support/apr/apr_1.7.6.bb
@@ -1,8 +1,8 @@
1SUMMARY = "Apache Portable Runtime (APR) library" 1SUMMARY = "Apache Portable Runtime (APR) library"
2DESCRIPTION = "The Apache Portable Runtime (APR) is a supporting library for the \ 2
3Apache web server. It provides a set of APIs that map to the underlying \ 3DESCRIPTION = "Create and maintain software libraries that provide a predictable \
4operating system (OS). Where the OS does not support a particular function, \ 4and consistent interface to underlying platform-specific implementations."
5APR will provide an emulation." 5
6HOMEPAGE = "http://apr.apache.org/" 6HOMEPAGE = "http://apr.apache.org/"
7SECTION = "libs" 7SECTION = "libs"
8DEPENDS = "util-linux" 8DEPENDS = "util-linux"
@@ -16,18 +16,15 @@ BBCLASSEXTEND = "native nativesdk"
16SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \ 16SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
17 file://run-ptest \ 17 file://run-ptest \
18 file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \ 18 file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \
19 file://0003-Makefile.in-configure.in-support-cross-compiling.patch \
20 file://0004-Fix-packet-discards-HTTP-redirect.patch \ 19 file://0004-Fix-packet-discards-HTTP-redirect.patch \
21 file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \ 20 file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \
22 file://0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \
23 file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \
24 file://libtoolize_check.patch \
25 file://0001-Add-option-to-disable-timed-dependant-tests.patch \ 21 file://0001-Add-option-to-disable-timed-dependant-tests.patch \
26 file://autoconf270.patch \ 22 file://0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch \
23 file://autoconf-2.73.patch \
24 file://0001-dso-Check-for-NULL-handle-in-apr_dso_sym.patch \
27 " 25 "
28 26
29SRC_URI[md5sum] = "7a14a83d664e87599ea25ff4432e48a7" 27SRC_URI[sha256sum] = "49030d92d2575da735791b496dc322f3ce5cff9494779ba8cc28c7f46c5deb32"
30SRC_URI[sha256sum] = "e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea"
31 28
32inherit autotools-brokensep lib_package binconfig multilib_header ptest multilib_script 29inherit autotools-brokensep lib_package binconfig multilib_header ptest multilib_script
33 30
@@ -35,19 +32,32 @@ OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
35 32
36# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928 33# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
37CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes" 34CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
38 35# Enable largefile
36CACHED_CONFIGUREVARS += "apr_cv_use_lfs64=yes"
37# Additional AC_TRY_RUN tests which will need to be cached for cross compile
38CACHED_CONFIGUREVARS += "apr_cv_epoll=yes epoll_create1=yes apr_cv_sock_cloexec=yes \
39 ac_cv_struct_rlimit=yes \
40 ac_cv_func_sem_open=yes \
41 apr_cv_process_shared_works=yes \
42 apr_cv_mutex_robust_shared=yes \
43 "
39# Also suppress trying to use sctp. 44# Also suppress trying to use sctp.
40# 45#
41CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no" 46CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
42 47
43CACHED_CONFIGUREVARS += "ac_cv_sizeof_struct_iovec=yes" 48# ac_cv_sizeof_struct_iovec is deduced using runtime check which will fail during cross-compile
49CACHED_CONFIGUREVARS += "${@['ac_cv_sizeof_struct_iovec=16','ac_cv_sizeof_struct_iovec=8'][d.getVar('SITEINFO_BITS') != '32']}"
50
44CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes" 51CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes"
45 52
53CACHED_CONFIGUREVARS:append:libc-musl = " ac_cv_strerror_r_rc_int=yes"
46PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" 54PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
55PACKAGECONFIG:append:libc-musl = " xsi-strerror"
47PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," 56PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
48PACKAGECONFIG[timed-tests] = "--enable-timed-tests,--disable-timed-tests," 57PACKAGECONFIG[timed-tests] = "--enable-timed-tests,--disable-timed-tests,"
58PACKAGECONFIG[xsi-strerror] = "ac_cv_strerror_r_rc_int=yes,ac_cv_strerror_r_rc_int=no,"
49 59
50do_configure_prepend() { 60do_configure:prepend() {
51 # Avoid absolute paths for grep since it causes failures 61 # Avoid absolute paths for grep since it causes failures
52 # when using sstate between different hosts with different 62 # when using sstate between different hosts with different
53 # install paths for grep. 63 # install paths for grep.
@@ -61,24 +71,26 @@ do_configure_prepend() {
61MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apr-1-config \ 71MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apr-1-config \
62 ${PN}-dev:${datadir}/build-1/apr_rules.mk" 72 ${PN}-dev:${datadir}/build-1/apr_rules.mk"
63 73
64FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*" 74FILES:${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
65RDEPENDS_${PN}-dev += "bash" 75RDEPENDS:${PN}-dev += "bash libtool"
66 76
67RDEPENDS_${PN}-ptest += "libgcc" 77RDEPENDS:${PN}-ptest += "libgcc"
68 78
69#for some reason, build/libtool.m4 handled by buildconf still be overwritten 79#for some reason, build/libtool.m4 handled by buildconf still be overwritten
70#when autoconf, so handle it again. 80#when autoconf, so handle it again.
71do_configure_append() { 81do_configure:append() {
72 sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4 82 sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4
73 sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk 83 sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk
74} 84}
75 85
76do_install_append() { 86do_install:append() {
77 oe_multilib_header apr.h 87 oe_multilib_header apr.h
78 install -d ${D}${datadir}/apr 88 install -d ${D}${datadir}/apr
79} 89}
80 90
81do_install_append_class-target() { 91do_install:append:class-target() {
92 rm -f ${D}${datadir}/build-1/libtool
93 sed -i s,LIBTOOL=.*,LIBTOOL=libtool,g ${D}${datadir}/build-1/apr_rules.mk
82 sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \ 94 sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \
83 -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk 95 -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
84 sed -i -e 's,${STAGING_DIR_HOST},,g' \ 96 sed -i -e 's,${STAGING_DIR_HOST},,g' \
@@ -96,12 +108,12 @@ apr_sysroot_preprocess () {
96 cp ${S}/build/apr_rules.mk $d/ 108 cp ${S}/build/apr_rules.mk $d/
97 sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk 109 sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
98 sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk 110 sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
99 sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk 111 sed -i s,LIBTOOL=.*,LIBTOOL=libtool,g $d/apr_rules.mk
100 sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk 112 sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
101 cp ${S}/build/mkdir.sh $d/ 113 cp ${S}/build/mkdir.sh $d/
102 cp ${S}/build/make_exports.awk $d/ 114 cp ${S}/build/make_exports.awk $d/
103 cp ${S}/build/make_var_export.awk $d/ 115 cp ${S}/build/make_var_export.awk $d/
104 cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool 116 cp ${S}/libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
105} 117}
106 118
107do_compile_ptest() { 119do_compile_ptest() {
@@ -122,4 +134,4 @@ do_install_ptest() {
122 cp ${S}/test/tryread $t/ 134 cp ${S}/test/tryread $t/
123} 135}
124 136
125export CONFIG_SHELL="/bin/bash" 137export CONFIG_SHELL = "/bin/bash"