Re: CFT: [build] Move libgcc_tm_file to toplevel libgcc

2011-11-02 Thread Rainer Orth
Paolo Bonzini  writes:

> On 08/16/2011 04:59 AM, Rainer Orth wrote:
>> None of them uses any of those macros, so I think we're safe.
>
> Yes, I checked the same now.  Looks like we're good.

Here's the rebased version of the patch I'm about to check in, after
regtesting on i386-pc-solaris2.11, sparc-sun-solaris2.11,
x86_64-unknown-linux-gnu, i386-apple-darwin9.8.0, and
powerpc-apple-darwin9.8.0.

Rainer


2011-08-06  Rainer Orth  
Paolo Bonzini  

gcc:
* configure.ac (libgcc_tm_file_list, libgcc_tm_include_list):
Remove.
* configure: Regenerate.
* Makefile.in (libgcc_tm_file_list, libgcc_tm_include_list): Remove.
(TM_H): Remove libgcc_tm.h, $(libgcc_tm_file_list).
(libgcc_tm.h, cs-libgcc_tm.h): Remove.
(clean): Remove libgcc_tm.h
* mkconfig.sh: Don't include libgcc_tm.h in tm.h.
* config.gcc (libgcc_tm_file): Remove.
(arm*-*-linux*): Remove libgcc_tm_file for arm*-*-linux-*eabi.
(arm*-*-uclinux*): Remove libgcc_tm_file for arm*-*-uclinux*eabi.
(arm*-*-eabi*, arm*-*-symbianelf*): Remove libgcc_tm_file.
(avr-*-rtems*): Likewise.
(avr-*-*): Likewise.
(frv-*-elf): Likewise.
(frv-*-*linux*): Likewise.
(h8300-*-rtems*): Likewise.
(h8300-*-elf*): Likewise.
(i[34567]86-*-darwin*): Likewise.
(x86_64-*-darwin*): Likewise.
(rx-*-elf*): Likewise.
(tic6x-*-elf): Likewise.
(tic6x-*-uclinux): Likewise.
(i[34567]86-*-linux*, x86_64-*-linux*): Likewise.

libgcc:
* configure.ac (tm_file_): New variable.
Determine from tm_file.
(tm_file, tm_defines): Substitute.
* configure: Regenerate.
* mkheader.sh: New file.
* Makefile.in (clean): Remove libgcc_tm.h.
($(objects)): Depend on libgcc_tm.h.
(libgcc_tm_defines, libgcc_tm_file): New variables.
(libgcc_tm.h, libgcc_tm.stamp): New targets.
($(libgcc-objects), $(libgcc-s-objects), $(libgcc-eh-objects))
($(libgcov-objects), $(libunwind-objects), $(libunwind-s-objects))
($(extra-parts)): Depend on libgcc_tm.h.
* config.host (tm_defines, tm_file): New variable.
(arm*-*-linux*): Set tm_file for arm*-*-linux-*eabi.
(arm*-*-uclinux*): Set tm_file for arm*-*-uclinux*eabi.
(arm*-*-eabi*, arm*-*-symbianelf*): Set tm_file.
(avr-*-rtems*): Likewise.
(avr-*-*): Likewise.
(frv-*-elf): Likewise.
(frv-*-*linux*): Likewise.
(h8300-*-rtems*): Likewise.
(h8300-*-elf*): Likewise.
(i[34567]86-*-darwin*): Likewise.
(x86_64-*-darwin*): Likewise.
(rx-*-elf): Likewise.
(tic6x-*-uclinux): Likewise.
(tic6x-*-elf): Likewise.
(i[34567]86-*-linux*, x86_64-*-linux*): Likewise.
* config/alpha/gthr-posix.c: Include libgcc_tm.h.
* config/i386/cygming-crtbegin.c: Likewise.
* config/i386/cygming-crtend.c: Likewise.
* config/ia64/fde-vms.c: Likewise.
* config/ia64/unwind-ia64.c: Likewise.
* config/libbid/bid_gcc_intrinsics.h: Likewise.
* config/rs6000/darwin-fallback.c: Likewise.
* config/stormy16/lib2funcs.c: Likewise.
* config/xtensa/unwind-dw2-xtensa.c: Likewise.
* crtstuff.c: Likewise.
* dfp-bit.h: Likewise.
* emutls.c: Likewise.
* fixed-bit.c: Likewise.
* fp-bit.c: Likewise.
* generic-morestack-thread.c: Likewise.
* generic-morestack.c: Likewise.
* libgcc2.c: Likewise.
* libgcov.c: Likewise.
* unwind-dw2-fde-dip.c: Likewise.
* unwind-dw2-fde.c: Likewise.
* unwind-dw2.c: Likewise.
* unwind-sjlj.c: Likewise.

