On some of our embedded aarch64 targets, RAM size is too small for
this test to fit. It doesn't look like this test requires linking,
and if it does, the -tiny version may presumably get most of the
coverage without going overboard in target system requirements.
Still, linking may be useful, so introduce a two_plus_gigs effective
target, that checks for the ability to link a program with 2GiB of
sbss, and use that to select whether to link or just compile
symbol-range.c.
for gcc/ChangeLog
* doc/sourcebuild.texi (Environment attributes): Document
two_plus_gigs.
for gcc/testsuite/ChangeLog
* lib/target-supports.exp
(check_effective_target_two_plus_gigs): New.
* gcc.target/aarch64/symbol-range.c: Link only on
two_plus_gigs targets, compile otherwise.
@item trampolines
Target supports trampolines.
+@item two_plus_gigs
+Target supports linking programs with 2+GiB of data.
+
@item uclibc
Target supports uClibc.
-/* { dg-do link } */
+/* { dg-do link { target two_plus_gigs } } */
+/* { dg-do compile { target { ! two_plus_gigs } } } */
/* { dg-options "-O3 -save-temps -mcmodel=small" } */
char fixed_regs[0x80000000];
}]
}
+# Return 1 if we can link a program with 2+GB of data.
+
+proc check_effective_target_two_plus_gigs { } {
+ return [check_no_compiler_messages two_plus_gigs executable {
+ int dummy[0x80000000];
+ int main () { return 0; }
+ }]
+}
+
# Return 1 if we're generating 32-bit code using default options, 0
# otherwise.