dslm4515 / Musl-LFS

Linux From Scratch using Musl as Libc
GNU General Public License v3.0
170 stars 21 forks source link

Use `find`(1) insead of directly passing `/tools/lib` to `strip`(1). #68

Closed takusuman closed 2 years ago

takusuman commented 2 years ago

Use find(1) insead of directly passing /tools/lib to strip(1).

This prevent those "strip: Warning: foo/bar is a directory" warnings, also strips all the libraries present.

--strip-unneeded instead of --strip-debug

Remove .*.cmd and Makefile files from /usr/include, not from the Linux kernel source tree

I think we don't want to "harm" the source tree, so we won't be needing to extract the source tarball two times.

dslm4515 commented 2 years ago

Actually, I’ve been striping by hand using strip —strip-unneeded per directory. Sometimes if is just use —strip-debug on some binaries or libraries, file still says those are not stripped.

takusuman commented 2 years ago

Actually, I’ve been striping by hand using strip —strip-unneeded per directory. Sometimes if is just use —strip-debug on some binaries or libraries, file still says those are not stripped.

Hmmmm, strange... I thought it would still stripping.

takusuman commented 2 years ago

Oh, what about using --strip-unneeded in everything instead of doing a two-step process?

dslm4515 commented 2 years ago

Yes, that's what I've been using... if the binary/library still shows up as unstripped by file then I use --strip-unneeded. Then file shows it as "stripped"

takusuman commented 2 years ago

Files that you've ran strip --strip-debug and still showed "unstripped" didn't have debug symbols on them, so strip hadn't any debug to strip (pun intended :) )

dslm4515 commented 2 years ago

Yup!

I started looking seriously into stripping when building LLVM. `--strip-debug" left a lot of binaries/libraries unstripped.

I've noticed some packages offer to strip when installing. Might consider it if not ever planning to debug.