From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 17 01:19:37 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 6AC2F106566B for ; Sun, 17 Jul 2011 01:19:37 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id EF7B28FC19 for ; Sun, 17 Jul 2011 01:19:36 +0000 (UTC) Received: from park.js.berklix.net (p5DCBD997.dip.t-dialin.net [93.203.217.151]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id p6H1JX65069610; Sun, 17 Jul 2011 01:19:34 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id p6H1Jn10006053; Sun, 17 Jul 2011 03:19:49 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.4/8.14.4) with ESMTP id p6H1JdII020844; Sun, 17 Jul 2011 01:19:44 GMT (envelope-from jhs@fire.js.berklix.net) Message-Id: <201107170119.p6H1JdII020844@fire.js.berklix.net> To: hackers@freebsd.org From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Linux Unix Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com/~jhs/cv/ Date: Sun, 17 Jul 2011 03:19:39 +0200 Sender: jhs@berklix.com Cc: "Julian H. Stacey" Subject: 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 01:19:37 -0000 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 It's nothing special about /who. Nothing to do with AMD+NFS, As I've used cp too before executing, I first found this while cross compiling from a fast 686 to install on a slow 586 for 7.3 to 7.4 upgrade, All these binaries were not excutable on the 586: /boot/loader /sbin/init /bin/sh /bin/csh getty Can someone else please confirm this observation ? Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Reply below, not above; Indent with "> "; Cumulative like a play script. Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.