Debian Codegraph @

hurd/Makefile

raw symbols ◀ ▶ SCIP
Source reconstructed at patch state 0 of 3 — not the installed (fully patched) source.
3 Debian patches touch this file
1 # Copyright (C) 1991-2026 Free Software Foundation, Inc.
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
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.
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
12 # Lesser General Public License for more details.
13
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <https://www.gnu.org/licenses/>.
17
18 subdir := hurd
19
20 include ../Makeconfig
21
22 tests := test-sig-xstate \
23 test-sig-rpc-interrupted
24 $(objpfx)test-sig-xstate: $(shared-thread-library)
25 $(objpfx)test-sig-rpc-interrupted: $(shared-thread-library) $(objdir)/hurd/libhurduser.so
26
27 headers = \
28 $(interface-headers) \
29 hurd.h \
30 hurd/fd.h \
31 hurd/id.h \
32 hurd/ioctl.h \
33 hurd/lookup.h \
34 hurd/port.h \
35 hurd/resource.h \
36 hurd/signal.h \
37 hurd/sigpreempt.h \
38 hurd/userlink.h \
39 # headers
40
41 inline-headers = \
42 hurd.h \
43 hurd/fd.h \
44 hurd/port.h \
45 hurd/signal.h \
46 hurd/userlink.h \
47 # inline-headers
48
49 # The RPC interfaces go in a separate library.
50 interface-library := libhurduser
51 user-interfaces := \
52 hurd/auth \
53 hurd/auth_reply \
54 hurd/auth_request \
55 hurd/crash \
56 hurd/exec \
57 hurd/exec_startup \
58 hurd/fs \
59 hurd/fsys \
60 hurd/ifsock \
61 hurd/interrupt \
62 hurd/io \
63 hurd/io_reply \
64 hurd/io_request \
65 hurd/login \
66 hurd/msg \
67 hurd/msg_reply \
68 hurd/msg_request \
69 hurd/password \
70 hurd/pci \
71 hurd/pfinet \
72 hurd/process \
73 hurd/process_request \
74 hurd/socket \
75 hurd/startup \
76 hurd/term \
77 hurd/tioctl \
78 # user-interfaces
79
80 server-interfaces := \
81 faultexc \
82 hurd/msg \
83 # server-interfaces
84
85 routines = \
86 $(dtable) \
87 $(inlines) \
88 $(sig) \
89 errno-loc \
90 fchroot \
91 fd-cleanup \
92 fopenport \
93 get-host \
94 geteuids \
95 getumask \
96 hurdauth \
97 hurdchdir \
98 hurdexec \
99 hurdfchdir \
100 hurdid \
101 hurdinit \
102 hurdlock \
103 hurdlookup \
104 hurdmsg \
105 hurdpid \
106 hurdports \
107 hurdprio \
108 hurdrlimit \
109 hurdselect \
110 hurdsock \
111 hurdstartup \
112 lookup-at \
113 lookup-retry \
114 msgportdemux \
115 path-lookup \
116 pid2task \
117 port-cleanup \
118 ports-get \
119 ports-set \
120 privports \
121 report-wait \
122 set-host \
123 setauth \
124 seteuids \
125 sysvshm \
126 task2pid \
127 vpprintf \
128 xattr \
129 # routines
130 sig = \
131 catch-exc \
132 catch-signal \
133 exc2signal \
134 hurd-raise \
135 hurdfault \
136 hurdkill \
137 hurdsig \
138 intr-msg \
139 longjmp-ts \
140 preempt-sig \
141 siginfo \
142 sigthreadmask \
143 sigunwind \
144 thread-cancel \
145 thread-self \
146 trampoline \
147 # sig
148 dtable = \
149 alloc-fd \
150 ctty-input \
151 ctty-output \
152 dtable \
153 fd-close \
154 fd-read \
155 fd-write \
156 getdport \
157 hurdioctl \
158 intern-fd \
159 new-fd \
160 openport \
161 port2fd \
162 # dtable
163 inlines = $(inline-headers:%.h=%-inlines)
164
165 # XXX this is a temporary hack; see hurdmalloc.h
166 routines += hurdmalloc
167
168 # Binary compatibility for libc.so.0.2[GLIBC_2.0].
169 ifeq ($(build-shared),yes)
170 routines += compat-20
171 endif
172
173 shared-only-routines = compat-20
174
175 # For each of the $(inline-headers), generate a trivial source
176 # file that will #include it to define its inline functions as real functions.
177 $(inlines:%=$(objpfx)%.c): $(objpfx)%-inlines.c: %.h
178 (h="`echo $(subst /,_,$*) | tr '[a-z]' '[A-Z]'`"; \
179 echo "#define _$${h}_H_EXTERN_INLINE /* Define real function. */"; \
180 echo "#define _$${h}_H_HIDDEN_DEF /* Declare hidden definition. */"; \
181 echo '#include "$<"') > $@-new
182 mv -f $@-new $@
183 generated += $(inlines:=.c)
184
185 # Avoid ssp before TLS is initialized.
186 CFLAGS-hurdstartup.o = $(no-stack-protector)
187 CFLAGS-RPC_exec_startup_get_info.o = $(no-stack-protector)
188
189 CFLAGS-RPC_file_record_lock.c = -DTypeCheck=0
190 CFLAGS-RPC_file_statfs.c = -DTypeCheck=0
191 CFLAGS-RPC_file_utimens.c = -DTypeCheck=0
192 CFLAGS-RPC_file_utimes.c = -DTypeCheck=0
193 CFLAGS-RPC_io_select_timeout.c = -DTypeCheck=0
194 CFLAGS-RPC_io_select_timeout_request.c = -DTypeCheck=0
195 CFLAGS-RPC_io_select_timeout_request.os= -DTypeCheck=0
196 CFLAGS-RPC_io_stat.c = -DTypeCheck=0
197 CFLAGS-RPC_io_stat_reply.c = -DTypeCheck=0
198 CFLAGS-RPC_login_get_idle_time.c = -DTypeCheck=0
199 CFLAGS-RPC_proc_getchildren_rusage.c = -DTypeCheck=0
200 CFLAGS-RPC_proc_wait.c = -DTypeCheck=0
201 CFLAGS-RPC_proc_waitid.c = -DTypeCheck=0
202
203 # Make it simpler to unwind over INTR_MSG_TRAP
204 CFLAGS-intr-msg.o = -fno-omit-frame-pointer
205 CFLAGS-intr-msg.os = -fno-omit-frame-pointer
206
207 # Make generated headers compatible with all support standards
208 migheaderpipe := | sed -e 's/\<ino64_t\>/__ino64_t/' -e 's/\<loff_t\>/__loff_t/'
209 include ../mach/Machrules
210 libhurduser-routines += RPC_gsync_wait_intr
211 include ../Rules
212
213 # intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC
214 # stubs import <hurd/signal.h> and #define __mach_msg to
215 # _hurd_intr_rpc_mach_msg.
216 user-MIGFLAGS += -imacros intr-rpc.defs
217
218 # The special exc server for sigthread faults uses a special prefix.
219 MIGFLAGS-faultexc = -prefix _hurdsig_fault_
220
221 # We need this static dependency to get faultexc.h generated the first time.
222 $(objpfx)hurdfault.o $(objpfx)hurdfault.d: \
223 $(objpfx)faultexc_server.h $(objpfx)faultexc_server.c