configure.ac (HAVE_LD_LARGE_TOC): Add AIX test.

* configure.ac (HAVE_LD_LARGE_TOC): Add AIX test.
        * configure: Regenerated.
        * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Warn if
        other toc options used with cmodel. Disable TARGET_NO_FP_IN_TOC
        and TARGET_NO_SUM_IN_TOC if not CMODEL_SMALL. CMODEL_MEDIUM means
        CMODEL_LARGE on AIX.
        (ASM_SPEC): -mvsx implies -mpwr6. Add -many.
        (ASM_DEFAULT_SPEC): Use -mpwr4.
        (TARGET_CMODEL): Define.
        (SET_CMODEL): Define.
        * config/rs6000/rs6000.md (largetoc_high_aix<mode>): New.
        (largetoc_high_plus_aix<mode>): New.
        (largetoc_low<mode>): Change to mode iterator. Test TARGET_TOC
        instead of TARGET_ELF.
        (tocref): Remove TARGET_ELF test.
        * config/rs6000/rs6000.c (output_toc): Use [TE] for large TOC
        symbols on AIX.
        * config/rs6000/aix64.opt (mcmodel): New.

From-SVN: r193502
This commit is contained in:
David Edelsohn 2012-11-14 11:41:21 -05:00
parent 4a3d0b10a2
commit 9e81cc8bde
7 changed files with 205 additions and 50 deletions

View File

