Subject: gcc4 & amd
To: None <current-users@netbsd.org>
From: Kurt Schreiner <ks@ub.uni-mainz.de>
List: current-users
Date: 06/06/2006 14:18:42
Hi,
compiling -current (from ~ 8:00 UTC this morning) on amd finally
finished with:
postinstall-fix-obsolete ===> .
=== Removing obsolete files ===
Source directory: /u/NetBSD/src
Target directory: /u/NetBSD/arch/amd64/dest/
obsolete fix:
Removed obsolete directory /u/NetBSD/arch/amd64/dest//var/spool/mqueue
Removed obsolete file /u/NetBSD/arch/amd64/dest//usr/share/man/man8/mail.local.8
Removed obsolete file /u/NetBSD/arch/amd64/dest//usr/share/man/cat8/mail.local.0
Removed obsolete directory /u/NetBSD/arch/amd64/dest//usr/libexec/sm.bin
Removed obsolete directory /u/NetBSD/arch/amd64/dest//usr/include/libmilter
Removed obsolete file /u/NetBSD/arch/amd64/dest//etc/mail/local-host-names
postinstall fixes passed: obsolete
postinstall fixes failed:
===============================
checkflist ===> distrib/sets
======= 1 extra files in DESTDIR =========
Files in DESTDIR but missing from flist.
File is obsolete or flist is out of date ?
------------------------------------------
./usr/include/mm_malloc.h
========= end of 1 extra files ===========
--- checkflist ---
*** [checkflist] Error code 1
1 error
nbmake: stopped in /u/NetBSD/src/distrib/sets
--- distribution ---
*** [distribution] Error code 2
1 error
nbmake: stopped in /u/NetBSD/src
ERROR: Failed to make distribution
*** BUILD ABORTED ***
To get there, two patches are needed:
First: As fatsz is u_int32_t but %zu want's something of type size_t just
cast to the required type. This makes fat.c compilable, but I don't know
if this's "The Right Thing" (tm) to do. (And haven't tested on other archs!)
diff -u src/sbin/fsck_msdos/fat.c{.old,}
--- src/sbin/fsck_msdos/fat.c.old 2006-06-06 13:55:13.000000000 +0200
+++ src/sbin/fsck_msdos/fat.c 2006-06-06 13:55:20.000000000 +0200
@@ -477,7 +477,7 @@
buffer = malloc(fatsz = boot->FATsecs * boot->BytesPerSec);
if (buffer == NULL) {
- perr("No space for FAT sectors (%zu)", fatsz);
+ perr("No space for FAT sectors (%zu)", (size_t)fatsz);
return FSFATAL;
}
memset(buffer, 0, fatsz);
And second: To get gcc4 quiet on attribute((__packed__)) in pxeboot.c
add -Wno-attributes to CFLAGS in .../Makefile.booters if ${MACHINE_ARCH}
== "x86_64" and ${HAVE_GCC} == 4. (And not only when ${MACHINE_ARCH} is
not x86_64!)
diff -u src/sys/arch/i386/stand/Makefile.booters{.old,}
--- src/sys/arch/i386/stand/Makefile.booters.old 2006-06-06 13:59:11.000000000 +0200
+++ src/sys/arch/i386/stand/Makefile.booters 2006-06-06 14:02:24.000000000 +0200
@@ -15,6 +15,9 @@
.if ${MACHINE_ARCH} == "x86_64"
CPUFLAGS= -m32
CPPFLAGS+= -DBOOT_ELF64
+.if ${HAVE_GCC} == 4
+CPUFLAGS+= -Wno-attributes
+.endif
.else
.if ${HAVE_GCC} == 3
CPUFLAGS= -mcpu=i386
Send-pr necessary?
Kurt