diff options
author | Andy Postnikov <apostnikov@gmail.com> | 2022-01-25 12:30:29 +0200 |
---|---|---|
committer | Andy Postnikov <apostnikov@gmail.com> | 2022-01-25 12:36:52 +0200 |
commit | 2cd4f30e8cccf1267795f30a3609fa916b525791 (patch) | |
tree | 1d063076b38496410111f1129e23126717f9d3a3 | |
parent | 5086da7d4cbb981331ef19628948513d3ac839ad (diff) | |
download | aports-2cd4f30e8cccf1267795f30a3609fa916b525791.tar.gz aports-2cd4f30e8cccf1267795f30a3609fa916b525791.tar.bz2 aports-2cd4f30e8cccf1267795f30a3609fa916b525791.tar.xz |
community/php7: add patch to build LSAPI on riscv64
-rw-r--r-- | community/php7/APKBUILD | 7 | ||||
-rw-r--r-- | community/php7/atomic-lsapi.patch | 82 |
2 files changed, 86 insertions, 3 deletions
diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD index fef376512a..305754cfda 100644 --- a/community/php7/APKBUILD +++ b/community/php7/APKBUILD @@ -26,7 +26,7 @@ pkgname=php7 _pkgreal=php pkgver=7.4.27 -pkgrel=0 +pkgrel=1 _apiver=20190902 _suffix=${pkgname#php} # Is this package the default (latest) PHP version? @@ -101,6 +101,7 @@ source="https://php.net/distributions/$_pkgreal-$pkgver.tar.xz enchant-2.patch xfail-openssl-1.1-test.patch fix-test.patch + atomic-lsapi.patch " builddir="$srcdir/$_pkgreal-$pkgver" @@ -174,8 +175,7 @@ for _ext in $_extensions; do done subpackages="$subpackages $pkgname-common::noarch" -# see https://gitlab.alpinelinux.org/alpine/aports/-/issues/12775 -[ "$CARCH" != "riscv64" ] && subpackages="$subpackages $pkgname-litespeed" +subpackages="$subpackages $pkgname-litespeed" # secfixes: # 7.4.26-r0: @@ -699,4 +699,5 @@ ebf571c5e595221b9944d7e840807ebb68c1be38bf117186e19a3bd1070310ece5918bcaa5f94167 7c8c3cac9efce81d525cb5a70e1402e393881b83ef4c7b5d39d3565803d21cd283daf3d74e9a8b059ecac66cf339756acc63608ffcb83d960dba86583bd45108 enchant-2.patch 996b9a542858b0385a300265194afc57eddb72b9d7e4dcdf63b4f1ba7d3588e67309030acc73f00af1717168becd50b1d3582fcb88605e9892fd683a33cae023 xfail-openssl-1.1-test.patch d2b96ccf6939e6fc1cf6159b96dcabcd24c90f6bc2a4dcbe5c1607eb97b4ca7587cd7ca5fb43594fe9032a99799c572dacc9d6857d9985c680fd5ba6b2104e70 fix-test.patch +465b38c089d938a4a072b2eff3edaf928455bf873f5eeb65ff3bee9614f5f45c70f285abb50809c2e2d9d259395acae38bd649860ca3b8d65e43447082a51552 atomic-lsapi.patch " diff --git a/community/php7/atomic-lsapi.patch b/community/php7/atomic-lsapi.patch new file mode 100644 index 0000000000..39cf1823f0 --- /dev/null +++ b/community/php7/atomic-lsapi.patch @@ -0,0 +1,82 @@ +Patch-Source: https://github.com/php/php-src/pull/7997 + +diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c +index 2208bbd47b..42dd320356 100644 +--- a/sapi/litespeed/lsapilib.c ++++ b/sapi/litespeed/lsapilib.c +@@ -443,7 +443,7 @@ static void lsapi_close_connection(LSAPI_Request *pReq) + if (s_busy_workers) + __sync_fetch_and_sub(s_busy_workers, 1); + if (s_worker_status) +- __sync_lock_test_and_set(&s_worker_status->m_state, LSAPI_STATE_IDLE); ++ __atomic_test_and_set(&s_worker_status->m_state, LSAPI_STATE_IDLE); + } + + +@@ -1587,7 +1587,7 @@ int LSAPI_Accept_r( LSAPI_Request * pReq ) + else + { + if (s_worker_status) +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_CONNECTED); + if (s_busy_workers) + __sync_fetch_and_add(s_busy_workers, 1); +@@ -3315,7 +3315,7 @@ static int lsapi_prefork_server_accept( lsapi_prefork_server * pServer, + if (pthread_atfork_func) + (*pthread_atfork_func)(NULL, NULL, set_skip_write); + +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_CONNECTED); + if (s_busy_workers) + __sync_add_and_fetch(s_busy_workers, 1); +@@ -3402,7 +3402,7 @@ int LSAPI_Postfork_Child(LSAPI_Request * pReq) + if (pthread_atfork_func) + (*pthread_atfork_func)(NULL, NULL, set_skip_write); + +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_CONNECTED); + if (s_busy_workers) + __sync_add_and_fetch(s_busy_workers, 1); +@@ -3651,7 +3651,7 @@ int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq ) + if (fd == pReq->m_fdListen) + { + if (s_worker_status) +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_ACCEPTING); + if (s_accepting_workers) + __sync_fetch_and_add(s_accepting_workers, 1); +@@ -3662,7 +3662,7 @@ int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq ) + if (s_accepting_workers) + __sync_fetch_and_sub(s_accepting_workers, 1); + if (s_worker_status) +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_IDLE); + } + +@@ -3711,7 +3711,7 @@ int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq ) + if ( pReq->m_fd != -1 ) + { + if (s_worker_status) +- __sync_lock_test_and_set(&s_worker_status->m_state, ++ __atomic_test_and_set(&s_worker_status->m_state, + LSAPI_STATE_CONNECTED); + if (s_busy_workers) + __sync_fetch_and_add(s_busy_workers, 1); +diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c +index 42dd320356..0932ebaaa8 100644 +--- a/sapi/litespeed/lsapilib.c ++++ b/sapi/litespeed/lsapilib.c +@@ -3390,7 +3390,7 @@ int LSAPI_Postfork_Child(LSAPI_Request * pReq) + { + int max_children = g_prefork_server->m_iMaxChildren; + s_pid = getpid(); +- __sync_lock_test_and_set(&pReq->child_status->m_pid, s_pid); ++ __atomic_test_and_set(&pReq->child_status->m_pid, s_pid); + s_worker_status = pReq->child_status; + + setsid(); |