55 lines
1.4 KiB
Makefile
55 lines
1.4 KiB
Makefile
|
# Makefile - hhl - /usr/src/world/glibc
|
||
|
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
|
||
|
#
|
||
|
distname = glibc
|
||
|
|
||
|
patches += glibc-2.31-fhs-1.patch
|
||
|
patches += glibc-no-test-installation.patch
|
||
|
patches += ldd-rewrite-nobash.patch
|
||
|
|
||
|
include world.mk
|
||
|
-include locales.mk
|
||
|
|
||
|
export CC = gcc -ffile-prefix-map=/toolchain=/usr
|
||
|
|
||
|
config_opts += --disable-werror
|
||
|
config_opts += --enable-kernel=3.2
|
||
|
config_opts += --enable-stack-protector=strong
|
||
|
config_opts += --with-headers=/usr/include
|
||
|
config_opts += libc_cv_slibdir=/lib
|
||
|
|
||
|
ifeq (${arch},x86_64)
|
||
|
define makelinks
|
||
|
ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64
|
||
|
ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
|
||
|
endef
|
||
|
else ifeq (${arch},armv7l)
|
||
|
makelinks = ln -sfv ld-2.31.so /lib/ld-linux.so.3
|
||
|
else ifeq (${arch},riscv64)
|
||
|
makelinks = ln -sfv ../lib/ld-linux-riscv64-lp64d.so.1 /lib64
|
||
|
endif
|
||
|
|
||
|
ifdef locales
|
||
|
define makelocales
|
||
|
install -d /usr/lib/locale
|
||
|
localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true
|
||
|
for l in ${locales} ; \
|
||
|
do localedef -i $$(echo $${l} | cut -f 1 -d '.') -f \
|
||
|
$$(echo $${l} | cut -f 2 -d '.') $${l} ; done
|
||
|
endef
|
||
|
else
|
||
|
makelocales = $(MAKE) -C ${objdir} localedata/install-locales
|
||
|
endif
|
||
|
|
||
|
|
||
|
define post_install
|
||
|
${makelinks}
|
||
|
install -d /var/cache/nscd
|
||
|
install -m0644 ${srcdir}/nscd/nscd.conf /etc
|
||
|
install -m0644 ${wkgdir}/etc/nsswitch.conf /etc
|
||
|
install -m0644 ${wkgdir}/etc/ld.so.conf /etc
|
||
|
${makelocales}
|
||
|
endef
|
||
|
|
||
|
include targets.mk
|