Ticket #6306: gcc_x86_64.multilib.buildtools.patch
File gcc_x86_64.multilib.buildtools.patch, 5.6 KB (added by , 13 years ago) |
---|
-
gcc/gcc/config.gcc
1063 1063 extra_parts='crtbegin.o crtend.o' 1064 1064 ;; 1065 1065 x86_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' 1068 1069 ;; 1069 1070 i[34567]86-*-netbsdelf*) 1070 1071 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
20 20 Boston, MA 02111-1307, USA. */ 21 21 22 22 23 #if TARGET_64BIT _DEFAULT23 #if TARGET_64BIT 24 24 #define TARGET_VERSION fprintf (stderr, " (x86-64 Haiku/ELF)"); 25 25 #else 26 26 #define TARGET_VERSION fprintf (stderr, " (i386 Haiku/ELF)"); … … 35 35 #undef DEFAULT_PCC_STRUCT_RETURN 36 36 #define DEFAULT_PCC_STRUCT_RETURN 1 37 37 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 38 43 #define TARGET_OS_CPP_BUILTINS() \ 39 44 do \ 40 45 { \ 41 46 builtin_define ("__HAIKU__"); \ 47 builtin_define ("__x86_64__"); \ 42 48 builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ 43 49 builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ 44 builtin_assert ("system=haiku"); 50 builtin_assert ("system=haiku"); \ 45 51 /* Haiku apparently doesn't support merging of symbols across shared \ 46 52 object boundaries. Hence we need to explicitly specify that \ 47 53 type_infos are not merged, so that they get compared by name \ 48 54 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"); \ 51 57 } \ 52 58 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 53 78 54 79 /* Provide a LINK_SPEC appropriate for Haiku. Here we provide support 55 80 for the special GCC options -static and -shared, which allow us to … … 57 82 combinations of options at link-time. */ 58 83 59 84 #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 61 90 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
1 MULTILIB_OPTIONS = m32 2 MULTILIB_DIRNAMES = legacy 3 MULTILIB_OSDIRNAMES = legacy