From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 17 02:02:25 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8EC61065670 for ; Sun, 17 Jul 2011 02:02:25 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id 54BA28FC17 for ; Sun, 17 Jul 2011 02:02:25 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id p6H22NmZ052195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 16 Jul 2011 21:02:23 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.5/8.14.5) with ESMTP id p6H22MCe088370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 16 Jul 2011 21:02:22 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.5/8.14.5/Submit) id p6H22LOT088177; Sat, 16 Jul 2011 21:02:21 -0500 (CDT) (envelope-from dan) Date: Sat, 16 Jul 2011 21:02:21 -0500 From: Dan Nelson To: "Julian H. Stacey" Message-ID: <20110717020220.GM6611@dan.emsphone.com> References: <201107170119.p6H1JdII020844@fire.js.berklix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107170119.p6H1JdII020844@fire.js.berklix.net> X-OS: FreeBSD 8.2-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Sat, 16 Jul 2011 21:02:23 -0500 (CDT) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 Cc: hackers@freebsd.org Subject: Re: Freebsd-7.4 + std gcc 4.2.1 fails to honour -march=i586 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jul 2011 02:02:25 -0000 In the last episode (Jul 17), Julian H. Stacey said: > Hi all, > ENVIRONMENT: > Standard > gcc version 4.2.1 20070719 [FreeBSD] > that comes with > FreeBSD 7.4-RELEASE > on my 686 host with > CFLAGS += -march=i586 > in > /etc/make.conf > used with > cd /usr/src/bin/who ; make clean ; make cleandir ; make clean ; make > reports > Warning: Object directory not changed from original /usr/src/usr.bin/who > cc -O2 -fno-strict-aliasing -march=i586 -c /usr/src/usr.bin/who/who.c > cc -O2 -fno-strict-aliasing -march=i586 -o who who.o > looking with > file who > reports > who: ELF 32-bit LSB executable, Intel 80386, version 1 > (FreeBSD), for FreeBSD 7.4, dynamically linked (uses shared > libs), FreeBSD-style, not stripped > > Problem: > Use it from a 586 7.4-RELEASE host (AMD+NFS) > file /host/sony/usr/src/usr.bin/who/who > /host/sony/usr/src/usr.bin/who/who: ELF 32-bit LSB executable, > Intel 80386, version 1 (FreeBSD), for FreeBSD 7.4, dynamically > linked (uses shared libs), FreeBSD-style, not stripped > /host/sony/usr/src/usr.bin/who/who > fails with > Illegal instruction Were the crt*.o files on your fast machine also compiled with -march=i586 ? If you run gdb on the core file, can you determine what function the bad instruction is in? -- Dan Nelson dnelson@allantgroup.com