Ticket #6306: gcc_x86_64.multilib.buildtools.patch

File gcc_x86_64.multilib.buildtools.patch, 5.6 KB (added by nmentley, 9 years ago)

added .patch extension to previously uploaded file

  • gcc/gcc/config.gcc

     
    10631063    extra_parts='crtbegin.o crtend.o'
    10641064    ;;
    10651065x86_64-*-haiku*)
    1066     tmake_file='t-haiku i386/t-crtpic'
    1067     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"
     1066    tmake_file='t-haiku i386/t-haiku64 i386/t-crtpic'
     1067    tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h haiku.h i386/haiku64.h"
     1068    extra_parts='crtbegin.o crtend.o'
    10681069    ;;
    10691070i[34567]86-*-netbsdelf*)
    10701071    tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
  • gcc/gcc/config/i386/haiku64.h

     
    2020Boston, MA 02111-1307, USA.  */
    2121
    2222
    23 #if TARGET_64BIT_DEFAULT
     23#if TARGET_64BIT
    2424#define TARGET_VERSION fprintf (stderr, " (x86-64 Haiku/ELF)");
    2525#else
    2626#define TARGET_VERSION fprintf (stderr, " (i386 Haiku/ELF)");
     
    3535#undef DEFAULT_PCC_STRUCT_RETURN
    3636#define DEFAULT_PCC_STRUCT_RETURN 1
    3737
     38#undef DBX_REGISTER_NUMBER
     39#define DBX_REGISTER_NUMBER(n) \
     40  (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
     41
     42#if TARGET_64BIT
    3843#define TARGET_OS_CPP_BUILTINS()                    \
    3944  do                                    \
    4045    {                                   \
    4146    builtin_define ("__HAIKU__");                   \
     47    builtin_define ("__x86_64__");                  \
    4248    builtin_define ("__stdcall=__attribute__((__stdcall__))");  \
    4349    builtin_define ("__cdecl=__attribute__((__cdecl__))");      \
    44     builtin_assert ("system=haiku");                    \
     50    builtin_assert ("system=haiku");                \
    4551    /* Haiku apparently doesn't support merging of symbols across shared \
    4652       object boundaries. Hence we need to explicitly specify that \
    4753       type_infos are not merged, so that they get compared by name \
    4854       instead of by pointer. */ \
    49     builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
    50     builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0"); \
     55        builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0");       \
     56        builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0");        \
    5157    }                                   \
    5258  while (0)
     59#else
     60#define TARGET_OS_CPP_BUILTINS()                    \
     61  do                                    \
     62    {                                   \
     63    builtin_define ("__HAIKU__");                   \
     64    builtin_define ("__INTEL__");                   \
     65    builtin_define ("__X86__");                 \
     66    builtin_define ("__stdcall=__attribute__((__stdcall__))");  \
     67    builtin_define ("__cdecl=__attribute__((__cdecl__))");      \
     68    builtin_assert ("system=haiku");                \
     69    /* Haiku apparently doesn't support merging of symbols across shared \
     70       object boundaries. Hence we need to explicitly specify that \
     71       type_infos are not merged, so that they get compared by name \
     72       instead of by pointer. */ \
     73        builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0");       \
     74        builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0");        \
     75    }                                   \
     76  while (0)
     77#endif
    5378
    5479/* Provide a LINK_SPEC appropriate for Haiku.  Here we provide support
    5580   for the special GCC options -static and -shared, which allow us to
     
    5782   combinations of options at link-time.  */
    5883
    5984#undef  LINK_SPEC
    60 #define LINK_SPEC "-m elf_x86_64_haiku -shared -Bsymbolic %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
     85#if TARGET_64BIT
     86#define LINK_SPEC "-m elf_x86_64 -z max-page-size=0x1000 -shared -Bsymbolic %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
     87#else
     88#define LINK_SPEC "-m elf_i386_haiku -shared -Bsymbolic %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
     89#endif
    6190
     91
     92/* A C statement (sans semicolon) to output to the stdio stream
     93   FILE the assembler definition of uninitialized global DECL named
     94   NAME whose size is SIZE bytes and alignment is ALIGN bytes.
     95   Try to use asm_output_aligned_bss to implement this macro.  */
     96
     97#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
     98  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
     99
     100/* A C statement to output to the stdio stream FILE an assembler
     101   command to advance the location counter to a multiple of 1<<LOG
     102   bytes if it is within MAX_SKIP bytes.
     103
     104   This is used to align code labels according to Intel recommendations.  */
     105
     106#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
     107#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
     108  if ((LOG)!=0) \
     109    if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
     110    else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP))
     111#endif
     112
     113
     114/* Output assembler code to FILE to call the profiler.  */
     115#define NO_PROFILE_COUNTERS 1
     116
     117#undef ASM_SPEC
     118#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
     119 %{Wa,*:%*} %{m32:--32} %{m64:--64}"
     120
     121#undef  ASM_OUTPUT_ALIGNED_COMMON
     122#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)      \
     123  x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN);
     124
     125
     126/* i386 System V Release 4 uses DWARF debugging info.
     127   x86-64 ABI specifies DWARF2.  */
     128#if TARGET_64BIT
     129    #define DWARF2_DEBUGGING_INFO 1
     130    #define DWARF2_UNWIND_INFO 1
     131
     132    #undef PREFERRED_DEBUGGING_TYPE
     133    #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
     134
     135    #undef TARGET_ASM_SELECT_SECTION
     136    #define TARGET_ASM_SELECT_SECTION  x86_64_elf_select_section
     137
     138    #undef TARGET_ASM_UNIQUE_SECTION
     139    #define TARGET_ASM_UNIQUE_SECTION  x86_64_elf_unique_section
     140#endif
  • gcc/gcc/config/i386/t-haiku64

     
     1MULTILIB_OPTIONS = m32
     2MULTILIB_DIRNAMES = legacy
     3MULTILIB_OSDIRNAMES = legacy