Import NetBSD tools and build.sh

This commit finalizes support for cross compilation. The tools
directory are all links to the actual tools and are built on the
host system to build Minix. build.sh is the work horse that takes
care of all environment settings. It's slightly adjusted for Minix.
The /usr/src/Makefile has additional targets needed for cross
compilation.
This commit is contained in:
Thomas Veerman
2012-06-06 14:46:00 +00:00
parent 2ed11343a6
commit c8a0e2f4c6
140 changed files with 26869 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
$NetBSD$
--- bfd/elf32-i386.c.orig Sat Apr 8 22:57:22 2006
+++ bfd/elf32-i386.c
@@ -3922,6 +3922,11 @@ elf_i386_plt_sym_val (bfd_vma i, const asection *plt,
#undef TARGET_LITTLE_NAME
#define TARGET_LITTLE_NAME "elf32-i386-freebsd"
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_i386_minix_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-i386-minix"
+
/* The kernel recognizes executables as valid only if they carry a
"FreeBSD" label in the ELF header. So we put this label on all
executables and (for simplicity) also all other object files. */
@@ -3946,6 +3951,11 @@ elf_i386_post_process_headers (bfd *abfd,
#define elf_backend_post_process_headers elf_i386_post_process_headers
#undef elf32_bed
#define elf32_bed elf32_i386_fbsd_bed
+
+#undef elf_backend_post_process_headers
+#define elf_backend_post_process_headers elf_i386_post_process_headers
+#undef elf32_bed
+#define elf32_bed elf32_i386_minix_bed
#include "elf32-target.h"