make: restrict use of --as-needed to Linux

This should really be checked in configure.ac in the future.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
make: add top-level libcommon dependency

On OSX there is consistently a problem with resolving pipe_cloexec and other
symbols through indirect libtool dependencies (below libglobal has a dependency
on libcommon). This makes the dependency top-level for most executables.

  CXXLD    ceph_test_timers
Undefined symbols for architecture x86_64:
  "_pipe_cloexec", referenced from:
      AdminSocket::create_shutdown_pipe(int*, int*) in libglobal.a(admin_socket.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
json_spirit: don't build json_spirit_value.cpp

This file just includes the header that is full of templates and
typedefs, so the resulting object file has no symbols in it and
generates warnings.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
make: avoid symbol exporting for C++ libs on non-Linux

This removes export-symbol-regex for installed libraries with C++
interfaces on non-Linux where the hidden symbols are not resolved. This
is a temporary fix.

See ceph-devel topic "Shared library symbol visibility" for discussion
about a perm solution.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
erasure: add dummy symbol to avoid warnings

Empty object files generate warning.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
test_cls_rbd: avoid shift overflow

warning: signed shift result (0x500000000) requires 36 bits to represent

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
test_cls_rbd: avoid warning -Wno-unnamed-template-args

According to this https://code.google.com/p/googletest/source/detail?r=446
the use of unnamed types (in this case the protection flag enums from
librbd/parent_types.h) as template parameters (in this case the gtest
macros) is not valid C++ pre C++0x.

As suggested, converting the enum into an int with integral promotion
via unary plus operator solves the problem.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
make: conditionally build filestore backends

Each of btrfs and zfs backends are wrapped in if __linux__ and if
WITH_ZFS, respectively, resulting in empty object files and the
associated warnings. This builds them under the same conditions.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Merge pull request #1023 from ceph/port/misc

misc portability patches

Reviewed-by: Sage Weil <sage@inktank.com>