]> git.proxmox.com Git - mirror_qemu.git/commit - configure
configure: Put tempfiles in a subdir of the build directory
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 23 May 2014 16:07:24 +0000 (17:07 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 23 May 2014 20:34:38 +0000 (00:34 +0400)
commit8cd05ab65a92a592e771a0a1847c7e5505d9a024
tree05b83733766e2de26962810c82553767d95240f5
parent9c132c7f64c0605f5c5be79508fa53676be642f9
configure: Put tempfiles in a subdir of the build directory

When libtool support was added to configure, the new temporary files
were left out of the list of files cleaned up on exit; this results
in a lot of stale .lo files being left around in /tmp. Worse, libtool
creates a /tmp/.libs directory which we can't easily clean up.

Put all our temporary files in a single temporary directory created
as a subdirectory of the build directory, so we can easily clean it up,
and don't need fragile or complicated code for creation to avoid it
clashing with temporary directories from other instances of QEMU
configure or being subject to attack from adversaries who can write
to /tmp.

Since the temporaries now live in the build tree, we have no
need to jump through hoops with a trap handler to try to remove
them when configure exits; this fixes some weird bugs where hitting
^C during a configure run wouldn't actually make it stop, because
we would run the trap handler but then not stop. (It is possible
to get the trap handler semantics right but it is convoluted largely
because of bugs in dash, so it is simpler to just avoid it.)

Note that "temporary files go in the build directory, not /tmp" is
the way autoconf behaves.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
.gitignore
configure