1 EGLIBC_OVERLAYS ?= $(shell ls glibc-linuxthreads* glibc-ports* glibc-libidn*)
2 MIN_KERNEL_SUPPORTED := 6.0.0
7 libc_add-ons = ports linuxthreads $(add-ons)
8 libc_extra_config_options = $(extra_config_options) --disable-compatible-utmp
10 ifndef KFREEBSD_SOURCE
11 ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
12 KFREEBSD_HEADERS := /usr/include
14 KFREEBSD_HEADERS := /usr/$(DEB_HOST_GNU_TYPE)/include
17 KFREEBSD_HEADERS := $(KFREEBSD_SOURCE)/sys
20 # Minimum Kernel supported
21 with_headers = --with-headers=$(shell pwd)/debian/include --enable-kernel=$(call xx,MIN_KERNEL_SUPPORTED)
23 KERNEL_HEADER_DIR = $(stamp)mkincludedir
27 ln -s $(KFREEBSD_HEADERS)/bsm debian/include
28 ln -s $(KFREEBSD_HEADERS)/net debian/include
29 ln -s $(KFREEBSD_HEADERS)/netatalk debian/include
30 ln -s $(KFREEBSD_HEADERS)/netipx debian/include
31 ln -s $(KFREEBSD_HEADERS)/nfs debian/include
32 ln -s $(KFREEBSD_HEADERS)/osreldate.h debian/include
33 ln -s $(KFREEBSD_HEADERS)/sys debian/include
34 ln -s $(KFREEBSD_HEADERS)/vm debian/include
36 # Link all machine directories. We can't just link machine
37 # because of explicit references to <machine-amd64/*> and
39 find $(KFREEBSD_HEADERS) -maxdepth 1 -xtype d -name machine\* \
40 -exec ln -s '{}' debian/include ';'
42 # To make configure happy if libc0.1-dev is not installed.
43 touch debian/include/assert.h
47 # Also to make configure happy.
48 export CPPFLAGS = -isystem $(shell pwd)/debian/include
50 # This round of ugliness decomposes the FreeBSD kernel version number
51 # into an integer so it can be easily compared and then does so.
52 CURRENT_KERNEL_VERSION=$(shell uname -r)
54 (minimum=$$((`echo $(1) | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1 \* 10000 + \2 \* 100 + \3/'`)); \
55 current=$$((`echo $(CURRENT_KERNEL_VERSION) | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100/'`)); \
56 if [ $$current -lt $$minimum ]; then \