Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Note: One of the buildroot autobuilder provided powerpc toolchains
seem to not provide the sys/auxv.h header file, resulting in a
compile failure (see [1] for details).
[1] http://lists.busybox.net/pipermail/buildroot/2019-September/259732.html
Check if the compiler supports __attribute__((target("cpu=power8")))
and __attribute__((target("cpu=power9")))
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
FLAC__CPU_PPC wasn't catching powerpcle or powerpc64le. Fix that and
add a new define for FLAC__CPU_PPC64.
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
The underscores are wrong. The comment is also correct.
Also remove the configure.ac option. Otherwise it tries to compile the
windows unicode stuff which POSIX(cygwin) does not understand.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* Furthermore, use NDEBUG globally to detect the presence
of building with more debug output information.
AX_CHECK_ENABLE_DEBUG is easier to use, and nowadays
Gnome has also switched to it from its own custom solution.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Not all linux hosts match the *-pc-linux-gnu wildcard, causing build
failures for older glibc versions where we need to link with -lrt for
clock_gettime - E.G.:
- arm-unknown-linux-musleabihf
- powerpc-unknown-linux-gnuspe
- bfin-linux-linux-uclibc
..
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Some operating systems such as OS/2 don't have any of the CLOCK* API
functions so add gettimeofday() as a fallback.
Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com>
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Handy for toolchains or operating systems that don't support AVX or AVX2
like OS/2.
Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com>
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
On some setups, benchmark_residual linkage fails with an undefined
reference to clock_gettime(). Adding -lrt fixes that.
Patch-from: Ozkan Sezer <sezeroz@gmail.com>
For some reason, the build fails when using GCC 4.7 due to the implicit
-finline-functions option passed to the compiler when -O3 is enabled,
which does not happen in newer versions of GCC, probably due to some of
the "General Optimizer Improvements" included in 4.8 (see [1]).
Fortunately, we don't need to disable -finline-functions completely but
just do it for "small functions", which is what this patch does.
[1] https://gcc.gnu.org/gcc-4.8/changes.html
Closes: https://sourceforge.net/p/flac/bugs/429/
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
The x32 architecture uses and ILP32 (32 bit ints, longs and pointers)
on an x86_64 CPU. Since the CPU is x86_64 we need to set FLAC__CPU_X86_64
even though the pointer size is 32 bits.
Patch-from: Stuart Shelton
Closes: https://sourceforge.net/p/flac/bugs/427/
* Correct definition of FLAC__HAS_X86INTRIN in config.h file.
* Correct comparison of sse_os with 'true' instead of 'yes'.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
The '-g' was in-correctly getting zapped from all CFLAGS expressions
including eg:
-mfloat-gprs=double (for powerpc e500) -> -mfloatprs=double.
Reported-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
* Removes FLAC__lpc_restore_signal_asm_ppc_altivec_16*
from lpc.h and stream_decoder.c
* Removes PPC-specific code from cpu.c and cpu.h
* Removes PPC stuff from libFLAC/Makefile.lite and build/*.mk
* Removes as/gas/PPC-specific stuff from configure.ac and
libFLAC/Makefile.am*
* Removes libFLAC/ppc folder and remove "src/libFLAC/ppc*/Makefile"
lines from configure.ac
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Previously CFLAGS had a -O3 at the start and a -O2 at the end. According
to the GCC docs:
https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/Optimize-Options.html
"If you use multiple -O options, with or without level numbers,
the last such option is the one that is effective" which means that
GCC doesn't try to use SIMD to vectorize the code, etc."
Autoconf detects the Clang compiler as GNU GCC (clang sets defines like
__GNUC__ etc) but Clang is *not* completely compatible. If we detect
Clang we set ac_vc_c_compiler_gnu to 'no'.
When compiling for ia32 on an x86_64 kernel, the configure script
was not detecting the ability to do asm optimisations because the
configure script was detecting the x86_64 kernel not the ia32
user space.
Libraries that are used internally by libFLAC(++) but are not part of
their API should be listed in pkg-config "private" clauses. Otherwise
executables that are linked dynamically against libFLAC(++) will have
unneeded direct dependencies (overlinking).
Based on a patch by Brad Smith from
https://sourceforge.net/p/flac/bugs/397/
that I updated to only include ogg if libFLAC is actually built with
ogg support.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This option is disabled by default because it is known not to work
on FreeBSD 9.1 and for Linux -> Windows cross compiling using the
Debian MinGW-w64 tool chain.
It is known to work for native compiles in Debian testing and
OpenBSD 5.2.
Extra compile options are detected at configure time with new
XIPH_ADD_*FLAGS m4 macros.
Options enabled include -Wextra, -D_FORTIFY_SOURCE=2 and stack
protection.
When building outside of the source tree, the Doxyfile needs to be
generated in the build tree and should point to the proper paths for
include directories and html footer.
The generated api files to install should also be taken from the build
tree instead of the source tree.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
In particular:
- quote several macro arguments properly
- switch to the extended version of AC_INIT
- replace AM_CONFIG_HEADER by AC_CONFIG_HEADERS
- remove obsolete extra AC_CHECK_SIZEOF param
- upgrade minimal automake version from 1.7 to 1.11
(which is when dist-xz was introduced)
Signed-off-by: Max Horn <max@quendi.de>
Also removed some pointless AC_SUBST invocation, which would only be
necessary if the Makefiles were using the results of the header
detection, which they are not.
Signed-off-by: Max Horn <max@quendi.de>
Previously, we only printed whether the used compiler was
detected as gcc if the answer was positive. Now we always
print the result (but the GCC version still is only
printed when we are using GCC)
Signed-off-by: Max Horn <max@quendi.de>
The autoreconf tool is provided by autoconf to do what custom
autogen.sh scripts in many projects used to do. Only it is more
robust and widely tested. It has been available for several years,
too. No reason to rely on custom code for this.
Signed-off-by: Max Horn <max@quendi.de>
With gcc >= 4 and ELF, set default visibility to hidden and make visible
only the symbols with FLAC_API or FLACPP_API.
A convenience libFLAC-static.la is created for test_libFLAC as it
depends on the hidden symbols.
recent autotools require calling AM_PROG_AR before LT_INIT
this macro needs to be conditionally defined as it is not
present in old versions.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
- INCLUDES is deprecated, and CPPFLAGS is an user-defined
variable, use the proper AM_CPPFLAGS instead
- Remove FLAC__INLINE definition, providing proper
replacement for MSVC compilers.
- Detect if we have C99 's lround and provide a replacement
for windows...