lrwxrwxrwx root/root lib/cpp -> ../usr/bin/cpp
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
--rwxr-xr-x root/root usr/bin/arm-crux-linux-gnueabihf-c++
--rwxr-xr-x root/root usr/bin/arm-crux-linux-gnueabihf-g++
--rwxr-xr-x root/root usr/bin/arm-crux-linux-gnueabihf-gcc
--rwxr-xr-x root/root usr/bin/arm-crux-linux-gnueabihf-gcc-7.3.0
--rwxr-xr-x root/root usr/bin/arm-crux-linux-gnueabihf-gcc-ar
--rwxr-xr-x root/root usr/bin/arm-crux-linux-gnueabihf-gcc-nm
--rwxr-xr-x root/root usr/bin/arm-crux-linux-gnueabihf-gcc-ranlib
lrwxrwxrwx root/root usr/bin/c++ -> g++
lrwxrwxrwx root/root usr/bin/cc -> gcc
-rwxr-xr-x root/root usr/bin/cpp
-rw-r--r-- root/root usr/man/man7/fsf-funding.7.gz
-rw-r--r-- root/root usr/man/man7/gfdl.7.gz
-rw-r--r-- root/root usr/man/man7/gpl.7.gz
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/gdb/
+drwxr-xr-x root/root usr/share/gdb/auto-load/
+drwxr-xr-x root/root usr/share/gdb/auto-load/usr/
+drwxr-xr-x root/root usr/share/gdb/auto-load/usr/lib/
+-rw-r--r-- root/root usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.24-gdb.py
mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
- rm $PKG/usr/lib/libstdc++.so.6.0.24-gdb.py
- rm -r $PKG/usr/share
+ rm -r $PKG/usr/share/{info,$name-$version}
+ rm -r $PKG/usr/bin/*-crux-linux-*
rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
+ for D in lib; do
+ install -d -m 0755 $PKG/usr/share/gdb/auto-load/usr/${D}
+ mv $PKG/usr/${D}/libstdc++.so.*-gdb.py $PKG/usr/share/gdb/auto-load/usr/${D}
+ done
+
sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
}