Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jul 2011 21:02:21 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        "Julian H. Stacey" <jhs@berklix.com>
Cc:        hackers@freebsd.org
Subject:   Re: Freebsd-7.4 + std gcc 4.2.1 fails to honour -march=i586
Message-ID:  <20110717020220.GM6611@dan.emsphone.com>
In-Reply-To: <201107170119.p6H1JdII020844@fire.js.berklix.net>
References:  <201107170119.p6H1JdII020844@fire.js.berklix.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110717020220.GM6611>