public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Vidya Praveen <vidyapraveen@arm.com>
To: "binutils@sourceware.org" <binutils@sourceware.org>
Cc: "nickc@redhat.com" <nickc@redhat.com>
Subject: Re: [Patch,ld] Support cflags, ldflags from board description file in ld tests
Date: Wed, 11 Dec 2013 13:51:00 -0000	[thread overview]
Message-ID: <20131211135117.GD5586@e103625-lin.cambridge.arm.com> (raw)
In-Reply-To: <20131211133801.GC5586@e103625-lin.cambridge.arm.com>

[-- 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]"
     }

  reply	other threads:[~2013-12-11 13:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 13:38 Vidya Praveen
2013-12-11 13:51 ` Vidya Praveen [this message]
2013-12-13 12:05   ` nick clifton
2013-12-16 14:05     ` Vidya Praveen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131211135117.GD5586@e103625-lin.cambridge.arm.com \
    --to=vidyapraveen@arm.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).