Ticket #1141: x86_64-buildtools-buildtoolstrunk.patch

File x86_64-buildtools-buildtoolstrunk.patch, 4.6 KB (added by nmentley, 12 years ago)

edited configure files in the buildtools that'll allow for an x86_64 haiku target to be compiled.

  • binutils/ld/configure.tgt

     
    276276i[3-7]86-*-beospe*) targ_emul=i386beos ;;
    277277i[3-7]86-*-beos*)   targ_emul=elf_i386_be ;;
    278278i[3-7]86-*-haiku*)  targ_emul=elf_i386_haiku ;;
     279x86_64-*-haiku*)    targ_emul=elf_x86_64
     280            targ_extra_emuls=elf_i386_haiku ;;
    279281i[3-7]86-*-vxworks*)    targ_emul=elf_i386_vxworks ;;
    280282i[3-7]86-*-chaos)   targ_emul=elf_i386_chaos
    281283            ;;
  • binutils/bfd/config.bfd

     
    614614    targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec bfd_efi_bsdrv_ia32_vec bfd_efi_rtdrv_ia32_vec bfd_efi_app_x86_64_vec bfd_efi_bsdrv_x86_64_vec bfd_efi_rtdrv_x86_64_vec"
    615615    want64=true
    616616    ;;
     617  x86_64-*-haiku*)
     618    targ_defvec=bfd_elf64_x86_64_vec
     619    targ_selvecs="bfd_elf32_i386_vec"
     620    want64=true
     621    ;;
    617622  x86_64-*-mingw*)
    618623    targ_defvec=x86_64pe_vec
    619624    targ_selvecs="x86_64pe_vec x86_64pei_vec bfd_elf64_x86_64_vec"
  • gcc/libgcc/config.host

     
    317317    ;;
    318318i[34567]86-*-haiku*)
    319319    ;;
     320x86_64-*-haiku*)
     321    ;;
    320322i[34567]86-*-netbsdelf*)
    321323    ;;
    322324i[34567]86-*-netbsd*)
  • gcc/gcc/config.gcc

     
    11361136    tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h haiku.h i386/haiku.h"
    11371137    extra_parts='crtbegin.o crtend.o'
    11381138    ;;
     1139x86_64-*-haiku*)
     1140    tmake_file='t-haiku i386/t-crtpic'
     1141    tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h haiku.h i386/x86-64.h i386/haiku64.h"
     1142    ;;
    11391143i[34567]86-*-netbsdelf*)
    11401144    tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
    11411145    ;;
  • gcc/gcc/config/i386/haiku64.h

     
     1/* Definitions for AMD x86_64 running Haiku with ELF format.
     2   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004
     3   Free Software Foundation, Inc.
     4
     5This file is part of GCC.
     6
     7GCC is free software; you can redistribute it and/or modify
     8it under the terms of the GNU General Public License as published by
     9the Free Software Foundation; either version 2, or (at your option)
     10any later version.
     11
     12GCC is distributed in the hope that it will be useful,
     13but WITHOUT ANY WARRANTY; without even the implied warranty of
     14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15GNU General Public License for more details.
     16
     17You should have received a copy of the GNU General Public License
     18along with GCC; see the file COPYING.  If not, write to
     19the Free Software Foundation, 59 Temple Place - Suite 330,
     20Boston, MA 02111-1307, USA.  */
     21
     22
     23#if TARGET_64BIT_DEFAULT
     24#define TARGET_VERSION fprintf (stderr, " (x86-64 Haiku/ELF)");
     25#else
     26#define TARGET_VERSION fprintf (stderr, " (i386 Haiku/ELF)");
     27#endif
     28
     29/* The SVR4 ABI for the i386 says that records and unions are returned
     30 *   in memory. 
     31 *
     32 *   TODO: Linux64 doesn't use pcc_struct_return scheme. Does haiku?
     33 *         If not this could be removed.
     34 */
     35#undef DEFAULT_PCC_STRUCT_RETURN
     36#define DEFAULT_PCC_STRUCT_RETURN 1
     37
     38#define TARGET_OS_CPP_BUILTINS()                    \
     39  do                                    \
     40    {                                   \
     41    builtin_define ("__HAIKU__");                   \
     42    builtin_define ("__stdcall=__attribute__((__stdcall__))");  \
     43    builtin_define ("__cdecl=__attribute__((__cdecl__))");      \
     44    builtin_assert ("system=haiku");                    \
     45    /* Haiku apparently doesn't support merging of symbols across shared \
     46       object boundaries. Hence we need to explicitly specify that \
     47       type_infos are not merged, so that they get compared by name \
     48       instead of by pointer. */ \
     49    builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
     50    builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0"); \
     51    }                                   \
     52  while (0)
     53
     54/* Provide a LINK_SPEC appropriate for Haiku.  Here we provide support
     55   for the special GCC options -static and -shared, which allow us to
     56   link things in one of these three modes by applying the appropriate
     57   combinations of options at link-time.  */
     58
     59#undef  LINK_SPEC
     60#define LINK_SPEC "-m elf_x86_64_haiku -shared -Bsymbolic %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
     61