Package: eglibc Version: 2.13-32 Tags: patch User: debian-...@lists.debian.org Usertags: kfreebsd
As eglibc needs special handling for headers provided by kfreebsd-kernel-headers package, it will FTBFS when kfreebsd-kernel-headers switches to multiarch-style directories (e.g. /usr/include/x86_64-kfreebsd-gnu/machine). Please consider fixing the problem preemptively using the attached patch. This patch doesn't breal backward compatibility with current kfreebsd-kernel-headers (0.79). It's been tested on i386 and amd64, both with pristine kfreebsd-kernel-headers and with a multiarch-enabled version. -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: kfreebsd-i386 (i386) Kernel: kFreeBSD 8.1-1-amd64 Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
Index: debian/sysdeps/kfreebsd.mk =================================================================== --- debian/sysdeps/kfreebsd.mk (revision 5248) +++ debian/sysdeps/kfreebsd.mk (working copy) @@ -18,21 +18,31 @@ endif # Minimum Kernel supported -with_headers = --with-headers=$(shell pwd)/debian/include --enable-kernel=$(call xx,MIN_KERNEL_SUPPORTED) +with_headers = --with-headers=$(shell pwd)/debian/include:$(shell pwd)/debian/include/$(DEB_HOST_MULTIARCH) --enable-kernel=$(call xx,MIN_KERNEL_SUPPORTED) KERNEL_HEADER_DIR = $(stamp)mkincludedir $(stamp)mkincludedir: rm -rf debian/include mkdir debian/include - for file in bsm net netatalk netipx nfs osreldate.h sys x86 vm ; do \ + for file in bsm net netatalk netipx nfs osreldate.h sys x86 vm machine ; do \ if test -e $(KFREEBSD_HEADERS)/$$file ; then \ ln -s $(KFREEBSD_HEADERS)/$$file debian/include ; \ fi ; \ + for arch in i386 x86_64 ; do \ + if test -e $(KFREEBSD_HEADERS)/$${arch}-kfreebsd-gnu/$$file ; then \ + mkdir -p debian/include/$${arch}-kfreebsd-gnu ; \ + ln -s $(KFREEBSD_HEADERS)/$${arch}-kfreebsd-gnu/$$file debian/include/$${arch}-kfreebsd-gnu ; \ + fi ; \ + done ; \ done # Link all machine directories. We can't just link machine # because of explicit references to <machine-amd64/*> and # <machine-i386/*>. + # + # FIXME: This can be removed when kfreebsd-kernel-headers switches to + # Multiarch-style directories. + # find $(KFREEBSD_HEADERS) -maxdepth 1 -xtype d -name machine\* \ -exec ln -s '{}' debian/include ';' @@ -42,7 +52,7 @@ touch $@ # Also to make configure happy. -export CPPFLAGS = -isystem $(shell pwd)/debian/include +CPPFLAGS = -isystem $(shell pwd)/debian/include -isystem $(shell pwd)/debian/include/$(DEB_HOST_MULTIARCH) # This round of ugliness decomposes the FreeBSD kernel version number # into an integer so it can be easily compared and then does so. Index: debian/sysdeps/kfreebsd-amd64.mk =================================================================== --- debian/sysdeps/kfreebsd-amd64.mk (revision 5248) +++ debian/sysdeps/kfreebsd-amd64.mk (working copy) @@ -8,10 +8,12 @@ i386_configure_target = i686-kfreebsd-gnu i386_CC = $(CC) -m32 +i386_CPPFLAGS = -isystem $(shell pwd)/debian/include -isystem $(shell pwd)/debian/include/i386-kfreebsd-gnu i386_CXX = $(CXX) -m32 i386_add-ons = ports linuxthreads $(add-ons) i386_extra_cflags = -march=pentium4 -mtune=generic i386_extra_config_options = $(extra_config_options) --disable-profile +i386_with_headers = --with-headers=$(shell pwd)/debian/include:$(shell pwd)/debian/include/i386-kfreebsd-gnu --enable-kernel=$(call xx,MIN_KERNEL_SUPPORTED) i386_slibdir = /lib32 i386_libdir = /usr/lib32 Index: debian/rules.d/build.mk =================================================================== --- debian/rules.d/build.mk (revision 5248) +++ debian/rules.d/build.mk (working copy) @@ -23,6 +23,7 @@ @echo Configuring $(curpass) rm -f $(DEB_BUILDDIR)/configparms echo "CC = $(call xx,CC)" >> $(DEB_BUILDDIR)/configparms + echo "CPPFLAGS = $(call xx,CPPFLAGS)" >> $(DEB_BUILDDIR)/configparms echo "CXX = $(call xx,CXX)" >> $(DEB_BUILDDIR)/configparms echo "BUILD_CC = $(BUILD_CC)" >> $(DEB_BUILDDIR)/configparms echo "BUILD_CXX = $(BUILD_CXX)" >> $(DEB_BUILDDIR)/configparms @@ -66,6 +67,7 @@ cd $(DEB_BUILDDIR) && \ CC="$(call xx,CC)" \ CXX="$(call xx,CXX)" \ + CPPFLAGS="$(call xx,CPPFLAGS)" \ AUTOCONF=false \ MAKEINFO=: \ $(CURDIR)/configure \