Subject: Re: GCC 3 and BSD style makefile?
To: <>
From: leam <leam@reuel.net>
List: netbsd-users
Date: 05/10/2003 19:49:33
Jeremy C. Reed wrote:
> On Sat, 10 May 2003, leam wrote:
> 
> 
>>Will solving this makefile issue also ensure gcc3 is my default gcc? I
>>put /usr/pkg/bin in front of /usr/bin in my path, and made a link from
>>/usr/pkg/gcc-3.2.2/bin/gcc to /usr/pkg/bin/gcc, but a "which gcc"
>>returns /usr/bin/gcc.
> 
> 
> "which" was discussed in a recent NetBSD thread.
> 
> Try "whereis -p gcc"

# whereis -p gcc
/usr/pkg/bin/gcc
/usr/bin/gcc

> Or "type gcc" (depending on your shell supports that).

# echo $PATH
/usr/pkg/bin:/usr/pkg/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
# type gcc
gcc is a tracked alias for /usr/bin/gcc
# echo $SHELL
/bin/sh

I'm wondering about that "tracked alias"

>>If i run /usr/pkg/bin/gcc -v, I get the proper version 3.
> 
> Does "gcc -v" return that version 3 too? (If not your path wasn't really
> set.)
> 

# gcc -v
Using builtin specs.
gcc version 2.95.3 20010315 (release) (NetBSD nb4)
# echo $PATH
/usr/pkg/bin:/usr/pkg/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
# /usr/pkg/bin/gcc -v
Reading specs from 
/usr/pkg/gcc-3.2.2/lib/gcc-lib/sparc64--netbsd/3.2.2/specs
Configured with: ./configure --host=sparc64--netbsd 
--infodir=/usr/pkg/info --prefix=/usr/pkg/gcc-3.2.2 --enable-shared
Thread model: single
gcc version 3.2.2

ciao!

leam