Place all temporary files within a single, quasi-atomically created
temporary directory rather than relying on unsafe 'mktemp -u'. This
prevents possible race conditions in case two parallel 'mktemp -u' calls
returned the same path. Additionally, it reduces TMPDIR pollution by
keeping all test files in a single subdirectory.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Newer versions of OS X use the blocks extension in VDA-related headers.
Some compilers, like current gcc, do not support the blocks extension
and fail to compile code using those headers.
If we only have a target compiler but no host compiler, the $type
variable will be empty once.
(Currently we fail to do a cross build if no host compiler is available
due to using the host compiler for processing option lists though.
But despite that, this comparison in configure needs quotes.)
Signed-off-by: Martin Storsjö <martin@martin.st>
This can be useful to filter out noise in known-broken scenarios like
miscompilation by legacy compilers and similar.
Originally based on a patch by Diego Biurrun.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
This moves work from the configure to the Make stage where it can
be parallelized and ensures that pkgconfig files are updated when
library versions change.
Bug-Id: 449
This moves work from the configure to the Make stage where it can
be parallelized and ensures that shared libraries are built with
the right version number in the filename.
Without any optimization flags, MSVC does no dead code elimination (DCE) at
all, even for the most trivial cases. DCE is a prerequisite for building libav
correctly, otherwise there are undefined references to functions for other
architectures and disabled components.
-O1 is the minimal optimization flag for MSVC that does include DCE.
-pie was added to C flags for ThreadSanitizer in commit
19f251a288. Under clang 3.8.0, the -pie
flag causes a compiler warning and a linker error when running configure
--toolchain=clang-tsan. Here is an excerpt from config.log:
clang ... -fsanitize=thread -pie -std=c11 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.A8SsaoCF.o /tmp/ffconf.JdpujQlD.c
clang: warning: argument unused during compilation: '-pie'
clang -fsanitize=thread -pie -Wl,--as-needed -o /tmp/ffconf.2iYA4bsw /tmp/ffconf.A8SsaoCF.o -lm -lm -lbz2 -lz -pthread
/usr/bin/ld: /tmp/ffconf.A8SsaoCF.o: relocation R_X86_64_PC32 against undefined symbol `atan2f@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
To be conservative, I changed -pie to -fPIE. But the documentation seems
to imply just -fsanitize=thread is enough:
http://clang.llvm.org/docs/ThreadSanitizer.htmlhttps://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual
Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Handle extralibs in the standard way, add missing pthreads dependency.
Also globally check for -fobj-arc with Objective-C compilers since
that option is useful for other Objective-C code as well.
Supporting the system was a nice joke for the 9 release, but it has
run its course. Nowadays Plan 9 receives no testing and has no
practical usefulness.