From dfbf6cca3838b32ea4714011be5be2aa9a1df366 Mon Sep 17 00:00:00 2001 From: Ivo Raisr Date: Mon, 31 Jul 2017 15:24:08 +0000 Subject: [PATCH] Fix the Solaris build after development trunk has been renamed. Effectively Solaris 12 is now becoming Solaris 11.4. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16464 --- README.solaris | 4 +-- configure.ac | 25 +++++++++++++------ coregrind/m_initimg/initimg-solaris.c | 2 +- memcheck/tests/solaris/scalar_auditon_stat.c | 4 +-- .../tests/solaris/scalar_lwp_sigqueue_pid.c | 2 +- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/README.solaris b/README.solaris index b9b122dac5..b16e7c074d 100644 --- a/README.solaris +++ b/README.solaris @@ -52,8 +52,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() +- posix_spawn() functionality is backed up by true spawn() syscall on Solaris 11.4 + whereas illumos and Solaris 11.3 leverage vfork() - illumos and older Solaris use utimesys() syscall whereas newer Solaris uses utimensat() diff --git a/configure.ac b/configure.ac index 40123f4c39..5022439b65 100644 --- a/configure.ac +++ b/configure.ac @@ -428,7 +428,16 @@ case "${host_os}" in solaris2.11*) AC_MSG_RESULT([ok (${host_os})]) VGCONF_OS="solaris" - DEFAULT_SUPP="solaris11.supp ${DEFAULT_SUPP}" + + uname_v=$( uname -v ) + case "$uname_v" in + 11.4.*) + DEFAULT_SUPP="solaris12.supp ${DEFAULT_SUPP}" + ;; + *) + DEFAULT_SUPP="solaris11.supp ${DEFAULT_SUPP}" + ;; + esac ;; solaris2.12*) @@ -3058,11 +3067,11 @@ AM_CONDITIONAL(SOLARIS_LWP_SIGQUEUE_SYSCALL, test x$solaris_lwp_sigqueue_syscall # Solaris-specific check determining if the lwp_sigqueue() syscall # takes both pid and thread id arguments or just thread id. # -# Old syscall (available on Solaris 11.x): +# Old syscall (available up to Solaris 11.3): # int lwp_sigqueue(id_t lwpid, int sig, void *value, # int si_code, timespec_t *timeout); # -# New syscall (available on Solaris 12): +# New syscall (available since Solaris 11.4): # int lwp_sigqueue(pid_t pid, id_t lwpid, int sig, void *value, # int si_code, timespec_t *timeout); # @@ -3178,7 +3187,7 @@ AM_CONDITIONAL(SOLARIS_ZONE_DEFUNCT, test x$solaris_zone_defunct = xyes) # Solaris-specific check determining if commands A_GETSTAT and A_SETSTAT # for auditon(2) subcode of the auditsys() syscall are available. # These commands are available in Solaris 11 and illumos but were removed -# in Solaris 12. +# in Solaris 11.4. # # C-level symbol: SOLARIS_AUDITON_STAT # Automake-level symbol: SOLARIS_AUDITON_STAT @@ -3350,8 +3359,8 @@ AM_CONDITIONAL(SOLARIS_TSOL_CLEARANCE, test x$solaris_tsol_clearance = xyes) # Solaris-specific check determining if the new pset() syscall subcode -# PSET_GET_NAME is available. This subcode was added in Solaris 12 but -# is missing on illumos and Solaris 11. +# PSET_GET_NAME is available. This subcode was added in Solaris 11.4 but +# is missing on illumos and Solaris 11.3. # # C-level symbol: SOLARIS_PSET_GET_NAME # Automake-level symbol: SOLARIS_PSET_GET_NAME @@ -3616,7 +3625,7 @@ AC_DEFINE_UNQUOTED([SOLARIS_REPCACHE_PROTOCOL_VERSION], [$version], # Solaris-specific check determining if "sysstat" segment reservation type # is available. # -# New "sysstat" segment reservation (available on Solaris 12): +# New "sysstat" segment reservation (available on Solaris 11.4): # - program header type: PT_SUNW_SYSSTAT # - auxiliary vector entry: AT_SUN_SYSSTAT_ADDR # @@ -3643,7 +3652,7 @@ AM_CONDITIONAL(SOLARIS_RESERVE_SYSSTAT_ADDR, test x$solaris_reserve_sysstat_addr # Solaris-specific check determining if "sysstat_zone" segment reservation type # is available. # -# New "sysstat_zone" segment reservation (available on Solaris 12): +# New "sysstat_zone" segment reservation (available on Solaris 11.4): # - program header type: PT_SUNW_SYSSTAT_ZONE # - auxiliary vector entry: AT_SUN_SYSSTAT_ZONE_ADDR # diff --git a/coregrind/m_initimg/initimg-solaris.c b/coregrind/m_initimg/initimg-solaris.c index ce4779dfd6..e7f6a6bf10 100644 --- a/coregrind/m_initimg/initimg-solaris.c +++ b/coregrind/m_initimg/initimg-solaris.c @@ -369,7 +369,7 @@ static void copy_auxv_entry(const vki_auxv_t *orig_auxv, Int type, Note that auxiliary vector is *not* created by kernel on illumos and Solaris 11 if the program is statically linked (which is our case). - Although we now taught Solaris 12 to create the auxiliary vector, we still + Although we now taught Solaris 11.4 to create the auxiliary vector, we still have to build auxv from scratch, to make the code consistent. */ static Addr setup_client_stack(Addr init_sp, diff --git a/memcheck/tests/solaris/scalar_auditon_stat.c b/memcheck/tests/solaris/scalar_auditon_stat.c index 9f95ad1c8e..4b30230af5 100644 --- a/memcheck/tests/solaris/scalar_auditon_stat.c +++ b/memcheck/tests/solaris/scalar_auditon_stat.c @@ -1,6 +1,6 @@ /* Scalar test for commands A_GETSTAT and A_SETSTAT for auditon(2) subcode - of the auditsys() syscall. Available on Solaris 11 and illumos, - removed in Solaris 12. */ + of the auditsys() syscall. Available on Solaris 11.3 and illumos, + removed in Solaris 11.4. */ #include "scalar.h" diff --git a/memcheck/tests/solaris/scalar_lwp_sigqueue_pid.c b/memcheck/tests/solaris/scalar_lwp_sigqueue_pid.c index 2e0fef0245..cafabebdc5 100644 --- a/memcheck/tests/solaris/scalar_lwp_sigqueue_pid.c +++ b/memcheck/tests/solaris/scalar_lwp_sigqueue_pid.c @@ -1,5 +1,5 @@ /* Test for lwp_sigqueue syscall which accepts pid along the thread id. - Available since Solaris 12. + Available since Solaris 11.4. */ #include "scalar.h" -- 2.47.2