On Fri, Sep 02, 2005 at 12:49:50AM +0200, Thomas Schwinge wrote:
> Hi!
>
> The attached `hurd_v.s._gcc-4.0.patch' makes the Hurd buildable with
> gcc-4.0.
A fix (to be applied after the above patch) is attached:
`hurd_v.s._gcc-4.0.fixes.patch'
The patch only fixes my previous patch, so no new ChangeLog entry is
needed.
Thanks to Neal Walfield and Peter De Schrijver.
Imo, a similar fix is also needed (additionally to those that Neal
already pointed out and Alfred fixed) for Alfred's patch to make glibc
build with gcc-4.0:
http://sources.redhat.com/ml/libc-alpha/2005-08/msg00018.html>
#v+
- *((integer_t *) t)++ = (integer_t) arg;
+ *(integer_t *) t = (integer_t) arg;
+ t += sizeof (integer_t);
#else
- *((integer_t *) p)++ = (integer_t) arg;
+ *(integer_t *) p = (integer_t) arg;
+ p += sizeof (integer_t);
#v-
... should rather be...
#v+
- *((integer_t *) t)++ = (integer_t) arg;
+ *(integer_t *) t = (integer_t) arg;
+ t = (mach_msg_type_t *) ((integer_t *) t + 1);
#else
- *((integer_t *) p)++ = (integer_t) arg;
+ *(integer_t *) p = (integer_t) arg;
+ p = (void *) ((integer_t *) p + 1);
#v-
Correct?
Regards,
Thomas
Fri Sep 2 15:22:00 CEST 2005 Thomas Schwinge <[EMAIL PROTECTED]>
* Make it build with gcc-4.0: Fixes.
diff -rN -u old-hurd-0-branch.1.tmp-1/boot/boot.c
new-hurd-0-branch.1.tmp-1/boot/boot.c
--- old-hurd-0-branch.1.tmp-1/boot/boot.c 2005-09-03 02:00:26.465879504
+0200
+++ new-hurd-0-branch.1.tmp-1/boot/boot.c 2005-09-03 02:00:26.495874944
+0200
@@ -368,16 +368,16 @@
+ (argc + 2) * sizeof (char *) + sizeof (integer_t));
p = args + ((vm_address_t) arg_pos & (vm_page_size - 1));
*(int *) p = argc;
- p += sizeof (int *);
+ p = (char *) ((int *) p + 1);
for (i = 0; i < argc; i++)
{
*(char **) p = argv[i] - strings + (char *) str_start;
- p += sizeof (char **);
+ p = (char *) ((char **) p + 1);
}
*(char **) p = 0;
- p += sizeof (char **);
+ p = (char *) ((char **) p + 1);
*(char **) p = 0;
- p += sizeof (char **);
+ p = (char *) ((char **) p + 1);
memcpy (p, strings, stringlen);
bzero (args, (vm_offset_t) arg_pos & (vm_page_size - 1));
vm_write (task, trunc_page ((vm_offset_t) arg_pos), (vm_address_t) args,
___
Bug-hurd mailing list
Bug-hurd@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-hurd