tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: "right" way to upgrade to gcc-4.4.1



Dear David,

At Sun, 20 Sep 2009 17:09:17 -0700,
david wrote:
> 
> Hello,
> 
> (Sorry for the HTML post, resending in plain text.)
> 
> pkgsrc head recently added support for gcc-4.4.1.  I've tried it and
> it works well (save for a BUILD_JAVA crash).  I'd like to use
> gcc-4.4.1 to rebuild the NetBSD world (seamlessly picked up by
> build.sh) for i386 and a few cross targets.  My question is:  What's
> the "right" way to replace gcc-4.1.3 with the now-working gcc-4.4.1?

I have not tried this out, but you can use shell aliases including
full paths. I have used something similar to get an unmodified source
tree to compile using ccache (have to clean this up and share it
here...). 

The aliases are not passed to any children. That can be remedied by
setting

SHELL='ENV=/home/marko/tmp/.shinit sh' 

where /home/marko/tmp/.shinit contains e.g.

alias /usr/bin/gcc='CCACHE_HASHCC="`/usr/bin/gcc -v 2>&1`" 
CCACHE_LOGFILE=/tmp/ccache.log  CCACHE_DIR=/mnt/exthd/ccache ccache 
/usr/bin/gcc'
alias /usr/bin/g++='CCACHE_HASHCC="`/usr/bin/g++ -v 2>&1`" 
CCACHE_LOGFILE=/tmp/ccache.log  CCACHE_DIR=/mnt/exthd/ccache ccache 
/usr/bin/g++'
[..]

Some part of the build uses HOST_SH and resets the SHELL variable. So
I currently use

HOST_SH='/home/marko/tmp/mysh'

where /home/marko/tmp/mysh contains:

#!/bin/sh
export ENV=/home/marko/tmp/.shinit
sh "$@"

Did I say I have to clean this up...?

You could use something similar to alias /usr/bin/gcc to
/usr/pkg/bin/gcc441 or whatever name it uses.

Hope this helps and best regards,

Marko

Attachment: pgpDL4TcEgCkH.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index