diff sources/patches/elf2flt-make.patch @ 1704:3675adfb4e36 draft

Add basic elf2flt support to simple-cross-compiler.sh and sh2eb.
author Rob Landley <rob@landley.net>
date Fri, 07 Nov 2014 08:49:26 -0600
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/patches/elf2flt-make.patch	Fri Nov 07 08:49:26 2014 -0600
@@ -0,0 +1,38 @@
+Remove nonexistent header (which apparently has no symbols we need),
+and teach makefile that the prefix can be something other than full target name.
+
+diff -ruN elf2flt/ld-elf2flt.c elf2flt.bak/ld-elf2flt.c
+--- elf2flt/ld-elf2flt.c	2012-10-03 21:32:38.000000000 -0500
++++ elf2flt.bak/ld-elf2flt.c	2014-11-06 23:42:35.703148578 -0600
+@@ -24,7 +24,6 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include <libiberty.h>
+-#include <filenames.h>
+ 
+ #include "stubs.h"
+ const char *elf2flt_progname;
+diff -ruN elf2flt/Makefile.in elf2flt.bak/Makefile.in
+--- elf2flt/Makefile.in	2012-10-03 21:32:38.000000000 -0500
++++ elf2flt.bak/Makefile.in	2014-11-07 08:12:07.914832959 -0600
+@@ -97,15 +97,15 @@
+ 	$(INSTALL) -d $(bindir)
+ 	$(INSTALL) -d $(target_bindir)
+ 	$(INSTALL) -d $(target_libdir)
+-	$(INSTALL) -m 755 $(PROG_FLTHDR) $(bindir)/$(TARGET)-$(PROG_FLTHDR)
++	$(INSTALL) -m 755 $(PROG_FLTHDR) $(bindir)/$(PREFIX)$(PROG_FLTHDR)
+ 	$(INSTALL) -m 755 $(PROG_FLTHDR) $(target_bindir)/$(PROG_FLTHDR)
+-	$(INSTALL) -m 755 $(PROG_ELF2FLT) $(bindir)/$(TARGET)-$(PROG_ELF2FLT)
++	$(INSTALL) -m 755 $(PROG_ELF2FLT) $(bindir)/$(PREFIX)$(PROG_ELF2FLT)
+ 	$(INSTALL) -m 755 $(PROG_ELF2FLT) $(target_bindir)/$(PROG_ELF2FLT)
+-	[ -f $(bindir)/$(TARGET)-ld.real$(EXEEXT) ] || \
+-		mv $(bindir)/$(TARGET)-ld$(EXEEXT) $(bindir)/$(TARGET)-ld.real$(EXEEXT)
++	[ -f $(bindir)/$(PREFIX)ld.real$(EXEEXT) ] || \
++		mv $(bindir)/$(PREFIX)ld$(EXEEXT) $(bindir)/$(PREFIX)ld.real$(EXEEXT)
+ 	[ -f $(target_bindir)/ld.real$(EXEEXT) ] || \
+ 		mv $(target_bindir)/ld$(EXEEXT) $(target_bindir)/ld.real$(EXEEXT)
+-	$(INSTALL) -m 755 $(PROG_LD_ELF2FLT) $(bindir)/$(TARGET)-ld$(EXEEXT)
++	$(INSTALL) -m 755 $(PROG_LD_ELF2FLT) $(bindir)/$(PREFIX)ld$(EXEEXT)
+ 	$(INSTALL) -m 755 $(PROG_LD_ELF2FLT) $(target_bindir)/ld$(EXEEXT)
+ 	$(INSTALL) -m 644 $(SRC_LDFILE) $(target_libdir)/$(LDFILE)
+