@ -1,3 +1,24 @@
2012-11-14 David Edelsohn <dje.gcc@gmail.com>
* configure.ac (HAVE_LD_LARGE_TOC): Add AIX test.
* configure: Regenerated.
* config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Warn if
other toc options used with cmodel. Disable TARGET_NO_FP_IN_TOC
and TARGET_NO_SUM_IN_TOC if not CMODEL_SMALL. CMODEL_MEDIUM means
CMODEL_LARGE on AIX.
(ASM_SPEC): -mvsx implies -mpwr6. Add -many.
(ASM_DEFAULT_SPEC): Use -mpwr4.
(TARGET_CMODEL): Define.
(SET_CMODEL): Define.
* config/rs6000/rs6000.md (largetoc_high_aix<mode>): New.
(largetoc_high_plus_aix<mode>): New.
(largetoc_low<mode>): Change to mode iterator. Test TARGET_TOC
instead of TARGET_ELF.
(tocref): Remove TARGET_ELF test.
* config/rs6000/rs6000.c (output_toc): Use [TE] for large TOC
symbols on AIX.
* config/rs6000/aix64.opt (mcmodel): New.
2012-11-14 Andreas Tobler <andreast@fgznet.ch>
* config/i386/i386.c (ix86_get_function_versions_dispatcher): Guard
@ -640,17 +661,17 @@
* config/i386/i386.c (ix86_function_ok_for_sibcall): Put back exception
to make a sibcall if one of the functions has void return type.
2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53063
* doc/invoke.texi (Wformat): Update.
2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
* optc-gen.awk: Factor code out to...
* opt-functions.awk (lang_enabled_by): ... this new function.
2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53063
* common.opt (Wswitch,Wswitch-default,Wswitch-enum): Move to c.opt.
@ -1778,7 +1799,7 @@
* expmed.c (store_bit_field_1): Remove test for BLKmode values.
2012-10-31 Ralf Corsépius <ralf.corsepius@rtems.org>,
2012-10-31 Ralf Corsépius <ralf.corsepius@rtems.org>,
Joel Sherrill <joel.sherrill@oarcorp.com>
* config/sparc/t-rtems: New (Custom multilibs).
@ -1991,7 +2012,7 @@
* lra-spills.c: Likewise.
* lra.c: Likewise.
2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53066
* tree.h (FUNCTION_POINTER_TYPE_P): New.
@ -2302,7 +2323,7 @@
* config/i386/x86intrin.h: Include
xsaveintrin.h, fxsrintrin.h, xsaveoptintrin.h.
2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
* config/avr/t-rtems: Revert previous commit.
@ -2358,7 +2379,7 @@
* lra-constraints.c (check_and_process_move): Remove #if
ENABLE_ASSERT_CHECKING.
2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
* config/avr/rtems.h (TARGET_OS_CPP_BUILTINS): Remove
__USE_INIT_FINI__.
@ -2413,7 +2434,7 @@
* lra-assigns.c (assign_by_spills): Add non-reload pseudos
assigned to hard register to changed_pseudo_bitmap.
2012-10-25 Ralf Corsépius <ralf.corsepius@rtems.org>
2012-10-25 Ralf Corsépius <ralf.corsepius@rtems.org>
* config.gcc (microblaze*-*-rtems*): New target.
* config/microblaze/rtems.h: New.
@ -2467,7 +2488,7 @@
* config/rs6000/rs6000.c (rs6000_density_test): Use dump_enabled_p
instead of dump_kind_p.
2012-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/54928
* tree-diagnostic.c (maybe_unwind_expanded_macro_loc):
@ -3128,7 +3149,7 @@
* loop-iv.c (iv_number_of_iterations): Record the upper bound
only if there are no further conditions on it.
2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53063
PR c/40989
@ -3765,7 +3786,7 @@
out of ...
(forwarder_block_p): ... here.
2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53063
PR c/40989
@ -3776,7 +3797,7 @@
* opts.c (finish_options): Do not handle them explicitly.
* opt-functions.awk (search_var_name): New.
2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53063
PR c/40989
@ -7180,7 +7201,7 @@
and -meb.
2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53210
* doc/invoke.texi ([Winit-self]): Document as enabled by -Wall in C++.
@ -8685,7 +8706,7 @@
PR rtl-optimization/54088
* jump.c (delete_related_insns): Robustify latest change.
2012-08-25 Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
2012-08-25 Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
* doc/extend.texi (__atomic Builtins): Remove space before comma.
@ -14438,7 +14459,7 @@
(ASM_SPEC): Pass mcu options to the assembler.
* doc/invoke.texi (MIPS Options): Document -mmcu and -mno-mcu.
2012-07-18 Ralf Corsépius <ralf.corsepius@rtems.org>
2012-07-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* config.gcc (v850-*-rtems*): New target.
* config/v850/rtems.h: New.
@ -17184,7 +17205,7 @@
* tree-inline.c (estimate_num_insns): Estimate call cost for
tailcalls properly.
2012-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2012-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
* tree.h (DECL_SOURCE_COLUMN): New accessor.
@ -18924,7 +18945,7 @@
(generate_code_for_partition): Generate code according
to partition classification.
2012-06-01 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-06-01 Manuel López-Ibáñez <manu@gcc.gnu.org>
Jonathan Wakely <jwakely.gcc@gmail.com>
PR c++/50134
@ -20430,7 +20451,7 @@
(decide_is_variable_needed): Handle externals.
(varpool_remove_unreferenced_decls): Likewise.
2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
* opts.c (common_handle_option): -pedantic-errors enables -Wpedantic.
(enable_warning_as_error): Do not special case Wuninitialized.
@ -20758,7 +20779,7 @@
strided loads.
* tree-vect-stmts.c (vect_model_load_cost): Handle strided loads.
2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 53063
* doc/options.texi: (LangEnabledBy): Document it.
@ -20832,7 +20853,7 @@
* config/pa/pa.md: Use define_c_enum for "unspec" and "unspecv".
2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
* common.opt (Wtype-limits): Use EnabledBy.
@ -20866,7 +20887,7 @@
(*<code><mode>3): Ditto.
(<code>tf3): Ditto.
2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
* optc-gen.awk: Error instead of warning for conflicting help.
@ -20913,7 +20934,7 @@
(delete_tree_ssa): Do not call fini_phinodes.
* tree-flow.h (init_phinodes, fini_phinodes): Remove.
2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 53063
* doc/options.texi (EnabledBy): Document
@ -21113,14 +21134,14 @@
(xop_mulv2div2di3_low): Remove insn_and_split pattern.
(xop_mulv2div2di3_high): Ditto.
2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53289
* diagnostic.h (diagnostic_context): Add last_location.
* diagnostic.c (diagnostic_initialize): Initialize it.
(diagnostic_show_locus): Use it.
2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
* doc/extend.texi (Function Attributes): Point xref to section
about Pragmas.
@ -21934,13 +21955,13 @@
Same stands for reloads with type RELOAD_FOR_OUTPUT_ADDRESS and
RELOAD_FOR_OUTADDR_ADDRESS.
2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/24985
* tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Show caret
for macro expansion.
2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
* flags.h (flag_permissive): Do not declare.
* diagnostic.c (diagnostic_report_diagnostic): Handle fpermissive
@ -22870,7 +22891,7 @@
* config/i386/i386.c (ix86_handle_struct_attribute): Use the proper
predicate to discriminate types.
2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
* doc/invoke.texi (Wmissing-format-attribute): Document as an
alias of Wsuggest-attribute=format.
@ -22878,7 +22899,7 @@
Wmissing-format-attribute with Wsuggest-attribute=format.
(digest_init): Likewise.
2012-04-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
* opts.c (finish_options): Do not handle -Wmissing-noreturn here.
* common.opt (Wmissing-noreturn): Alias of
@ -22966,7 +22987,7 @@
PR middle-end/27139
* tree-ssa-forwprop.c (combine_conversions): Handle INT->FP->INT.
2012-04-25 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-25 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53130
* c-typeck.c (pop_init_level): Use %qD instead of %qT.
@ -23128,7 +23149,7 @@
* reload.c (find_reloads): Change the loop nesting when trying an
alternative with swapped operands.
2012-04-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
* tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Fix
comment. Delete unused parameter first_exp_point_map.
@ -23262,7 +23283,7 @@
set_nonincremental_init_from_string): Pass true instead of false
as IMPLICIT to add_pending_init.
2012-04-25 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-25 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-typeck.c (pop_init_level): Improve diagnostics.
@ -23379,7 +23400,7 @@
* config/vxworks.c (vxworks_override_options): Default to strict-dwarf
and dwarf_version 2.
2012-04-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
* tree-pretty-print.h (default_tree_printer): Do not declare.
* tree-diagnostic.c: Include tree-pretty-print.h, tree-pass.h and
@ -23663,7 +23684,7 @@
Likewise.
* tree-switch-conversion.c (build_one_array): Likewise.
2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/44774
* doc/invoke.texi (pedantic): Rename to Wpedantic.
@ -23751,7 +23772,7 @@
* fold-const.c (fold_checksum_tree): Fix VECTOR_CST case.
2012-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 35441
* c-typeck.c (inform_declaration): New.
@ -23938,7 +23959,7 @@
* config/arm/sync.md (sync_optab): Change ior attribute to "or".
2012-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/52283/37985
* stmt.c (warn_if_unused_value): Skip NOP_EXPR.
@ -24168,7 +24189,7 @@
* varpoo.c (varpool_node_name): Remove.
(dump_varpool_node): Use dump_symtab_base; reformat.
2012-04-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
* doc/invoke.texi (Language Independent Options): @item should be
before @opindex.
@ -25036,7 +25057,7 @@
* doc/extend.texi (Type Attributes): Move paragraph.
2012-04-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 24985
* diagnostic.h (show_caret): Declare.
@ -25071,7 +25092,7 @@
manipulation code we are threading through a loop header
to an exit destination.
2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
* tree.h (warn_if_unused_value): Move declaration from here.
* stmt.c (warn_if_unused_value): Move definition from here.
@ -25211,7 +25232,7 @@
comment block.
(Sr0): Remove unused memory constraint.
2012-04-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-04-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
* tree-pretty-print.h: Update comment.
@ -26738,7 +26759,7 @@
* tree-data-ref.c (subscript_dependence_tester_1): Check
all dimensions for non-conflicting access functions.
2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/44783
* doc/invoke.texi [C++ Language Options]: Document
@ -27697,7 +27718,7 @@
in new variable 'empty'. Increase issue_rate only for
non-empty insns.
2012-03-07 Ralf Corsépius <ralf.corsepius@rtems.org>
2012-03-07 Ralf Corsépius <ralf.corsepius@rtems.org>
PR target/51417
* Makefile.in: Let install-gcc-ar depend on installdirs,

