view sources/patches/elf2flt-make.patch @ 1763:b6e4e49cec5e draft

Teach build to do an elf compiler, no libc or root filesystem if no KARCH in target.
author Rob Landley <rob@landley.net>
date Tue, 26 May 2015 00:10:07 -0500
parents 3675adfb4e36
children
line wrap: on
line source

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)