From owner-freebsd-questions@FreeBSD.ORG Thu Apr 29 23:15:28 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECCF616A4CE for ; Thu, 29 Apr 2004 23:15:28 -0700 (PDT) Received: from mail.ebit.ca (ebit.ca [207.136.103.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B64F43D3F for ; Thu, 29 Apr 2004 23:15:28 -0700 (PDT) (envelope-from jason+lists.freebsd@lixfeld.ca) Received: from [192.168.100.66] (trek.lixfeld.ca [216.7.194.254]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mail.ebit.ca (Postfix) with ESMTP id E9EE73C8014 for ; Fri, 30 Apr 2004 02:56:56 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v613) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: freebsd-questions@freebsd.org From: Jason Lixfeld Date: Fri, 30 Apr 2004 02:15:22 -0400 X-Mailer: Apple Mail (2.613) Subject: GCC3.4 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2004 06:15:29 -0000 I've just installed gcc3.4 to, among other things take advantange of the -march=opteron options. I'm in quite a bit of a conundrum here because I've installed, changed the order in $PATH to look in /usr/local/bin before /usr/bin for gcc, cc etc but when I run a make buildworld it fails saying it doen't recognize the -march=opterion option. This means that the old system version of gcc is still being referenced somehow, even though I've set the paths: # env USER=jlixfeld SSH_CLIENT=192.168.100.66 56715 22 MAIL=/var/mail/jlixfeld SHLVL=1 OLDPWD=/usr/bin HOME=/root SSH_TTY=/dev/ttyp0 PAGER=more ENV=/usr/home/jlixfeld/.shrc LOGNAME=jlixfeld _=buildkernel BLOCKSIZE=K TERM=xterm-color PATH=/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/ X11R6/bin:/usr/home/jlixfeld/bin SHELL=/bin/sh PWD=/usr/src SSH_CONNECTION=192.168.100.66 56715 192.168.100.184 22 FTP_PASSIVE_MODE=YES EDITOR=vi # which gcc /usr/local/bin/gcc # gcc -v Reading specs from /usr/local/lib/gcc/x86_64-portbld-freebsd5.2/3.4.0/specs Configured with: ./..//gcc-3.4-20040414/configure --disable-nls --with-system-zlib --with-libiconv-prefix=/usr/local --program-suffix= --with-gxx-include-dir=/usr/local/lib/gcc/x86_64-portbld-freebsd5.2/ 3.4.0/include/c++/ --disable-shared --prefix=/usr/local x86_64-portbld-freebsd5.2 Thread model: posix gcc version 3.4.0 20040414 (prerelease) [FreeBSD] # make buildworld -------------------------------------------------------------- >>> Rebuilding the temporary build tree -------------------------------------------------------------- ................8<...................8<................... cc -O2 -pipe -march=opteron -I/usr/obj/usr/src/amd64/legacy/usr/include -c /usr/src/tools/build/dummy.c cc1: error: bad value (opteron) for -march= switch cc1: error: bad value (opteron) for -mcpu= switch *** Error code 1 Stop in /usr/src/tools/build. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. # if I rename /usr/bin/cc, I get this error now: cc -O2 -pipe -march=opteron -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -c /usr/src/sys/dev/aic7xxx/aicasm/aicasm.c cc: not found *** Error code 127 Stop in /usr/obj/usr/src/sys/GENERIC. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. # so there must be something, somewhere that is hardcoding the path of the compiler to be /usr/bin/ but I can't find where it is. What should I do here? rename all the old compilers and symlink them to /usr/local/bin?