Package: u-boot Version: 2010.12~rc2-1 Severity: wishlist Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu natty ubuntu-patch
Hey there The u-boot build passes LDFLAGS from the environment straight to ld, not to gcc as in e.g. automake builds. This means that if you include a -Wl,foo in LDFLAGS, ld will barf: ld: unrecognized option '-Wl,foo' this happens to hit Ubuntu which sets LDFLAGS to -Wl,-Bsymbolic-functions in dpkg-buildpackage pre-build environment (to the dpkg-buildflags returned value). (This problem currently only affects Ubuntu, but it would be nice to fix it in Debian to avoid a permanent diff with Ubuntu and for people rebuilding Debian sources, including u-boot, with custom LDFLAGS.) There are IMO three ways to fix this: * filter / fix problematic LDFLAGS on a per-package basis; this is the rules snipped I added to the Ubuntu x-loader and u-boot packages: # the upstream build passes LDFLAGS directly to ld instead of calling gcc for # linking; so instead of passing -Wl,foo in LDFLAGS as in automake builds, one # should set LDFLAGS to foo directly comma := , LDFLAGS := $(patsubst -Wl$(comma)%,%,$(LDFLAGS)) * or you can unset LDFLAGS, assuming that this piece of code is too special that distro-wide LDFLAGS usually don't apply (for instance the Ubuntu kernel build ignores CFLAGS and LDFLAGS from the environment because they are mostly for userspace) * change the upstream build process to call cc for linking; I'm not sure how open upstream would be to this though, and this needs testing with other compilers Cheers, -- Loïc Minier -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org