From patchwork Wed Jul 6 11:34:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 103455 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 2B1B6B6F7C for ; Wed, 6 Jul 2011 21:35:44 +1000 (EST) Received: (qmail 831 invoked by alias); 6 Jul 2011 11:35:35 -0000 Received: (qmail 32092 invoked by uid 22791); 6 Jul 2011 11:35:30 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL, BAYES_50, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Jul 2011 11:35:04 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 8573270F; Wed, 6 Jul 2011 13:35:02 +0200 (CEST) Received: from smtp-relay.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 94CJsGIzxNtO; Wed, 6 Jul 2011 13:34:50 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 4EF5970E; Wed, 6 Jul 2011 13:34:50 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p66BYnPe002879; Wed, 6 Jul 2011 13:34:49 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou , Ian Lance Taylor , Ralf Wildenhues , Arnaud Charlet , "Joseph S. Myers" , Gerald Pfeifer java-patches@gcc.gnu.org, libstd++@gcc.gnu.org Subject: Provide 64-bit default Solaris/x86 configuration (PR target/39150) Date: Wed, 06 Jul 2011 13:34:49 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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 There has long been some clamoring for a amd64-*-solaris2 configuration similar to sparcv9-sun-solaris2. I've resisted this for quite some time, primarily because it doubles the maintenance effort of testing both the 32-bit default and 64-bit default configurations. After the recent cleanup patches to the Solaris configuration, it proved to be quite easy and straight forward to implement. Only a few changes are worth mentioning: * TRY_EMPTY_VM_SPACE for amd64 had to be massively reduced in host-solaris2.c, otherwise mmap would fail with ENOMEM. The old value had been in the middle of the 64-bit address space, which obviously doesn't work. * The TARGET_LD_EMULATION macro needed a clause to properly deal with the default case: at first, I had used a 32-bit GNU ld for the 64-bit configuation, which only works if you explicitly specify the 64-bit emulation. I'm leaving this in although a 32-bit gld doesn't work properly: the lto-plugin is built as 64-bit object, thus all -flto tests fail in such a configuration. I think practically the whole patch falls under the Solaris maintainership, with the possible exception of the change to the copy of libtool.m4 in libgo/config. This is not for the technical content, but for the special commit rules to that directory. Ian? Anyway, this part of the patch will have to go to upstream libtool. Ralf, could you take care of that? Bootstrapped without regression on i386-pc-solaris2.10 (both 32-bit default and 64-bit default configurations), i386-pc-solaris2.11 and sparc-sun-solaris2.11 in progress. There are two caveats, which will be addressed subsequently: * libstdc++-abi/abi_check FAILs for the 64-bit ABI due to a mismatch between --print-multi-directory and --print-multi-os-directory. I'll report and hopefully address this subsequently; the problem already exists in the the existing sparcv9-sun-solaris2 configurations. * In the sparcv9-sun-solaris2.11 builds, the 32-bit libgo tests fail to link since they have unresolved references to __sync_bool_compare_and_swap_8 and __sync_add_and_fetch_8. I could trace this to -mv8plus being missing in that configuration. I'm uncertain where best to handle this. Eric? Once all the bootstraps have finished, I'll commit this patch (at least the non-libgo parts) unless anything unexpected comes up. Rainer 2011-07-02 Rainer Orth gcc: PR target/39150 * configure.ac (gcc_cv_as_hidden): Also accept x86_64-*-solaris2.1[0-9]*. (gcc_cv_as_cfi_directive): Likewise. (gcc_cv_as_comdat_group_group): Likewise. (set_have_as_tls): Likewise. * configure: Regenerate. * config.gcc (i[34567]86-*-solaris2*): Also handle x86_64-*-solaris2.1[0-9]*. * config.host (i[34567]86-*-solaris2*): Likewise. * config/sparc/sol2.h (ASM_CPU_DEFAULT_SPEC): Remove. * config/sol2-bi.h (ASM_CPU_DEFAULT_SPEC): Redefine. [USE_GLD] (ARCH_DEFAULT_EMULATION): Define. (TARGET_LD_EMULATION): Use it. * config/i386/sol2.h (ASM_CPU_DEFAULT_SPEC): Define. (SUBTARGET_CPU_EXTRA_SPECS): Add asm_cpu_default. * config/i386/sol2-bi.h (ASM_CPU32_DEFAULT_SPEC): Define. (ASM_CPU64_DEFAULT_SPEC): Define. (ASM_CPU_SPEC): Use %(asm_cpu_default). (ASM_SPEC): Redefine. (DEFAULT_ARCH32_P): Define using TARGET_64BIT_DEFAULT. * config/host-solaris.c [__x86_64__] (TRY_EMPTY_VM_SPACE): Reduce. * doc/install.texi (Specific, amd64-*-solaris2.1[0-9]*): Document. (Specific, i?86-*-solaris2.10): Mention x86_64-*-solaris2.1[0-9]* configuration. (Specific, x86_64-*-solaris2.1[0-9]*): Document. gcc/ada: PR target/39150 * gcc-interface/Makefile.in: Handle x86_64-solaris2. libgcc: PR target/39150 * config.host (*-*-solaris2*): Handle x86_64-*-solaris2.1[0-9]* like i?86-*-solaris2.1[0-9]*. (i[34567]86-*-solaris2*): Also handle x86_64-*-solaris2.1[0-9]*. * configure.ac (i?86-*-solaris2*): Likewise. * configure: Regenerate. gcc/testsuite: PR target/39150 * gcc.misc-tests/linkage.exp: Handle x86_64-*-solaris2.1[0-9]*. toplevel: PR target/39150 * configure.ac (i[3456789]86-*-solaris2*): Also accept x86_64-*-solaris2.1[0-9]*. * configure: Regenerate. boehm-gc: PR target/39150 * configure.ac (i?86-*-solaris2.[89]): Also accept x86_64-*-solaris2.1?. * configure: Regenerate. gnattools: PR target/39150 * configure.ac (*86-*-solaris2*): Also accept x86_64-*-solaris2.1[0-9]*. * configure: Regenerate. libcpp: PR target/39150 * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9] like i[34567]86-*-solaris2.1[0-9]*. * configure: Regenerate. libgo: PR target/39150 * config/libtool.m4: Handle x86_64-*-solaris2.1[0-9]* like i?86-*-solaris*. * configure: Regenerate. libjava: PR target/39150 * configure.host (x86_64-*): Add -Usun to libgcj_flags. (x86_64-*-solaris2.1[0-9]*): New case. (i?86-*-solaris2*): Also accept x86_64-*-solaris2.1[0-9]*. diff --git a/boehm-gc/configure.ac b/boehm-gc/configure.ac --- a/boehm-gc/configure.ac +++ b/boehm-gc/configure.ac @@ -400,7 +400,7 @@ case "$host" in alpha*-*-linux*) machdep="alpha_mach_dep.lo" ;; - i?86-*-solaris2.[[89]] | i?86-*-solaris2.1?) + i?86-*-solaris2.[[89]] | i?86-*-solaris2.1? | x86_64-*-solaris2.1?) AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED,1,[PROC_VDB in Solaris 2.5 gives wrong values for dirty bits]) ;; mipstx39-*-elf*) diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -923,7 +923,7 @@ case "${target}" in i[[3456789]]86-*-sco*) noconfigdirs="$noconfigdirs gprof target-libgloss" ;; - i[[3456789]]86-*-solaris2*) + i[[3456789]]86-*-solaris2* | x86_64-*-solaris2.1[[0-9]]*) noconfigdirs="$noconfigdirs target-libgloss" ;; i[[3456789]]86-*-sysv4*) diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -1011,8 +1011,8 @@ ifeq ($(strip $(filter-out sparc% sun so endif endif -ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),) - LIBGNAT_TARGET_PAIRS = \ +ifeq ($(strip $(filter-out %86 %x86_64 solaris2%,$(arch) $(osys))),) + LIBGNAT_TARGET_PAIRS_COMMON = \ a-numaux.adb