1 # Copyright (C) 1991-2024 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
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.
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.
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/>.
23 $(interface-headers
) \
44 # The RPC interfaces go in a separate library.
45 interface-library
:= libhurduser
66 hurd
/process_request \
73 server-interfaces
:= \
154 inlines
= $(inline-headers
:%.h
=%-inlines
)
156 # XXX this is a temporary hack; see hurdmalloc.h
157 routines
+= hurdmalloc
159 # Binary compatibility for libc.so.0.2[GLIBC_2.0].
160 ifeq ($(build-shared
),yes
)
161 routines
+= compat-20
164 shared-only-routines
= compat-20
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. */"; \
171 echo
"#define _$${h}_H_HIDDEN_DEF /* Declare hidden definition. */"; \
172 echo
'#include "$<"') > $@
-new
174 generated
+= $(inlines
:=.c
)
176 # Avoid ssp before TLS is initialized.
177 CFLAGS-hurdstartup.o
= $(no-stack-protector
)
178 CFLAGS-RPC_exec_startup_get_info.o
= $(no-stack-protector
)
180 # Make it simpler to unwind over INTR_MSG_TRAP
181 CFLAGS-intr-msg.o
= -fno-omit-frame-pointer
182 CFLAGS-intr-msg.os
= -fno-omit-frame-pointer
184 # Make generated headers compatible with all support standards
185 migheaderpipe
:= | sed
-e
's/\<ino64_t\>/__ino64_t/' -e
's/\<loff_t\>/__loff_t/'
186 include ..
/mach
/Machrules
187 libhurduser-routines
+= RPC_gsync_wait_intr
190 # intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC
191 # stubs import <hurd/signal.h> and #define __mach_msg to
192 # _hurd_intr_rpc_mach_msg.
193 user-MIGFLAGS
+= -imacros intr-rpc.defs
195 # The special exc server for sigthread faults uses a special prefix.
196 MIGFLAGS-faultexc
= -prefix _hurdsig_fault_
198 # We need this static dependency to get faultexc.h generated the first time.
199 $(objpfx
)hurdfault.o
$(objpfx
)hurdfault.d
: \
200 $(objpfx
)faultexc_server.h
$(objpfx
)faultexc_server.c