bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH hurd 27/30] hurd: add intranpayload functions to all hurd typ


From: Justus Winter
Subject: Re: [PATCH hurd 27/30] hurd: add intranpayload functions to all hurd types
Date: Fri, 12 Dec 2014 10:21:43 +0100
User-agent: alot/0.3.5

Quoting Samuel Thibault (2014-12-12 01:08:44)
> Justus Winter, le Thu 27 Nov 2014 14:19:07 +0100, a écrit :
> > +#ifdef HURD_DEFAULT_PAYLOAD_TO_PORT
> > +#if HURD_DEFAULT_PAYLOAD_TO_PORT
> > +/* Any non-numeric value will fail this test.  If 1 (or any number) is
> > +   given, do not inject the default translator function.  */
> > +#undef HURD_DEFAULT_PAYLOAD_TO_PORT
> > +#endif
> > +#else
> > +   import <hurd/ports.h>;
> > +#define HURD_DEFAULT_PAYLOAD_TO_PORT ports_payload_get_name
> > +#endif
> 
> We're now getting it from libc:
> 
> /usr/src/glibc-2.19/build-tree/hurd-i386-libc/hurd/libhurduser_pic.a(msg_server.os):
>  In function `_Xmsg_describe_ports':
> /usr/src/glibc-2.19/build-tree/hurd-i386-libc/hurd/./hurd/msg_server.c:2071: 
> undefined reference to `ports_payload_get_name'
> 
> Perhaps we should revert the logic: not define any
> HURD_DEFAULT_PAYLOAD_TO_PORT by default, and have servers which want to
> enable the payload optimization to define it?

Hm.  Maybe we can check whether we're building server stubs, and only
apply the payload magic then.  Gnumach does something similar with the
KERNEL_SERVER macro.  Indeed, we could simply do:

diff --git a/Makeconf b/Makeconf
index 5439913..ed2f6d0 100644
--- a/Makeconf
+++ b/Makeconf
@@ -546,6 +546,7 @@ MIGCOMFLAGS := -subrprefix __
 
 %.sdefsi %.sdefs.d: %.defs
        $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $($*-MIGSFLAGS) -DSERVERPREFIX=S_ \
+         -DHURD_SERVER=1 \
          -MD -MF $*.sdefs.d.new \
          $< -o $*.sdefsi
        sed -e 's/[^:]*:/$*Server.c $(mig-sheader-prefix)$*_S.h:/' \

Justus

Attachment: signature.asc
Description: signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]