public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <bonzini@gnu.org>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Cc: gcc-patches@gcc.gnu.org, Ralf Wildenhues <Ralf.Wildenhues@gmx.de>,
	 Ian Lance Taylor <iant@google.com>,
	"Joseph S. Myers" <joseph@codesourcery.com>,
	 Steve Ellcey <sje@cup.hp.com>,
	Richard Earnshaw <richard.earnshaw@arm.com>,
	 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>,
	Nick Clifton <nickc@redhat.com>, Douglas Rupp <rupp@gnat.com>,
	 Tristan Gingold <gingold@adacore.com>,
	Mike Stump <mikestump@comcast.net>,
	Kaz Kojima <kkojima@gcc.gnu.org>,
	 David Edelsohn <dje.gcc@gmail.com>,
	Sterling Augustine <augustine.sterling@gmail.com>,
	 Arnaud Charlet <charlet@adacore.com>,
	java-patches@gcc.gnu.org,
	Nicola Pero <nicola.pero@meta-innovation.com>,
	 libstdc++@gcc.gnu.org,
	Richard Sandiford <rdsandiford@googlemail.com>
Subject: Re: [build] Move unwinder to toplevel libgcc
Date: Wed, 29 Jun 2011 09:23:00 -0000	[thread overview]
Message-ID: <4E0AEEF0.7080406@gnu.org> (raw)
In-Reply-To: <yddfwn4pu5u.fsf@manam.CeBiTec.Uni-Bielefeld.DE>

[-- Attachment #1: Type: text/plain, Size: 331 bytes --]

On 06/20/2011 02:24 PM, Rainer Orth wrote:
> * The only unwinder-related macro I haven't moved is
>    LIBGCC2_UNWIND_ATTRIBUTE.  It is only defined gcc/config/mips/mips.h.
>    I suppose we would need a libgcc equivalent of tm.h for that,
>    something I didn't want to attack at this point.

Something like the attached?

Paolo

[-- Attachment #2: libgcc-tm.patch --]
[-- Type: text/x-patch, Size: 3148 bytes --]

Index: configure.ac
===================================================================
--- configure.ac	(revision 169877)
+++ configure.ac	(working copy)
@@ -267,6 +267,16 @@ done
 tmake_file="${tmake_file_}"
 AC_SUBST(tmake_file)
 
+# Likewise export definitions for libgcc_tm.h
+tm_file_=
+for f in ${tm_file}
+do
+	tm_file_="${tm_file_} \$(srcdir)/config/$f"
+done
+tm_file="${tm_file_}"
+AC_SUBST(tm_file)
+AC_SUBST(tm_defines)
+
 # Substitute configuration variables
 AC_SUBST(extra_parts)
 AC_SUBST(asm_hidden_op)
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 169877)
+++ Makefile.in	(working copy)
@@ -253,6 +253,16 @@ objects = $(filter %$(objext),$^)
 tmake_file = @tmake_file@
 include $(srcdir)/empty.mk $(tmake_file)
 
+# Collect target defines and headers from config.host.
+libgcc_tm_defines = @tm_defines@
+libgcc_tm_file = @tm_file@
+libgcc_tm.h: libgcc_tm.stamp; @true
+libgcc_tm.stamp:
+	DEFINES='$(libgcc_tm_defines)' HEADERS='$(libgcc_tm_file)' \
+		$(srcdir)/mkheader.sh > tmp-libgcc_tm.h
+	$(SHELL) $(srcdir)/../move-if-change tmp-libgcc_tm.h libgcc_tm.h
+	echo timestamp > $@
+
 # Only handle shared libraries if both:
 #   - the user requested them
 #   - we know how to build them
Index: config.host
===================================================================
--- config.host	(revision 169877)
+++ config.host	(working copy)
@@ -57,6 +57,8 @@
 asm_hidden_op=.hidden
 extra_parts=
 tmake_file=
+tm_defines=
+tm_file=
 
 # Set default cpu_type so it can be updated in each machine entry.
 cpu_type=`echo ${host} | sed 's/-.*$//'`
Index: mkheader.sh
===================================================================
--- mkheader.sh	(revision 0)
+++ mkheader.sh	(revision 0)
@@ -0,0 +1,41 @@
+#! /bin/sh
+
+# Copyright (C) 2001, 2002, 2006, 2007, 2010, 2011 Free Software Foundation, Inc.
+# This file is part of GCC.
+
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.  
+
+
+# Print libgcc_tm.h to the standard output.
+# DEFINES and HEADERS are expected to be set in the environment.
+
+# Add multiple inclusion protection guard, part one.
+echo "#ifndef LIBGCC_TM_H"
+echo "#define LIBGCC_TM_H"
+
+# Generate the body of the file
+echo "/* Automatically generated by mkheader.sh.  */"
+for def in $DEFINES; do
+    echo "#ifndef $def" | sed 's/=.*//'
+    echo "# define $def" | sed 's/=/ /'
+    echo "#endif"
+done
+
+for file in $HEADERS; do
+    echo "#include \"$file\""
+done
+
+# Add multiple inclusion protection guard, part two.
+echo "#endif /* LIBGCC_TM_H"

  parent reply	other threads:[~2011-06-29  9:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <yddfwn4pu5u.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
2011-06-20 15:11 ` Joseph S. Myers
2011-06-20 15:21   ` Rainer Orth
2011-06-20 15:28     ` Joseph S. Myers
2011-07-04 18:10   ` CFT: " Rainer Orth
2011-06-29  9:23 ` Paolo Bonzini [this message]
2011-06-29  9:33   ` [build] " Rainer Orth
2011-06-29 10:42   ` Joseph S. Myers
2011-06-29 11:29     ` Paolo Bonzini
2011-06-29 11:33       ` Rainer Orth
2011-06-29 11:31     ` Rainer Orth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E0AEEF0.7080406@gnu.org \
    --to=bonzini@gnu.org \
    --cc=Ralf.Wildenhues@gmx.de \
    --cc=augustine.sterling@gmail.com \
    --cc=charlet@adacore.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gingold@adacore.com \
    --cc=iant@google.com \
    --cc=java-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=kkojima@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    --cc=nickc@redhat.com \
    --cc=nicola.pero@meta-innovation.com \
    --cc=ramana.radhakrishnan@arm.com \
    --cc=rdsandiford@googlemail.com \
    --cc=richard.earnshaw@arm.com \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    --cc=rupp@gnat.com \
    --cc=sje@cup.hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).