Support building a cross gcc2 on x86_64

At least building the compiler seems to work on Linux (openSUSE 12.3).
Haven't tested whether the resulting Haiku works as well.
This commit is contained in:
Ingo Weinhold 2013-07-21 19:48:12 +02:00
parent ab0f66e995
commit dd0e14964f
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,43 @@
/* Configuration for GNU C-compiler for Intel 80386.
Copyright (C) 1988, 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef i386
#define i386
#endif
/* #defines that need visibility everywhere. */
#define FALSE 0
#define TRUE 1
/* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_CHAR 8
#define HOST_BITS_PER_SHORT 16
#define HOST_BITS_PER_INT 32
#define HOST_BITS_PER_LONG 64
#define HOST_BITS_PER_LONGLONG 64
/* Arguments to use with `exit'. */
#define SUCCESS_EXIT_CODE 0
#define FATAL_EXIT_CODE 33
/* target machine dependencies.
tm.h is a symbolic link to the actual target specific file. */
#include "tm.h"

View File

@ -2947,6 +2947,9 @@ for machine in $build $host $target; do
sparc*-*-*)
cpu_type=sparc
;;
x86_64-*)
cpu_type=x86_64
;;
esac
tm_file=${cpu_type}/${cpu_type}.h
@ -5637,6 +5640,11 @@ for machine in $build $host $target; do
xm_file="${xm_file} xm-svr3"
use_collect2=yes
;;
x86_64-*)
# Not actually supported as a target. But we want to avoid an error when
# building a cross-compiler for this build host.
xm_file=i386/xm-x86_64.h
;;
*)
echo "Configuration $machine not supported" 1>&2
exit 1

View File

@ -513,6 +513,9 @@ changequote([,])dnl
sparc*-*-*)
cpu_type=sparc
;;
x86_64-*)
cpu_type=x86_64
;;
esac
tm_file=${cpu_type}/${cpu_type}.h
@ -3341,6 +3344,11 @@ changequote([,])dnl
xm_file="${xm_file} xm-svr3"
use_collect2=yes
;;
x86_64-*)
# Not actually supported as a target. But we want to avoid an error when
# building a cross-compiler for this build host.
xm_file=i386/xm-x86_64.h
;;
*)
echo "Configuration $machine not supported" 1>&2
exit 1