changeset 1705:012df19f8569

Only edit linker script when it exists. Avoids busybox bug where sed -i creates file with random permissions when it doesn't already exist.
author Rob Landley <rob@landley.net>
date Wed, 12 Nov 2014 09:20:03 -0600
parents 3675adfb4e36
children dcb7e74a7a71
files sources/sections/uClibc.build
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sources/sections/uClibc.build	Fri Nov 07 08:49:26 2014 -0600
+++ b/sources/sections/uClibc.build	Wed Nov 12 09:20:03 2014 -0600
@@ -29,7 +29,8 @@
 # paths into their linker scripts.  This isn't needed for current versions, and
 # is allowed to fail if HAVE_SHARED=n
 
-sed -i 's@/lib/@@g' "$STAGE_DIR/lib/libc.so" 2>/dev/null
+[ -e "$STAGE_DIR/lib/libc.so" ] &&
+  sed -i 's@/lib/@@g' "$STAGE_DIR/lib/libc.so" 2>/dev/null
 
 # Build ldd and friends