New gcc versions (4.9, 5.3) provided by Solaris enable

largefile support by default. This gets in the way what
Valgrind core expects (vki, various m_libc modules).
Therefore disable largefile support if it is enabled.
Anyway, support for 32-bit applications is going away in Solaris 12.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15785
This commit is contained in:
Ivo Raisr 2016-02-12 13:43:59 +00:00
parent f6c211aaf8
commit 970c6d26d2
4 changed files with 26 additions and 2 deletions

View File

@ -244,7 +244,8 @@ AM_CFLAGS_PSO_TILEGX_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) $(AM_CFLAGS_PSO_BASE)
AM_FLAG_M3264_X86_SOLARIS = @FLAG_M32@
AM_CFLAGS_X86_SOLARIS = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY_2@ \
$(AM_CFLAGS_BASE) -fomit-frame-pointer
$(AM_CFLAGS_BASE) -fomit-frame-pointer \
@SOLARIS_UNDEF_LARGESOURCE@
AM_CFLAGS_PSO_X86_SOLARIS = @FLAG_M32@ $(AM_CFLAGS_BASE) $(AM_CFLAGS_PSO_BASE)
AM_CCASFLAGS_X86_SOLARIS = @FLAG_M32@ -g -D_ASM

View File

@ -28,7 +28,8 @@ AM_CCASFLAGS = $(AM_CPPFLAGS)
if VGCONF_OS_IS_SOLARIS
# Make sure that all test programs have threaded errno.
AM_CFLAGS += -D_REENTRANT
# Disable largefile support as there are test cases explictly enabling it.
AM_CFLAGS += -D_REENTRANT @SOLARIS_UNDEF_LARGESOURCE@
endif
if VGCONF_OS_IS_DARWIN

View File

@ -50,6 +50,8 @@ Main currently-known incompatibilities:
- syscall number for unlinkat() is 76 on Solaris 11, but 65 on illumos [2]
- illumos (in April 2013) changed interface of the accept() and pipe()
syscalls [3]
- posix_spawn() functionality is backed up by true spawn() syscall on Solaris 12
whereas illumos and Solaris 11 leverage vfork()
[1] http://docs.oracle.com/cd/E26502_01/html/E28556/gkzlf.html#gkzip
[2] https://www.illumos.org/issues/521

View File

@ -2728,6 +2728,26 @@ AM_CONDITIONAL(SOLARIS_XPG_SYMBOLS_PRESENT, test x$solaris_xpg_symbols_present =
CFLAGS="$save_CFLAGS"
# Solaris-specific check determining if gcc enables largefile support by
# default for 32-bit executables. If it does, then set SOLARIS_UNDEF_LARGESOURCE
# variable with gcc flags which disable it.
#
AC_MSG_CHECKING([if gcc enables largefile support for 32-bit apps (Solaris-specific)])
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -m32"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return _LARGEFILE_SOURCE;
]])], [
SOLARIS_UNDEF_LARGESOURCE="-U_LARGEFILE_SOURCE -U_LARGEFILE64_SOURCE -U_FILE_OFFSET_BITS"
AC_MSG_RESULT([yes])
], [
SOLARIS_UNDEF_LARGESOURCE=""
AC_MSG_RESULT([no])
])
CFLAGS=$safe_CFLAGS
AC_SUBST(SOLARIS_UNDEF_LARGESOURCE)
# Solaris-specific check determining if /proc/self/cmdline
# or /proc/<pid>/cmdline is supported.
#