public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH ARC 3/3]: Fixed-linker-related-testsuite-for-ARC
@ 2016-05-11 15:23 Cupertino Miranda
  2016-05-12  0:28 ` Alan Modra
  0 siblings, 1 reply; 4+ messages in thread
From: Cupertino Miranda @ 2016-05-11 15:23 UTC (permalink / raw)
  To: binutils; +Cc: Claudiu Zissulescu, Francois Bedard

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

Hi all,

In this patch I reviewed the testsuite in order to enable and pass has
many tests as possible.
Older target was XFAILing too many tests.

Best regards,
Cupertino

ld/ChangeLog:

Cupertino Miranda  <cmiranda@synopsys.com>
    testsuite/ld-elf/compressed1d.d: Removed from notarget.
    testsuite/ld-elf/group8a.d: Likewise.
    testsuite/ld-elf/group8b.d: Likewise.
    testsuite/ld-elf/group9a.d: Likewise.
    testsuite/ld-elf/group9b.d: Likewise.
    testsuite/ld-elf/pr12851.d: Likewise.
    testsuite/ld-elf/pr12975.d: Likewise.
    testsuite/ld-elf/pr13177.d: Likewise.
    testsuite/ld-elf/pr13195.d: Likewise.
    testsuite/ld-elf/pr17615.d: Likewise.
    testsuite/ld-elf/eh-frame-hdr.d: Removed from xfail.
    testsuite/ld-elf/group3b.d: Likewise.
    testsuite/ld-srec/srec.exp: Likewise.
    testsuite/lib/ld-lib.exp (check_gc_sections_available):
      Mark ARC as supporting gc.
    (check_shared_lib_support): Mark ARC as supporting.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-Fixed-linker-related-testsuite-for-ARC.patch --]
[-- Type: text/x-patch; name="0003-Fixed-linker-related-testsuite-for-ARC.patch", Size: 7863 bytes --]

diff --git a/ld/testsuite/ld-elf/compressed1d.d b/ld/testsuite/ld-elf/compressed1d.d
index 496557d..d04e9c1 100644
--- a/ld/testsuite/ld-elf/compressed1d.d
+++ b/ld/testsuite/ld-elf/compressed1d.d
@@ -2,7 +2,7 @@
 #as: --compress-debug-sections=none
 #ld: -r --compress-debug-sections=zlib-gnu
 #readelf: -SW
-#notarget: arc*-*-* d30v-*-* dlx-*-* fr30-*-* frv-*-* i370-*-* i860-*-* iq2000-*-* mn10200-*-* moxie-*-* msp430-*-* mt-*-* or1k-*-* pj-*-*
+#notarget: d30v-*-* dlx-*-* fr30-*-* frv-*-* i370-*-* i860-*-* iq2000-*-* mn10200-*-* moxie-*-* msp430-*-* mt-*-* or1k-*-* pj-*-*
 # Not all ELF targets use the elf.em emulation...
 
 #failif
diff --git a/ld/testsuite/ld-elf/eh-frame-hdr.d b/ld/testsuite/ld-elf/eh-frame-hdr.d
index b4ea7fb..f73d0e5 100644
--- a/ld/testsuite/ld-elf/eh-frame-hdr.d
+++ b/ld/testsuite/ld-elf/eh-frame-hdr.d
@@ -2,7 +2,7 @@
 #ld: -e _start --eh-frame-hdr
 #objdump: -hw
 #target: cfi
-#xfail: arc*-*-elf* avr*-*-* or1k*-*-elf or1k*-*-rtems* visium-*-*
+#xfail: avr*-*-* or1k*-*-elf or1k*-*-rtems* visium-*-*
 # These targets support CFI generation but not shared libraries.
 #...
   [0-9] .eh_frame_hdr 0*[12][048c] .*
diff --git a/ld/testsuite/ld-elf/group3b.d b/ld/testsuite/ld-elf/group3b.d
index 0da9540..a242c40 100644
--- a/ld/testsuite/ld-elf/group3b.d
+++ b/ld/testsuite/ld-elf/group3b.d
@@ -2,7 +2,7 @@
 #source: group3a.s
 #ld: -T group.ld
 #readelf: -s
-#xfail: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 # generic linker targets don't comply with all symbol merging rules
 
 Symbol table '.symtab' contains .* entries:
diff --git a/ld/testsuite/ld-elf/group8a.d b/ld/testsuite/ld-elf/group8a.d
index 3613044..45955ba 100644
--- a/ld/testsuite/ld-elf/group8a.d
+++ b/ld/testsuite/ld-elf/group8a.d
@@ -1,7 +1,7 @@
 #source: group8.s
 #ld: -r --gc-sections --entry foo
 #readelf: -g --wide
-#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
 #xfail: cr16-*-* crx-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/group8b.d b/ld/testsuite/ld-elf/group8b.d
index 3859cb6..0175c7f 100644
--- a/ld/testsuite/ld-elf/group8b.d
+++ b/ld/testsuite/ld-elf/group8b.d
@@ -1,7 +1,7 @@
 #source: group8.s
 #ld: -r --gc-sections --entry bar
 #readelf: -g --wide
-#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
 #xfail: cr16-*-* crx-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/group9a.d b/ld/testsuite/ld-elf/group9a.d
index 4e8341d..44fe606 100644
--- a/ld/testsuite/ld-elf/group9a.d
+++ b/ld/testsuite/ld-elf/group9a.d
@@ -1,7 +1,7 @@
 #source: group9.s
 #ld: -r --gc-sections --entry foo
 #readelf: -g --wide
-#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #notarget: alpha-*-* hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
 #xfail: cr16-*-* crx-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/group9b.d b/ld/testsuite/ld-elf/group9b.d
index ce5931c..4ab2ba6 100644
--- a/ld/testsuite/ld-elf/group9b.d
+++ b/ld/testsuite/ld-elf/group9b.d
@@ -1,7 +1,7 @@
 #source: group9.s
 #ld: -r --gc-sections --entry bar
 #readelf: -g --wide
-#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #notarget: alpha-*-* hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
 #xfail: cr16-*-* crx-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
diff --git a/ld/testsuite/ld-elf/pr12851.d b/ld/testsuite/ld-elf/pr12851.d
index f02e3d2..48ecb09 100644
--- a/ld/testsuite/ld-elf/pr12851.d
+++ b/ld/testsuite/ld-elf/pr12851.d
@@ -2,7 +2,7 @@
 #source: start.s
 #ld: --gc-sections
 #readelf: -s --wide
-#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
 
diff --git a/ld/testsuite/ld-elf/pr12975.d b/ld/testsuite/ld-elf/pr12975.d
index 97326a7..7eb5afb 100644
--- a/ld/testsuite/ld-elf/pr12975.d
+++ b/ld/testsuite/ld-elf/pr12975.d
@@ -1,7 +1,7 @@
 #ld: --gc-sections -shared -version-script pr12975.t
 #readelf: -s --wide
 #target: *-*-linux* *-*-gnu*
-#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
 
diff --git a/ld/testsuite/ld-elf/pr13177.d b/ld/testsuite/ld-elf/pr13177.d
index d47aadf..2d09162 100644
--- a/ld/testsuite/ld-elf/pr13177.d
+++ b/ld/testsuite/ld-elf/pr13177.d
@@ -2,7 +2,7 @@
 #ld: --gc-sections -shared
 #readelf: -s -D --wide
 #target: *-*-linux* *-*-gnu*
-#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
 
diff --git a/ld/testsuite/ld-elf/pr13195.d b/ld/testsuite/ld-elf/pr13195.d
index c806c11..e6c45f1 100644
--- a/ld/testsuite/ld-elf/pr13195.d
+++ b/ld/testsuite/ld-elf/pr13195.d
@@ -1,7 +1,7 @@
 #ld: --gc-sections -shared -version-script pr13195.t
 #readelf: -s --wide -D
 #target: *-*-linux* *-*-gnu*
-#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
 
diff --git a/ld/testsuite/ld-elf/pr17615.d b/ld/testsuite/ld-elf/pr17615.d
index 0b11823..27b5894 100644
--- a/ld/testsuite/ld-elf/pr17615.d
+++ b/ld/testsuite/ld-elf/pr17615.d
@@ -1,7 +1,7 @@
 #ld: --gc-sections -shared
 #readelf: -S --wide --dyn-syms
 #target: *-*-linux* *-*-gnu*
-#notarget: arc*-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
 #notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
 # generic linker targets don't support --gc-sections, nor do a bunch of others
 
diff --git a/ld/testsuite/ld-srec/srec.exp b/ld/testsuite/ld-srec/srec.exp
index c15d054..21d165b 100644
--- a/ld/testsuite/ld-srec/srec.exp
+++ b/ld/testsuite/ld-srec/srec.exp
@@ -438,6 +438,7 @@ if ![ld_compile "$CXX $CXXFLAGS -fno-exceptions" $srcdir/$subdir/sr3.cc tmpdir/s
 setup_xfail "i*86-*-aout*"
 setup_xfail "mips*-*-irix5*" "mips*-*-irix6*" "mips*-*-linux*"
 setup_xfail "*-*-aix*" "*-*-xcoff*"
+setup_xfail "arc-*-*"
 setup_xfail "arm*-*-*"
 setup_xfail "v850*-*-elf"
 setup_xfail "alpha*-*-elf*" "alpha*-*-linux-*" "alpha*-*-gnu*"
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 9333f52..d74d280 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1665,8 +1665,7 @@ proc check_gc_sections_available { } {
     if {![info exists gc_sections_available_saved]} {
 	# Some targets don't support gc-sections despite whatever's
 	# advertised by ld's options.
-	if {   [istarget arc*-*-*]
-	    || [istarget d30v-*-*]
+	if {   [istarget d30v-*-*]
 	    || [istarget dlx-*-*]
 	    || [istarget i960-*-*]
 	    || [istarget pj*-*-*]
@@ -1707,7 +1706,7 @@ proc check_gc_sections_available { } {
 
 proc check_shared_lib_support { } {
     if {![istarget aarch64*-*-elf]
-	 && ![istarget arc*-*-*]
+	 && ![istarget arc*-*-elf32]
 	 && ![istarget arm*-*-elf]
 	 && ![istarget avr-*-*]
 	 && ![istarget cr16-*-*]
-- 
1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH ARC 3/3]: Fixed-linker-related-testsuite-for-ARC
  2016-05-11 15:23 [PATCH ARC 3/3]: Fixed-linker-related-testsuite-for-ARC Cupertino Miranda
@ 2016-05-12  0:28 ` Alan Modra
  2016-05-12  9:55   ` Cupertino Miranda
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2016-05-12  0:28 UTC (permalink / raw)
  To: Cupertino Miranda; +Cc: binutils, Claudiu Zissulescu, Francois Bedard

On Wed, May 11, 2016 at 03:23:34PM +0000, Cupertino Miranda wrote:
> @@ -1707,7 +1706,7 @@ proc check_gc_sections_available { } {
>  
>  proc check_shared_lib_support { } {
>      if {![istarget aarch64*-*-elf]
> -	 && ![istarget arc*-*-*]
> +	 && ![istarget arc*-*-elf32]
>  	 && ![istarget arm*-*-elf]
>  	 && ![istarget avr-*-*]
>  	 && ![istarget cr16-*-*]

The other testsuite changes are OK, but this one looks wrong.
--target=arc-elf is a valid configure option, resulting in a target
triple of arc-unknown-elf.

$ ./config.sub arc-elf
arc-unknown-elf

This one also builds
$ ./config.sub arc-linux-uclibc
arc-unknown-linux-uclibc

But this one doesn't, and probably ought to be fixed in config.sub
upstream.
$ ./config.sub arc
arc-unknown-none

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH ARC 3/3]: Fixed-linker-related-testsuite-for-ARC
  2016-05-12  0:28 ` Alan Modra
