diff options
Diffstat (limited to 'meta/recipes-support/apr')
-rw-r--r-- | meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch | 135 | ||||
-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) | 8 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch | 20 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch | 58 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch | 25 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch | 63 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch | 76 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr/libtoolize_check.patch | 21 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr_1.7.2.bb (renamed from meta/recipes-support/apr/apr_1.7.0.bb) | 31 |
9 files changed, 122 insertions, 315 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 @@ | |||
1 | From 6b638fa9afbeb54dfa19378e391465a5284ce1ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Wed, 12 Sep 2018 17:16:36 +0800 | ||
4 | Subject: [PATCH] Fix error handling in gdbm | ||
5 | |||
6 | Only check for gdbm_errno if the return value of the called gdbm_* | ||
7 | function says so. This fixes apr-util with gdbm 1.14, which does not | ||
8 | seem to always reset gdbm_errno. | ||
9 | |||
10 | Also make the gdbm driver return error codes starting with | ||
11 | APR_OS_START_USEERR instead of always returning APR_EGENERAL. This is | ||
12 | what the berkleydb driver already does. | ||
13 | |||
14 | Also ensure that dsize is 0 if dptr == NULL. | ||
15 | |||
16 | Upstream-Status: Backport[https://svn.apache.org/viewvc? | ||
17 | view=revision&revision=1825311] | ||
18 | |||
19 | Signed-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 | |||
24 | diff --git a/dbm/apr_dbm_gdbm.c b/dbm/apr_dbm_gdbm.c | ||
25 | index 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 | -- | ||
134 | 2.7.4 | ||
135 | |||
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 f7d827a1d8..3d9d619c7b 100644 --- a/meta/recipes-support/apr/apr-util_1.6.1.bb +++ b/meta/recipes-support/apr/apr-util_1.6.3.bb | |||
@@ -13,11 +13,9 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \ | |||
13 | file://configfix.patch \ | 13 | file://configfix.patch \ |
14 | file://configure_fixes.patch \ | 14 | file://configure_fixes.patch \ |
15 | file://run-ptest \ | 15 | file://run-ptest \ |
16 | file://0001-Fix-error-handling-in-gdbm.patch \ | 16 | " |
17 | " | ||
18 | 17 | ||
19 | SRC_URI[md5sum] = "bd502b9a8670a8012c4d90c31a84955f" | 18 | SRC_URI[sha256sum] = "2b74d8932703826862ca305b094eef2983c27b39d5c9414442e9976a9acf1983" |
20 | SRC_URI[sha256sum] = "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459" | ||
21 | 19 | ||
22 | EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ | 20 | EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ |
23 | --without-odbc \ | 21 | --without-odbc \ |
@@ -35,6 +33,7 @@ OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" | |||
35 | do_configure_append() { | 33 | do_configure_append() { |
36 | if [ "${CLASSOVERRIDE}" = "class-target" ]; then | 34 | if [ "${CLASSOVERRIDE}" = "class-target" ]; then |
37 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk | 35 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk |
36 | sed -i -e 's#^CFLAGS=.*#CFLAGS=${TARGET_CFLAGS}#g' ${B}/build/rules.mk | ||
38 | fi | 37 | fi |
39 | } | 38 | } |
40 | do_configure_prepend_class-native() { | 39 | do_configure_prepend_class-native() { |
@@ -49,6 +48,7 @@ do_configure_append_class-native() { | |||
49 | 48 | ||
50 | do_configure_prepend_class-nativesdk() { | 49 | do_configure_prepend_class-nativesdk() { |
51 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk | 50 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk |
51 | sed -i -e 's#^CFLAGS=.*#CFLAGS=${TARGET_CFLAGS}#g' ${S}/build/rules.mk | ||
52 | } | 52 | } |
53 | 53 | ||
54 | do_configure_append_class-nativesdk() { | 54 | do_configure_append_class-nativesdk() { |
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..a274f3a16e 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,14 +1,15 @@ | |||
1 | From 2bbe20b4f69e84e7a18bc79d382486953f479328 Mon Sep 17 00:00:00 2001 | 1 | From 225abf37cd0b49960664b59f08e515a4c4ea5ad0 Mon Sep 17 00:00:00 2001 |
2 | From: Jeremy Puhlman <jpuhlman@mvista.com> | 2 | From: Jeremy Puhlman <jpuhlman@mvista.com> |
3 | Date: Thu, 26 Mar 2020 18:30:36 +0000 | 3 | Date: Thu, 26 Mar 2020 18:30:36 +0000 |
4 | Subject: [PATCH] Add option to disable timed dependant tests | 4 | Subject: [PATCH] Add option to disable timed dependant tests |
5 | 5 | ||
6 | The disabled tests rely on timing to pass correctly. On a virtualized | 6 | The disabled tests rely on timing to pass correctly. On a virtualized |
7 | system under heavy load, these tests randomly fail because they miss | 7 | system under heavy load, these tests randomly fail because they miss |
8 | a timer or other timing related issues. | 8 | a timer or other timing related issues. |
9 | 9 | ||
10 | Upstream-Status: Pending | 10 | Upstream-Status: Pending |
11 | Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> | 11 | Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> |
12 | |||
12 | --- | 13 | --- |
13 | configure.in | 6 ++++++ | 14 | configure.in | 6 ++++++ |
14 | include/apr.h.in | 1 + | 15 | include/apr.h.in | 1 + |
@@ -16,10 +17,10 @@ Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> | |||
16 | 3 files changed, 9 insertions(+), 2 deletions(-) | 17 | 3 files changed, 9 insertions(+), 2 deletions(-) |
17 | 18 | ||
18 | diff --git a/configure.in b/configure.in | 19 | diff --git a/configure.in b/configure.in |
19 | index d9f32d6..f0c5661 100644 | 20 | index bfd488b..3663220 100644 |
20 | --- a/configure.in | 21 | --- a/configure.in |
21 | +++ b/configure.in | 22 | +++ b/configure.in |
22 | @@ -2886,6 +2886,12 @@ AC_ARG_ENABLE(timedlocks, | 23 | @@ -3023,6 +3023,12 @@ AC_ARG_ENABLE(timedlocks, |
23 | ) | 24 | ) |
24 | AC_SUBST(apr_has_timedlocks) | 25 | AC_SUBST(apr_has_timedlocks) |
25 | 26 | ||
@@ -45,10 +46,10 @@ index ee99def..c46a5f4 100644 | |||
45 | #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@ | 46 | #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@ |
46 | 47 | ||
47 | diff --git a/test/testlock.c b/test/testlock.c | 48 | diff --git a/test/testlock.c b/test/testlock.c |
48 | index a43f477..6233d0b 100644 | 49 | index e3437c1..04e01b9 100644 |
49 | --- a/test/testlock.c | 50 | --- a/test/testlock.c |
50 | +++ b/test/testlock.c | 51 | +++ b/test/testlock.c |
51 | @@ -396,13 +396,13 @@ abts_suite *testlock(abts_suite *suite) | 52 | @@ -535,7 +535,7 @@ abts_suite *testlock(abts_suite *suite) |
52 | abts_run_test(suite, threads_not_impl, NULL); | 53 | abts_run_test(suite, threads_not_impl, NULL); |
53 | #else | 54 | #else |
54 | abts_run_test(suite, test_thread_mutex, NULL); | 55 | abts_run_test(suite, test_thread_mutex, NULL); |
@@ -56,6 +57,8 @@ index a43f477..6233d0b 100644 | |||
56 | +#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS | 57 | +#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS |
57 | abts_run_test(suite, test_thread_timedmutex, NULL); | 58 | abts_run_test(suite, test_thread_timedmutex, NULL); |
58 | #endif | 59 | #endif |
60 | abts_run_test(suite, test_thread_nestedmutex, NULL); | ||
61 | @@ -543,7 +543,7 @@ abts_suite *testlock(abts_suite *suite) | ||
59 | abts_run_test(suite, test_thread_rwlock, NULL); | 62 | abts_run_test(suite, test_thread_rwlock, NULL); |
60 | abts_run_test(suite, test_cond, NULL); | 63 | abts_run_test(suite, test_cond, NULL); |
61 | abts_run_test(suite, test_timeoutcond, NULL); | 64 | abts_run_test(suite, test_timeoutcond, NULL); |
@@ -63,7 +66,4 @@ index a43f477..6233d0b 100644 | |||
63 | +#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS | 66 | +#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS |
64 | abts_run_test(suite, test_timeoutmutex, NULL); | 67 | abts_run_test(suite, test_timeoutmutex, NULL); |
65 | #endif | 68 | #endif |
66 | #endif | 69 | #ifdef WIN32 |
67 | -- | ||
68 | 2.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..a78b16284f --- /dev/null +++ b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 316b81c462f065927d7fec56aadd5c8cb94d1cf0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 26 Aug 2022 00:28:08 -0700 | ||
4 | Subject: [PATCH] configure: Remove runtime test for mmap that can map | ||
5 | /dev/zero | ||
6 | |||
7 | This never works for cross-compile moreover it ends up disabling | ||
8 | ac_cv_file__dev_zero which then results in compiler errors in shared | ||
9 | mutexes | ||
10 | |||
11 | Upstream-Status: Inappropriate [Cross-compile specific] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | |||
14 | --- | ||
15 | configure.in | 30 ------------------------------ | ||
16 | 1 file changed, 30 deletions(-) | ||
17 | |||
18 | diff --git a/configure.in b/configure.in | ||
19 | index 3663220..dce9789 100644 | ||
20 | --- a/configure.in | ||
21 | +++ b/configure.in | ||
22 | @@ -1303,36 +1303,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \ | ||
23 | APR_CHECK_DEFINE(MAP_ANON, sys/mman.h) | ||
24 | AC_CHECK_FILE(/dev/zero) | ||
25 | |||
26 | -# Not all systems can mmap /dev/zero (such as HP-UX). Check for that. | ||
27 | -if test "$ac_cv_func_mmap" = "yes" && | ||
28 | - test "$ac_cv_file__dev_zero" = "yes"; then | ||
29 | - AC_CACHE_CHECK([for mmap that can map /dev/zero], | ||
30 | - [ac_cv_mmap__dev_zero], | ||
31 | - [AC_TRY_RUN([#include <sys/types.h> | ||
32 | -#include <sys/stat.h> | ||
33 | -#include <fcntl.h> | ||
34 | -#ifdef HAVE_SYS_MMAN_H | ||
35 | -#include <sys/mman.h> | ||
36 | -#endif | ||
37 | - int main() | ||
38 | - { | ||
39 | - int fd; | ||
40 | - void *m; | ||
41 | - fd = open("/dev/zero", O_RDWR); | ||
42 | - if (fd < 0) { | ||
43 | - return 1; | ||
44 | - } | ||
45 | - m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); | ||
46 | - if (m == (void *)-1) { /* aka MAP_FAILED */ | ||
47 | - return 2; | ||
48 | - } | ||
49 | - if (munmap(m, sizeof(void*)) < 0) { | ||
50 | - return 3; | ||
51 | - } | ||
52 | - return 0; | ||
53 | - }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])]) | ||
54 | -fi | ||
55 | - | ||
56 | # Now we determine which one is our anonymous shmem preference. | ||
57 | haveshmgetanon="0" | ||
58 | havemmapzero="0" | ||
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..d63423f3a1 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 @@ | |||
1 | From 5925b20da8bbc34d9bf5a5dca123ef38864d43c6 Mon Sep 17 00:00:00 2001 | 1 | From 689a8db96a6d1e1cae9cbfb35d05ac82140a6555 Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Tue, 30 Jan 2018 09:39:06 +0800 | 3 | Date: Tue, 30 Jan 2018 09:39:06 +0800 |
4 | Subject: [PATCH 2/7] apr: Remove workdir path references from installed apr | 4 | Subject: [PATCH] apr: Remove workdir path references from installed apr files |
5 | files | ||
6 | 5 | ||
7 | Upstream-Status: Inappropriate [configuration] | 6 | Upstream-Status: Inappropriate [configuration] |
8 | 7 | ||
@@ -14,20 +13,23 @@ packages at target run time, the workdir path caused confusion. | |||
14 | Rebase to 1.6.3 | 13 | Rebase to 1.6.3 |
15 | 14 | ||
16 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 15 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
16 | |||
17 | --- | 17 | --- |
18 | apr-config.in | 26 ++------------------------ | 18 | apr-config.in | 32 ++------------------------------ |
19 | 1 file changed, 2 insertions(+), 24 deletions(-) | 19 | 1 file changed, 2 insertions(+), 30 deletions(-) |
20 | 20 | ||
21 | diff --git a/apr-config.in b/apr-config.in | 21 | diff --git a/apr-config.in b/apr-config.in |
22 | index 84b4073..bbbf651 100644 | 22 | index bed47ca..47874e5 100644 |
23 | --- a/apr-config.in | 23 | --- a/apr-config.in |
24 | +++ b/apr-config.in | 24 | +++ b/apr-config.in |
25 | @@ -152,14 +152,7 @@ while test $# -gt 0; do | 25 | @@ -164,16 +164,7 @@ while test $# -gt 0; do |
26 | flags="$flags $LDFLAGS" | 26 | flags="$flags $LDFLAGS" |
27 | ;; | 27 | ;; |
28 | --includes) | 28 | --includes) |
29 | - if test "$location" = "installed"; then | 29 | - if test "$location" = "installed"; then |
30 | flags="$flags -I$includedir $EXTRA_INCLUDES" | 30 | flags="$flags -I$includedir $EXTRA_INCLUDES" |
31 | - elif test "$location" = "crosscompile"; then | ||
32 | - flags="$flags -I$APR_TARGET_DIR/$includedir $EXTRA_INCLUDES" | ||
31 | - elif test "$location" = "source"; then | 33 | - elif test "$location" = "source"; then |
32 | - flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES" | 34 | - flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES" |
33 | - else | 35 | - else |
@@ -37,13 +39,15 @@ index 84b4073..bbbf651 100644 | |||
37 | ;; | 39 | ;; |
38 | --srcdir) | 40 | --srcdir) |
39 | echo $APR_SOURCE_DIR | 41 | echo $APR_SOURCE_DIR |
40 | @@ -181,29 +174,14 @@ while test $# -gt 0; do | 42 | @@ -197,33 +188,14 @@ while test $# -gt 0; do |
41 | exit 0 | 43 | exit 0 |
42 | ;; | 44 | ;; |
43 | --link-ld) | 45 | --link-ld) |
44 | - if test "$location" = "installed"; then | 46 | - if test "$location" = "installed"; then |
45 | - ### avoid using -L if libdir is a "standard" location like /usr/lib | 47 | - ### avoid using -L if libdir is a "standard" location like /usr/lib |
46 | - flags="$flags -L$libdir -l${APR_LIBNAME}" | 48 | - flags="$flags -L$libdir -l${APR_LIBNAME}" |
49 | - elif test "$location" = "crosscompile"; then | ||
50 | - flags="$flags -L$APR_TARGET_DIR/$libdir -l${APR_LIBNAME}" | ||
47 | - else | 51 | - else |
48 | - ### this surely can't work since the library is in .libs? | 52 | - ### this surely can't work since the library is in .libs? |
49 | - flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}" | 53 | - flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}" |
@@ -62,6 +66,8 @@ index 84b4073..bbbf651 100644 | |||
62 | - # Since the user is specifying they are linking with libtool, we | 66 | - # Since the user is specifying they are linking with libtool, we |
63 | - # *know* that -R will be recognized by libtool. | 67 | - # *know* that -R will be recognized by libtool. |
64 | - flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}" | 68 | - flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}" |
69 | - elif test "$location" = "crosscompile"; then | ||
70 | - flags="$flags -L${APR_TARGET_DIR}/$libdir -l${APR_LIBNAME}" | ||
65 | - else | 71 | - else |
66 | - flags="$flags $LA_FILE" | 72 | - flags="$flags $LA_FILE" |
67 | - fi | 73 | - fi |
@@ -69,6 +75,3 @@ index 84b4073..bbbf651 100644 | |||
69 | ;; | 75 | ;; |
70 | --shlib-path-var) | 76 | --shlib-path-var) |
71 | echo "$SHLIBPATH_VAR" | 77 | echo "$SHLIBPATH_VAR" |
72 | -- | ||
73 | 1.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 @@ | |||
1 | From d5028c10f156c224475b340cfb1ba025d6797243 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 2 Feb 2018 15:51:42 +0800 | ||
4 | Subject: [PATCH 3/7] Makefile.in/configure.in: support cross compiling | ||
5 | |||
6 | While cross compiling, the tools/gen_test_char could not | ||
7 | be executed at build time, use AX_PROG_CC_FOR_BUILD to | ||
8 | build native tools/gen_test_char | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/apache/apr/pull/8] | ||
11 | |||
12 | Signed-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 | |||
18 | diff --git a/Makefile.in b/Makefile.in | ||
19 | index 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 | ||
47 | diff --git a/configure.in b/configure.in | ||
48 | index 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 | -- | ||
62 | 1.8.3.1 | ||
63 | |||
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 @@ | |||
1 | From 49661ea3858cf8494926cccf57d3e8c6dcb47117 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dengke Du <dengke.du@windriver.com> | ||
3 | Date: Wed, 14 Dec 2016 18:13:08 +0800 | ||
4 | Subject: [PATCH] apr: fix off_t size doesn't match in glibc when cross | ||
5 | compiling | ||
6 | |||
7 | In configure.in, it contains the following: | ||
8 | |||
9 | APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8) | ||
10 | |||
11 | the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4, | ||
12 | it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross | ||
13 | compiling enable. | ||
14 | |||
15 | So it was hardcoded for cross compiling, we should detect it dynamic based on | ||
16 | the sysroot's glibc. We change it to the following: | ||
17 | |||
18 | AC_CHECK_SIZEOF(off_t) | ||
19 | |||
20 | The 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 | |||
27 | Change the above correspondingly. | ||
28 | |||
29 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
30 | |||
31 | Upstream-Status: Pending | ||
32 | |||
33 | --- | ||
34 | configure.in | 8 ++++---- | ||
35 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
36 | |||
37 | diff --git a/configure.in b/configure.in | ||
38 | index 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/libtoolize_check.patch b/meta/recipes-support/apr/apr/libtoolize_check.patch index 740792e6b0..80ce43caa4 100644 --- a/meta/recipes-support/apr/apr/libtoolize_check.patch +++ b/meta/recipes-support/apr/apr/libtoolize_check.patch | |||
@@ -1,6 +1,7 @@ | |||
1 | From 17835709bc55657b7af1f7c99b3f572b819cf97e Mon Sep 17 00:00:00 2001 | ||
1 | From: Helmut Grohne <helmut@subdivi.de> | 2 | From: Helmut Grohne <helmut@subdivi.de> |
2 | Subject: check for libtoolize rather than libtool | 3 | Date: Tue, 7 Feb 2023 07:04:00 +0000 |
3 | Last-Update: 2014-09-19 | 4 | Subject: [PATCH] check for libtoolize rather than libtool |
4 | 5 | ||
5 | libtool is now in package libtool-bin, but apr only needs libtoolize. | 6 | libtool is now in package libtool-bin, but apr only needs libtoolize. |
6 | 7 | ||
@@ -8,14 +9,22 @@ Upstream-Status: Pending [ from debian: https://sources.debian.org/data/main/a/a | |||
8 | 9 | ||
9 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | 10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
10 | 11 | ||
11 | --- apr.orig/build/buildcheck.sh | 12 | --- |
12 | +++ apr/build/buildcheck.sh | 13 | build/buildcheck.sh | 10 ++++------ |
13 | @@ -39,11 +39,11 @@ fi | 14 | 1 file changed, 4 insertions(+), 6 deletions(-) |
15 | |||
16 | diff --git a/build/buildcheck.sh b/build/buildcheck.sh | ||
17 | index 44921b5..08bc8a8 100755 | ||
18 | --- a/build/buildcheck.sh | ||
19 | +++ b/build/buildcheck.sh | ||
20 | @@ -39,13 +39,11 @@ fi | ||
14 | # ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a | 21 | # ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a |
15 | # output is multiline from 1.5 onwards | 22 | # output is multiline from 1.5 onwards |
16 | 23 | ||
17 | -# Require libtool 1.4 or newer | 24 | -# Require libtool 1.4 or newer |
18 | -libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14` | 25 | -if test -z "$libtool"; then |
26 | - libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14` | ||
27 | -fi | ||
19 | -lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` | 28 | -lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` |
20 | +# Require libtoolize 1.4 or newer | 29 | +# Require libtoolize 1.4 or newer |
21 | +libtoolize=`build/PrintPath glibtoolize1 glibtoolize libtoolize libtoolize15 libtoolize14` | 30 | +libtoolize=`build/PrintPath glibtoolize1 glibtoolize libtoolize libtoolize15 libtoolize14` |
diff --git a/meta/recipes-support/apr/apr_1.7.0.bb b/meta/recipes-support/apr/apr_1.7.2.bb index c9b9bf0f50..807dce21da 100644 --- a/meta/recipes-support/apr/apr_1.7.0.bb +++ b/meta/recipes-support/apr/apr_1.7.2.bb | |||
@@ -1,8 +1,8 @@ | |||
1 | SUMMARY = "Apache Portable Runtime (APR) library" | 1 | SUMMARY = "Apache Portable Runtime (APR) library" |
2 | DESCRIPTION = "The Apache Portable Runtime (APR) is a supporting library for the \ | 2 | |
3 | Apache web server. It provides a set of APIs that map to the underlying \ | 3 | DESCRIPTION = "Create and maintain software libraries that provide a predictable \ |
4 | operating system (OS). Where the OS does not support a particular function, \ | 4 | and consistent interface to underlying platform-specific implementations." |
5 | APR will provide an emulation." | 5 | |
6 | HOMEPAGE = "http://apr.apache.org/" | 6 | HOMEPAGE = "http://apr.apache.org/" |
7 | SECTION = "libs" | 7 | SECTION = "libs" |
8 | DEPENDS = "util-linux" | 8 | DEPENDS = "util-linux" |
@@ -16,17 +16,15 @@ BBCLASSEXTEND = "native nativesdk" | |||
16 | SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \ | 16 | SRC_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 \ | 21 | file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \ |
24 | file://libtoolize_check.patch \ | 22 | file://libtoolize_check.patch \ |
25 | file://0001-Add-option-to-disable-timed-dependant-tests.patch \ | 23 | file://0001-Add-option-to-disable-timed-dependant-tests.patch \ |
24 | file://0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch \ | ||
26 | " | 25 | " |
27 | 26 | ||
28 | SRC_URI[md5sum] = "7a14a83d664e87599ea25ff4432e48a7" | 27 | SRC_URI[sha256sum] = "75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e" |
29 | SRC_URI[sha256sum] = "e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea" | ||
30 | 28 | ||
31 | inherit autotools-brokensep lib_package binconfig multilib_header ptest multilib_script | 29 | inherit autotools-brokensep lib_package binconfig multilib_header ptest multilib_script |
32 | 30 | ||
@@ -34,17 +32,30 @@ OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" | |||
34 | 32 | ||
35 | # 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 |
36 | CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes" | 34 | CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes" |
37 | 35 | # Enable largefile | |
36 | CACHED_CONFIGUREVARS += "apr_cv_use_lfs64=yes" | ||
37 | # Additional AC_TRY_RUN tests which will need to be cached for cross compile | ||
38 | CACHED_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 | " | ||
38 | # Also suppress trying to use sctp. | 44 | # Also suppress trying to use sctp. |
39 | # | 45 | # |
40 | CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no" | 46 | CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no" |
41 | 47 | ||
42 | CACHED_CONFIGUREVARS += "ac_cv_sizeof_struct_iovec=yes" | 48 | # ac_cv_sizeof_struct_iovec is deduced using runtime check which will fail during cross-compile |
49 | CACHED_CONFIGUREVARS += "${@['ac_cv_sizeof_struct_iovec=16','ac_cv_sizeof_struct_iovec=8'][d.getVar('SITEINFO_BITS') != '32']}" | ||
50 | |||
43 | CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes" | 51 | CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes" |
44 | 52 | ||
53 | CACHED_CONFIGUREVARS:append:libc-musl = " ac_cv_strerror_r_rc_int=yes" | ||
45 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | 54 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |
55 | PACKAGECONFIG:append:libc-musl = " xsi-strerror" | ||
46 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | 56 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
47 | PACKAGECONFIG[timed-tests] = "--enable-timed-tests,--disable-timed-tests," | 57 | PACKAGECONFIG[timed-tests] = "--enable-timed-tests,--disable-timed-tests," |
58 | PACKAGECONFIG[xsi-strerror] = "ac_cv_strerror_r_rc_int=yes,ac_cv_strerror_r_rc_int=no," | ||
48 | 59 | ||
49 | do_configure_prepend() { | 60 | do_configure_prepend() { |
50 | # Avoid absolute paths for grep since it causes failures | 61 | # Avoid absolute paths for grep since it causes failures |