From owner-freebsd-current@FreeBSD.ORG Sat Oct 22 19:11:10 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 055451065673 for ; Sat, 22 Oct 2011 19:11:10 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [94.23.254.147]) by mx1.freebsd.org (Postfix) with ESMTP id BC0FF8FC19 for ; Sat, 22 Oct 2011 19:11:09 +0000 (UTC) Received: from baby-jane.lamaiziere.net (63.9.74.86.rev.sfr.net [86.74.9.63]) by smtp.lamaiziere.net (Postfix) with ESMTPA id 95DEEFAA31A5 for ; Sat, 22 Oct 2011 20:51:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id 04A56730F9 for ; Sat, 22 Oct 2011 20:51:29 +0200 (CEST) Date: Sat, 22 Oct 2011 20:51:29 +0200 From: Patrick Lamaiziere To: FreeBSD Current Message-ID: <20111022205129.32569ec5@davenulle.org> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: 9.0 RC1/Clang / illegal instruction (Signal 4) in gengtype while building cc_tools on i586. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 19:11:10 -0000 Hello, On my Soekris net5501 (AMD Geode i586 CPU) clang make buildworld fails on an illegal instruction "nopw %cs:0x0(%eax,%eax,1)". # make buildworld ... ranlib libiberty.a clang -O2 -pipe -I. -DGCCVER=\"4.2\" -DIN_GCC -DHAVE_CONFIG_H -DPREFIX=\"/usr\" -I/usr/obj/usr/src/gnu/usr.bin/cc/cc_tools/../cc_tools -I/usr/src/gnu/usr.bin/cc/cc_tools/../cc_tools -I/usr/src/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcc -I/usr/src/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcc/config -I/usr/src/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcclibs/include -I/usr/src/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcclibs/libcpp/include -I/usr/src/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcclibs/libdecnumber -g -DGENERATOR_FILE -DHAVE_CONFIG_H -std=gnu89 -I/usr/obj/usr/src/tmp/legacy/usr/include -L/usr/obj/usr/src/tmp/legacy/usr/lib -o gengtype gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o errors.o libiberty.a clang: warning: argument unused during compilation: '-g' clang: warning: argument unused during compilation: '-std=gnu89' ./gengtype *** Signal 4 Stop in /usr/src/gnu/usr.bin/cc/cc_tools. *** Error code 1 # cd /usr/obj/usr/src/gnu/usr.bin/cc/cc_tools # gdb ./gengtype (gdb) r Starting program: /usr/obj/usr/src/gnu/usr.bin/cc/cc_tools/gengtype Program received signal SIGILL, Illegal instruction. 0x08048b24 in do_typedef (s=0x80532bf "CUMULATIVE_ARGS", pos=0x805e1a4) at /usr/src/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcc/gengtype.c:103 103 { (gdb) disas 0x08048b24 Dump of assembler code for function do_typedef: 0x08048b10 : push %ebp 0x08048b11 : mov %esp,%ebp 0x08048b13 : push %ebx 0x08048b14 : push %edi 0x08048b15 : push %esi 0x08048b16 : sub $0xc,%esp 0x08048b19 : mov $0x805e1d4,%edi 0x08048b1e : mov 0x10(%ebp),%esi 0x08048b21 : mov 0x8(%ebp),%ebx 0x08048b24 : nopw %cs:0x0(%eax,%eax,1) ---------------- /etc/make.conf for clang (same as the wiki) .if !defined(CC) || ${CC} == "cc" CC=clang .endif .if !defined(CXX) || ${CXX} == "c++" CXX=clang++ .endif .if !defined(CPP) || ${CPP} == "cpp" CPP=clang -E .endif # Don't die on warnings NO_WERROR= WERROR= # Don't forget this when using Jails! #NO_FSCHG= ------------------ Help will be welcome. Thanks regards.