[patch, rfa] rewrite TPF OS handling

Ulrich Weigand uweigand@de.ibm.com
Wed Jul 13 12:34:00 GMT 2005


Eric Christopher wrote:

> The original TPF OS port was done with a very odd idea for cross
> compilation in mind. This rewrite gets it more toward a standard host
> cross host sysroot type environment. Now it's possible to use
> --with-sysroot and get a cross compiler that with a few additional
> command line options will produce code for the s390x-ibm-tpf system.

Thanks!

> Index: gcc/config.gcc
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
> retrieving revision 1.553
> diff -u -p -w -r1.553 config.gcc
> --- gcc/config.gcc	11 Jul 2005 08:23:27 -0000	1.553
> +++ gcc/config.gcc	12 Jul 2005 18:47:23 -0000
> @@ -1824,10 +1824,11 @@ s390x-ibm-tpf*)
>  	tm_p_file=s390/s390-protos.h
>  	md_file=s390/s390.md
>  	extra_modes=s390/s390-modes.def
> -	extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
>  	out_file=s390/s390.c
> -	tmake_file="t-slibgcc-elf-ver s390/t-crtstuff s390/t-tpf"
> +        extra_parts="crtbeginS.o crtendS.o"
> +        tmake_file="s390/t-crtstuff s390/t-tpf"
white space?

> -/* When building for TPF, set a generic default target that is 64 bits.
> -   Also, enable TPF profiling support and the standard backchain by default.  */
> +/* When building for TPF, set a generic default target that is 64 bits. Also
> +   enable TPF profiling support and the standard backchain by default.  */
>  #undef TARGET_DEFAULT
> -#define TARGET_DEFAULT		(MASK_64BIT | MASK_ZARCH | MASK_HARD_FLOAT \
> -				 | MASK_TPF_PROFILING | MASK_BACKCHAIN)
> +#define TARGET_DEFAULT (MASK_TPF_PROFILING | MASK_64BIT \
> +			| MASK_HARD_FLOAT | MASK_BACKCHAIN)

Um, I'd think removing MASK_ZARCH has adverse effects -- given that TPF
only runs on z/Architecture, you'd want to allow those instructions ...

> -#define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*}"
> +#define ASM_SPEC "%{m31&m64}%{march=*} \
> +                  -alshd=%b.lst"

Again, you should be passing -mzarch to the assembler.  I'm somewhat 
ambiguous about hard-coding the -alshd listing, but if that's what
the TPF folks want, I have no objections.


The rest is fine with me.

Bye,
Ulrich


-- 
  Dr. Ulrich Weigand
  Linux on zSeries Development
  Ulrich.Weigand@de.ibm.com



More information about the Gcc-patches mailing list