summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJérôme Pouiller <jezz@sysmic.org>2016-11-09 11:57:27 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-11-09 23:14:17 +0100
commit179c5f1b87a46ac272d66a947fddbf7c0fdeb442 (patch)
treed8288fa1da445b18e508680ed2d597529b637754 /Makefile
parent2501039e3f6f105745be48cbc3b1cb48b00d519e (diff)
Makefile: fix stripping of ld.so and libpthread for merged /usr
If 'lib' is a symlink (as is the case when BR2_ROOTFS_MERGED_USR=y), 'find lib' does not return the correct result. So, until now, libpthread*.so* and ld-*.so* were not stripped when 'lib' was a symlink. We fix this by using 'find lib/' instead of 'find lib'. For consistency reason, we also do the same change for the 'find' that removes .a and .la files. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> [Thomas: slightly improved the commit log.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4ea64b369..925e9c632 100644
--- a/Makefile
+++ b/Makefile
@@ -641,7 +641,7 @@ target-finalize: $(PACKAGES)
$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
- find $(TARGET_DIR)/lib $(TARGET_DIR)/usr/lib $(TARGET_DIR)/usr/libexec \
+ find $(TARGET_DIR)/lib/ $(TARGET_DIR)/usr/lib/ $(TARGET_DIR)/usr/libexec/ \
\( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
ifneq ($(BR2_PACKAGE_GDB),y)
rm -rf $(TARGET_DIR)/usr/share/gdb
@@ -663,13 +663,13 @@ endif
# besides the one in which crash occurred; or SIGTRAP kills my program when
# I set a breakpoint"
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
- find $(TARGET_DIR)/lib -type f -name 'libpthread*.so*' | \
+ find $(TARGET_DIR)/lib/ -type f -name 'libpthread*.so*' | \
xargs -r $(STRIPCMD) $(STRIP_STRIP_DEBUG)
endif
# Valgrind needs ld.so with enough information, so only strip
# debugging symbols.
- find $(TARGET_DIR)/lib -type f -name 'ld-*.so*' | \
+ find $(TARGET_DIR)/lib/ -type f -name 'ld-*.so*' | \
xargs -r $(STRIPCMD) $(STRIP_STRIP_DEBUG)
test -f $(TARGET_DIR)/etc/ld.so.conf && \
{ echo "ERROR: we shouldn't have a /etc/ld.so.conf file"; exit 1; } || true