| 1 |
# src/template/linux |
| 2 |
|
| 3 |
# Prefer unnamed POSIX semaphores if available, unless user overrides choice |
| 4 |
if test x"$PREFERRED_SEMAPHORES" = x"" ; then |
| 5 |
PREFERRED_SEMAPHORES=UNNAMED_POSIX |
| 6 |
fi |
| 7 |
|
| 8 |
# Force _GNU_SOURCE on; plperl is broken with Perl 5.8.0 otherwise |
| 9 |
# This is also required for ppoll(2), and perhaps other things |
| 10 |
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" |
| 11 |
|
| 12 |
# Extra CFLAGS for code that will go into a shared library |
| 13 |
CFLAGS_SL="-fPIC" |
| 14 |
|
| 15 |
# If --enable-profiling is specified, we need -DLINUX_PROFILE |
| 16 |
PLATFORM_PROFILE_FLAGS="-DLINUX_PROFILE" |
| 17 |
|
| 18 |
if test "$SUN_STUDIO_CC" = "yes" ; then |
| 19 |
CC="$CC -Xa" # relaxed ISO C mode |
| 20 |
CFLAGS="-v" # -v is like gcc -Wall |
| 21 |
if test "$enable_debug" != yes; then |
| 22 |
CFLAGS="$CFLAGS -O" # any optimization breaks debug |
| 23 |
fi |
| 24 |
|
| 25 |
# Pick the right test-and-set (TAS) code for the Sun compiler. |
| 26 |
# We would like to use in-line assembler, but the compiler |
| 27 |
# requires *.il files to be on every compile line, making |
| 28 |
# the build system too fragile. |
| 29 |
case $host_cpu in |
| 30 |
sparc) |
| 31 |
need_tas=yes |
| 32 |
tas_file=sunstudio_sparc.s |
| 33 |
;; |
| 34 |
i?86|x86_64) |
| 35 |
need_tas=yes |
| 36 |
tas_file=sunstudio_x86.s |
| 37 |
;; |
| 38 |
esac |
| 39 |
fi |