* [PATCH] Add dg-require-linker-plugin
@ 2010-07-22 12:52 Richard Guenther
2010-07-22 14:36 ` H.J. Lu
0 siblings, 1 reply; 4+ messages in thread
From: Richard Guenther @ 2010-07-22 12:52 UTC (permalink / raw)
To: gcc-patches; +Cc: Jan Hubicka
This adds dg-require-linker-plugin support to the testsuite. Simple now,
as the lto-plugin is installed into gcc/. I'll add the testcase for
PR43373 as an example. Honza - you didn't yet apply the patch to
fix the wrong-code issue of gcc.dg/lto/20100715-1_[01].c, so I won't
commit that testcase now.
Committed.
Richard.
2010-07-22 Richard Guenther <rguenther@suse.de>
* lib/target-supports-dg.exp (dg-require-linker-plugin): New proc.
* lib/target-supports.exp (check_linker_plugin_available): Likewise.
* gcc.dg/lto/20100715-1_0.c: New testcase.
* gcc.dg/lto/20100715-1_1.c: Likewise.
PR lto/43373
* gcc.dg/lto/20100722-1_0.c: New testcase.
Index: gcc/testsuite/lib/target-supports-dg.exp
===================================================================
*** gcc/testsuite/lib/target-supports-dg.exp.orig 2010-07-22 13:39:23.000000000 +0200
--- gcc/testsuite/lib/target-supports-dg.exp 2010-07-22 14:17:37.000000000 +0200
*************** proc dg-require-host-local { args } {
*** 207,212 ****
--- 207,220 ----
}
}
+ proc dg-require-linker-plugin { args } {
+ set linker_plugin_available [ check_linker_plugin_available ]
+ if { $linker_plugin_available == 0 } {
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ }
+ }
+
# Add any target-specific flags needed for accessing the given list
# of features. This must come after all dg-options.
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
*** gcc/testsuite/lib/target-supports.exp.orig 2010-07-22 13:39:23.000000000 +0200
--- gcc/testsuite/lib/target-supports.exp 2010-07-22 14:17:37.000000000 +0200
*************** proc check_effective_target_static_libgf
*** 886,891 ****
--- 886,897 ----
} "-static"]
}
+ proc check_linker_plugin_available { } {
+ return [check_no_compiler_messages_nocache linker_plugin executable {
+ int main() { return 0; }
+ } "-flto -fuse-linker-plugin"]
+ }
+
# Return 1 if the target supports executing 750CL paired-single instructions, 0
# otherwise. Cache the result.
Index: gcc/testsuite/gcc.dg/lto/20100715-1_0.c
===================================================================
*** /dev/null 1970-01-01 00:00:00.000000000 +0000
--- gcc/testsuite/gcc.dg/lto/20100715-1_0.c 2010-07-22 14:17:37.000000000 +0200
***************
*** 0 ****
--- 1,15 ----
+ /* { dg-lto-do run } */
+ /* { dg-require-linker-plugin "" } */
+ /* { dg-extra-ld-options "-fuse-linker-plugin" } */
+
+ __attribute__ ((visibility("hidden"))) int a;
+ void abort (void);
+ extern int b(void);
+ main()
+ {
+ b();
+ if (a!=3)
+ abort ();
+ return 0;
+ }
+
Index: gcc/testsuite/gcc.dg/lto/20100715-1_1.c
===================================================================
*** /dev/null 1970-01-01 00:00:00.000000000 +0000
--- gcc/testsuite/gcc.dg/lto/20100715-1_1.c 2010-07-22 14:17:37.000000000 +0200
***************
*** 0 ****
--- 1,7 ----
+ /* { dg-options "-fno-lto -fno-whopr" } */
+
+ __attribute__ ((visibility("hidden"))) int a;
+ int b(void)
+ {
+ a=3;
+ }
Index: gcc/testsuite/gcc.dg/lto/20100722-1_0.c
===================================================================
*** /dev/null 1970-01-01 00:00:00.000000000 +0000
--- gcc/testsuite/gcc.dg/lto/20100722-1_0.c 2010-07-22 14:36:20.000000000 +0200
***************
*** 0 ****
--- 1,6 ----
+ /* { dg-lto-do run } */
+ /* { dg-require-lto-plugin "" } */
+ /* { dg-extra-ld-options "-fuse-linker-plugin" } */
+
+ int main() { return 0; }
+
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add dg-require-linker-plugin
2010-07-22 12:52 [PATCH] Add dg-require-linker-plugin Richard Guenther
@ 2010-07-22 14:36 ` H.J. Lu
2010-07-22 14:45 ` H.J. Lu
0 siblings, 1 reply; 4+ messages in thread
From: H.J. Lu @ 2010-07-22 14:36 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc-patches, Jan Hubicka
On Thu, Jul 22, 2010 at 5:52 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> This adds dg-require-linker-plugin support to the testsuite. Simple now,
> as the lto-plugin is installed into gcc/. I'll add the testcase for
> PR43373 as an example. Honza - you didn't yet apply the patch to
> fix the wrong-code issue of gcc.dg/lto/20100715-1_[01].c, so I won't
> commit that testcase now.
>
> Committed.
>
> Richard.
>
> 2010-07-22 Richard Guenther <rguenther@suse.de>
>
> * lib/target-supports-dg.exp (dg-require-linker-plugin): New proc.
This adds dg-require-linker-plugin.
> Index: gcc/testsuite/gcc.dg/lto/20100722-1_0.c
> ===================================================================
> *** /dev/null 1970-01-01 00:00:00.000000000 +0000
> --- gcc/testsuite/gcc.dg/lto/20100722-1_0.c 2010-07-22 14:36:20.000000000 +0200
> ***************
> *** 0 ****
> --- 1,6 ----
> + /* { dg-lto-do run } */
> + /* { dg-require-lto-plugin "" } */
This uses dg-require-lto-plugin. Is this a typo?
> + /* { dg-extra-ld-options "-fuse-linker-plugin" } */
> +
> + int main() { return 0; }
> +
>
--
H.J.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add dg-require-linker-plugin
2010-07-22 14:36 ` H.J. Lu
@ 2010-07-22 14:45 ` H.J. Lu
2010-07-22 15:04 ` Richard Guenther
0 siblings, 1 reply; 4+ messages in thread
From: H.J. Lu @ 2010-07-22 14:45 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc-patches, Jan Hubicka
On Thu, Jul 22, 2010 at 7:36 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Jul 22, 2010 at 5:52 AM, Richard Guenther <rguenther@suse.de> wrote:
>>
>> This adds dg-require-linker-plugin support to the testsuite. Simple now,
>> as the lto-plugin is installed into gcc/. I'll add the testcase for
>> PR43373 as an example. Honza - you didn't yet apply the patch to
>> fix the wrong-code issue of gcc.dg/lto/20100715-1_[01].c, so I won't
>> commit that testcase now.
>>
>> Committed.
>>
>> Richard.
>>
>> 2010-07-22 Richard Guenther <rguenther@suse.de>
>>
>> * lib/target-supports-dg.exp (dg-require-linker-plugin): New proc.
>
> This adds dg-require-linker-plugin.
>
>
>
>> Index: gcc/testsuite/gcc.dg/lto/20100722-1_0.c
>> ===================================================================
>> *** /dev/null 1970-01-01 00:00:00.000000000 +0000
>> --- gcc/testsuite/gcc.dg/lto/20100722-1_0.c 2010-07-22 14:36:20.000000000 +0200
>> ***************
>> *** 0 ****
>> --- 1,6 ----
>> + /* { dg-lto-do run } */
>> + /* { dg-require-lto-plugin "" } */
>
> This uses dg-require-lto-plugin. Is this a typo?
>
I checked a fix to replace dg-require-lto-plugin with
dg-require-linker-plugin.
--
H.J.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add dg-require-linker-plugin
2010-07-22 14:45 ` H.J. Lu
@ 2010-07-22 15:04 ` Richard Guenther
0 siblings, 0 replies; 4+ messages in thread
From: Richard Guenther @ 2010-07-22 15:04 UTC (permalink / raw)
To: H.J. Lu; +Cc: Richard Guenther, gcc-patches, Jan Hubicka
On Thu, Jul 22, 2010 at 4:45 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Jul 22, 2010 at 7:36 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Thu, Jul 22, 2010 at 5:52 AM, Richard Guenther <rguenther@suse.de> wrote:
>>>
>>> This adds dg-require-linker-plugin support to the testsuite. Simple now,
>>> as the lto-plugin is installed into gcc/. I'll add the testcase for
>>> PR43373 as an example. Honza - you didn't yet apply the patch to
>>> fix the wrong-code issue of gcc.dg/lto/20100715-1_[01].c, so I won't
>>> commit that testcase now.
>>>
>>> Committed.
>>>
>>> Richard.
>>>
>>> 2010-07-22 Richard Guenther <rguenther@suse.de>
>>>
>>> * lib/target-supports-dg.exp (dg-require-linker-plugin): New proc.
>>
>> This adds dg-require-linker-plugin.
>>
>>
>>
>>> Index: gcc/testsuite/gcc.dg/lto/20100722-1_0.c
>>> ===================================================================
>>> *** /dev/null 1970-01-01 00:00:00.000000000 +0000
>>> --- gcc/testsuite/gcc.dg/lto/20100722-1_0.c 2010-07-22 14:36:20.000000000 +0200
>>> ***************
>>> *** 0 ****
>>> --- 1,6 ----
>>> + /* { dg-lto-do run } */
>>> + /* { dg-require-lto-plugin "" } */
>>
>> This uses dg-require-lto-plugin. Is this a typo?
>>
>
> I checked a fix to replace dg-require-lto-plugin with
> dg-require-linker-plugin.
Thanks.
Richard.
>
>
> --
> H.J.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-22 15:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-22 12:52 [PATCH] Add dg-require-linker-plugin Richard Guenther
2010-07-22 14:36 ` H.J. Lu
2010-07-22 14:45 ` H.J. Lu
2010-07-22 15:04 ` Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).