The temp executable file isn't created along with the others,
since the file name depends on the executable extension, which
depends on target_os, and the --toolchain option can change
the default value of target_os.
---
The previous version of this patch didn't set pkg-config properly
and would also fail to set target_os properly in some cases.
---
configure | 61 +++++++++++++++++++++++++++++++------------------------------
1 file changed, 31 insertions(+), 30 deletions(-)
diff --git a/configure b/configure
index b83f9a3..86aac19 100755
--- a/configure
+++ b/configure
@@ -2248,6 +2248,37 @@ strip="${cross_prefix}${strip}"
sysinclude_default="${sysroot}/usr/include"
+# set temporary file name
+: ${TMPDIR:=$TEMPDIR}
+: ${TMPDIR:=$TMP}
+: ${TMPDIR:=/tmp}
+
+if ! check_cmd mktemp -u XXXXXX; then
+ # simple replacement for missing mktemp
+ # NOT SAFE FOR GENERAL USE
+ mktemp(){
+ echo "${2%%XXX*}.${HOSTNAME}.${UID}.$$"
+ }
+fi
+
+tmpfile(){
+ tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 &&
+ (set -C; exec > $tmp) 2>/dev/null ||
+ die "Unable to create temporary file in $TMPDIR."
+ append TMPFILES $tmp
+ eval $1=$tmp
+}
+
+trap 'rm -f -- $TMPFILES' EXIT
+
+tmpfile TMPASM .asm
+tmpfile TMPC .c
+tmpfile TMPH .h
+tmpfile TMPO .o
+tmpfile TMPS .S
+tmpfile TMPSH .sh
+tmpfile TMPV .ver
+
case "$toolchain" in
clang-asan)
cc_default="clang"
@@ -2322,37 +2353,7 @@ exesuf() {
EXESUF=$(exesuf $target_os)
HOSTEXESUF=$(exesuf $host_os)
-# set temporary file name
-: ${TMPDIR:=$TEMPDIR}
-: ${TMPDIR:=$TMP}
-: ${TMPDIR:=/tmp}
-
-if ! check_cmd mktemp -u XXXXXX; then
- # simple replacement for missing mktemp
- # NOT SAFE FOR GENERAL USE
- mktemp(){
- echo "${2%%XXX*}.${HOSTNAME}.${UID}.$$"
- }
-fi
-
-tmpfile(){
- tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 &&
- (set -C; exec > $tmp) 2>/dev/null ||
- die "Unable to create temporary file in $TMPDIR."
- append TMPFILES $tmp
- eval $1=$tmp
-}
-
-trap 'rm -f -- $TMPFILES' EXIT
-
-tmpfile TMPASM .asm
-tmpfile TMPC .c
tmpfile TMPE $EXESUF
-tmpfile TMPH .h
-tmpfile TMPO .o
-tmpfile TMPS .S
-tmpfile TMPSH .sh
-tmpfile TMPV .ver
unset -f mktemp
--
1.7.9.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel