]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
New gcc versions (4.9, 5.3) provided by Solaris enable
authorIvo Raisr <ivosh@ivosh.net>
Fri, 12 Feb 2016 13:43:59 +0000 (13:43 +0000)
committerIvo Raisr <ivosh@ivosh.net>
Fri, 12 Feb 2016 13:43:59 +0000 (13:43 +0000)
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

Makefile.all.am
Makefile.tool-tests.am
README.solaris
configure.ac

index 44a6207ab32d0bc3cf2a1e1d0045f7ac01d26b44..14ce6cefeca1e627a2d83ab2213915a66a326f4c 100644 (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
 
index eb359db2bce528d524b30b733958320676b9f246..59c3b4202dd22b2222b25a56444d2e60e2af9630 100644 (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
index ed73e498e18de579971137f73930c72982564ef8..cb956dd9dda5b1f5a16ca9f7172edf43aa7c4ae4 100644 (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
index f687bdd4508a9e2ce794c2e9d6d0dd448bddf135..980dbdb8e88e957c7a6d264cd4652f393801aa62 100644 (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.
 #