This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] sim: bfin: fix up linux-fixed-code.h generation [PR sim/10143]


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=43fa85d9a8d7aac7a70c72220abd09d39703208a

commit 43fa85d9a8d7aac7a70c72220abd09d39703208a
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Mar 8 23:53:48 2015 -0400

    sim: bfin: fix up linux-fixed-code.h generation [PR sim/10143]
    
    The use of $< ends up picking the wrong object out of the depend
    list.  Specify the input name directly to avoid fragility.
    
    On BSD systems, we need to make sure all options come before the
    non-options (i.e. the files).
    
    Reported-by: Chris Johns <chrisj@rtems.org>
    URL: https://sourceware.org/bugzilla/show_bug.cgi?id=13160

Diff:
---
 sim/bfin/ChangeLog   | 7 +++++++
 sim/bfin/Makefile.in | 7 ++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index a07be86..9a115c2 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,3 +1,10 @@
+2015-03-08  Mike Frysinger  <vapier@gentoo.org>
+
+	PR sim/10143
+	* Makefile.in ($(srcdir)/linux-fixed-code.h): Specify the asm input
+	directly rather than use $<.  Move the file name to the end of the
+	sed command to be POSIX compliant.
+
 2014-08-19  Alan Modra  <amodra@gmail.com>
 
 	* configure: Regenerate.
diff --git a/sim/bfin/Makefile.in b/sim/bfin/Makefile.in
index b6cfeb5..a7f852d 100644
--- a/sim/bfin/Makefile.in
+++ b/sim/bfin/Makefile.in
@@ -50,15 +50,16 @@ SIM_EXTRA_LIBS = @SDL_LIBS@ -lm
 ## COMMON_POST_CONFIG_FRAG
 
 $(srcdir)/linux-fixed-code.h: @MAINTAINER_MODE_TRUE@ $(srcdir)/linux-fixed-code.s Makefile.in
-	$(AS_FOR_TARGET) $< -o linux-fixed-code.o
+	$(AS_FOR_TARGET) $(srcdir)/linux-fixed-code.s -o linux-fixed-code.o
 	(	set -e; \
 		echo "/* DO NOT EDIT: Autogenerated from linux-fixed-code.s.  */"; \
 		echo "static const unsigned char bfin_linux_fixed_code[] ="; \
 		echo "{"; \
 		$(OBJDUMP_FOR_TARGET) -d -z linux-fixed-code.o > $@.dis; \
-		sed -n $@.dis \
+		sed -n \
 			-e 's:^[^	]*	:0x:' \
-			-e '/^0x/{s:	.*::;s: *$$:,:;s: :, 0x:g;p}'; \
+			-e '/^0x/{s:	.*::;s: *$$:,:;s: :, 0x:g;p}' \
+			$@.dis; \
 		rm -f $@.dis; \
 		echo "};" \
 	) > $@.tmp


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]