Hi! On Wed, 2012-11-21 at 19:09:34 +0000, Wookey wrote: > I've been using dpkg-buildflags to nobble the link path and > rpath-link LDFLAGS setting because the current cross-toolchain for > arm64 does not get these right by default (and it doesn't have libssp).
As you mention further on, I think this is the key here, and IMO the toolchain just needs fixing. > Unfortunately because dpkg-buildflag settings are not arch-specific > this goes wrong when a native (amd64) gcc comes along and is then told to find > it's libraries in /usr/lib/aarch64-linux-gnu: > [...] > So, is there a way to make dpkg-buildflags arch-specific, so they are > picked up for one CC and not another? > Yes I realise that fixing the compiler would be a better fix in this case, > but the concept of varying buildflags between architectures is a useful > one, as especially during bootstrap when cross-compiling is required it is > very likely to be the case the cross-compiler needs so different flags to > the more capable native toolchain. > > Any ideas? While on the surface this sounds like a nice idea, the first problem that comes to mind is that, all packages would need to be patched to set flags for the native and the cross-toolchains, the other bigger problem is that I don't think there's any standard or general support for setting different build flags for native and foreign targets in upstream build systems, I'm only aware of the pseudo-standard CC_FOR_BUILD. And this does not seem usual enough to require the infrastructure and mass package changes needed to support it, when using wrapper scripts for the toolchain would just do it too, something like appending to the LDFLAGS from inside a ~/bin/aarch64-linux-gnu-gcc and friend scripts for example. Thanks, Guillem -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

