On Thu, Jun 26, 2008 at 09:09:54PM +0200, Antoine Reilles wrote: > Hi, > > When trying to build a -current release for amd64 from a MacOSX 10.5 > machine, ./build.sh release fails to set the ramdisk for the install > kernel, with the following message: > > /Volumes/Data/NetBSD/obj/tooldir.Darwin-9.3.0-i386/bin/x86_64--netbsd-mdsetimage > -v netbsd-INSTALL.tmp > /Volumes/Data/NetBSD/obj/distrib/amd64/ramdisks/ramdisk/ramdisk.fs > usage: > /Volumes/Data/NetBSD/obj/tooldir.Darwin-9.3.0-i386/bin/x86_64--netbsd-mdsetimage > [-svx] [-b bfdname] kernel image > supported targets: elf64-x86-64 elf32-i386 a.out-i386-netbsd coff-i386 > efi-app-ia32 elf64-little elf64-big elf32-little elf32-big srec > symbolsrec tekhex binary ihex I've tracked this down to libiberty, which the tools version of mdsetimage is linked with. It includes a GNU implementation of getopt, and apparently the linker on Mac OS X get confused using optind and optarg from one implementation and getopt from the other (the other implementation being the libc). Of course that leads to interesting results. It confuses gdb too, because it gets the right value of optind, but the code doesn't. My knowledge of Mac OS X is too limited to debug it further. I'm pretty sure though that defining ELIDE_CODE in libiberty's getopt will at least allow mdsetimage to run properly. -- Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost "See the look on my face from staying too long in one place [...] every time the morning breaks I know I'm closer to falling" KT Tunstall, Saving My Face, Drastic Fantastic, 2007.
Description: PGP signature