mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 10:38:53 +08:00
Fix Dockerfile.android build failure
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
MAINTAINER Tatsuhiro Tsujikawa
|
MAINTAINER Tatsuhiro Tsujikawa
|
||||||
|
|
||||||
ENV NDK_VERSION r25b
|
ENV NDK_VERSION r26d
|
||||||
ENV NDK /root/android-ndk-$NDK_VERSION
|
ENV NDK /root/android-ndk-$NDK_VERSION
|
||||||
ENV TOOLCHAIN $NDK/toolchains/llvm/prebuilt/linux-x86_64
|
ENV TOOLCHAIN $NDK/toolchains/llvm/prebuilt/linux-x86_64
|
||||||
ENV TARGET aarch64-linux-android
|
ENV TARGET aarch64-linux-android
|
||||||
@@ -42,9 +42,9 @@ RUN curl -L -O https://dl.google.com/android/repository/android-ndk-$NDK_VERSION
|
|||||||
rm android-ndk-$NDK_VERSION-linux.zip
|
rm android-ndk-$NDK_VERSION-linux.zip
|
||||||
|
|
||||||
# Setup version of libraries
|
# Setup version of libraries
|
||||||
ENV OPENSSL_VERSION 1.1.1q
|
ENV OPENSSL_VERSION 1.1.1w
|
||||||
ENV LIBEV_VERSION 4.33
|
ENV LIBEV_VERSION 4.33
|
||||||
ENV ZLIB_VERSION 1.2.13
|
ENV ZLIB_VERSION 1.3.1
|
||||||
ENV CARES_VERSION 1.18.1
|
ENV CARES_VERSION 1.18.1
|
||||||
ENV NGHTTP2_VERSION master
|
ENV NGHTTP2_VERSION master
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ RUN ./configure \
|
|||||||
make install
|
make install
|
||||||
|
|
||||||
WORKDIR /root/build
|
WORKDIR /root/build
|
||||||
RUN curl -L -O https://zlib.net/zlib-$ZLIB_VERSION.tar.gz && \
|
RUN curl -L -O https://github.com/madler/zlib/releases/download/v$ZLIB_VERSION/zlib-$ZLIB_VERSION.tar.gz && \
|
||||||
tar xf zlib-$ZLIB_VERSION.tar.gz && \
|
tar xf zlib-$ZLIB_VERSION.tar.gz && \
|
||||||
rm zlib-$ZLIB_VERSION.tar.gz
|
rm zlib-$ZLIB_VERSION.tar.gz
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ RUN HOST=$TARGET \
|
|||||||
|
|
||||||
|
|
||||||
WORKDIR /root/build
|
WORKDIR /root/build
|
||||||
RUN curl -L -O https://c-ares.haxx.se/download/c-ares-$CARES_VERSION.tar.gz && \
|
RUN curl -L -O https://github.com/c-ares/c-ares/releases/download/cares-1_18_1/c-ares-$CARES_VERSION.tar.gz && \
|
||||||
tar xf c-ares-$CARES_VERSION.tar.gz && \
|
tar xf c-ares-$CARES_VERSION.tar.gz && \
|
||||||
rm c-ares-$CARES_VERSION.tar.gz
|
rm c-ares-$CARES_VERSION.tar.gz
|
||||||
|
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ case "$host_os" in
|
|||||||
*android*)
|
*android*)
|
||||||
android_build=yes
|
android_build=yes
|
||||||
# android does not need -pthread, but needs following 2 libs for C++
|
# android does not need -pthread, but needs following 2 libs for C++
|
||||||
APPLDFLAGS="$APPLDFLAGS -lstdc++ -latomic"
|
APPLDFLAGS="$APPLDFLAGS -latomic"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
PTHREAD_LDFLAGS="-pthread"
|
PTHREAD_LDFLAGS="-pthread"
|
||||||
|
|||||||
@@ -444,19 +444,19 @@ inline constexpr bool operator==(const StringRef &lhs,
|
|||||||
std::equal(std::begin(lhs), std::end(lhs), std::begin(rhs));
|
std::equal(std::begin(lhs), std::end(lhs), std::begin(rhs));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __APPLE__
|
#if !defined(__APPLE__) && !defined(_LIBCPP_VERSION)
|
||||||
inline constexpr std::strong_ordering
|
inline constexpr std::strong_ordering
|
||||||
operator<=>(const StringRef &lhs, const StringRef &rhs) noexcept {
|
operator<=>(const StringRef &lhs, const StringRef &rhs) noexcept {
|
||||||
return std::lexicographical_compare_three_way(std::begin(lhs), std::end(lhs),
|
return std::lexicographical_compare_three_way(std::begin(lhs), std::end(lhs),
|
||||||
std::begin(rhs), std::end(rhs));
|
std::begin(rhs), std::end(rhs));
|
||||||
}
|
}
|
||||||
#else // __APPLE__
|
#else // __APPLE__ || _LIBCPP_VERSION
|
||||||
inline constexpr bool operator<(const StringRef &lhs,
|
inline constexpr bool operator<(const StringRef &lhs,
|
||||||
const StringRef &rhs) noexcept {
|
const StringRef &rhs) noexcept {
|
||||||
return std::lexicographical_compare(std::begin(lhs), std::end(lhs),
|
return std::lexicographical_compare(std::begin(lhs), std::end(lhs),
|
||||||
std::begin(rhs), std::end(rhs));
|
std::begin(rhs), std::end(rhs));
|
||||||
}
|
}
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__ || _LIBCPP_VERSION
|
||||||
|
|
||||||
inline std::ostream &operator<<(std::ostream &o, const StringRef &s) {
|
inline std::ostream &operator<<(std::ostream &o, const StringRef &s) {
|
||||||
return o.write(s.data(), s.size());
|
return o.write(s.data(), s.size());
|
||||||
|
|||||||
Reference in New Issue
Block a user