Index: contrib/libc++/src/experimental/filesystem/operations.cpp =================================================================== --- contrib/libc++/src/experimental/filesystem/operations.cpp +++ contrib/libc++/src/experimental/filesystem/operations.cpp @@ -548,7 +548,7 @@ constexpr auto max_time_t = numeric_limits::max(); constexpr auto min_time_t = numeric_limits::min(); -#if !defined(__LP64__) && defined(__clang__) +#if !defined(TIME_T_64BIT) && defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare" #endif @@ -565,7 +565,7 @@ } } #ifndef _LIBCPP_HAS_NO_CXX14_CONSTEXPR -#if defined(__LP64__) +#if defined(TIME_T_64BIT) static_assert(is_representable({max_seconds, max_nsec}), ""); static_assert(!is_representable({max_seconds + 1, 0}), ""); static_assert(!is_representable({max_seconds, max_nsec + 1}), ""); @@ -596,7 +596,7 @@ return secs.count() >= TLim::min(); } #ifndef _LIBCPP_HAS_NO_CXX14_CONSTEXPR -#if defined(__LP64__) +#if defined(TIME_T_64BIT) static_assert(is_representable(file_time_type::max()), ""); static_assert(is_representable(file_time_type::min()), ""); #else @@ -622,7 +622,7 @@ } } #ifndef _LIBCPP_HAS_NO_CXX14_CONSTEXPR -#if defined(__LP64__) +#if defined(TIME_T_64BIT) static_assert(convert_timespec({max_seconds, max_nsec}) == file_time_type::max(), ""); static_assert(convert_timespec({max_seconds, max_nsec - 1}) < file_time_type::max(), ""); static_assert(convert_timespec({max_seconds - 1, 999999999}) < file_time_type::max(), ""); @@ -634,7 +634,7 @@ #endif #endif -#if !defined(__LP64__) && defined(__clang__) +#if !defined(TIME_T_64BIT) && defined(__clang__) #pragma clang diagnostic pop #endif Index: lib/Makefile =================================================================== --- lib/Makefile +++ lib/Makefile @@ -156,10 +156,7 @@ .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt -_libcplusplus= libc++ -.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" -_libcplusplus+= libc++experimental -.endif +_libcplusplus= libc++ libc++experimental .endif SUBDIR.${MK_EFI}+= libefivar Index: lib/libc++experimental/Makefile =================================================================== --- lib/libc++experimental/Makefile +++ lib/libc++experimental/Makefile @@ -23,6 +23,9 @@ CXXFLAGS+= -nostdlib CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY CXXFLAGS+= -DLIBCXXRT +.if ${MACHINE_CPUARCH} != "i386" +CXXFLAGS+= -DTIME_T_64BIT +.endif .if empty(CXXFLAGS:M-std=*) CXXFLAGS+= -std=c++14 .endif