From patchwork Tue Dec 13 17:51:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 131156 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 CC5F61007D3 for ; Wed, 14 Dec 2011 04:51:57 +1100 (EST) Received: (qmail 32613 invoked by alias); 13 Dec 2011 17:51:49 -0000 Received: (qmail 32584 invoked by uid 22791); 13 Dec 2011 17:51:44 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, TW_GC, T_TVD_MIME_NO_HEADERS 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; Tue, 13 Dec 2011 17:51:27 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 2BA29330; Tue, 13 Dec 2011 18:51:26 +0100 (CET) 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 Qe0DO5RXvjt7; Tue, 13 Dec 2011 18:51:22 +0100 (CET) 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 D7CB032F; Tue, 13 Dec 2011 18:51:22 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id pBDHpMDC029893; Tue, 13 Dec 2011 18:51:22 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: java-patches@gcc.gnu.org Subject: [libjava] Support 64-bit multilib for i?86-linux Date: Tue, 13 Dec 2011 18:51:22 +0100 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 This is the last patch necessary to have a full-blown i686-unknown-linux-gnu --enable-targets=all configuration to work. It requires http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01011.html and fixes a compilation failure compiling the 64-bit libgcj multilib: $ /var/gcc/regression/trunk/2.6.18-gcc-gas-gld-32/build/./gcc/xgcc -shared-libgcc -B/var/gcc/regression/trunk/2.6.18-gcc-gas-gld-32/build/./gcc -nostdinc++ -L/var/gcc/regression/trunk/2.6.18-gcc-gas-gld-32/build/i686-unknown-linux-gnu/64/libstdc++-v3/src -L/var/gcc/regression/trunk/2.6.18-gcc-gas-gld-32/build/i686-unknown-linux-gnu/64/libstdc++-v3/src/.libs -B/vol/gcc/i686-unknown-linux-gnu/bin/ -B/vol/gcc/i686-unknown-linux-gnu/lib/ -isystem /vol/gcc/i686-unknown-linux-gnu/include -isystem /vol/gcc/i686-unknown-linux-gnu/sys-include -m64 -DHAVE_CONFIG_H -I. -I/vol/gcc/src/hg/trunk/local/libjava -I./include -I./gcj -I/vol/gcc/src/hg/trunk/local/libjava -Iinclude -I/vol/gcc/src/hg/trunk/local/libjava/include -I/vol/gcc/src/hg/trunk/local/libjava/classpath/include -Iclasspath/include -I/vol/gcc/src/hg/trunk/local/libjava/classpath/native/fdlibm -I/vol/gcc/src/hg/trunk/local/libjava/../boehm-gc/include -I../boehm-gc/include -I/vol/gcc/src/hg/trunk/local/libjava/libltdl -I/vol/gcc/src/hg/trunk/local/libjava/libltdl -I/vol/gcc/src/hg/trunk/local/libjava/.././libjava/../libgcc -I/vol/gcc/src/hg/trunk/local/libjava/../zlib -I/vol/gcc/src/hg/trunk/local/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSET_BITS=64 -ffloat-store -fomit-frame-pointer -Usun -Wextra -Wall -D_GNU_SOURCE -DPREFIX=\"/vol/gcc\" -DTOOLEXECLIBDIR=\"/vol/gcc/lib/../lib64\" -DJAVA_HOME=\"/vol/gcc\" -DBOOT_CLASS_PATH=\"/vol/gcc/share/java/libgcj-4.7.0.jar\" -DJAVA_EXT_DIRS=\"/vol/gcc/share/java/ext\" -DGCJ_ENDORSED_DIRS=\"/vol/gcc/share/java/gcj-endorsed\" -DGCJ_VERSIONED_LIBDIR=\"/vol/gcc/lib/../lib64/gcj-4.7.0-13\" -DPATH_SEPARATOR=\":\" -DECJ_JAR_FILE=\"\" -DLIBGCJ_DEFAULT_DATABASE=\"/vol/gcc/lib/../lib64/gcj-4.7.0-13/classmap.db\" -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.7.0-13/classmap.db\" -fno-omit-frame-pointer -g -O2 -D_GNU_SOURCE -m64 -MT prims.lo -MD -MP -MF .deps/prims.Tpo -c /vol/gcc/src/hg/trunk/local/libjava/prims.cc -fPIC -DPIC -o .libs/prims.o /vol/gcc/src/hg/trunk/local/libjava/prims.cc: In function 'void _Jv_catch_fpe(int, siginfo_t*, void*)': /vol/gcc/src/hg/trunk/local/libjava/prims.cc:192:3: error: 'REG_EIP' was not declared in this scope /vol/gcc/src/hg/trunk/local/libjava/prims.cc:192:3: error: 'REG_EAX' was not declared in this scope /vol/gcc/src/hg/trunk/local/libjava/prims.cc:192:3: error: 'REG_EDX' was not declared in this scope It applies the same technique already used for the 32-bit multilib in the x86_64-*-linux* configuration. It allowed the i686-unknown-linux-gnu bootstrap to finish successfully and bootstrapped without regressions on x86_64-unknown-linux-gnu. Ok for mainline? Rainer 2011-12-13 Rainer Orth * configure.ac (i?86-*-linux*): Set SIGNAL_HANDLER_AUX. * configure: Regenerate. * include/i386-signal.h: Wrap in __i386__, include java-signal-aux.h otherwise. diff --git a/libjava/configure.ac b/libjava/configure.ac --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -1737,6 +1737,7 @@ case "${host}" in ;; i?86-*-linux*) SIGNAL_HANDLER=include/i386-signal.h + SIGNAL_HANDLER_AUX=include/x86_64-signal.h ;; # ia64-*) # SYSDEP_SOURCES=sysdep/ia64.c diff --git a/libjava/include/i386-signal.h b/libjava/include/i386-signal.h --- a/libjava/include/i386-signal.h +++ b/libjava/include/i386-signal.h @@ -1,7 +1,8 @@ // i386-signal.h - Catch runtime signals and turn them into exceptions // on an i386 based Linux system. -/* Copyright (C) 1998, 1999, 2001, 2002, 2006, 2007 Free Software Foundation +/* Copyright (C) 1998, 1999, 2001, 2002, 2006, 2007, 2011 + Free Software Foundation This file is part of libgcj. @@ -10,6 +11,8 @@ Libgcj License. Please consult the file details. */ +#ifdef __i386__ + #ifndef JAVA_SIGNAL_H #define JAVA_SIGNAL_H 1 @@ -165,3 +168,11 @@ while (0) #endif /* JAVA_SIGNAL_H */ +#else /* __i386__ */ + +/* This is for the 64-bit subsystem on i386. */ + +#define sigcontext_struct sigcontext +#include + +#endif /* __i386__ */