]> git.ipfire.org Git - thirdparty/glibc.git/blame - hurd/Makefile
build-many-glibcs.py: Add openrisc hard float glibc variant
[thirdparty/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
f31d677f
CD
22headers = \
23 $(interface-headers) \
24 hurd.h \
25 hurd/fd.h \
26 hurd/id.h \
27 hurd/ioctl.h \
28 hurd/lookup.h \
29 hurd/port.h \
30 hurd/resource.h \
31 hurd/signal.h \
32 hurd/sigpreempt.h \
33 hurd/userlink.h \
34 # headers
28f540f4 35
f31d677f
CD
36inline-headers = \
37 hurd.h \
38 hurd/fd.h \
39 hurd/port.h \
40 hurd/signal.h \
41 hurd/userlink.h \
42 # inline-headers
6f9dc08b 43
28f540f4 44# The RPC interfaces go in a separate library.
f0bf9cb9 45interface-library := libhurduser
f31d677f
CD
46user-interfaces := \
47 hurd/auth \
48 hurd/crash \
49 hurd/exec \
50 hurd/exec_startup \
51 hurd/fs \
52 hurd/fsys \
53 hurd/ifsock \
54 hurd/interrupt \
55 hurd/io \
56 hurd/io_reply \
57 hurd/io_request \
58 hurd/login \
59 hurd/msg \
60 hurd/msg_reply \
61 hurd/msg_request \
62 hurd/password \
63 hurd/pci \
64 hurd/pfinet \
65 hurd/process \
66 hurd/process_request \
67 hurd/socket \
68 hurd/startup \
69 hurd/term \
70 hurd/tioctl \
71 # user-interfaces
28f540f4 72
f31d677f
CD
73server-interfaces := \
74 faultexc \
75 hurd/msg \
76 # server-interfaces
77
78routines = \
79 $(dtable) \
80 $(inlines) \
81 $(sig) \
82 errno-loc \
83 fchroot \
84 fd-cleanup \
85 fopenport \
86 get-host \
87 geteuids \
88 getumask \
89 hurdauth \
90 hurdchdir \
91 hurdexec \
92 hurdfchdir \
93 hurdid \
94 hurdinit \
95 hurdlock \
96 hurdlookup \
97 hurdmsg \
98 hurdpid \
99 hurdports \
100 hurdprio \
101 hurdrlimit \
102 hurdselect \
103 hurdsock \
104 hurdstartup \
105 lookup-at \
106 lookup-retry \
107 msgportdemux \
108 path-lookup \
109 pid2task \
110 port-cleanup \
111 ports-get \
112 ports-set \
113 privports \
114 report-wait \
115 set-host \
116 setauth \
117 seteuids \
118 task2pid \
119 vpprintf \
120 xattr \
121 # routines
122sig = \
123 catch-exc \
124 catch-signal \
125 exc2signal \
126 hurd-raise \
127 hurdfault \
128 hurdkill \
129 hurdsig \
130 intr-msg \
131 longjmp-ts \
132 preempt-sig \
133 siginfo \
134 sigunwind \
135 thread-cancel \
136 thread-self \
137 trampoline \
138 # sig
139dtable = \
140 alloc-fd \
141 ctty-input \
142 ctty-output \
143 dtable \
144 fd-close \
145 fd-read \
146 fd-write \
147 getdport \
148 hurdioctl \
149 intern-fd \
150 new-fd \
151 openport \
152 port2fd \
153 # dtable
6f9dc08b 154inlines = $(inline-headers:%.h=%-inlines)
28f540f4
RM
155
156# XXX this is a temporary hack; see hurdmalloc.h
157routines += hurdmalloc
aab217f3
RM
158
159# Binary compatibility for libc.so.0.2[GLIBC_2.0].
3f2e46a4 160ifeq ($(build-shared),yes)
aab217f3
RM
161routines += compat-20
162endif
163
164shared-only-routines = compat-20
6f9dc08b
RM
165
166# For each of the $(inline-headers), generate a trivial source
167# file that will #include it to define its inline functions as real functions.
168$(inlines:%=$(objpfx)%.c): $(objpfx)%-inlines.c: %.h
169 (h="`echo $(subst /,_,$*) | tr '[a-z]' '[A-Z]'`"; \
170 echo "#define _$${h}_H_EXTERN_INLINE /* Define real function. */"; \
a758c293 171 echo "#define _$${h}_H_HIDDEN_DEF /* Declare hidden definition. */"; \
6f9dc08b
RM
172 echo '#include "$<"') > $@-new
173 mv -f $@-new $@
174generated += $(inlines:=.c)
99ee4d26
ST
175
176# Avoid ssp before TLS is initialized.
177CFLAGS-hurdstartup.o = $(no-stack-protector)
178CFLAGS-RPC_exec_startup_get_info.o = $(no-stack-protector)
63550530
ST
179
180# Make it simpler to unwind over INTR_MSG_TRAP
181CFLAGS-intr-msg.o = -fno-omit-frame-pointer
bf33bf59 182CFLAGS-intr-msg.os = -fno-omit-frame-pointer
28f540f4 183\f
95dfdbd2
ST
184# Make generated headers compatible with all support standards
185migheaderpipe := | sed -e 's/\<ino64_t\>/__ino64_t/' -e 's/\<loff_t\>/__loff_t/'
28f540f4 186include ../mach/Machrules
59bb023c 187libhurduser-routines += RPC_gsync_wait_intr
28f540f4
RM
188include ../Rules
189\f
190# intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC
54da5be3
RM
191# stubs import <hurd/signal.h> and #define __mach_msg to
192# _hurd_intr_rpc_mach_msg.
28f540f4
RM
193user-MIGFLAGS += -imacros intr-rpc.defs
194
aa1075ea
RM
195# The special exc server for sigthread faults uses a special prefix.
196MIGFLAGS-faultexc = -prefix _hurdsig_fault_
28f540f4
RM
197
198# We need this static dependency to get faultexc.h generated the first time.
199$(objpfx)hurdfault.o $(objpfx)hurdfault.d: \
aa1075ea 200 $(objpfx)faultexc_server.h $(objpfx)faultexc_server.c