# HG changeset patch
# Parent b3e4db3f4854862cc04a6abb156278761b85bae7
Move libgcc_tm_file to toplevel libgcc

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -490,8 +490,6 @@ md_file=$(srcdir)/config/@md_file@
 tm_file_list=@tm_file_list@
 tm_include_list=@tm_include_list@
 tm_defines=@tm_defines@
-libgcc_tm_file_list=@libgcc_tm_file_list@
-libgcc_tm_include_list=@libgcc_tm_include_list@
 tm_p_file_list=@tm_p_file_list@
 tm_p_include_list=@tm_p_include_list@
 build_xm_file_list=@build_xm_file_list@
@@ -790,8 +788,7 @@ CONFIG_H  = config.h  $(host_xm_file_lis
 TCONFIG_H = tconfig.h $(xm_file_list)
 TM_P_H= tm_p.h$(tm_p_file_list)
 GTM_H = tm.h  $(tm_file_list) insn-constants.h
-TM_H  = $(GTM_H) libgcc_tm.h $(libgcc_tm_file_list) insn-flags.h \
-	$(OPTIONS_H)
+TM_H  = $(GTM_H) insn-flags.h $(OPTIONS_H)
 
 # Variables for version information.
 BASEVER := $(srcdir)/BASE-VER  # 4.x.y
@@ -1598,7 +1595,6 @@ config.h: cs-config.h ; @true
 bconfig.h: cs-bconfig.h ; @true
 tconfig.h: cs-tconfig.h ; @true
 tm.h: cs-tm.h ; @true
-libgcc_tm.h: cs-libgcc_tm.h ; @true
 tm_p.h: cs-tm_p.h ; @true
 
 cs-config.h: Makefile
@@ -1621,11 +

Re: CFT: [build] Move libgcc_tm_file to toplevel libgcc

2011-08-16 Thread Rainer Orth
Paolo Bonzini  writes:

> On 08/16/2011 04:59 AM, Rainer Orth wrote:
>> None of them uses any of those macros, so I think we're safe.
>
> Yes, I checked the same now.  Looks like we're good.

Fine we've reached the same conclusion :-)

> I'll review the other patches soon, but they are _huge_! :)

No need to hurry: it took me over a month to get them finished :-)

Thanks.
Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: CFT: [build] Move libgcc_tm_file to toplevel libgcc

2011-08-16 Thread Paolo Bonzini

On 08/16/2011 04:59 AM, Rainer Orth wrote:

None of them uses any of those macros, so I think we're safe.


Yes, I checked the same now.  Looks like we're good.

I'll review the other patches soon, but they are _huge_! :)

Paolo


Re: CFT: [build] Move libgcc_tm_file to toplevel libgcc

2011-08-16 Thread Rainer Orth
Paolo,