View File

@ -39,6 +39,23 @@ do { \
{ \
error ("-maix64 required: 64-bit computation with 32-bit addressing not yet supported"); \
} \
if ((rs6000_isa_flags_explicit \
& OPTION_MASK_MINIMAL_TOC) != 0) \
{ \
if (global_options_set.x_rs6000_current_cmodel \
&& rs6000_current_cmodel != CMODEL_SMALL) \
error ("-mcmodel incompatible with other toc options"); \
SET_CMODEL (CMODEL_SMALL); \
} \
if (rs6000_current_cmodel != CMODEL_SMALL) \
{ \
TARGET_NO_FP_IN_TOC = 0; \
TARGET_NO_SUM_IN_TOC = 0; \
} \
if (rs6000_current_cmodel == CMODEL_MEDIUM) \
{ \
rs6000_current_cmodel = CMODEL_LARGE; \
} \
} while (0);
#undef ASM_SPEC
@ -72,10 +89,12 @@ do { \
%{mcpu=620: -m620} \
%{mcpu=630: -m620} \
%{mcpu=970: -m970} \
%{mcpu=G5: -m970}"
%{mcpu=G5: -m970} \
%{mvsx: %{!mcpu*: -mpwr6}} \
-many"
#undef ASM_DEFAULT_SPEC
#define ASM_DEFAULT_SPEC "-mppc"
#define ASM_DEFAULT_SPEC "-mpwr4"
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
@ -177,6 +196,15 @@ extern long long int atoll(const char *);
/* This target uses the aix64.opt file. */
#define TARGET_USES_AIX64_OPT 1
/* Large TOC Support */
#ifdef HAVE_LD_LARGE_TOC
#undef TARGET_CMODEL
#define TARGET_CMODEL rs6000_current_cmodel
#define SET_CMODEL(opt) rs6000_current_cmodel = opt
#else
#define SET_CMODEL(opt) do {} while (0)
#endif
/* This target defines SUPPORTS_WEAK and TARGET_ASM_NAMED_SECTION,
but does not have crtbegin/end. */

View File

@ -27,6 +27,23 @@ maix32
Target Report RejectNegative Negative(maix64) InverseMask(64BIT) Var(rs6000_isa_flags)
Compile for 32-bit pointers
mcmodel=
Target RejectNegative Joined Enum(rs6000_cmodel) Var(rs6000_current_cmodel)
Select code model
Enum
Name(rs6000_cmodel) Type(enum rs6000_cmodel)
Known code models (for use with the -mcmodel= option):
EnumValue
Enum(rs6000_cmodel) String(small) Value(CMODEL_SMALL)
EnumValue
Enum(rs6000_cmodel) String(medium) Value(CMODEL_MEDIUM)
EnumValue
Enum(rs6000_cmodel) String(large) Value(CMODEL_LARGE)
mpe
Target Report RejectNegative Var(internal_nothing_1) Save
Support message passing with the Parallel Environment

View File

@ -22183,7 +22183,11 @@ output_toc (FILE *file, rtx x, int labelno, enum machine_mode mode)
else if (offset)
fprintf (file, ".P" HOST_WIDE_INT_PRINT_UNSIGNED, offset);
fputs ("[TC],", file);
/* Mark large TOC symbols on AIX with [TE] so they are mapped
after other TOC symbols, reducing overflow of small TOC access
to [TC] symbols. */
fputs (TARGET_XCOFF && TARGET_CMODEL != CMODEL_SMALL
? "[TE]," : "[TC],", file);
}
/* Currently C++ toc references to vtables can be emitted before it

View File

@ -10339,6 +10339,15 @@
"TARGET_ELF && TARGET_CMODEL != CMODEL_SMALL"
"addis %0,%2,%1@toc@ha")
(define_insn "*largetoc_high_aix<mode>"
[(set (match_operand:P 0 "gpc_reg_operand" "=b*r")
(high:P
(unspec [(match_operand:P 1 "" "")
(match_operand:P 2 "gpc_reg_operand" "b")]
UNSPEC_TOCREL)))]
"TARGET_XCOFF && TARGET_CMODEL != CMODEL_SMALL"
"addis %0,%1@u(%2)")
(define_insn "*largetoc_high_plus"
[(set (match_operand:DI 0 "gpc_reg_operand" "=b*r")
(high:DI
@ -10350,11 +10359,22 @@
"TARGET_ELF && TARGET_CMODEL != CMODEL_SMALL"
"addis %0,%2,%1+%3@toc@ha")
(define_insn "*largetoc_low"
[(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
(lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b,!*r")
(match_operand:DI 2 "" "")))]
"TARGET_ELF && TARGET_CMODEL != CMODEL_SMALL"
(define_insn "*largetoc_high_plus_aix<mode>"
[(set (match_operand:P 0 "gpc_reg_operand" "=b*r")
(high:P
(plus:P
(unspec [(match_operand:P 1 "" "")
(match_operand:P 2 "gpc_reg_operand" "b")]
UNSPEC_TOCREL)
(match_operand 3 "const_int_operand" "n"))))]
"TARGET_XCOFF && TARGET_CMODEL != CMODEL_SMALL"
"addis %0,%1+%3@u(%2)")
(define_insn "*largetoc_low<mode>"
[(set (match_operand:P 0 "gpc_reg_operand" "=r,r")
(lo_sum:P (match_operand:P 1 "gpc_reg_operand" "b,!*r")
(match_operand:P 2 "" "")))]
"TARGET_TOC && TARGET_CMODEL != CMODEL_SMALL"
"@
addi %0,%1,%2@l
addic %0,%1,%2@l")
@ -10364,7 +10384,7 @@
(match_operand:P 1 "small_toc_ref" "R"))]
"TARGET_TOC"
"la %0,%a1"
"&& TARGET_ELF && TARGET_CMODEL != CMODEL_SMALL && reload_completed"
"&& TARGET_CMODEL != CMODEL_SMALL && reload_completed"
[(set (match_dup 0) (high:P (match_dup 1)))
(set (match_dup 0) (lo_sum:P (match_dup 0) (match_dup 1)))])

36
gcc/configure vendored
View File

@ -26413,6 +26413,42 @@ $as_echo "#define HAVE_LD_LARGE_TOC 1" >>confdefs.h
;;
esac
case "$target" in
*-*-aix*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker large toc support" >&5
$as_echo_n "checking linker large toc support... " >&6; }
if test "${gcc_cv_ld_large_toc+set}" = set; then :
$as_echo_n "(cached) " >&6
else
gcc_cv_ld_large_toc=no
if test x$gcc_cv_as != x ; then
cat > conftest.s <<EOF
.toc
LC..1:
.tc a[TC],a[RW]
.extern a[RW]
.csect .text[PR]
.largetoctest:
addis 9,LC..1@u(2)
ld 3,LC..1@l(9)
EOF
if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_ld_large_toc=yes
fi
rm -f conftest conftest.o conftest.s
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_large_toc" >&5
$as_echo "$gcc_cv_ld_large_toc" >&6; }
if test x"$gcc_cv_ld_large_toc" = xyes; then
$as_echo "#define HAVE_LD_LARGE_TOC 1" >>confdefs.h
fi
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5
$as_echo_n "checking linker --build-id support... " >&6; }
if test "${gcc_cv_ld_buildid+set}" = set; then :

View File

@ -4496,6 +4496,35 @@ EOF
;;
esac
case "$target" in
*-*-aix*)
AC_CACHE_CHECK(linker large toc support,
gcc_cv_ld_large_toc,
[gcc_cv_ld_large_toc=no
if test x$gcc_cv_as != x ; then
cat > conftest.s <<EOF
.toc
LC..1:
.tc a[[TC]],a[[RW]]
.extern a[[RW]]
.csect .text[[PR]]
.largetoctest:
addis 9,LC..1@u(2)
ld 3,LC..1@l(9)
EOF
if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_ld_large_toc=yes
fi
rm -f conftest conftest.o conftest.s
fi
])
if test x"$gcc_cv_ld_large_toc" = xyes; then
AC_DEFINE(HAVE_LD_LARGE_TOC, 1,
[Define if your AIX linker supports a large TOC.])
fi
;;
esac
AC_CACHE_CHECK(linker --build-id support,
gcc_cv_ld_buildid,
[gcc_cv_ld_buildid=no