diff options
| author | ivmai <ivmai> | 2011-05-30 16:52:54 +0000 |
|---|---|---|
| committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-25 16:03:26 +0400 |
| commit | 2657b13b2a090a13aeb692d2df39c2034989be3e (patch) | |
| tree | 7fe2ab25fd136ca5a920f0e9b369512f33d2c004 /configure.ac | |
| parent | 93d66c013aa74b66e620f22d0feb2c5e96794138 (diff) | |
| download | libatomic_ops-2657b13b2a090a13aeb692d2df39c2034989be3e.tar.gz | |
2011-05-30 Ivan Maidanski <ivmai@mail.ru>
* configure.ac (PIC): Add workaround for GCC v3.4.6 which does not
define the corresponding macro.
* configure.ac: Don't check for GCC twice.
* configure: Regenerate.
* tests/test_malloc.c (DEFAULT_NTHREADS): New macro.
* tests/test_malloc.c (run_one_test): Refine printed message (in
case of HAVE_MMAP).
* tests/test_malloc.c (main): Use DEFAULT_NTHREADS.
* tests/test_stack.c (main): Cast AO_stack_pop() returned pointer.
* src/atomic_ops_malloc.c (USE_MMAP_ANON, GC_MMAP_FLAGS,
OPT_MAP_ANON): New macro.
* src/atomic_ops_malloc.c (get_mmaped): Pass -1 (instead of 0) as
file descriptor to mmap() if MAP_ANONYMOUS (same as for MAP_ANON).
* src/atomic_ops_malloc.c (get_mmaped): Use USE_MMAP_ANON,
GC_MMAP_FLAGS and OPT_MAP_ANON macros; reformat code; check open()
returned value.
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 547e315..e913b96 100644 --- a/configure.ac +++ b/configure.ac @@ -25,22 +25,24 @@ AC_MSG_CHECKING(Determining PIC compiler flag) if test "$GCC" = yes; then AC_MSG_RESULT(-fPIC) PICFLAG=-fPIC + case "$host" in + *-*-solaris*) + # Workaround: at least GCC 3.4.6 does not define this macro. + CFLAGS="$CFLAGS -D__PIC__=1" + ;; + esac else case "$host" in *-*-hpux*) AC_MSG_RESULT("+Z") PICFLAG="+Z" - if test "$GCC" != yes; then - CFLAGS="$CFLAGS +O2 -mt" - fi + CFLAGS="$CFLAGS +O2 -mt" ;; *-*-solaris*) AC_MSG_RESULT(-Kpic) PICFLAG=-Kpic - if test "$GCC" != yes; then - CFLAGS="$CFLAGS -O" - need_asm=true - fi + CFLAGS="$CFLAGS -O" + need_asm=true ;; *-*-linux*) AC_MSG_RESULT(-fPIC) |
