From: Ivo Raisr Date: Fri, 12 Feb 2016 13:43:59 +0000 (+0000) Subject: New gcc versions (4.9, 5.3) provided by Solaris enable X-Git-Tag: svn/VALGRIND_3_12_0~238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=970c6d26d25f15bc015b2c9856cb7eb54ff6b7b6;p=thirdparty%2Fvalgrind.git 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 --- diff --git a/Makefile.all.am b/Makefile.all.am index 44a6207ab3..14ce6cefec 100644 --- a/Makefile.all.am +++ b/Makefile.all.am @@ -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 diff --git a/Makefile.tool-tests.am b/Makefile.tool-tests.am index eb359db2bc..59c3b4202d 100644 --- a/Makefile.tool-tests.am +++ b/Makefile.tool-tests.am @@ -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 diff --git a/README.solaris b/README.solaris index ed73e498e1..cb956dd9dd 100644 --- a/README.solaris +++ b/README.solaris @@ -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 diff --git a/configure.ac b/configure.ac index f687bdd450..980dbdb8e8 100644 --- a/configure.ac +++ b/configure.ac @@ -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//cmdline is supported. #