mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
Fix posix_memalign checks.
git-svn-id: svn://localhost/ardour2/branches/3.0@12316 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
8aca90e593
commit
8647471379
5 changed files with 3 additions and 11 deletions
|
|
@ -1061,7 +1061,6 @@
|
|||
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3)",
|
||||
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4)",
|
||||
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5)",
|
||||
NO_POSIX_MEMALIGN,
|
||||
);
|
||||
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "PACKAGE=\"\\\"libardour\\\"\"";
|
||||
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2 = "CONFIG_DIR=\"\\\"/Library/Application\\ Support/Ardour/config\\\"\"";
|
||||
|
|
@ -1110,7 +1109,6 @@
|
|||
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3)",
|
||||
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4)",
|
||||
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5)",
|
||||
NO_POSIX_MEMALIGN,
|
||||
);
|
||||
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "PACKAGE=\"\\\"libardour\\\"\"";
|
||||
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2 = "CONFIG_DIR=\"\\\"/Library/Application\\ Support/Ardour/config\\\"\"";
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ FPU::FPU ()
|
|||
supported, otherwise, it isn't.
|
||||
*/
|
||||
|
||||
#ifdef NO_POSIX_MEMALIGN
|
||||
#ifndef HAVE_POSIX_MEMALIGN
|
||||
fxbuf = (char **) malloc (sizeof (char *));
|
||||
assert (fxbuf);
|
||||
*fxbuf = (char *) malloc (512);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ static const int CPU_CACHE_ALIGN = 16; /* arguably 32 on most arches, but it mat
|
|||
|
||||
int cache_aligned_malloc (void** memptr, size_t size)
|
||||
{
|
||||
#ifdef NO_POSIX_MEMALIGN
|
||||
#ifndef HAVE_POSIX_MEMALIGN
|
||||
if (((*memptr) = malloc (size)) == 0) {
|
||||
fatal << string_compose (_("Memory allocation error: malloc (%1 * %2) failed (%3)"),
|
||||
CPU_CACHE_ALIGN, size, strerror (errno)) << endmsg;
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@ def configure(conf):
|
|||
conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT',mandatory=False)
|
||||
conf.check(header_name='execinfo.h', define_name='HAVE_EXECINFO',mandatory=False)
|
||||
conf.check(header_name='unistd.h', define_name='HAVE_UNISTD',mandatory=False)
|
||||
if conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', cflags='-D_XOPEN_SOURCE=600',mandatory=False) == False:
|
||||
conf.define ('NO_POSIX_MEMALIGN',1)
|
||||
conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', cflags='-D_XOPEN_SOURCE=600', define_name='HAVE_POSIX_MEMALIGN', mandatory=False)
|
||||
|
||||
conf.write_config_header('libpbd-config.h', remove=False)
|
||||
|
||||
|
|
|
|||
5
wscript
5
wscript
|
|
@ -231,11 +231,6 @@ def set_compiler_flags (conf,opt):
|
|||
if not build_host_supports_sse:
|
||||
print("\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)")
|
||||
|
||||
# check this even if we aren't using FPU optimization
|
||||
if not conf.is_defined('HAVE_POSIX_MEMALIGN'):
|
||||
optimization_flags.append("-DNO_POSIX_MEMALIGN")
|
||||
debug_flags.append("-DNO_POSIX_MEMALIGN")
|
||||
|
||||
# end optimization section
|
||||
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue