Fix for bug Bootstrap/58918.
+2013-10-30 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * configure: Reconfigured. + * configure.ac: Add AC_FUNC_ALLOCA. + * runtime/sysdep-unix.c: Added check for alloca.h before + including it. + * config/x86/cilk-abi-vla.c: Likewise. + * runtime/cilk_fiber-unix.cpp: Likewise. + From-SVN: r204232
This commit is contained in:
parent
2283f03ac9
commit
fbdec79172
@ -1,3 +1,12 @@
|
||||
2013-10-30 Balaji V. Iyer <balaji.v.iyer@intel.com>
|
||||
|
||||
* configure: Reconfigured.
|
||||
* configure.ac: Add AC_FUNC_ALLOCA.
|
||||
* runtime/sysdep-unix.c: Added check for alloca.h before
|
||||
including it.
|
||||
* config/x86/cilk-abi-vla.c: Likewise.
|
||||
* runtime/cilk_fiber-unix.cpp: Likewise.
|
||||
|
||||
2013-10-29 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
* configure.ac: Add AM_MAINTAINER_MODE.
|
||||
|
@ -206,6 +206,7 @@ HEADERS = $(cilkinclude_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
|
1149
libcilkrts/configure
vendored
1149
libcilkrts/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -49,6 +49,7 @@ AC_PROG_CC
|
||||
# AC_CONFIG_MACRO_DIR([..])
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AM_ENABLE_MULTILIB(, ..)
|
||||
AC_FUNC_ALLOCA
|
||||
|
||||
# Get target configury.
|
||||
. ${srcdir}/configure.tgt
|
||||
|
@ -44,7 +44,20 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include <alloca.h>
|
||||
#if defined HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
#elif defined __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
#elif defined _AIX
|
||||
# define alloca __alloca
|
||||
#else
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
void *alloca (size_t);
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
@ -150,7 +163,8 @@ NORETURN cilk_fiber_sysdep::jump_to_resume_other_sysdep(cilk_fiber_sysdep* other
|
||||
__cilkrts_bug("Should not get here");
|
||||
}
|
||||
|
||||
|
||||
#pragma GCC push_options
|
||||
#pragma GCC optimize ("-O0")
|
||||
NORETURN cilk_fiber_sysdep::run()
|
||||
{
|
||||
// Only fibers created from a pool have a proc method to run and execute.
|
||||
@ -214,6 +228,7 @@ NORETURN cilk_fiber_sysdep::run()
|
||||
// User proc should never return.
|
||||
__cilkrts_bug("Should not get here");
|
||||
}
|
||||
#pragma GCC pop_options
|
||||
|
||||
void cilk_fiber_sysdep::make_stack(size_t stack_size)
|
||||
{
|
||||
|
@ -58,15 +58,34 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#ifdef _WIN32
|
||||
|
||||
// Getting a definition for alloca appears to be a pain in the butt. Here's
|
||||
// a variant on what's recommended in the autoconf doc
|
||||
#if defined _MSC_VER
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
#elif defined HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
#elif defined __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
#elif defined _AIX
|
||||
# define alloca __alloca
|
||||
#else
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
void *alloca (size_t);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# define INLINE static __inline
|
||||
# pragma warning(disable:1025) // Don't whine about zero extending result of unary operation
|
||||
#else
|
||||
# include <alloca.h>
|
||||
# define INLINE static inline
|
||||
#endif
|
||||
|
||||
|
||||
#include "internal/abi.h"
|
||||
#include "cilk-abi-vla-internal.h"
|
||||
|
||||
|
@ -80,7 +80,20 @@
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <alloca.h>
|
||||
|
||||
#if defined HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
#elif defined __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
#elif defined _AIX
|
||||
# define alloca __alloca
|
||||
#else
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
void *alloca (size_t);
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
//# include <scheduler.h> // Angle brackets include Apple's scheduler.h, not ours.
|
||||
|
Loading…
Reference in New Issue
Block a user