Dear David, after sending this, I realized that it'll require more thought getting a gcc-4.4.1 to work as the "cross" compiler in the build. For ccache I use in .shinit something like eval alias ${ROOT}/tooldir/bin/i386--netbsdelf-gcc="CCACHE_HASHCC=\\\"\"\\\`${ROOT}/tooldir/bin/i386--netbsdelf-gcc -v 2>&1\\\`\"\\\"\ CCACHE_LOGFILE=/tmp/ccache.log\ CCACHE_DIR=/mnt/exthd/ccache\ ccache\ ${ROOT}/tooldir/bin/i386--netbsdelf-gcc" which obviously isn't going to work in your case. Best regards, Marko At Mon, 21 Sep 2009 17:11:16 -0400, Marko Schütz wrote: > > 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:
pgpfVYYYzo0Qp.pgp
Description: PGP signature