[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 2/6] Check to see if we have a libgcc substvars file before trying to rewrite it



For the minimal static bootstrap build there is nothing to put in that file
and it does not get created.
---
 debian/rules.d/binary-libgcc-cross.mk |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/debian/rules.d/binary-libgcc-cross.mk b/debian/rules.d/binary-libgcc-cross.mk
index e3a4659..b4de9e8 100644
--- a/debian/rules.d/binary-libgcc-cross.mk
+++ b/debian/rules.d/binary-libgcc-cross.mk
@@ -52,8 +52,13 @@ ifeq ($(with_shared_libgcc),yes)
 	cat debian/$(p_lgcc)/DEBIAN/shlibs >> debian/shlibs.local
 endif
 	ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps -p$(p_lgcc)
-	sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < debian/$(p_lgcc).substvars > debian/$(p_lgcc).substvars.new
-	mv debian/$(p_lgcc).substvars.new debian/$(p_lgcc).substvars
+	if [ -f debian/$(p_lgcc).substvars ]; then			\
+		sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g'		\
+		 < debian/$(p_lgcc).substvars				\
+		 > debian/$(p_lgcc).substvars.new;			\
+		mv debian/$(p_lgcc).substvars.new			\
+		   debian/$(p_lgcc).substvars;				\
+	fi
 	dh_gencontrol -p$(p_lgcc) \
 		-- -v$(DEB_LIBGCC_VERSION) $(common_substvars)
 	b=libgcc; v=$(GCC_SONAME); \
-- 
1.6.3.3


Reply to: