Package: src:gcc-5 Version: 5.2.1-15 Severity: wishlist Tags: patch User: helm...@debian.org Usertags: rebootstrap
Hi, gcc-5 already supports having some linux kernel headers at /usr/include/$(DEB_TARGET_MULTIARCH)/asm We'd like to move *all* of kfreebsd-kernel-headers into /usr/include/$(DEB_TARGET_MULTIARCH), to allow cross-building linux arches from kfreebsd and vice-versa. Moving our headers to a multiarch path would deconflict identically named kernel headers. Would the attached patch be acceptable? I have tested this with native builds on kfreebsd-i386 and kfreebsd-amd64 (with biarch). The change should not affect other arches than kfreebsd. And it is backward- compatible with headers being in /usr/include/sys, until we actually make the change in sid. Thanks! -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: kfreebsd-amd64 (x86_64) Kernel: kFreeBSD 9.0-2-amd64-xenhvm-ipsec Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
--- gcc-5-5.2.1/debian/rules2.orig 2015-08-26 09:46:51.000000000 +0000 +++ gcc-5-5.2.1/debian/rules2 2015-08-27 20:08:21.845453886 +0000 @@ -1121,11 +1121,15 @@ LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc/ada/rts \ ../src/configure $(subst ___, ,$(CONFARGS)) +ifeq ($(DEB_TARGET_ARCH_OS),kfreebsd) : # multilib builds without b-d on gcc-multilib (used in FLAGS_FOR_TARGET) + ln -sf /usr/include/$(DEB_TARGET_MULTIARCH) $(builddir)/sys-include +else if [ -d /usr/include/$(DEB_TARGET_MULTIARCH)/asm ]; then \ mkdir -p $(builddir)/sys-include; \ ln -sf /usr/include/$(DEB_TARGET_MULTIARCH)/asm $(builddir)/sys-include/asm; \ fi +endif touch $(configure_stamp) @@ -1299,6 +1303,12 @@ CC="$(BUILT_CC)" \ CXX="$(BUILT_CXX)" \ ../src/configure $(CONFARGS_JIT) + +ifeq ($(DEB_TARGET_ARCH_OS),kfreebsd) + : # multilib builds without b-d on gcc-multilib (used in FLAGS_FOR_TARGET) + ln -sf /usr/include/$(DEB_TARGET_MULTIARCH) $(builddir_jit)/sys-include +endif + touch $(configure_jit_stamp) $(build_jit_stamp): $(configure_jit_stamp)