From bbd55fce38f1036db52e594c2b49e3ff7899c479 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 30 May 2023 19:11:49 +0200 Subject: [PATCH] try fixing patch --- 8.2/sid/cli/Dockerfile | 3 +++ latomic.patch | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 latomic.patch diff --git a/8.2/sid/cli/Dockerfile b/8.2/sid/cli/Dockerfile index b2581c58..4152131e 100644 --- a/8.2/sid/cli/Dockerfile +++ b/8.2/sid/cli/Dockerfile @@ -96,6 +96,7 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false COPY docker-php-source /usr/local/bin/ +COPY latomic.patch / RUN set -eux; \ \ @@ -126,6 +127,8 @@ RUN set -eux; \ if [ ! -d /usr/include/curl ]; then \ ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \ fi; \ + patch -p1 < /latomic.patch; \ + rm /latomic.patch; \ ./configure \ --build="$gnuArch" \ --with-config-file-path="$PHP_INI_DIR" \ diff --git a/latomic.patch b/latomic.patch new file mode 100644 index 00000000..c1f4886b --- /dev/null +++ b/latomic.patch @@ -0,0 +1,21 @@ +diff --git a/configure.ac b/configure.ac +index fcb6297238..0a475ed80f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -373,6 +373,16 @@ if test "$ac_cv_func_dlopen" = "yes"; then + fi + AC_CHECK_LIB(m, sin) + ++case $host_alias in ++ riscv64*) ++ AC_CHECK_LIB(atomic, __atomic_exchange_1, [ ++ PHP_ADD_LIBRARY(atomic) ++ ], [ ++ AC_MSG_ERROR([Problem with enabling atomic. Please check config.log for details.]) ++ ]) ++ ;; ++esac ++ + dnl Check for inet_aton in -lc, -lbind and -lresolv. + PHP_CHECK_FUNC(inet_aton, resolv, bind) +