]> sourceware.org Git - glibc.git/blame - hurd/Makefile
syslog: Fix integer overflow in __vsyslog_internal (CVE-2023-6780)
[glibc.git] / hurd / Makefile
CommitLineData
dff8da6b 1# Copyright (C) 1991-2024 Free Software Foundation, Inc.
28f540f4
RM
2# This file is part of the GNU C Library.
3
4# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5# modify it under the terms of the GNU Lesser General Public
6# License as published by the Free Software Foundation; either
7# version 2.1 of the License, or (at your option) any later version.
28f540f4
RM
8
9# The GNU C Library is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12# Lesser General Public License for more details.
28f540f4 13
41bdb6e2 14# You should have received a copy of the GNU Lesser General Public
59ba27a6 15# License along with the GNU C Library; if not, see
5a82c748 16# <https://www.gnu.org/licenses/>.
28f540f4
RM
17
18subdir := hurd
19
28f540f4
RM
20include ../Makeconfig
21
28f540f4 22headers = hurd.h $(interface-headers) \
9f447fb3 23 $(addprefix hurd/,fd.h id.h port.h signal.h sigpreempt.h ioctl.h\
dc33bef3 24 userlink.h resource.h lookup.h)
28f540f4 25
6f9dc08b 26inline-headers = hurd.h $(addprefix hurd/,fd.h signal.h \
dc33bef3 27 userlink.h port.h)
6f9dc08b 28
28f540f4 29# The RPC interfaces go in a separate library.
f0bf9cb9 30interface-library := libhurduser
28f540f4 31user-interfaces := $(addprefix hurd/,\
75914335
RM
32 auth startup \
33 process process_request \
28f540f4 34 msg msg_reply msg_request \
03a75825 35 exec exec_startup crash interrupt \
c3010778
RB
36 fs fsys io io_reply io_request \
37 term tioctl socket ifsock \
fc783076 38 login password pfinet pci \
7d25696a 39 )
aa1075ea 40server-interfaces := hurd/msg faultexc
28f540f4 41
11872325 42routines = hurdstartup hurdinit \
5fe915ee 43 hurdid hurdpid hurdrlimit hurdprio hurdexec hurdselect \
16a10468 44 hurdlookup lookup-retry lookup-at \
5fbef188 45 get-host set-host \
8f0c527e 46 path-lookup \
28f540f4
RM
47 setauth \
48 pid2task task2pid \
2d6d0728 49 geteuids seteuids getumask fchroot \
8f5ca04b 50 hurdsock hurdauth \
e8f51d56 51 hurdchdir hurdfchdir \
28f540f4
RM
52 privports \
53 msgportdemux \
54 fopenport \
f0f1bf85 55 vpprintf \
28f540f4 56 ports-get ports-set hurdports hurdmsg \
747bf98e 57 errno-loc \
fb4cc8a0 58 hurdlock \
67a78072
ST
59 $(sig) $(dtable) $(inlines) \
60 fd-cleanup port-cleanup report-wait xattr
aa1075ea 61sig = hurdsig hurdfault siginfo hurd-raise preempt-sig \
ded29119 62 trampoline longjmp-ts catch-exc exc2signal hurdkill sigunwind \
7974fe21 63 thread-self thread-cancel intr-msg catch-signal
28f540f4
RM
64dtable = dtable port2fd new-fd alloc-fd intern-fd \
65 getdport openport \
66 fd-close fd-read fd-write hurdioctl ctty-input ctty-output
6f9dc08b 67inlines = $(inline-headers:%.h=%-inlines)
28f540f4
RM
68
69# XXX this is a temporary hack; see hurdmalloc.h
70routines += hurdmalloc
aab217f3
RM
71
72# Binary compatibility for libc.so.0.2[GLIBC_2.0].
3f2e46a4 73ifeq ($(build-shared),yes)
aab217f3
RM
74routines += compat-20
75endif
76
77shared-only-routines = compat-20
6f9dc08b
RM
78
79# For each of the $(inline-headers), generate a trivial source
80# file that will #include it to define its inline functions as real functions.
81$(inlines:%=$(objpfx)%.c): $(objpfx)%-inlines.c: %.h
82 (h="`echo $(subst /,_,$*) | tr '[a-z]' '[A-Z]'`"; \
83 echo "#define _$${h}_H_EXTERN_INLINE /* Define real function. */"; \
a758c293 84 echo "#define _$${h}_H_HIDDEN_DEF /* Declare hidden definition. */"; \
6f9dc08b
RM
85 echo '#include "$<"') > $@-new
86 mv -f $@-new $@
87generated += $(inlines:=.c)
99ee4d26
ST
88
89# Avoid ssp before TLS is initialized.
90CFLAGS-hurdstartup.o = $(no-stack-protector)
91CFLAGS-RPC_exec_startup_get_info.o = $(no-stack-protector)
63550530
ST
92
93# Make it simpler to unwind over INTR_MSG_TRAP
94CFLAGS-intr-msg.o = -fno-omit-frame-pointer
bf33bf59 95CFLAGS-intr-msg.os = -fno-omit-frame-pointer
28f540f4 96\f
95dfdbd2
ST
97# Make generated headers compatible with all support standards
98migheaderpipe := | sed -e 's/\<ino64_t\>/__ino64_t/' -e 's/\<loff_t\>/__loff_t/'
28f540f4 99include ../mach/Machrules
59bb023c 100libhurduser-routines += RPC_gsync_wait_intr
28f540f4
RM
101include ../Rules
102\f
103# intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC
54da5be3
RM
104# stubs import <hurd/signal.h> and #define __mach_msg to
105# _hurd_intr_rpc_mach_msg.
28f540f4
RM
106user-MIGFLAGS += -imacros intr-rpc.defs
107
aa1075ea
RM
108# The special exc server for sigthread faults uses a special prefix.
109MIGFLAGS-faultexc = -prefix _hurdsig_fault_
28f540f4
RM
110
111# We need this static dependency to get faultexc.h generated the first time.
112$(objpfx)hurdfault.o $(objpfx)hurdfault.d: \
aa1075ea 113 $(objpfx)faultexc_server.h $(objpfx)faultexc_server.c
This page took 0.546433 seconds and 5 git commands to generate.