From patchwork Thu Oct 26 10:14:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 830561 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-465184-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="HWED66oL"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yN2tW3WJYz9t2r for ; Thu, 26 Oct 2017 21:14:42 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=ZpUur5/0T/qTDN4GLJv3qqbSYdef/mCdysjhqg8I0nj8g0E5MM rAKtK3uJF/las6IRGnBCLtDtwemJQywl5mz4EfU+BWPD69zdfBNsRbOQjqG2mxKZ DW8BL5Ay5fivFzNEXxakXn2djcC6fCdJOhcQm0dR/vvkgGB8NSvnLbbtU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=Yfqr/9Qu941O9XrIX3oKsG/PR2M=; b=HWED66oL3Jiz5jO6oejJ Ws727YBeGqJrUrQbCcu7ZEleoLwMSHo8j2MnRuI+6P0aP8PiviDHqzmFRZgsNMxv CFHXTlIO7Uz+rurZu56CdFZyvy5p22IJFbE8CQXE0M2MFMVnG0gy+qVJSd7TYi52 yr6uEvqIDRa4Pb7NBwZbWhI= Received: (qmail 13242 invoked by alias); 26 Oct 2017 10:14:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 11706 invoked by uid 89); 26 Oct 2017 10:14:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-19.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=delivers, adapt X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Oct 2017 10:14:29 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 99512D17; Thu, 26 Oct 2017 12:14:21 +0200 (CEST) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id z8eUM5fzyHd5; Thu, 26 Oct 2017 12:14:15 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 36E03D16; Thu, 26 Oct 2017 12:14:15 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id v9QAECH9004033; Thu, 26 Oct 2017 12:14:12 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Ian Lance Taylor Subject: [build, libgcc, libgo] Adapt Solaris 12 references Date: Thu, 26 Oct 2017 12:14:12 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes With the change in the Solaris release model (no more major releases like Solaris 12 but only minor ones like 11.4), the Solaris 12 references in GCC need to be adapted. The following patch does this, consisting mostly of comment changes. Only a few changes bear comment: * Solaris 11.4 introduced __cxa_atexit, so we have to enable it on *-*-solaris2.11. Not a problem for native builds which check for the actual availability of the function. * gcc.dg/torture/pr60092.c was xfailed on *-*-solaris2.11*, but the underlying bug was fixed in Solaris 12/11.4. However, now 11.3 and 11.4 have the same configure triplet. To avoid noise on the newest release, I've removed the xfail. I've left a few references to Solaris 12 builds in libstdc++-v3/acinclude.m4 because those hadn't been renamed retroactively, of course. install.texi needs some work, too, but I'll address this separately because there's more than just the version change. Bootstrapped without regressions on {i386-pc, sparc-sun}-solaris2.1[01] (both Solaris 11.3 and 11.4). I believe I need approval only for the libgo parts. I'm going to backport the patch to the gcc-7 and gcc-6 branches after a bit of soak time. Rainer # HG changeset patch # Parent f752fe4435b62bc0cae5d59f32c22db221b0c6f0 Adapt Solaris 12 references diff --git a/gcc/config.gcc b/gcc/config.gcc --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -851,8 +851,8 @@ case ${target} in sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h" sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}" case ${target} in - *-*-solaris2.1[2-9]*) - # __cxa_atexit was introduced in Solaris 12. + *-*-solaris2.1[1-9]*) + # __cxa_atexit was introduced in Solaris 11.4. default_use_cxa_atexit=yes ;; esac diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -208,8 +208,8 @@ along with GCC; see the file COPYING3. /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us. */ #undef STARTFILE_SPEC #ifdef HAVE_SOLARIS_CRTS -/* Since Solaris 11.x and Solaris 12, the OS delivers crt1.o, crti.o, and - crtn.o, with a hook for compiler-dependent stuff like profile handling. */ +/* Since Solaris 11.4, the OS delivers crt1.o, crti.o, and crtn.o, with a hook + for compiler-dependent stuff like profile handling. */ #define STARTFILE_SPEC "%{!shared:%{!symbolic: \ crt1.o%s \ %{p:%e-p is not supported; \ diff --git a/gcc/configure.ac b/gcc/configure.ac --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -5091,7 +5091,7 @@ elif test x$gcc_cv_ld != x; then else case "$target" in *-*-solaris2.1[[1-9]]*) - # Solaris 11.x and Solaris 12 added PIE support. + # Solaris 11.3 added PIE support. if $gcc_cv_ld -z help 2>&1 | grep -- type.*pie > /dev/null; then gcc_cv_ld_pie=yes fi diff --git a/gcc/testsuite/gcc.dg/torture/pr60092.c b/gcc/testsuite/gcc.dg/torture/pr60092.c --- a/gcc/testsuite/gcc.dg/torture/pr60092.c +++ b/gcc/testsuite/gcc.dg/torture/pr60092.c @@ -4,7 +4,6 @@ /* { dg-skip-if "No undefined weak" { nvptx-*-* } } */ /* { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } */ /* { dg-additional-options "-Wl,-flat_namespace" { target *-*-darwin[89]* } } */ -/* { dg-xfail-run-if "posix_memalign modifies first arg on error" { *-*-solaris2.11* } { "-O0" } } */ typedef __SIZE_TYPE__ size_t; extern int posix_memalign(void **memptr, size_t alignment, size_t size) __attribute__((weak)); diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1170,8 +1170,8 @@ proc check_effective_target_pie { } { return 1; } if { [istarget *-*-solaris2.1\[1-9\]*] } { - # Full PIE support was added in Solaris 11.x and Solaris 12, but gcc - # errors out if missing, so check for that. + # Full PIE support was added in Solaris 11.3, but gcc errors out + # if missing, so check for that. return [check_no_compiler_messages pie executable { int main (void) { return 0; } } "-pie -fpie"] diff --git a/libgcc/config.host b/libgcc/config.host --- a/libgcc/config.host +++ b/libgcc/config.host @@ -277,7 +277,7 @@ case ${host} in tmake_file="$tmake_file $cpu_type/t-sol2" extra_parts="gmon.o crtbegin.o crtend.o" if test "${libgcc_cv_solaris_crts}" = yes; then - # Solaris 11.x and 12 provide crt1.o, crti.o, and crtn.o as part of the + # Solaris 11.4 provides crt1.o, crti.o, and crtn.o as part of the # base system. crtp.o and crtpg.o implement the compiler-dependent parts. extra_parts="$extra_parts crtp.o crtpg.o" # If the Solaris CRTs are present, both ld and gld will have PIE support. diff --git a/libgcc/config/sol2/crtpg.c b/libgcc/config/sol2/crtpg.c --- a/libgcc/config/sol2/crtpg.c +++ b/libgcc/config/sol2/crtpg.c @@ -31,11 +31,10 @@ extern char _start[], _etext[]; int __start_crt_compiler (int, char **); -/* Since Solaris 11.x and Solaris 12, the system-provided CRTs provide a - hook to invoke initialization code early during process startup. - __start_crt_compiler is documented in crt1.o(5). We use it to perform - initialization for profiling as a substitute for the earlier separate - gcrt1.o. */ +/* Since Solaris 11.4, the system-provided CRTs provide a hook to invoke + initialization code early during process startup. __start_crt_compiler + is documented in crt1.o(5). We use it to perform initialization for + profiling as a substitute for the earlier separate gcrt1.o. */ int __start_crt_compiler (int argc __attribute__ ((unused)), diff --git a/libgcc/configure.ac b/libgcc/configure.ac --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -296,7 +296,7 @@ esac case ${host} in *-*-solaris2*) - # Check for system-provided CRTs on Solaris 11.x and Solaris 12. + # Check for system-provided CRTs on Solaris 11.4. AC_CACHE_CHECK([system-provided CRTs on Solaris], [libgcc_cv_solaris_crts], [libgcc_cv_solaris_crts=no diff --git a/libgo/Makefile.am b/libgo/Makefile.am --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -1111,7 +1111,7 @@ syscall/wait.lo: go/syscall/wait.c runti @$(MKDIR_P) syscall $(LTCOMPILE) -c -o $@ $(srcdir)/go/syscall/wait.c -# Solaris 12 changed the type of fields in struct stat. +# Solaris 11.4 changed the type of fields in struct stat. # Use a build tag, based on a configure check, to cope. if LIBGO_IS_SOLARIS if HAVE_STAT_TIMESPEC diff --git a/libgo/configure.ac b/libgo/configure.ac --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -757,7 +757,7 @@ STRUCT_EPOLL_EVENT_FD_OFFSET=${libgo_cv_ AC_SUBST(STRUCT_EPOLL_EVENT_FD_OFFSET) dnl Check if uses timespec_t for st_?tim members. Introduced -dnl in Solaris 12 for XPG7 compatibility. +dnl in Solaris 11.4 for XPG7 compatibility. AC_EGREP_HEADER([timespec_t.*st_atim], [sys/stat.h], [have_stat_timespec=yes], [have_stat_timespec=no]) AM_CONDITIONAL(HAVE_STAT_TIMESPEC, test $have_stat_timespec = yes) diff --git a/libgo/mkrsysinfo.sh b/libgo/mkrsysinfo.sh --- a/libgo/mkrsysinfo.sh +++ b/libgo/mkrsysinfo.sh @@ -163,22 +163,22 @@ grep '^type _zone_net_addr_t ' gen-sysin sed -e 's/_in6_addr/[16]byte/' \ >> ${OUT} -# The Solaris 12 _flow_arp_desc_t struct. +# The Solaris 11.4 _flow_arp_desc_t struct. grep '^type _flow_arp_desc_t ' gen-sysinfo.go | \ sed -e 's/_in6_addr_t/[16]byte/g' \ >> ${OUT} -# The Solaris 12 _flow_l3_desc_t struct. +# The Solaris 11.4 _flow_l3_desc_t struct. grep '^type _flow_l3_desc_t ' gen-sysinfo.go | \ sed -e 's/_in6_addr_t/[16]byte/g' \ >> ${OUT} -# The Solaris 12 _mac_ipaddr_t struct. +# The Solaris 11.3 _mac_ipaddr_t struct. grep '^type _mac_ipaddr_t ' gen-sysinfo.go | \ sed -e 's/_in6_addr_t/[16]byte/g' \ >> ${OUT} -# The Solaris 12 _mactun_info_t struct. +# The Solaris 11.3 _mactun_info_t struct. grep '^type _mactun_info_t ' gen-sysinfo.go | \ sed -e 's/_in6_addr_t/[16]byte/g' \ >> ${OUT} diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -1288,22 +1288,22 @@ grep '^type _zone_net_addr_t ' gen-sysin sed -e 's/_in6_addr/[16]byte/' \ >> ${OUT} -# The Solaris 12 _flow_arp_desc_t struct. +# The Solaris 11.4 _flow_arp_desc_t struct. grep '^type _flow_arp_desc_t ' gen-sysinfo.go | \ sed -e 's/_in6_addr_t/[16]byte/g' \ >> ${OUT} -# The Solaris 12 _flow_l3_desc_t struct. +# The Solaris 11.4 _flow_l3_desc_t struct. grep '^type _flow_l3_desc_t ' gen-sysinfo.go | \ sed -e 's/_in6_addr_t/[16]byte/g' \ >> ${OUT} -# The Solaris 12 _mac_ipaddr_t struct. +# The Solaris 11.3 _mac_ipaddr_t struct. grep '^type _mac_ipaddr_t ' gen-sysinfo.go | \ sed -e 's/_in6_addr_t/[16]byte/g' \ >> ${OUT} -# The Solaris 12 _mactun_info_t struct. +# The Solaris 11.3 _mactun_info_t struct. grep '^type _mactun_info_t ' gen-sysinfo.go | \ sed -e 's/_in6_addr_t/[16]byte/g' \ >> ${OUT}