|
From: <sv...@va...> - 2016-02-12 13:44:08
|
Author: iraisr
Date: Fri Feb 12 13:43:59 2016
New Revision: 15785
Log:
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.
Modified:
trunk/Makefile.all.am
trunk/Makefile.tool-tests.am
trunk/README.solaris
trunk/configure.ac
Modified: trunk/Makefile.all.am
==============================================================================
--- trunk/Makefile.all.am (original)
+++ trunk/Makefile.all.am Fri Feb 12 13:43:59 2016
@@ -244,7 +244,8 @@
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
Modified: trunk/Makefile.tool-tests.am
==============================================================================
--- trunk/Makefile.tool-tests.am (original)
+++ trunk/Makefile.tool-tests.am Fri Feb 12 13:43:59 2016
@@ -28,7 +28,8 @@
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
Modified: trunk/README.solaris
==============================================================================
--- trunk/README.solaris (original)
+++ trunk/README.solaris Fri Feb 12 13:43:59 2016
@@ -50,6 +50,8 @@
- 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
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Feb 12 13:43:59 2016
@@ -2728,6 +2728,26 @@
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.
#
|