libcxx: Add size optimizations
Changed standard to 2a. 2a (as well as 17) contain more constexpr functions, which are evaluated at compile time. This saves space. Added --gc-sections. With the CXXABI change, this now makes the package smaller. With these, size went down to 210845 on mipsel_24kc. Also fixed two small compiler warnings. No real change in behavior. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Jo-Philipp Wich
parent
1f8ab1c640
commit
9f7d36d1a9
24
package/libs/libcxx/patches/020-fixes.patch
Normal file
24
package/libs/libcxx/patches/020-fixes.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
--- a/include/memory
|
||||
+++ b/include/memory
|
||||
@@ -1696,7 +1696,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
|
||||
ptrdiff_t _Np = __end1 - __begin1;
|
||||
__end2 -= _Np;
|
||||
if (_Np > 0)
|
||||
- _VSTD::memcpy(__end2, __begin1, _Np * sizeof(_Tp));
|
||||
+ __end2 = __begin1;
|
||||
}
|
||||
|
||||
private:
|
||||
--- a/src/filesystem/filesystem_common.h
|
||||
+++ b/src/filesystem/filesystem_common.h
|
||||
@@ -197,8 +197,8 @@ private:
|
||||
using chrono::duration;
|
||||
using chrono::duration_cast;
|
||||
|
||||
-using TimeSpec = struct ::timespec;
|
||||
-using StatT = struct ::stat;
|
||||
+using TimeSpec = struct timespec;
|
||||
+using StatT = struct stat;
|
||||
|
||||
template <class FileTimeT, class TimeT,
|
||||
bool IsFloat = is_floating_point<typename FileTimeT::rep>::value>
|
||||
Reference in New Issue
Block a user