diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-01-03 18:31:01 -0800 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2020-01-05 19:36:45 +0100 |
commit | c84a3458aaee23b6cc6a6ace039596dccb6b7a12 (patch) | |
tree | 6b6e3b0442f17950f3a7b68c2e20e54b1646f659 /package/libs | |
parent | 9a3b10b449a38f88def3a9ccbfcadea111338346 (diff) | |
download | upstream-c84a3458aaee23b6cc6a6ace039596dccb6b7a12.tar.gz upstream-c84a3458aaee23b6cc6a6ace039596dccb6b7a12.tar.bz2 upstream-c84a3458aaee23b6cc6a6ace039596dccb6b7a12.zip |
libcxx: Remove -flto from LDFLAGS
It seems the buildbots can't handle it.
Added a cmake option to find the cxxabi files as they are part of the
toolchain and not in the normal path. It doesn't seem to make a
difference, just gets rid of cmake warnings.
Added another small GCC warning fix. It's fairly minor.
This has no change in compiled size, and most likely no change in
behavior. Bumped the PKG_RELEASE anyway.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'package/libs')
-rw-r--r-- | package/libs/libcxx/Makefile | 6 | ||||
-rw-r--r-- | package/libs/libcxx/patches/010-cxx17.patch | 2 | ||||
-rw-r--r-- | package/libs/libcxx/patches/020-fixes.patch | 13 |
3 files changed, 17 insertions, 4 deletions
diff --git a/package/libs/libcxx/Makefile b/package/libs/libcxx/Makefile index 1d8e502221..53b7f1eaab 100644 --- a/package/libs/libcxx/Makefile +++ b/package/libs/libcxx/Makefile @@ -1,3 +1,4 @@ + # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libcxx PKG_VERSION:=9.0.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://git.llvm.org/git/libcxx @@ -38,6 +39,7 @@ endef CMAKE_OPTIONS += \ -DLIBCXX_CXX_ABI="libsupc++" \ + -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/include/c++/$(CONFIG_GCC_VERSION);$(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/include/c++/$(CONFIG_GCC_VERSION)/$(REAL_GNU_TARGET_NAME)" \ -DLIBCXX_ENABLE_ASSERTIONS=OFF \ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \ -DLIBCXX_INCLUDE_BENCHMARKS=OFF \ @@ -47,7 +49,7 @@ CMAKE_OPTIONS += \ -DLIBCXX_HAS_MUSL_LIBC=$(if $(CONFIG_USE_MUSL),ON,OFF) TARGET_CXXFLAGS += -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -Wno-attributes -flto -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -flto=jobserver +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed define Build/InstallDev $(call Build/InstallDev/cmake,$(1)) diff --git a/package/libs/libcxx/patches/010-cxx17.patch b/package/libs/libcxx/patches/010-cxx17.patch index c313c47611..dceec9d4f3 100644 --- a/package/libs/libcxx/patches/010-cxx17.patch +++ b/package/libs/libcxx/patches/010-cxx17.patch @@ -1,6 +1,6 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -524,9 +524,9 @@ remove_flags(-Wno-pedantic -pedantic-errors -pedantic) +@@ -524,9 +524,9 @@ remove_flags(-Wno-pedantic -pedantic-err if (LIBCXX_HAS_MUSL_LIBC OR LIBCXX_TARGETING_CLANG_CL) # musl's pthread implementations uses volatile types in their structs which is # not a constexpr in C++11 but is in C++14, so we use C++14 with musl. diff --git a/package/libs/libcxx/patches/020-fixes.patch b/package/libs/libcxx/patches/020-fixes.patch index abc630d42f..22ac494c04 100644 --- a/package/libs/libcxx/patches/020-fixes.patch +++ b/package/libs/libcxx/patches/020-fixes.patch @@ -1,6 +1,17 @@ +--- a/include/cmath ++++ b/include/cmath +@@ -615,7 +615,7 @@ _Fp __lerp(_Fp __a, _Fp __b, _Fp __t) no + + if (__t == 1) return __b; + const _Fp __x = __a + __t * (__b - __a); +- if (__t > 1 == __b > __a) ++ if ((__t > 1) == (__b > __a)) + return __b < __x ? __x : __b; + else + return __x < __b ? __x : __b; --- a/include/memory +++ b/include/memory -@@ -1696,7 +1696,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits +@@ -1696,7 +1696,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_tr ptrdiff_t _Np = __end1 - __begin1; __end2 -= _Np; if (_Np > 0) |