- # Setup a libgnustl_shared.so in $PREFIX/lib, so that other C++ using packages
- # links to it. We do however want to avoid installing this, to avoid problems
- # where e.g. libm.so on some i686 devices links against libstdc++.so, so do
- # this here in termux_step_post_massage.
- cd $TERMUX_PREFIX/lib
- ln -f -s libgnustl_shared.so libstdc++.so
+ # We take the library here after massage step to
+ # avoid stripping the library after running termux-elf-cleaner,
+ # which causes a broken library (program compiled on the
+ # device linking to the library will segfault, at least on aarch64).
+ mkdir lib
+ cp $TERMUX_PREFIX/lib/libgnustl_shared.so lib/