source:
patches/gcc-5.3.0-pure64-1.patch@
5344c0b
Last change on this file since 5344c0b was 223e237, checked in by , 9 years ago | |
---|---|
|
|
File size: 36.7 KB |
-
gcc/config/i386/linux64.h
Submitted By: William Harrington <kb0iic at cross-lfs dot org> Date: 12-28-2015 Initial Package Version: 5.2.0 Origin: Idea originally developed by Ryan Oliver and Greg Schafer for the Pure LFS project with help from Martin Ward Upstream Status: Not Applied - CLFS Specific Description: This patch makes changes to the paths for pure64, eg 64bit libs in /usr/lib, 32bit in /usr/lib32. Comment: Renamed for GCC 5.3.0 diff -Naur gcc-5.1.0.orig/gcc/config/i386/linux64.h gcc-5.1.0/gcc/config/i386/linux64.h
old new 27 27 #define GNU_USER_LINK_EMULATION64 "elf_x86_64" 28 28 #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" 29 29 30 #define GLIBC_DYNAMIC_LINKER32 "/lib /ld-linux.so.2"31 #define GLIBC_DYNAMIC_LINKER64 "/lib 64/ld-linux-x86-64.so.2"30 #define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2" 31 #define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2" 32 32 #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -
gcc/config/i386/t-linux64
diff -Naur gcc-5.1.0.orig/gcc/config/i386/t-linux64 gcc-5.1.0/gcc/config/i386/t-linux64
old new 33 33 comma=, 34 34 MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) 35 35 MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) 36 MULTILIB_OSDIRNAMES = m64=../lib 64$(call if_multiarch,:x86_64-linux-gnu)37 MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib )$(call if_multiarch,:i386-linux-gnu)36 MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu) 37 MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:i386-linux-gnu) 38 38 MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) -
gcc/config/linux.h
diff -Naur gcc-5.1.0.orig/gcc/config/linux.h gcc-5.1.0/gcc/config/linux.h
old new 74 74 GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets 75 75 supporting both 32-bit and 64-bit compilation. */ 76 76 #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" 77 #define UCLIBC_DYNAMIC_LINKER32 "/lib /ld-uClibc.so.0"77 #define UCLIBC_DYNAMIC_LINKER32 "/lib32/ld-uClibc.so.0" 78 78 #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" 79 79 #define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" 80 80 #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" -
gcc/config/mips/t-linux64
diff -Naur gcc-5.1.0.orig/gcc/config/mips/t-linux64 gcc-5.1.0/gcc/config/mips/t-linux64
old new 22 22 MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) 23 23 MULTILIB_OSDIRNAMES = \ 24 24 ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ 25 ../lib $(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \26 ../lib 64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))25 ../lib32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ 26 ../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) -
gcc/config/rs6000/linux64.h
diff -Naur gcc-5.1.0.orig/gcc/config/rs6000/linux64.h gcc-5.1.0/gcc/config/rs6000/linux64.h
old new 357 357 #undef LINK_OS_DEFAULT_SPEC 358 358 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" 359 359 360 #define GLIBC_DYNAMIC_LINKER32 "/lib /ld.so.1"360 #define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1" 361 361 #ifdef LINUX64_DEFAULT_ABI_ELFv2 362 #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib 64/ld64.so.1;:/lib64/ld64.so.2}"362 #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib/ld64.so.1;:/lib/ld64.so.2}" 363 363 #else 364 #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib 64/ld64.so.2;:/lib64/ld64.so.1}"364 #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib/ld64.so.2;:/lib/ld64.so.1}" 365 365 #endif 366 #define UCLIBC_DYNAMIC_LINKER32 "/lib /ld-uClibc.so.0"366 #define UCLIBC_DYNAMIC_LINKER32 "/lib32/ld-uClibc.so.0" 367 367 #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" 368 368 #if DEFAULT_LIBC == LIBC_UCLIBC 369 369 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -
gcc/config/rs6000/linux64.h.orig
diff -Naur gcc-5.1.0.orig/gcc/config/rs6000/linux64.h.orig gcc-5.1.0/gcc/config/rs6000/linux64.h.orig
old new 1 /* Definitions of target machine for GNU compiler, 2 for 64 bit PowerPC linux. 3 Copyright (C) 2000-2015 Free Software Foundation, Inc. 4 5 This file is part of GCC. 6 7 GCC is free software; you can redistribute it and/or modify it 8 under the terms of the GNU General Public License as published 9 by the Free Software Foundation; either version 3, or (at your 10 option) any later version. 11 12 GCC is distributed in the hope that it will be useful, but WITHOUT 13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 15 License for more details. 16 17 Under Section 7 of GPL version 3, you are granted additional 18 permissions described in the GCC Runtime Library Exception, version 19 3.1, as published by the Free Software Foundation. 20 21 You should have received a copy of the GNU General Public License and 22 a copy of the GCC Runtime Library Exception along with this program; 23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 <http://www.gnu.org/licenses/>. */ 25 26 #ifndef RS6000_BI_ARCH 27 28 #undef TARGET_64BIT 29 #define TARGET_64BIT 1 30 31 #define DEFAULT_ARCH64_P 1 32 #define RS6000_BI_ARCH_P 0 33 34 #else 35 36 #define DEFAULT_ARCH64_P (TARGET_DEFAULT & MASK_64BIT) 37 #define RS6000_BI_ARCH_P 1 38 39 #endif 40 41 #ifdef IN_LIBGCC2 42 #undef TARGET_64BIT 43 #ifdef __powerpc64__ 44 #define TARGET_64BIT 1 45 #else 46 #define TARGET_64BIT 0 47 #endif 48 #endif 49 50 #undef TARGET_AIX 51 #define TARGET_AIX TARGET_64BIT 52 53 #ifdef HAVE_LD_NO_DOT_SYMS 54 /* New ABI uses a local sym for the function entry point. */ 55 extern int dot_symbols; 56 #undef DOT_SYMBOLS 57 #define DOT_SYMBOLS dot_symbols 58 #endif 59 60 #define TARGET_PROFILE_KERNEL profile_kernel 61 62 #define TARGET_USES_LINUX64_OPT 1 63 #ifdef HAVE_LD_LARGE_TOC 64 #undef TARGET_CMODEL 65 #define TARGET_CMODEL rs6000_current_cmodel 66 #define SET_CMODEL(opt) rs6000_current_cmodel = opt 67 #else 68 #define SET_CMODEL(opt) do {} while (0) 69 #endif 70 71 #undef PROCESSOR_DEFAULT 72 #define PROCESSOR_DEFAULT PROCESSOR_POWER7 73 #undef PROCESSOR_DEFAULT64 74 #define PROCESSOR_DEFAULT64 PROCESSOR_POWER8 75 76 /* We don't need to generate entries in .fixup, except when 77 -mrelocatable or -mrelocatable-lib is given. */ 78 #undef RELOCATABLE_NEEDS_FIXUP 79 #define RELOCATABLE_NEEDS_FIXUP \ 80 (rs6000_isa_flags & rs6000_isa_flags_explicit & OPTION_MASK_RELOCATABLE) 81 82 #undef RS6000_ABI_NAME 83 #define RS6000_ABI_NAME "linux" 84 85 #define INVALID_64BIT "-m%s not supported in this configuration" 86 #define INVALID_32BIT INVALID_64BIT 87 88 #ifdef LINUX64_DEFAULT_ABI_ELFv2 89 #define ELFv2_ABI_CHECK (rs6000_elf_abi != 1) 90 #else 91 #define ELFv2_ABI_CHECK (rs6000_elf_abi == 2) 92 #endif 93 94 #undef SUBSUBTARGET_OVERRIDE_OPTIONS 95 #define SUBSUBTARGET_OVERRIDE_OPTIONS \ 96 do \ 97 { \ 98 if (!global_options_set.x_rs6000_alignment_flags) \ 99 rs6000_alignment_flags = MASK_ALIGN_NATURAL; \ 100 if (rs6000_isa_flags & OPTION_MASK_64BIT) \ 101 { \ 102 if (DEFAULT_ABI != ABI_AIX) \ 103 { \ 104 rs6000_current_abi = ABI_AIX; \ 105 error (INVALID_64BIT, "call"); \ 106 } \ 107 dot_symbols = !strcmp (rs6000_abi_name, "aixdesc"); \ 108 if (ELFv2_ABI_CHECK) \ 109 { \ 110 rs6000_current_abi = ABI_ELFv2; \ 111 if (dot_symbols) \ 112 error ("-mcall-aixdesc incompatible with -mabi=elfv2"); \ 113 } \ 114 if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE) \ 115 { \ 116 rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE; \ 117 error (INVALID_64BIT, "relocatable"); \ 118 } \ 119 if (rs6000_isa_flags & OPTION_MASK_EABI) \ 120 { \ 121 rs6000_isa_flags &= ~OPTION_MASK_EABI; \ 122 error (INVALID_64BIT, "eabi"); \ 123 } \ 124 if (TARGET_PROTOTYPE) \ 125 { \ 126 target_prototype = 0; \ 127 error (INVALID_64BIT, "prototype"); \ 128 } \ 129 if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \ 130 { \ 131 rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ 132 error ("-m64 requires a PowerPC64 cpu"); \ 133 } \ 134 if ((rs6000_isa_flags_explicit \ 135 & OPTION_MASK_MINIMAL_TOC) != 0) \ 136 { \ 137 if (global_options_set.x_rs6000_current_cmodel \ 138 && rs6000_current_cmodel != CMODEL_SMALL) \ 139 error ("-mcmodel incompatible with other toc options"); \ 140 SET_CMODEL (CMODEL_SMALL); \ 141 } \ 142 else \ 143 { \ 144 if (!global_options_set.x_rs6000_current_cmodel) \ 145 SET_CMODEL (CMODEL_MEDIUM); \ 146 if (rs6000_current_cmodel != CMODEL_SMALL) \ 147 { \ 148 if (!global_options_set.x_TARGET_NO_FP_IN_TOC) \ 149 TARGET_NO_FP_IN_TOC \ 150 = rs6000_current_cmodel == CMODEL_MEDIUM; \ 151 if (!global_options_set.x_TARGET_NO_SUM_IN_TOC) \ 152 TARGET_NO_SUM_IN_TOC = 0; \ 153 } \ 154 } \ 155 } \ 156 else \ 157 { \ 158 if (!RS6000_BI_ARCH_P) \ 159 error (INVALID_32BIT, "32"); \ 160 if (TARGET_PROFILE_KERNEL) \ 161 { \ 162 TARGET_PROFILE_KERNEL = 0; \ 163 error (INVALID_32BIT, "profile-kernel"); \ 164 } \ 165 if (global_options_set.x_rs6000_current_cmodel) \ 166 { \ 167 SET_CMODEL (CMODEL_SMALL); \ 168 error (INVALID_32BIT, "cmodel"); \ 169 } \ 170 } \ 171 } \ 172 while (0) 173 174 #undef ASM_DEFAULT_SPEC 175 #undef ASM_SPEC 176 #undef LINK_OS_LINUX_SPEC 177 178 #ifndef RS6000_BI_ARCH 179 #define ASM_DEFAULT_SPEC "-mppc64" 180 #define ASM_SPEC "%(asm_spec64) %(asm_spec_common)" 181 #define LINK_OS_LINUX_SPEC "%(link_os_linux_spec64)" 182 #else 183 #if DEFAULT_ARCH64_P 184 #define ASM_DEFAULT_SPEC "-mppc%{!m32:64}" 185 #define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)" 186 #define LINK_OS_LINUX_SPEC "%{m32:%(link_os_linux_spec32)}%{!m32:%(link_os_linux_spec64)}" 187 #else 188 #define ASM_DEFAULT_SPEC "-mppc%{m64:64}" 189 #define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)" 190 #define LINK_OS_LINUX_SPEC "%{!m64:%(link_os_linux_spec32)}%{m64:%(link_os_linux_spec64)}" 191 #endif 192 #endif 193 194 #define ASM_SPEC32 "-a32 \ 195 %{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \ 196 %{memb|msdata=eabi: -memb}" 197 198 #define ASM_SPEC64 "-a64" 199 200 #define ASM_SPEC_COMMON "%(asm_cpu) \ 201 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \ 202 ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) 203 204 #undef SUBSUBTARGET_EXTRA_SPECS 205 #define SUBSUBTARGET_EXTRA_SPECS \ 206 { "asm_spec_common", ASM_SPEC_COMMON }, \ 207 { "asm_spec32", ASM_SPEC32 }, \ 208 { "asm_spec64", ASM_SPEC64 }, \ 209 { "link_os_linux_spec32", LINK_OS_LINUX_SPEC32 }, \ 210 { "link_os_linux_spec64", LINK_OS_LINUX_SPEC64 }, 211 212 #undef MULTILIB_DEFAULTS 213 #if DEFAULT_ARCH64_P 214 #define MULTILIB_DEFAULTS { "m64" } 215 #else 216 #define MULTILIB_DEFAULTS { "m32" } 217 #endif 218 219 #ifndef RS6000_BI_ARCH 220 221 /* 64-bit PowerPC Linux always has a TOC. */ 222 #undef TARGET_TOC 223 #define TARGET_TOC 1 224 225 /* Some things from sysv4.h we don't do when 64 bit. */ 226 #undef OPTION_RELOCATABLE 227 #define OPTION_RELOCATABLE 0 228 #undef OPTION_EABI 229 #define OPTION_EABI 0 230 #undef OPTION_PROTOTYPE 231 #define OPTION_PROTOTYPE 0 232 #undef RELOCATABLE_NEEDS_FIXUP 233 #define RELOCATABLE_NEEDS_FIXUP 0 234 235 #endif 236 237 /* We use glibc _mcount for profiling. */ 238 #define NO_PROFILE_COUNTERS 1 239 #define PROFILE_HOOK(LABEL) \ 240 do { if (TARGET_64BIT) output_profile_hook (LABEL); } while (0) 241 242 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */ 243 #undef ADJUST_FIELD_ALIGN 244 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ 245 (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \ 246 ? 128 \ 247 : (TARGET_64BIT \ 248 && TARGET_ALIGN_NATURAL == 0 \ 249 && TYPE_MODE (strip_array_types (TREE_TYPE (FIELD))) == DFmode) \ 250 ? MIN ((COMPUTED), 32) \ 251 : (COMPUTED)) 252 253 /* PowerPC64 Linux increases natural record alignment to doubleword if 254 the first field is an FP double, only if in power alignment mode. */ 255 #undef ROUND_TYPE_ALIGN 256 #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \ 257 ((TARGET_64BIT \ 258 && (TREE_CODE (STRUCT) == RECORD_TYPE \ 259 || TREE_CODE (STRUCT) == UNION_TYPE \ 260 || TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \ 261 && TARGET_ALIGN_NATURAL == 0) \ 262 ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \ 263 : MAX ((COMPUTED), (SPECIFIED))) 264 265 /* Use the default for compiling target libs. */ 266 #ifdef IN_TARGET_LIBS 267 #undef TARGET_ALIGN_NATURAL 268 #define TARGET_ALIGN_NATURAL 1 269 #endif 270 271 /* Indicate that jump tables go in the text section. */ 272 #undef JUMP_TABLES_IN_TEXT_SECTION 273 #define JUMP_TABLES_IN_TEXT_SECTION TARGET_64BIT 274 275 /* The linux ppc64 ABI isn't explicit on whether aggregates smaller 276 than a doubleword should be padded upward or downward. You could 277 reasonably assume that they follow the normal rules for structure 278 layout treating the parameter area as any other block of memory, 279 then map the reg param area to registers. i.e. pad upward. 280 Setting both of the following defines results in this behavior. 281 Setting just the first one will result in aggregates that fit in a 282 doubleword being padded downward, and others being padded upward. 283 Not a bad idea as this results in struct { int x; } being passed 284 the same way as an int. */ 285 #define AGGREGATE_PADDING_FIXED TARGET_64BIT 286 #define AGGREGATES_PAD_UPWARD_ALWAYS 0 287 288 /* Specify padding for the last element of a block move between 289 registers and memory. FIRST is nonzero if this is the only 290 element. */ 291 #define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \ 292 (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE)) 293 294 /* Linux doesn't support saving and restoring 64-bit regs in a 32-bit 295 process. */ 296 #define OS_MISSING_POWERPC64 !TARGET_64BIT 297 298 #ifdef SINGLE_LIBC 299 #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) 300 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) 301 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) 302 #else 303 #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) 304 #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) 305 #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) 306 #endif 307 308 /* Determine what functions are present at the runtime; 309 this includes full c99 runtime and sincos. */ 310 #undef TARGET_LIBC_HAS_FUNCTION 311 #define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function 312 313 #undef TARGET_OS_CPP_BUILTINS 314 #define TARGET_OS_CPP_BUILTINS() \ 315 do \ 316 { \ 317 if (TARGET_64BIT) \ 318 { \ 319 builtin_define ("__PPC__"); \ 320 builtin_define ("__PPC64__"); \ 321 builtin_define ("__powerpc__"); \ 322 builtin_define ("__powerpc64__"); \ 323 if (!DOT_SYMBOLS) \ 324 builtin_define ("_CALL_LINUX"); \ 325 builtin_assert ("cpu=powerpc64"); \ 326 builtin_assert ("machine=powerpc64"); \ 327 } \ 328 else \ 329 { \ 330 builtin_define_std ("PPC"); \ 331 builtin_define_std ("powerpc"); \ 332 builtin_assert ("cpu=powerpc"); \ 333 builtin_assert ("machine=powerpc"); \ 334 TARGET_OS_SYSV_CPP_BUILTINS (); \ 335 } \ 336 } \ 337 while (0) 338 339 #undef CPP_OS_DEFAULT_SPEC 340 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" 341 342 #undef LINK_SHLIB_SPEC 343 #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" 344 345 #undef LIB_DEFAULT_SPEC 346 #define LIB_DEFAULT_SPEC "%(lib_linux)" 347 348 #undef STARTFILE_DEFAULT_SPEC 349 #define STARTFILE_DEFAULT_SPEC "%(startfile_linux)" 350 351 #undef ENDFILE_DEFAULT_SPEC 352 #define ENDFILE_DEFAULT_SPEC "%(endfile_linux)" 353 354 #undef LINK_START_DEFAULT_SPEC 355 #define LINK_START_DEFAULT_SPEC "%(link_start_linux)" 356 357 #undef LINK_OS_DEFAULT_SPEC 358 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" 359 360 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" 361 #ifdef LINUX64_DEFAULT_ABI_ELFv2 362 #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}" 363 #else 364 #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}" 365 #endif 366 #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" 367 #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" 368 #if DEFAULT_LIBC == LIBC_UCLIBC 369 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" 370 #elif DEFAULT_LIBC == LIBC_GLIBC 371 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" 372 #else 373 #error "Unsupported DEFAULT_LIBC" 374 #endif 375 #define GNU_USER_DYNAMIC_LINKER32 \ 376 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) 377 #define GNU_USER_DYNAMIC_LINKER64 \ 378 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) 379 380 #undef DEFAULT_ASM_ENDIAN 381 #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) 382 #define DEFAULT_ASM_ENDIAN " -mlittle" 383 #define LINK_OS_LINUX_EMUL32 ENDIAN_SELECT(" -m elf32ppclinux", \ 384 " -m elf32lppclinux", \ 385 " -m elf32lppclinux") 386 #define LINK_OS_LINUX_EMUL64 ENDIAN_SELECT(" -m elf64ppc", \ 387 " -m elf64lppc", \ 388 " -m elf64lppc") 389 #else 390 #define DEFAULT_ASM_ENDIAN " -mbig" 391 #define LINK_OS_LINUX_EMUL32 ENDIAN_SELECT(" -m elf32ppclinux", \ 392 " -m elf32lppclinux", \ 393 " -m elf32ppclinux") 394 #define LINK_OS_LINUX_EMUL64 ENDIAN_SELECT(" -m elf64ppc", \ 395 " -m elf64lppc", \ 396 " -m elf64ppc") 397 #endif 398 399 #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \ 400 %{rdynamic:-export-dynamic} \ 401 -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}" 402 403 #define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " %{!shared: %{!static: \ 404 %{rdynamic:-export-dynamic} \ 405 -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}" 406 407 #undef TOC_SECTION_ASM_OP 408 #define TOC_SECTION_ASM_OP \ 409 (TARGET_64BIT \ 410 ? "\t.section\t\".toc\",\"aw\"" \ 411 : "\t.section\t\".got\",\"aw\"") 412 413 #undef MINIMAL_TOC_SECTION_ASM_OP 414 #define MINIMAL_TOC_SECTION_ASM_OP \ 415 (TARGET_64BIT \ 416 ? "\t.section\t\".toc1\",\"aw\"" \ 417 : ((TARGET_RELOCATABLE || flag_pic) \ 418 ? "\t.section\t\".got2\",\"aw\"" \ 419 : "\t.section\t\".got1\",\"aw\"")) 420 421 /* Must be at least as big as our pointer type. */ 422 #undef SIZE_TYPE 423 #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") 424 425 #undef PTRDIFF_TYPE 426 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") 427 428 #undef WCHAR_TYPE 429 #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int") 430 #undef WCHAR_TYPE_SIZE 431 #define WCHAR_TYPE_SIZE 32 432 433 #undef RS6000_MCOUNT 434 #define RS6000_MCOUNT "_mcount" 435 436 #ifdef __powerpc64__ 437 /* _init and _fini functions are built from bits spread across many 438 object files, each potentially with a different TOC pointer. For 439 that reason, place a nop after the call so that the linker can 440 restore the TOC pointer if a TOC adjusting call stub is needed. */ 441 #if DOT_SYMBOLS 442 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ 443 asm (SECTION_OP "\n" \ 444 " bl ." #FUNC "\n" \ 445 " nop\n" \ 446 " .previous"); 447 #else 448 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ 449 asm (SECTION_OP "\n" \ 450 " bl " #FUNC "\n" \ 451 " nop\n" \ 452 " .previous"); 453 #endif 454 #endif 455 456 /* FP save and restore routines. */ 457 #undef SAVE_FP_PREFIX 458 #define SAVE_FP_PREFIX (TARGET_64BIT ? "._savef" : "_savefpr_") 459 #undef SAVE_FP_SUFFIX 460 #define SAVE_FP_SUFFIX "" 461 #undef RESTORE_FP_PREFIX 462 #define RESTORE_FP_PREFIX (TARGET_64BIT ? "._restf" : "_restfpr_") 463 #undef RESTORE_FP_SUFFIX 464 #define RESTORE_FP_SUFFIX "" 465 466 /* Dwarf2 debugging. */ 467 #undef PREFERRED_DEBUGGING_TYPE 468 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG 469 470 /* This is how to declare the size of a function. */ 471 #undef ASM_DECLARE_FUNCTION_SIZE 472 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ 473 do \ 474 { \ 475 if (!flag_inhibit_size_directive) \ 476 { \ 477 fputs ("\t.size\t", (FILE)); \ 478 if (TARGET_64BIT && DOT_SYMBOLS) \ 479 putc ('.', (FILE)); \ 480 assemble_name ((FILE), (FNAME)); \ 481 fputs (",.-", (FILE)); \ 482 rs6000_output_function_entry (FILE, FNAME); \ 483 putc ('\n', (FILE)); \ 484 } \ 485 } \ 486 while (0) 487 488 /* Return nonzero if this entry is to be written into the constant 489 pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF 490 or a CONST containing one of them. If -mfp-in-toc (the default), 491 we also do this for floating-point constants. We actually can only 492 do this if the FP formats of the target and host machines are the 493 same, but we can't check that since not every file that uses 494 the macros includes real.h. We also do this when we can write the 495 entry into the TOC and the entry is not larger than a TOC entry. */ 496 497 #undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P 498 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \ 499 (TARGET_TOC \ 500 && (GET_CODE (X) == SYMBOL_REF \ 501 || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \ 502 && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \ 503 || GET_CODE (X) == LABEL_REF \ 504 || (GET_CODE (X) == CONST_INT \ 505 && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \ 506 || (GET_CODE (X) == CONST_DOUBLE \ 507 && ((TARGET_64BIT \ 508 && (TARGET_MINIMAL_TOC \ 509 || (SCALAR_FLOAT_MODE_P (GET_MODE (X)) \ 510 && ! TARGET_NO_FP_IN_TOC))) \ 511 || (!TARGET_64BIT \ 512 && !TARGET_NO_FP_IN_TOC \ 513 && !TARGET_RELOCATABLE \ 514 && SCALAR_FLOAT_MODE_P (GET_MODE (X)) \ 515 && BITS_PER_WORD == HOST_BITS_PER_INT))))) 516 517 /* Select a format to encode pointers in exception handling data. CODE 518 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is 519 true if the symbol may be affected by dynamic relocations. */ 520 #undef ASM_PREFERRED_EH_DATA_FORMAT 521 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ 522 ((TARGET_64BIT || flag_pic || TARGET_RELOCATABLE) \ 523 ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel \ 524 | (TARGET_64BIT ? DW_EH_PE_udata8 : DW_EH_PE_sdata4)) \ 525 : DW_EH_PE_absptr) 526 527 /* For backward compatibility, we must continue to use the AIX 528 structure return convention. */ 529 #undef DRAFT_V4_STRUCT_RET 530 #define DRAFT_V4_STRUCT_RET (!TARGET_64BIT) 531 532 #ifdef TARGET_LIBC_PROVIDES_SSP 533 /* ppc32 glibc provides __stack_chk_guard in -0x7008(2), 534 ppc64 glibc provides it at -0x7010(13). */ 535 #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008) 536 #endif 537 538 #define POWERPC_LINUX 539 540 /* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later. */ 541 #ifdef TARGET_DEFAULT_LONG_DOUBLE_128 542 #define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128 543 #endif 544 545 /* Static stack checking is supported by means of probes. */ 546 #define STACK_CHECK_STATIC_BUILTIN 1 547 548 /* The default value isn't sufficient in 64-bit mode. */ 549 #define STACK_CHECK_PROTECT (TARGET_64BIT ? 16 * 1024 : 12 * 1024) 550 551 /* Software floating point support for exceptions and rounding modes 552 depends on the C library in use. */ 553 #undef TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P 554 #define TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P \ 555 rs6000_linux_float_exceptions_rounding_supported_p 556 557 /* Support for TARGET_ATOMIC_ASSIGN_EXPAND_FENV without FPRs depends 558 on glibc 2.19 or greater. */ 559 #if TARGET_GLIBC_MAJOR > 2 \ 560 || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 19) 561 #define RS6000_GLIBC_ATOMIC_FENV 1 562 #endif -
gcc/config/rs6000/t-linux64
diff -Naur gcc-5.1.0.orig/gcc/config/rs6000/t-linux64 gcc-5.1.0/gcc/config/rs6000/t-linux64
old new 28 28 MULTILIB_OPTIONS := m64/m32 29 29 MULTILIB_DIRNAMES := 64 32 30 30 MULTILIB_EXTRA_OPTS := 31 MULTILIB_OSDIRNAMES := m64=../lib 64$(call if_multiarch,:powerpc64-linux-gnu)32 MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib )$(call if_multiarch,:powerpc-linux-gnu)31 MULTILIB_OSDIRNAMES := m64=../lib$(call if_multiarch,:powerpc64-linux-gnu) 32 MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:powerpc-linux-gnu) 33 33 34 34 rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c 35 35 $(COMPILE) $< -
gcc/config/s390/linux.h
diff -Naur gcc-5.1.0.orig/gcc/config/s390/linux.h gcc-5.1.0/gcc/config/s390/linux.h
old new 60 60 #define MULTILIB_DEFAULTS { "m31" } 61 61 #endif 62 62 63 #define GLIBC_DYNAMIC_LINKER32 "/lib /ld.so.1"63 #define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1" 64 64 #define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" 65 65 66 66 #undef LINK_SPEC -
gcc/config/s390/t-linux64
diff -Naur gcc-5.1.0.orig/gcc/config/s390/t-linux64 gcc-5.1.0/gcc/config/s390/t-linux64
old new 7 7 8 8 MULTILIB_OPTIONS = m64/m31 9 9 MULTILIB_DIRNAMES = 64 32 10 MULTILIB_OSDIRNAMES = ../lib 64$(call if_multiarch,:s390x-linux-gnu)11 MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib )$(call if_multiarch,:s390-linux-gnu)10 MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:s390x-linux-gnu) 11 MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:s390-linux-gnu) -
gcc/config/sparc/linux.h
diff -Naur gcc-5.1.0.orig/gcc/config/sparc/linux.h gcc-5.1.0/gcc/config/sparc/linux.h
old new 83 83 When the -shared link option is used a final link is not being 84 84 done. */ 85 85 86 #define GLIBC_DYNAMIC_LINKER "/lib /ld-linux.so.2"86 #define GLIBC_DYNAMIC_LINKER "/lib32/ld-linux.so.2" 87 87 88 88 #undef LINK_SPEC 89 89 #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ -
gcc/config/sparc/linux64.h
diff -Naur gcc-5.1.0.orig/gcc/config/sparc/linux64.h gcc-5.1.0/gcc/config/sparc/linux64.h
old new 84 84 When the -shared link option is used a final link is not being 85 85 done. */ 86 86 87 #define GLIBC_DYNAMIC_LINKER32 "/lib /ld-linux.so.2"88 #define GLIBC_DYNAMIC_LINKER64 "/lib 64/ld-linux.so.2"87 #define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2" 88 #define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux.so.2" 89 89 90 90 #ifdef SPARC_BI_ARCH 91 91 … … 193 193 #else /* !SPARC_BI_ARCH */ 194 194 195 195 #undef LINK_SPEC 196 #define LINK_SPEC "-m elf64_sparc -Y P,%R/ usr/lib64%{shared:-shared} \196 #define LINK_SPEC "-m elf64_sparc -Y P,%R/lib %{shared:-shared} \ 197 197 %{!shared: \ 198 198 %{!static: \ 199 199 %{rdynamic:-export-dynamic} \ -
gcc/config/sparc/linux64.h.orig
diff -Naur gcc-5.1.0.orig/gcc/config/sparc/linux64.h.orig gcc-5.1.0/gcc/config/sparc/linux64.h.orig
old new 1 /* Definitions for 64-bit SPARC running Linux-based GNU systems with ELF. 2 Copyright (C) 1996-2015 Free Software Foundation, Inc. 3 Contributed by David S. Miller (davem@caip.rutgers.edu) 4 5 This file is part of GCC. 6 7 GCC is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 3, or (at your option) 10 any later version. 11 12 GCC is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with GCC; see the file COPYING3. If not see 19 <http://www.gnu.org/licenses/>. */ 20 21 #define TARGET_OS_CPP_BUILTINS() \ 22 do \ 23 { \ 24 GNU_USER_TARGET_OS_CPP_BUILTINS(); \ 25 if (TARGET_ARCH64) \ 26 builtin_define ("_LONGLONG"); \ 27 if (TARGET_ARCH32 \ 28 && TARGET_LONG_DOUBLE_128) \ 29 builtin_define ("__LONG_DOUBLE_128__"); \ 30 } \ 31 while (0) 32 33 /* On Linux, the combination sparc64-* --with-cpu=v8 is supported and 34 selects a 32-bit compiler. */ 35 #if defined(TARGET_64BIT_DEFAULT) && TARGET_CPU_DEFAULT >= TARGET_CPU_v9 36 #undef TARGET_DEFAULT 37 #define TARGET_DEFAULT \ 38 (MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_STACK_BIAS + \ 39 MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128) 40 #endif 41 42 /* This must be v9a not just v9 because by default we enable 43 -mvis. */ 44 #undef ASM_CPU64_DEFAULT_SPEC 45 #define ASM_CPU64_DEFAULT_SPEC "-Av9a" 46 47 /* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on 48 the GNU/Linux magical crtend.o file (see crtstuff.c) which 49 provides part of the support for getting C++ file-scope static 50 object constructed before entering `main', followed by a normal 51 GNU/Linux "finalizer" file, `crtn.o'. */ 52 53 #undef ENDFILE_SPEC 54 #define ENDFILE_SPEC \ 55 "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s\ 56 %{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}" 57 58 /* The default code model. */ 59 #undef SPARC_DEFAULT_CMODEL 60 #define SPARC_DEFAULT_CMODEL CM_MEDLOW 61 62 #undef WCHAR_TYPE 63 #define WCHAR_TYPE "int" 64 65 #undef WCHAR_TYPE_SIZE 66 #define WCHAR_TYPE_SIZE 32 67 68 /* Define for support of TFmode long double. 69 SPARC ABI says that long double is 4 words. */ 70 #undef LONG_DOUBLE_TYPE_SIZE 71 #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) 72 73 #undef CPP_SUBTARGET_SPEC 74 #define CPP_SUBTARGET_SPEC "\ 75 %{posix:-D_POSIX_SOURCE} \ 76 %{pthread:-D_REENTRANT} \ 77 " 78 79 /* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support 80 for the special GCC options -static and -shared, which allow us to 81 link things in one of these three modes by applying the appropriate 82 combinations of options at link-time. 83 84 When the -shared link option is used a final link is not being 85 done. */ 86 87 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" 88 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" 89 90 #ifdef SPARC_BI_ARCH 91 92 #undef SUBTARGET_EXTRA_SPECS 93 #define SUBTARGET_EXTRA_SPECS \ 94 { "link_arch32", LINK_ARCH32_SPEC }, \ 95 { "link_arch64", LINK_ARCH64_SPEC }, \ 96 { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ 97 { "link_arch", LINK_ARCH_SPEC }, 98 99 #define LINK_ARCH32_SPEC "-m elf32_sparc %{shared:-shared} \ 100 %{!shared: \ 101 %{!static: \ 102 %{rdynamic:-export-dynamic} \ 103 -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "} \ 104 %{static:-static}} \ 105 " 106 107 #define LINK_ARCH64_SPEC "-m elf64_sparc %{shared:-shared} \ 108 %{!shared: \ 109 %{!static: \ 110 %{rdynamic:-export-dynamic} \ 111 -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "} \ 112 %{static:-static}} \ 113 " 114 115 #define LINK_ARCH_SPEC "\ 116 %{m32:%(link_arch32)} \ 117 %{m64:%(link_arch64)} \ 118 %{!m32:%{!m64:%(link_arch_default)}} \ 119 " 120 121 #define LINK_ARCH_DEFAULT_SPEC \ 122 (DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC) 123 124 #undef LINK_SPEC 125 #define LINK_SPEC "\ 126 %(link_arch) \ 127 %{!mno-relax:%{!r:-relax}} \ 128 " 129 130 /* -mcpu=native handling only makes sense with compiler running on 131 a SPARC chip. */ 132 #if defined(__sparc__) && defined(__linux__) 133 extern const char *host_detect_local_cpu (int argc, const char **argv); 134 # define EXTRA_SPEC_FUNCTIONS \ 135 { "local_cpu_detect", host_detect_local_cpu }, 136 137 # define MCPU_MTUNE_NATIVE_SPECS \ 138 " %{mcpu=native:%<mcpu=native %:local_cpu_detect(cpu)}" \ 139 " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}" 140 #else 141 # define MCPU_MTUNE_NATIVE_SPECS "" 142 #endif 143 144 #define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS 145 146 #undef CC1_SPEC 147 #if DEFAULT_ARCH32_P 148 #define CC1_SPEC "%{profile:-p} \ 149 %{m32:%{m64:%emay not use both -m32 and -m64}} \ 150 %{m64:-mptr64 -mstack-bias -mlong-double-128 \ 151 %{!mcpu*:-mcpu=ultrasparc} \ 152 %{!mno-vis:%{!mcpu=v9:-mvis}}} \ 153 " 154 #else 155 #define CC1_SPEC "%{profile:-p} \ 156 %{m32:%{m64:%emay not use both -m32 and -m64}} \ 157 %{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \ 158 %{!mcpu*:-mcpu=cypress}} \ 159 %{mv8plus:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \ 160 %{!mcpu*:-mcpu=v9}} \ 161 %{!m32:%{!mcpu*:-mcpu=ultrasparc}} \ 162 %{!mno-vis:%{!m32:%{!mcpu=v9:-mvis}}} \ 163 " 164 #endif 165 166 /* Support for a compile-time default CPU, et cetera. The rules are: 167 --with-cpu is ignored if -mcpu is specified. 168 --with-tune is ignored if -mtune is specified. 169 --with-float is ignored if -mhard-float, -msoft-float, -mfpu, or -mno-fpu 170 are specified. 171 In the SPARC_BI_ARCH compiler we cannot pass %{!mcpu=*:-mcpu=%(VALUE)} 172 here, otherwise say -mcpu=v7 would be passed even when -m64. 173 CC1_SPEC above takes care of this instead. */ 174 #undef OPTION_DEFAULT_SPECS 175 #if DEFAULT_ARCH32_P 176 #define OPTION_DEFAULT_SPECS \ 177 {"cpu", "%{!m64:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \ 178 {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \ 179 {"float", "%{!msoft-float:%{!mhard-float:%{!mfpu:%{!mno-fpu:-m%(VALUE)-float}}}}" } 180 #else 181 #define OPTION_DEFAULT_SPECS \ 182 {"cpu", "%{!m32:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \ 183 {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \ 184 {"float", "%{!msoft-float:%{!mhard-float:%{!mfpu:%{!mno-fpu:-m%(VALUE)-float}}}}" } 185 #endif 186 187 #if DEFAULT_ARCH32_P 188 #define MULTILIB_DEFAULTS { "m32" } 189 #else 190 #define MULTILIB_DEFAULTS { "m64" } 191 #endif 192 193 #else /* !SPARC_BI_ARCH */ 194 195 #undef LINK_SPEC 196 #define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ 197 %{!shared: \ 198 %{!static: \ 199 %{rdynamic:-export-dynamic} \ 200 -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "} \ 201 %{static:-static}} \ 202 %{!mno-relax:%{!r:-relax}} \ 203 " 204 205 #endif /* !SPARC_BI_ARCH */ 206 207 /* It's safe to pass -s always, even if -g is not used. */ 208 #undef ASM_SPEC 209 #define ASM_SPEC "\ 210 -s \ 211 %{fpic|fPIC|fpie|fPIE:-K PIC} \ 212 %{!.c:%{findirect-dispatch:-K PIC}} \ 213 %(asm_cpu) %(asm_arch) %(asm_relax)" 214 215 #undef ASM_OUTPUT_ALIGNED_LOCAL 216 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ 217 do { \ 218 fputs ("\t.local\t", (FILE)); \ 219 assemble_name ((FILE), (NAME)); \ 220 putc ('\n', (FILE)); \ 221 ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \ 222 } while (0) 223 224 #undef COMMON_ASM_OP 225 #define COMMON_ASM_OP "\t.common\t" 226 227 #undef LOCAL_LABEL_PREFIX 228 #define LOCAL_LABEL_PREFIX "." 229 230 /* DWARF bits. */ 231 232 /* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets. 233 Obviously the Dwarf2 folks haven't tried to actually build systems 234 with their spec. On a 64-bit system, only 64-bit relocs become 235 RELATIVE relocations. */ 236 237 /* #define DWARF_OFFSET_SIZE PTR_SIZE */ 238 239 #undef DITF_CONVERSION_LIBFUNCS 240 #define DITF_CONVERSION_LIBFUNCS 1 241 0 242 243 #ifdef HAVE_AS_TLS 244 #undef TARGET_SUN_TLS 245 #undef TARGET_GNU_TLS 246 #define TARGET_SUN_TLS 0 247 #define TARGET_GNU_TLS 1 248 #endif 249 1 250 251 /* We use GNU ld so undefine this so that attribute((init_priority)) works. */ 252 #undef CTORS_SECTION_ASM_OP 253 #undef DTORS_SECTION_ASM_OP 254 255 /* Static stack checking is supported by means of probes. */ 256 #define STACK_CHECK_STATIC_BUILTIN 1 257 258 /* Linux currently uses RMO in uniprocessor mode, which is equivalent to 259 TMO, and TMO in multiprocessor mode. But they reserve the right to 260 change their minds. */ 261 #undef SPARC_RELAXED_ORDERING 262 #define SPARC_RELAXED_ORDERING true 263 264 #undef NEED_INDICATE_EXEC_STACK 265 #define NEED_INDICATE_EXEC_STACK 1 266 267 #ifdef TARGET_LIBC_PROVIDES_SSP 268 /* sparc glibc provides __stack_chk_guard in [%g7 + 0x14], 269 sparc64 glibc provides it at [%g7 + 0x28]. */ 270 #define TARGET_THREAD_SSP_OFFSET (TARGET_ARCH64 ? 0x28 : 0x14) 271 #endif 272 273 /* Define if long doubles should be mangled as 'g'. */ 274 #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING 275 276 /* We use glibc _mcount for profiling. */ -
gcc/config/sparc/t-linux64
+#undef NO_PROFILE_COUNTERS +#define NO_PROFILE_COUNTERS 1 diff -Naur gcc-5.1.0.orig/gcc/config/sparc/t-linux64 gcc-5.1.0/gcc/config/sparc/t-linux64
old new 25 25 26 26 MULTILIB_OPTIONS = m64/m32 27 27 MULTILIB_DIRNAMES = 64 32 28 MULTILIB_OSDIRNAMES = ../lib 64$(call if_multiarch,:sparc64-linux-gnu)29 MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib )$(call if_multiarch,:sparc-linux-gnu)28 MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:sparc64-linux-gnu) 29 MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib32)$(call if_multiarch,:sparc-linux-gnu)
Note:
See TracBrowser
for help on using the repository browser.