Add SPLIT_DEBUG_INFO option, when it's set to yes the debug info is
stored in separate .dwo files.
This is mainly useful for remote debugging and reduces image size a lot.
See also https://gcc.gnu.org/wiki/DebugFission
Signed-off-by: Matthias Reichl <hias@horus.com>
Several packages call safe_remove with a wildcard to remove
multiple files but safe_remove only deleted the first one.
Fix this by iterating over all arguments passed into safe_remove
so unwanted files don't end up in the image.
Signed-off-by: Matthias Reichl <hias@horus.com>
cp (and potentially mkdir -p) are not atomic, and we have seen situations where two packages
concurrently copying the same file (eg. the udev rule for xf86-video-nvidia and
xf86-video-nvidia-legacy) will succeed for one package but the other package fails with
a "file exists" error (as the file didn't exist when it checked, but does exist when it
actually copies the file). Not even cp -f will avoid this issue.
There are several workarounds, but the most practical (and general) solution is to ensure
sequential updates of the image and shared sysroot directories.
Instead of cluttering $BUILD we now have
- $BUILD/build sources and builds of packages
- $BUILD/install_pkg installed packages
- $BUILD/install_init installed packages for initramfs
- follow symlinks (as used by RPi/Slice)
- don't include hidden files like vi swap files (lol)
- remove duplicates (like $LINUX_DEPENDS for linux itself)
- sort by filename, not by hash
- don't use one sha256sum process per file, use xargs to pass all files to
one process.