> On 08/15/2011 02:05 PM, Joseph S. Myers wrote:
>>> >  This patch almost completes the build side of the libgcc moves.  It
>>> >  moves the libgcc_tm_file support to libgcc/config.host (tm_file), where
>>> >  it belongs.  It builds on a patch Paolo posted some time ago, with some
>>> >  minor corrections (introducing the required dependencies on the
>>> >  generated libgcc_tm.h).  I've removed libgcc_tm.h from tm.h and include
>>> >  the file directly in all libgcc sources that currently include tm.h.
>> What about the Ada files that get built for both the host and the target
>> (or maybe just for the target in some cases) and include tm.h?  Might not
>> some of them require macros that will end up being moved to libgcc_tm.h?
>> What about libobjc files?  I think the target macros in those files need
>> checking to make sure that libgcc_tm.h won't be the right solution for
>> them, or else it should be included in those files when built for the
>> target.
>
> Right. :(  Rainer, please hold the patch.

I didn't mean to apply it until the preceding ones are in...

I've now checked the list of defines in headers referenced from
libgcc/config.host (tm_file)

CMPtype
CREATE_DOUBLE_SHIFT
DECLARE_LIBRARY_RENAMES
DF
DI
FLOAT_ONLY
LIBGCC2_FIXEDBIT_GNU_PREFIX
LIBGCC2_GNU_PREFIX
RENAME_LIBRARY

against the files (outside of gcc and libgcc) which include tm.h:

gcc/ada/gcc-interface/cuintp.c
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/misc.c
gcc/ada/gcc-interface/targtyps.c
gcc/ada/gcc-interface/trans.c
gcc/ada/gcc-interface/utils.c
gcc/ada/gcc-interface/utils2.c
gcc/ada/raise-gcc.c
gcc/ada/targext.c
libdecnumber/dconfig.h
libobjc/encoding.c
libobjc/sendmsg.c
libobjc/thr.c

None of them uses any of those macros, so I think we're safe.

Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: CFT: [build] Move libgcc_tm_file to toplevel libgcc

2011-08-15 Thread Paolo Bonzini

On 08/15/2011 02:05 PM, Joseph S. Myers wrote:

>  This patch almost completes the build side of the libgcc moves.  It
>  moves the libgcc_tm_file support to libgcc/config.host (tm_file), where
>  it belongs.  It builds on a patch Paolo posted some time ago, with some
>  minor corrections (introducing the required dependencies on the
>  generated libgcc_tm.h).  I've removed libgcc_tm.h from tm.h and include
>  the file directly in all libgcc sources that currently include tm.h.

What about the Ada files that get built for both the host and the target
(or maybe just for the target in some cases) and include tm.h?  Might not
some of them require macros that will end up being moved to libgcc_tm.h?
What about libobjc files?  I think the target macros in those files need
checking to make sure that libgcc_tm.h won't be the right solution for
them, or else it should be included in those files when built for the
target.


Right. :(  Rainer, please hold the patch.

Paolo


Re: CFT: [build] Move libgcc_tm_file to toplevel libgcc

2011-08-15 Thread Joseph S. Myers
On Mon, 15 Aug 2011, Rainer Orth wrote:

> This patch almost completes the build side of the libgcc moves.  It
> moves the libgcc_tm_file support to libgcc/config.host (tm_file), where
> it belongs.  It builds on a patch Paolo posted some time ago, with some
> minor corrections (introducing the required dependencies on the
> generated libgcc_tm.h).  I've removed libgcc_tm.h from tm.h and include
> the file directly in all libgcc sources that currently include tm.h.

What about the Ada files that get built for both the host and the target 
(or maybe just for the target in some cases) and include tm.h?  Might not 
some of them require macros that will end up being moved to libgcc_tm.h?  
What about libobjc files?  I think the target macros in those files need 
checking to make sure that libgcc_tm.h won't be the right solution for 
them, or else it should be included in those files when built for the 
target.

-- 
Joseph S. Myers
jos...@codesourcery.com


Re: CFT: [build] Move libgcc_tm_file to toplevel libgcc

2011-08-15 Thread Paolo Bonzini

On 08/15/2011 10:30 AM, Rainer Orth wrote:

This patch almost completes the build side of the libgcc moves.  It
moves the libgcc_tm_file support to libgcc/config.host (tm_file), where
it belongs.  It builds on a patch Paolo posted some time ago, with some
minor corrections (introducing the required dependencies on the
generated libgcc_tm.h).  I've removed libgcc_tm.h from tm.h and include
the file directly in all libgcc sources that currently include tm.h.

Everything else is pretty mechanical, I believe.

Tested as described in the previous submissions.

Rainer


Ok.

Paolo


CFT: [build] Move libgcc_tm_file to toplevel libgcc

2011-08-15 Thread Rainer Orth
This patch almost completes the build side of the libgcc moves.  It
moves the libgcc_tm_file support to libgcc/config.host (tm_file), where
it belongs.  It builds on a patch Paolo posted some time ago, with some
minor corrections (introducing the required dependencies on the
generated libgcc_tm.h).  I've removed libgcc_tm.h from tm.h and include
the file directly in all libgcc sources that currently include tm.h.

Everything else is pretty mechanical, I believe.

Tested as described in the previous submissions.

Rainer


2011-08-06  Rainer Orth  
Paolo Bonzini  

gcc:
* configure.ac (libgcc_tm_file_list, libgcc_tm_include_list):
Remove.
* configure: Regenerate.
* Makefile.in (libgcc_tm_file_list, libgcc_tm_include_list): Remove.
(TM_H): Remove libgcc_tm.h, $(libgcc_tm_file_list).
(libgcc_tm.h, cs-libgcc_tm.h): Remove.
(clean): Remove libgcc_tm.h
* mkconfig.sh: Don't include libgcc_tm.h in tm.h.
* config.gcc (libgcc_tm_file): Remove.
(arm*-*-linux*): Remove libgcc_tm_file for arm*-*-linux-*eabi.
(arm*-*-uclinux*): Remove libgcc_tm_file for arm*-*-uclinux*eabi.
(arm*-*-eabi*, arm*-*-symbianelf*): Remove libgcc_tm_file.
(avr-*-rtems*): Likewise.
(avr-*-*): Likewise.
(frv-*-elf): Likewise.
(frv-*-*linux*): Likewise.
(h8300-*-rtems*): Likewise.
(h8300-*-elf*): Likewise.
(i[34567]86-*-darwin*): Likewise.
(x86_64-*-darwin*): Likewise.
(rx-*-elf*): Likewise.
(tic6x-*-elf): Likewise.
(tic6x-*-uclinux): Likewise.

libgcc:
* configure.ac (tm_file_): New variable.
Determine from tm_file.
(tm_file, tm_defines): Substitute.
* configure: Regenerate.
* mkheader.sh: New file.
* Makefile.in (clean): Remove libgcc_tm.h.
($(objects)): Depend on libgcc_tm.h.
(libgcc_tm_defines, libgcc_tm_file): New variables.
(libgcc_tm.h, libgcc_tm.stamp): New targets.
($(libgcc-objects), $(libgcc-s-objects), $(libgcc-eh-objects))
($(libgcov-objects), $(libunwind-objects), $(libunwind-s-objects))
($(extra-parts)): Depend on libgcc_tm.h.
* config.host (tm_defines, tm_file): New variable.
(arm*-*-linux*): Set tm_file for arm*-*-linux-*eabi.
(arm*-*-uclinux*): Set tm_file for arm*-*-uclinux*eabi.
(arm*-*-eabi*, arm*-*-symbianelf*): Set tm_file.
(avr-*-rtems*): Likewise.
(avr-*-*): Likewise.
(frv-*-elf): Likewise.
(frv-*-*linux*): Likewise.
(h8300-*-rtems*): Likewise.
(h8300-*-elf*): Likewise.
(i[34567]86-*-darwin*): Likewise.
(x86_64-*-darwin*): Likewise.
(rx-*-elf): Likewise.
(tic6x-*-uclinux): Likewise.
(tic6x-*-elf): Likewise.
* config/alpha/gthr-posix.c: Include libgcc_tm.h.
* config/i386/cygming-crtbegin.c: Likewise.
* config/i386/cygming-crtend.c: Likewise.
* config/ia64/fde-vms.c: Likewise.
* config/ia64/unwind-ia64.c: Likewise.
* config/libbid/bid_gcc_intrinsics.h: Likewise.
* config/rs6000/darwin-fallback.c: Likewise.
* config/stormy16/lib2funcs.c: Likewise.
* config/xtensa/unwind-dw2-xtensa.c: Likewise.
* crtstuff.c: Likewise.
* dfp-bit.h: Likewise.
* emutls.c: Likewise.
* fixed-bit.c: Likewise.
* fp-bit.c: Likewise.
* generic-morestack-thread.c: Likewise.
* generic-morestack.c: Likewise.
* libgcc2.c: Likewise.
* libgcov.c: Likewise.
* unwind-dw2-fde-dip.c: Likewise.
* unwind-dw2-fde.c: Likewise.
* unwind-dw2.c: Likewise.
* unwind-sjlj.c: Likewise.

# HG changeset patch
# Parent fe692d8e27093b36a9342ef937f5f9891af8fa60
Move libgcc_tm_file to toplevel libgcc

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -486,8 +486,6 @@ md_file=$(srcdir)/config/@md_file@
 tm_file_list=@tm_file_list@
 tm_include_list=@tm_include_list@
 tm_defines=@tm_defines@
-libgcc_tm_file_list=@libgcc_tm_file_list@
-libgcc_tm_include_list=@libgcc_tm_include_list@
 tm_p_file_list=@tm_p_file_list@
 tm_p_include_list=@tm_p_include_list@
 build_xm_file_list=@build_xm_file_list@
@@ -786,8 +784,7 @@ CONFIG_H  = config.h  $(host_xm_file_lis
 TCONFIG_H = tconfig.h $(xm_file_list)
 TM_P_H= tm_p.h$(tm_p_file_list)
 GTM_H = tm.h  $(tm_file_list) insn-constants.h
-TM_H  = $(GTM_H) libgcc_tm.h $(libgcc_tm_file_list) insn-flags.h \
-	$(OPTIONS_H)
+TM_H  = $(GTM_H) insn-flags.h $(OPTIONS_H)
 
 # Variables for version information.
 BASEVER := $(srcdir)/BASE-VER  # 4.x.y
@@ -1592,7 +1589,6 @@ config.h: cs-config.h ; @true
 bconfig.h: cs-bconfig.h ; @true
 tconfig.h: cs-tconfig.h ; @true
 tm.h: cs-tm.h ; @true
-libgcc_tm.h: cs-libgcc_tm.h ; @true
 tm_p.h: cs-tm_p.h ; @true
 
 cs-config.h: Makefile
@@ -1615,11