public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Patch,ld] Support cflags, ldflags from board description file in ld tests
@ 2013-12-11 13:38 Vidya Praveen
  2013-12-11 13:51 ` Vidya Praveen
  0 siblings, 1 reply; 4+ messages in thread
From: Vidya Praveen @ 2013-12-11 13:38 UTC (permalink / raw)
  To: binutils; +Cc: nickc

Hello,

This patch enables the ld regression test scripts to use ldflags and cflags
from the board description file. However, these are used only when the tests
makes use of default_ld_link or default_ld_simple_link or default_ld_compile
eventually.

Tested for aarch64-one-elf, arm-none-eabi, arm-none-linux-gnueabihf and
x86_64-unknown-linux-gnu.

OK for trunk?

Cheers
VP.

ld/testsuite/ChangeLog:

2013-12-11  Vidya Praveen  <vidyapraveen@arm.com>

        * lib/ld-lib.exp (default_ld_link): Use ldflags from board description
        file.
        (default_ld_simple_link): Likewise.
        (default_ld_compile): Use cflags from board description file.


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

* Re: [Patch,ld] Support cflags, ldflags from board description file in ld tests
  2013-12-11 13:38 [Patch,ld] Support cflags, ldflags from board description file in ld tests Vidya Praveen
@ 2013-12-11 13:51 ` Vidya Praveen
  2013-12-13 12:05   ` nick clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Vidya Praveen @ 2013-12-11 13:51 UTC (permalink / raw)
  To: binutils; +Cc: nickc

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

Apologies. Now with the patch attached!

VP.

On Wed, Dec 11, 2013 at 01:38:01PM +0000, Vidya Praveen wrote:
> Hello,
> 
> This patch enables the ld regression test scripts to use ldflags and cflags
> from the board description file. However, these are used only when the tests
> makes use of default_ld_link or default_ld_simple_link or default_ld_compile
> eventually.
> 
> Tested for aarch64-one-elf, arm-none-eabi, arm-none-linux-gnueabihf and
> x86_64-unknown-linux-gnu.
> 
> OK for trunk?
> 
> Cheers
> VP.
> 
> ld/testsuite/ChangeLog:
> 
> 2013-12-11  Vidya Praveen  <vidyapraveen@arm.com>
> 
>         * lib/ld-lib.exp (default_ld_link): Use ldflags from board description
>         file.
>         (default_ld_simple_link): Likewise.
>         (default_ld_compile): Use cflags from board description file.
> 

[-- Attachment #2: 1066a-v2.patch --]
[-- Type: text/x-diff, Size: 1328 bytes --]

diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 67c429f..f22fa8e 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -197,6 +197,10 @@ proc default_ld_link { ld target objects } {
 	set flags ""
     }
 
+    if [board_info [target_info name] exists ldflags] {
+        append flags " [board_info [target_info name] ldflags]"
+    }
+
     remote_file host delete $target
 
     return [run_host_cmd_yesno "$ld" "$HOSTING_EMU $flags -o $target $objs $libs"]
@@ -215,6 +219,10 @@ proc default_ld_simple_link { ld target objects } {
 	set flags ""
     }
 
+    if [board_info [target_info name] exists ldflags] {
+        append flags " [board_info [target_info name] ldflags]"
+    }
+
     # If we are compiling with gcc, we want to add gcc_ld_flag to
     # flags.  Rather than determine this in some complex way, we guess
     # based on the name of the compiler.
@@ -293,6 +301,10 @@ proc default_ld_compile { cc source object } {
 	set flags "$flags $CFLAGS"
     }
 
+    if [board_info [target_info name] exists cflags] {
+        append flags " [board_info [target_info name] cflags]"
+    }
+
     if [board_info [target_info name] exists multilib_flags] {
 	append flags " [board_info [target_info name] multilib_flags]"
     }

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

* Re: [Patch,ld] Support cflags, ldflags from board description file in ld tests
  2013-12-11 13:51 ` Vidya Praveen
@ 2013-12-13 12:05   ` nick clifton
  2013-12-16 14:05     ` Vidya Praveen
  0 siblings, 1 reply; 4+ messages in thread
From: nick clifton @ 2013-12-13 12:05 UTC (permalink / raw)
  To: Vidya Praveen, binutils

Hi Vidya,
>> 2013-12-11  Vidya Praveen  <vidyapraveen@arm.com>
>>
>>          * lib/ld-lib.exp (default_ld_link): Use ldflags from board description
>>          file.
>>          (default_ld_simple_link): Likewise.
>>          (default_ld_compile): Use cflags from board description file.

Approved and applied.

Cheers
   Nick

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

* Re: [Patch,ld] Support cflags, ldflags from board description file in ld tests
  2013-12-13 12:05   ` nick clifton
@ 2013-12-16 14:05     ` Vidya Praveen
  0 siblings, 0 replies; 4+ messages in thread
From: Vidya Praveen @ 2013-12-16 14:05 UTC (permalink / raw)
  To: nickc; +Cc: binutils

On Fri, Dec 13, 2013 at 12:03:10PM +0000, nick clifton wrote:
> Hi Vidya,
> >> 2013-12-11  Vidya Praveen  <vidyapraveen@arm.com>
> >>
> >>          * lib/ld-lib.exp (default_ld_link): Use ldflags from board description
> >>          file.
> >>          (default_ld_simple_link): Likewise.
> >>          (default_ld_compile): Use cflags from board description file.
> 
> Approved and applied.
> 
> Cheers
>    Nick
> 

Thanks Nick!

VP. 

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

end of thread, other threads:[~2013-12-16 14:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-11 13:38 [Patch,ld] Support cflags, ldflags from board description file in ld tests Vidya Praveen
2013-12-11 13:51 ` Vidya Praveen
2013-12-13 12:05   ` nick clifton
2013-12-16 14:05     ` Vidya Praveen

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