bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH mig] x86_64: adapt MiG generated stubs to use mach_port_name_


From: Samuel Thibault
Subject: Re: [PATCH mig] x86_64: adapt MiG generated stubs to use mach_port_name_inlined_t for inlined port rights.
Date: Sun, 3 Dec 2023 02:05:24 +0100
User-agent: NeoMutt/20170609 (1.8.3)

And now I'm getting a -Werror in glibc due to this:

Flavio Cruz, le ven. 24 nov. 2023 16:30:40 -0500, a ecrit:
> diff --git a/utils.c b/utils.c
> index ec0f2d1..0d69cb2 100644
> --- a/utils.c
> +++ b/utils.c
> @@ -317,6 +317,9 @@ WriteFieldDeclPrim(FILE *file, const argument_t *arg,
>      if (it->itInLine && it->itVarArray)
>      {
>       ipc_type_t *btype = it->itElement;
> +     identifier_t original_type_name = (*tfunc)(btype);
> +     identifier_t inlined_type_name = btype->itUserlandPort ?
> +         "mach_port_name_inlined_t" : original_type_name;
>  
>       /*
>        *      Build our own declaration for a varying array:
> @@ -325,19 +328,27 @@ WriteFieldDeclPrim(FILE *file, const argument_t *arg,
>        */
>       fprintf(file, "\t\tunion {\n");
>       fprintf(file, "\t\t\t%s %s[%d];\n",
> -                     (*tfunc)(btype),
> +                     inlined_type_name,
>                       arg->argMsgField,
>                       it->itNumber/btype->itNumber);


i686-glibc-gnu-gcc 
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.c
 -c -std=gnu11 -fgnu89-inline  -g -O2 -Wall -Wwrite-strings -Wundef -Werror 
-fmerge-all-constants -frounding-math -fno-stack-protector -fno-common 
-Wp,-U_FORTIFY_SOURCE -Wno-parentheses -Wstrict-prototypes 
-Wold-style-definition -fmath-errno    -fPIC           -I../include 
-I/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd
  -I/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu  
-I../sysdeps/mach/hurd/i386  -I../sysdeps/mach/hurd/x86  
-I../sysdeps/mach/hurd/i386/htl  -I../sysdeps/mach/hurd/htl  
-I../sysdeps/hurd/htl  -I../sysdeps/mach/htl  -I../sysdeps/htl/include 
-I../sysdeps/htl  -I../sysdeps/pthread  -I../sysdeps/i386/htl  
-I../sysdeps/x86/htl  -I../sysdeps/mach/hurd  -I../sysdeps/gnu  
-I../sysdeps/unix/bsd  -I../sysdeps/unix/inet  -I../sysdeps/mach/i386  
-I../sysdeps/mach/x86  -I../sysdeps/mach/include -I../sysdeps/mach  
-I../sysdeps/i386/i686/fpu/multiarch  -I../sysdeps/i386/i686/fpu  
-I../sysdeps/i386/i686/multiarch  -I../sysdeps/i386/i686  -I../sysdeps/i386/fpu 
 -I../sysdeps/x86/fpu  -I../sysdeps/i386  -I../sysdeps/x86/include 
-I../sysdeps/x86  -I../sysdeps/wordsize-32  -I../sysdeps/ieee754/float128  
-I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96  
-I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32  
-I../sysdeps/hurd/include -I../sysdeps/hurd  -I../sysdeps/unix  
-I../sysdeps/posix  -I../sysdeps/ieee754  -I../sysdeps/generic -I../hurd 
-I/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/
 -I../mach 
-I/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/mach/
 -I.. -I../libio -I.  -D_LIBC_REENTRANT -include 
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/libc-modules.h
 -DMODULE_NAME=libhurduser -include ../include/libc-symbols.h  -DPIC -DSHARED   
  -DTOP_NAMESPACE=glibc -o 
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.os
 -MD -MP -MF 
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.os.dt
 -MT 
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.os
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.c:
 In function ‘_Xmsg_get_init_ports’:
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.c:685:16:
 error: assignment to ‘mach_port_t *’ {aka ‘unsigned int *’} from incompatible 
pointer type ‘mach_port_name_inlined_t *’ [-Werror=incompatible-pointer-types]
  685 |         portsP = OutP->ports;
      |                ^
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.c:695:20:
 error: comparison of distinct pointer types lacks a cast [-Werror]
  695 |         if (portsP != OutP->ports) {
      |                    ^~
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.c:
 In function ‘_Xmsg_set_init_ports’:
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.c:789:154:
 error: pointer type mismatch in conditional expression [-Werror]
  789 |         OutP->RetCode = 
_S_msg_set_init_ports(In0P->Head.msgh_request_port, In0P->refport.name, 
(In0P->portsType.msgtl_header.msgt_inline) ? In0P->ports : In0P->portsP, 
In0P->portsType.msgtl_number);
      |                                                                         
                                                                                
 ^
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.c:
 In function ‘_Xmsg_get_dtable’:
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.c:1242:17:
 error: assignment to ‘mach_port_t *’ {aka ‘unsigned int *’} from incompatible 
pointer type ‘mach_port_name_inlined_t *’ [-Werror=incompatible-pointer-types]
 1242 |         dtableP = OutP->dtable;
      |                 ^
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.c:1252:21:
 error: comparison of distinct pointer types lacks a cast [-Werror]
 1252 |         if (dtableP != OutP->dtable) {
      |                     ^~
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.c:
 In function ‘_Xmsg_set_dtable’:
/mnt/scratch/sthibault/build-glibc/build/compilers/i686-gnu/glibc/i686-gnu/hurd/hurd/msg_server.c:1346:152:
 error: pointer type mismatch in conditional expression [-Werror]
 1346 |         OutP->RetCode = _S_msg_set_dtable(In0P->Head.msgh_request_port, 
In0P->refport.name, (In0P->dtableType.msgtl_header.msgt_inline) ? In0P->dtable 
: In0P->dtableP, In0P->dtableType.msgtl_number);
      |                                                                         
                                                                               ^
cc1: all warnings being treated as errors


And indeed, I wonder how it's supposed to work? Not only the kernel
provides servers, but also glibc.


I was half-way in releasing the whole thing, but now I'm just thinking
that considering the clock time, I'll just revert the whole thing.

Samuel



reply via email to

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