@ 2016-05-12  9:55   ` Cupertino Miranda
  2016-05-12 12:03     ` Alan Modra
  0 siblings, 1 reply; 4+ messages in thread
From: Cupertino Miranda @ 2016-05-12  9:55 UTC (permalink / raw)
  To: Alan Modra, Cupertino Miranda
  Cc: binutils, Claudiu Zissulescu, Francois Bedard

Hi Alan,

Thanks for noticing this mistake.
Would it be reasonable to just change it to

+	 && ![istarget arc*-*-elf*]

Or should I change it in config.sub to default any elf* to elf.

The reason for the elf32 is our legacy build and regression testing
scripts.
Nevertheless, we do not consider it a requirement to keep this behavior
specially if it could lead us to more of this problems in the future.

Regarding "./config.sub arc", should we make it default to something. We
noticed that arm also gives "arm-unknown-none" and does not support the
target.

Looking forward to your reply and opinion on how we should address it.

Best regards,
Cupertino

On 05/12/2016 02:28 AM, Alan Modra wrote:
> On Wed, May 11, 2016 at 03:23:34PM +0000, Cupertino Miranda wrote:
>> @@ -1707,7 +1706,7 @@ proc check_gc_sections_available { } {
>>  
>>  proc check_shared_lib_support { } {
>>      if {![istarget aarch64*-*-elf]
>> -	 && ![istarget arc*-*-*]
>> +	 && ![istarget arc*-*-elf32]
>>  	 && ![istarget arm*-*-elf]
>>  	 && ![istarget avr-*-*]
>>  	 && ![istarget cr16-*-*]
> The other testsuite changes are OK, but this one looks wrong.
> --target=arc-elf is a valid configure option, resulting in a target
> triple of arc-unknown-elf.
>
> $ ./config.sub arc-elf
> arc-unknown-elf
>
> This one also builds
> $ ./config.sub arc-linux-uclibc
> arc-unknown-linux-uclibc
>
> But this one doesn't, and probably ought to be fixed in config.sub
> upstream.
> $ ./config.sub arc
> arc-unknown-none
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH ARC 3/3]: Fixed-linker-related-testsuite-for-ARC
  2016-05-12  9:55   ` Cupertino Miranda
@ 2016-05-12 12:03     ` Alan Modra
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Modra @ 2016-05-12 12:03 UTC (permalink / raw)
  To: Cupertino Miranda; +Cc: binutils, Claudiu Zissulescu, Francois Bedard

On Thu, May 12, 2016 at 09:44:40AM +0000, Cupertino Miranda wrote:
> Hi Alan,
> 
> Thanks for noticing this mistake.
> Would it be reasonable to just change it to
> 
> +	 && ![istarget arc*-*-elf*]

Yes, I think so.  If I understand correctly from ld/emulparams
and ld/configure.tgt, arc-*-linux-uclibc* supports shared
libraries, but arc-*-elf* does not.

> Or should I change it in config.sub to default any elf* to elf.
> 
> The reason for the elf32 is our legacy build and regression testing
> scripts.
> Nevertheless, we do not consider it a requirement to keep this behavior
> specially if it could lead us to more of this problems in the future.
> 
> Regarding "./config.sub arc", should we make it default to something. We
> noticed that arm also gives "arm-unknown-none" and does not support the
> target.

ARM is quite different, supporting AOUT, COFF, PE and more binutils
formats.  ARC on the other hand, only has ELF support in binutils.
So it would be reasonable to change config.sub to translate plain
"arc" to "arc-elf".  I guess it's also quite reasonable to leave it
as is..  In any case, whether config.sub changes or not doesn't have
any bearing on this particular patch.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-12 12:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11 15:23 [PATCH ARC 3/3]: Fixed-linker-related-testsuite-for-ARC Cupertino Miranda
2016-05-12  0:28 ` Alan Modra
2016-05-12  9:55   ` Cupertino Miranda
2016-05-12 12:03     ` Alan Modra

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).