Le 21/10/15 15:06, Greg Troxel a écrit :
Tobias Nygren <tnn%NetBSD.org@localhost> writes:The purpose of /var/tmp is to be a globally writable temp directory. If you do "ktrace gcc -o test test.c" you will find that the gcc + binutils toolchain too creates many temporary files there, unless -pipe is used. A good solution to preserve the life of your ssd is to mount tmpfs on /tmp and /var/tmp. But beware that this breaks virecover.That's all kind of true, except that /var/tmp is supposed to persist and tmp is not. So it seems broken for anything to put ephemera in /var/tmp. I see your point that gcc does this too. Do you know why they made that choice?
As joerg mentioned, it kinda depends if P_tmpdir is defined when things are built, not to mention the value of TMPDIR.
Turns out in my case (and from what I see, NetBSD) stdio.h defines P_tmpdir (under conditions) to "/var/tmp/".
I notice that it appears Linux doesn"t bother defining it and FreeBSD changed a number of years back from "/var/tmp/" to simply "/tmp/".
I'm finding I also need to define TMPDIR in my .xinitrc otherwise gnome and co all use /var/tmp!
So far simple builds seem fine with the patch indicated prior, I had to put off the bulk build but I should have one (if nobody else does prior) by this weekend.
cheers