2019-04-26 10:47:33 +00:00
|
|
|
LICENSE = BSD
|
|
|
|
VERSION = 12.0.0
|
|
|
|
DOWNLOADS = libc.archive openlibm.archive
|
|
|
|
|
|
|
|
D = src/lib/libc
|
|
|
|
|
|
|
|
URL(libc) = http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.0-RELEASE/src.txz
|
|
|
|
SHA(libc) = 0da393ac2174168a71c1c527d1453e07372295187d05c288250800cb152a889b
|
|
|
|
DIR(libc) = $(D)
|
|
|
|
|
|
|
|
OWNER := JuliaMath
|
|
|
|
REPO := openlibm
|
|
|
|
REV := a96f0740e32c3d8aaa0a34c3988201018dfa90ce
|
|
|
|
|
|
|
|
URL(openlibm) := https://github.com/$(OWNER)/$(REPO)/archive/$(REV).tar.gz
|
|
|
|
SHA(openlibm) := a9c7d4450c3e9a8b92ec1e20c7a9fd2682e900743dff37f163c9a9ac68b4f471
|
|
|
|
DIR(openlibm) := src/lib/openlibm
|
|
|
|
|
|
|
|
TAR_OPT(libc) = --strip-components=2
|
|
|
|
|
|
|
|
TAR_OPT(libc) += usr/src/contrib/gdtoa
|
|
|
|
TAR_OPT(libc) += usr/src/contrib/libc-vis
|
|
|
|
TAR_OPT(libc) += usr/src/contrib/tzcode/stdtime
|
|
|
|
TAR_OPT(libc) += usr/src/include
|
|
|
|
TAR_OPT(libc) += usr/src/lib/libc
|
|
|
|
TAR_OPT(libc) += usr/src/lib/msun
|
|
|
|
TAR_OPT(libc) += usr/src/sys/amd64
|
|
|
|
TAR_OPT(libc) += usr/src/sys/arm
|
|
|
|
TAR_OPT(libc) += usr/src/sys/arm64
|
|
|
|
TAR_OPT(libc) += usr/src/sys/bsm
|
|
|
|
TAR_OPT(libc) += usr/src/sys/crypto/chacha20
|
|
|
|
TAR_OPT(libc) += usr/src/sys/i386
|
|
|
|
TAR_OPT(libc) += usr/src/sys/libkern
|
|
|
|
TAR_OPT(libc) += usr/src/sys/net
|
|
|
|
TAR_OPT(libc) += usr/src/sys/netinet
|
|
|
|
TAR_OPT(libc) += usr/src/sys/netinet6
|
|
|
|
TAR_OPT(libc) += usr/src/sys/riscv
|
|
|
|
TAR_OPT(libc) += usr/src/sys/rpc
|
|
|
|
TAR_OPT(libc) += usr/src/sys/sys
|
|
|
|
TAR_OPT(libc) += usr/src/sys/vm
|
|
|
|
TAR_OPT(libc) += usr/src/sys/x86
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Check for tools
|
|
|
|
#
|
|
|
|
$(call check_tool,svn)
|
2017-03-21 16:34:54 +00:00
|
|
|
$(call check_tool,flex)
|
2014-05-07 21:52:52 +00:00
|
|
|
$(call check_tool,bison)
|
|
|
|
$(call check_tool,rpcgen)
|
|
|
|
|
2019-04-26 10:47:33 +00:00
|
|
|
PATCHES := $(sort $(wildcard $(REP_DIR)/$(D)/patches/*.patch))
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generic headers
|
|
|
|
#
|
|
|
|
|
2019-04-26 10:47:33 +00:00
|
|
|
DIRS := include/libc include/openlibm
|
|
|
|
|
|
|
|
DIR_CONTENT(include/openlibm) = src/lib/openlibm/include/*
|
|
|
|
|
2014-05-07 21:52:52 +00:00
|
|
|
DIR_CONTENT(include/libc) := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/include/,\
|
|
|
|
strings.h limits.h string.h ctype.h _ctype.h \
|
2014-05-07 21:52:52 +00:00
|
|
|
stdlib.h stdio.h signal.h unistd.h wchar.h time.h sysexits.h \
|
|
|
|
resolv.h wctype.h locale.h langinfo.h regex.h paths.h ieeefp.h \
|
|
|
|
inttypes.h fstab.h netdb.h ar.h memory.h res_update.h \
|
|
|
|
netconfig.h ifaddrs.h pthread.h err.h getopt.h search.h \
|
2019-04-26 10:47:33 +00:00
|
|
|
varargs.h stddef.h stdbool.h assert.h monetary.h printf.h \
|
2014-05-07 21:52:52 +00:00
|
|
|
libgen.h dirent.h dlfcn.h link.h fmtmsg.h fnmatch.h fts.h ftw.h \
|
2019-04-26 10:47:33 +00:00
|
|
|
db.h grp.h nsswitch.h pthread_np.h pwd.h ttyent.h \
|
2014-05-07 21:52:52 +00:00
|
|
|
stringlist.h glob.h a.out.h elf-hints.h nlist.h spawn.h \
|
|
|
|
readpassphrase.h setjmp.h elf.h ulimit.h utime.h wordexp.h \
|
2019-04-26 10:47:33 +00:00
|
|
|
complex.h semaphore.h uchar.h iconv.h termios.h \
|
|
|
|
xlocale.h runetype.h) \
|
|
|
|
$(addprefix $(D)/sys/sys/,\
|
|
|
|
syslog.h fcntl.h stdint.h sched.h ktrace.h \
|
|
|
|
_semaphore.h ucontext.h) \
|
|
|
|
$(D)/sys/sys/errno.h \
|
|
|
|
$(D)/lib/msun/src/math.h \
|
|
|
|
$(D)/contrib/libc-vis/vis.h
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
DIRS += include/libc/rpc
|
|
|
|
DIR_CONTENT(include/libc/rpc) := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/include/rpc/,\
|
2014-05-07 21:52:52 +00:00
|
|
|
rpc.h xdr.h auth.h clnt_stat.h clnt.h clnt_soc.h rpc_msg.h \
|
|
|
|
auth_unix.h auth_des.h svc.h svc_soc.h svc_auth.h pmap_clnt.h \
|
|
|
|
pmap_prot.h rpcb_clnt.h rpcent.h des_crypt.h des.h nettype.h \
|
|
|
|
rpcsec_gss.h raw.h rpc_com.h) \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(D)/include/rpc/rpcb_prot.h
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
DIRS += include/libc/rpcsvc
|
|
|
|
DIR_CONTENT(include/libc/rpcsvc) := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/include/rpcsvc/,\
|
|
|
|
yp_prot.h nis.h ypclnt.h nis_tags.h nislib.h)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
DIRS += include/libc/gssapi
|
2019-04-26 10:47:33 +00:00
|
|
|
DIR_CONTENT(include/libc/gssapi) := $(D)/include/gssapi/gssapi.h
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
DIRS += include/libc/arpa
|
|
|
|
DIR_CONTENT(include/libc/arpa) := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/include/arpa/,\
|
2014-05-07 21:52:52 +00:00
|
|
|
inet.h ftp.h nameser.h nameser_compat.h telnet.h tftp.h)
|
|
|
|
|
|
|
|
DIRS += include/libc/vm
|
|
|
|
DIR_CONTENT(include/libc/vm) := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/sys/vm/, vm_param.h vm.h pmap.h)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
DIRS += include/libc/net
|
|
|
|
DIR_CONTENT(include/libc/net) := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/sys/net/, if.h if_dl.h if_tun.h if_types.h \
|
|
|
|
radix.h route.h ethernet.h if_arp.h vnet.h)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
DIRS += include/libc/netinet
|
|
|
|
DIR_CONTENT(include/libc/netinet) := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/sys/netinet/, in.h in_systm.h ip.h tcp.h \
|
2018-12-04 10:55:20 +00:00
|
|
|
udp.h ip_icmp.h if_ether.h tcp_fsm.h)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
DIRS += include/libc/netinet6
|
2019-04-26 10:47:33 +00:00
|
|
|
DIR_CONTENT(include/libc/netinet6) := $(D)/sys/netinet6/in6.h
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
DIRS += include/libc/bsm
|
2019-04-26 10:47:33 +00:00
|
|
|
DIR_CONTENT(include/libc/bsm) := $(D)/sys/bsm/audit.h
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
DIRS += include/libc/sys/rpc
|
2019-04-26 10:47:33 +00:00
|
|
|
DIR_CONTENT(include/libc/sys/rpc) := $(D)/sys/rpc/types.h
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
DIRS += include/libc/sys
|
|
|
|
DIR_CONTENT(include/libc/sys) := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/sys/sys/,\
|
2014-05-07 21:52:52 +00:00
|
|
|
_types.h limits.h cdefs.h _null.h types.h _pthreadtypes.h \
|
|
|
|
syslimits.h select.h _sigset.h _timeval.h timespec.h \
|
|
|
|
_timespec.h stat.h signal.h unistd.h time.h param.h stdint.h \
|
2014-08-15 13:54:36 +00:00
|
|
|
event.h eventhandler.h disk.h errno.h poll.h queue.h mman.h \
|
|
|
|
stddef.h sysctl.h uio.h _iovec.h ktrace.h ioctl.h ttycom.h \
|
|
|
|
ioccom.h filio.h sockio.h wait.h file.h fcntl.h resource.h \
|
|
|
|
disklabel.h link_elf.h endian.h mount.h ucred.h dirent.h \
|
|
|
|
cpuset.h socket.h un.h ttydefaults.h imgact_aout.h elf32.h \
|
|
|
|
elf64.h elf_generic.h elf_common.h nlist_aout.h ipc.h sem.h \
|
|
|
|
exec.h _lock.h _mutex.h statvfs.h ucontext.h syslog.h times.h \
|
2019-04-26 10:47:33 +00:00
|
|
|
utsname.h elf.h mtio.h _stdint.h atomic_common.h _ucontext.h \
|
|
|
|
_cpuset.h _bitset.h bitset.h _stdarg.h _uio.h auxv.h random.h \
|
|
|
|
_sockaddr_storage.h termios.h _termios.h _umtx.h kerneldump.h \
|
2019-06-17 06:58:43 +00:00
|
|
|
conf.h disk_zone.h counter.h)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
2019-04-26 10:47:33 +00:00
|
|
|
DIRS += include/libc/sys/disk
|
|
|
|
DIR_CONTENT(include/libc/sys/disk) := $(D)/sys/sys/disk/*h
|
|
|
|
|
|
|
|
DIRS += include/libc/xlocale
|
|
|
|
DIR_CONTENT(include/libc/xlocale) := $(D)/include/xlocale/*.h
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# CPU-architecture-specific headers
|
|
|
|
#
|
|
|
|
# The 'common_include_*_content' functions take the CPU architecture as first
|
|
|
|
# argument.
|
|
|
|
#
|
|
|
|
|
|
|
|
common_include_libc_arch_content = \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/sys/$1/include/, stdarg.h float.h) \
|
|
|
|
$(addprefix $(D)/lib/libc/$2/, arith.h _fpmath.h SYS.h gd_qnan.h)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
common_include_libc_arch_machine_content = \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/sys/$1/include/,\
|
2014-05-07 21:52:52 +00:00
|
|
|
_types.h endian.h _limits.h signal.h trap.h _stdint.h \
|
2019-04-26 10:47:33 +00:00
|
|
|
sysarch.h ieeefp.h frame.h vm.h \
|
2014-05-07 21:52:52 +00:00
|
|
|
cpufunc.h vmparam.h atomic.h elf.h exec.h reloc.h pmap.h \
|
2019-04-26 10:47:33 +00:00
|
|
|
ucontext.h setjmp.h asm.h param.h _inttypes.h _align.h \
|
|
|
|
float.h)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
2019-04-26 10:47:33 +00:00
|
|
|
#
|
|
|
|
# x86-specific headers
|
|
|
|
#
|
|
|
|
DIRS += include/spec/x86/libc
|
|
|
|
DIR_CONTENT(include/spec/x86/libc) := \
|
|
|
|
$(D)/lib/msun/x86/fenv.h
|
|
|
|
|
|
|
|
DIRS += include/libc/x86
|
|
|
|
DIR_CONTENT(include/libc/x86) := \
|
|
|
|
$(D)/sys/x86/include/*.h
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# i386-specific headers
|
|
|
|
#
|
2018-09-03 09:53:05 +00:00
|
|
|
DIRS += include/spec/x86_32/libc
|
|
|
|
DIR_CONTENT(include/spec/x86_32/libc) := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(call common_include_libc_arch_content,i386,i386)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
2018-09-03 09:53:05 +00:00
|
|
|
DIRS += include/spec/x86_32/libc/machine
|
|
|
|
DIR_CONTENT(include/spec/x86_32/libc/machine) := \
|
2014-05-07 21:52:52 +00:00
|
|
|
$(call common_include_libc_arch_machine_content,i386) \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/sys/i386/include/, specialreg.h npx.h sigframe.h)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# AMD64-specific headers
|
|
|
|
#
|
2018-09-03 09:53:05 +00:00
|
|
|
DIRS += include/spec/x86_64/libc
|
|
|
|
DIR_CONTENT(include/spec/x86_64/libc) := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(call common_include_libc_arch_content,amd64,amd64)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
2018-09-03 09:53:05 +00:00
|
|
|
DIRS += include/spec/x86_64/libc/machine
|
|
|
|
DIR_CONTENT(include/spec/x86_64/libc/machine) := \
|
2014-05-07 21:52:52 +00:00
|
|
|
$(call common_include_libc_arch_machine_content,amd64) \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/sys/amd64/include/, specialreg.h fpu.h sigframe.h)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# ARM-specific headers
|
|
|
|
#
|
2018-09-03 09:53:05 +00:00
|
|
|
DIRS += include/spec/arm/libc
|
|
|
|
DIR_CONTENT(include/spec/arm/libc) := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(call common_include_libc_arch_content,arm,arm) \
|
|
|
|
$(D)/lib/msun/arm/fenv.h
|
2014-05-07 21:52:52 +00:00
|
|
|
|
2018-09-03 09:53:05 +00:00
|
|
|
DIRS += include/spec/arm/libc/machine
|
|
|
|
DIR_CONTENT(include/spec/arm/libc/machine) := \
|
2014-05-07 21:52:52 +00:00
|
|
|
$(call common_include_libc_arch_machine_content,arm) \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(addprefix $(D)/sys/arm/include/, armreg.h atomic-v6.h ieee.h sysreg.h sigframe.h)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
2019-04-26 10:47:33 +00:00
|
|
|
# ARM64-specific headers
|
2014-05-07 21:52:52 +00:00
|
|
|
#
|
2019-04-26 10:47:33 +00:00
|
|
|
DIRS += include/spec/arm_64/libc
|
|
|
|
DIR_CONTENT(include/spec/arm_64/libc) := \
|
|
|
|
$(call common_include_libc_arch_content,arm64,aarch64) \
|
|
|
|
$(D)/lib/msun/aarch64/fenv.h
|
2014-05-07 21:52:52 +00:00
|
|
|
|
2019-04-26 10:47:33 +00:00
|
|
|
DIRS += include/spec/arm_64/libc/machine
|
|
|
|
DIR_CONTENT(include/spec/arm_64/libc/machine) := \
|
|
|
|
$(call common_include_libc_arch_machine_content,arm64) \
|
|
|
|
$(addprefix $(D)/sys/arm64/include/, armreg.h)
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Rules for generating files
|
|
|
|
#
|
2014-05-07 21:52:52 +00:00
|
|
|
|
2019-04-26 10:47:33 +00:00
|
|
|
$(D)/include/rpcsvc/nis_object.x : $(DOWNLOADS)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
|
|
|
%.h: %.x
|
|
|
|
@$(MSG_GENERATE)$(notdir $@)
|
2019-06-17 06:58:43 +00:00
|
|
|
$(VERBOSE)rm -f $@
|
2014-05-07 21:52:52 +00:00
|
|
|
$(VERBOSE)rpcgen -C -h -DWANT_NFS3 $< -o $@
|
|
|
|
|
2017-08-18 12:37:35 +00:00
|
|
|
generated_rpcsvc_files := \
|
2019-04-26 10:47:33 +00:00
|
|
|
$(D)/include/rpc/rpcb_prot.h \
|
|
|
|
$(addprefix $(D)/include/rpcsvc/,\
|
|
|
|
nis.h)
|
2014-05-07 21:52:52 +00:00
|
|
|
|
2017-08-18 12:37:35 +00:00
|
|
|
$(generated_rpcsvc_files:.h=.x): $(DOWNLOADS)
|
|
|
|
|
|
|
|
$(generated_rpcsvc_files) : $(generated_rpcsvc_files:.h=.x)
|
|
|
|
|
|
|
|
generated_files += $(generated_rpcsvc_files)
|
|
|
|
|
2014-05-07 21:52:52 +00:00
|
|
|
# generate files before assembling the public include directory tree
|
|
|
|
_dirs: $(generated_files)
|
|
|
|
$(generated_files) : $(DOWNLOADS)
|
2015-01-09 20:53:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Create symlinks for sys headers expected in parent directory
|
|
|
|
#
|
|
|
|
|
|
|
|
default: create_symlinks
|
|
|
|
create_symlinks: _dirs
|
|
|
|
@$(MSG_PREFIX)create symlinks
|
|
|
|
$(VERBOSE)ln -sf sys/poll.h include/libc/poll.h
|