summaryrefslogtreecommitdiff
path: root/debian/rules.conf
diff options
context:
space:
mode:
authordoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2015-05-21 15:25:37 +0000
committerdoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2015-05-21 15:25:37 +0000
commit31909a77838c58c503f963da099790ebbb4e8dad (patch)
tree5449d4d2588007ef97e22954bf43964f788ba10c /debian/rules.conf
parentcbc6a3d28b68f886c45ec977ca9f4560daba0d1d (diff)
downloadgcc-5-31909a77838c58c503f963da099790ebbb4e8dad.tar.gz
* Make symbols file symlinking for cross builds more robust.
git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-5@8057 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
Diffstat (limited to 'debian/rules.conf')
-rw-r--r--debian/rules.conf30
1 files changed, 18 insertions, 12 deletions
diff --git a/debian/rules.conf b/debian/rules.conf
index e53cb5d..94e1361 100644
--- a/debian/rules.conf
+++ b/debian/rules.conf
@@ -1319,20 +1319,26 @@ parameters-file:
mv debian/rules.parameters.tmp debian/rules.parameters; \
touch $(control_stamp)
-symbols-files:
+symbols-files: control-file
ifeq ($(DEB_CROSS),yes)
ifneq ($(DEB_STAGE),rtlibs)
- for f in debian/*.symbols; do \
- [ -f "$$f" ] || continue; \
- [ -L "$$f" ] && continue; \
- b=$$(basename $$f .symbols); \
- ln -sf $$f debian/$$b$(LS).symbols; \
- done
- for f in debian/*.symbols.$(DEB_TARGET_ARCH); do \
- [ -f "$$f" ] || continue; \
- [ -L "$$f" ] && continue; \
- b=$$(basename $$f .symbols.$(DEB_TARGET_ARCH)); \
- ln -sf $$f debian/$$b$(LS).symbols; \
+ test -n "$(LS)"
+ set -e; \
+ for p in $$(dh_listpackages -i | grep '^lib'); do \
+ p=$${p%$(LS)}; \
+ if [ -f debian/$$p.symbols.$(DEB_TARGET_ARCH) ]; then \
+ f=debian/$$p.symbols.$(DEB_TARGET_ARCH); \
+ elif [ -f debian/$$p.symbols ]; then \
+ f=debian/$$p.symbols; \
+ else \
+ continue; \
+ fi; \
+ link=debian/$$p$(LS).symbols; \
+ if [ -L $$link ]; then \
+ echo >&2 "removing left over symbols file link: $$link"; \
+ rm -f $$link; \
+ fi; \
+ ln -s $$f $$link; \
done
endif
endif