diff options
author | dinoex <dinoex@FreeBSD.org> | 2001-06-30 19:45:12 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2001-06-30 19:45:12 +0800 |
commit | 167f0c30449954f351745695ac795d62acad4930 (patch) | |
tree | e2ad766bf4e2214f127c9db72f273710be35817c /devel | |
parent | 967660f058a7a5cfb93dbe225f8cd3fcb8146096 (diff) | |
download | freebsd-ports-gnome-167f0c30449954f351745695ac795d62acad4930.tar.gz freebsd-ports-gnome-167f0c30449954f351745695ac795d62acad4930.tar.zst freebsd-ports-gnome-167f0c30449954f351745695ac795d62acad4930.zip |
This is binutils-2.8.1 for mipsel-linux target with Linux VR
patches.
Version 2.8.1 is latest official supported by Linux VR version.
This port was converted from SRPM for RedHat.
PR: 28514
Submitted by: lev@serebryakov.spb.ru
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/mipsel-linux-binutils/Makefile | 59 | ||||
-rw-r--r-- | devel/mipsel-linux-binutils/distinfo | 1 | ||||
-rw-r--r-- | devel/mipsel-linux-binutils/files/patch-aa-mips-1 | 272 | ||||
-rw-r--r-- | devel/mipsel-linux-binutils/files/patch-bb-mips-2 | 52 | ||||
-rw-r--r-- | devel/mipsel-linux-binutils/files/patch-cc-loaddelay-2 | 257 | ||||
-rw-r--r-- | devel/mipsel-linux-binutils/pkg-comment | 1 | ||||
-rw-r--r-- | devel/mipsel-linux-binutils/pkg-descr | 12 | ||||
-rw-r--r-- | devel/mipsel-linux-binutils/pkg-plist | 83 |
9 files changed, 738 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 5047d8d866d9..3f4e8e370a7e 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -255,6 +255,7 @@ SUBDIR += mips-rtems-gcc SUBDIR += mips-rtems-gcj SUBDIR += mips-rtems-objc + SUBDIR += mipsel-linux-binutils SUBDIR += mipsel-linux-kernel-headers SUBDIR += mkcmd SUBDIR += mkmf diff --git a/devel/mipsel-linux-binutils/Makefile b/devel/mipsel-linux-binutils/Makefile new file mode 100644 index 000000000000..94ca160d5e77 --- /dev/null +++ b/devel/mipsel-linux-binutils/Makefile @@ -0,0 +1,59 @@ +# New ports collection makefile for: mipsel-linux-binutils +# Date created: 13 June 2001 +# Whom: Lev Serebryakov <lev@serebryakov.spb.ru> +# +# $FreeBSD$ +# + +PORTNAME= binutils +PORTVERSION= 2.8.1 +CATEGORIES= devel +MASTER_SITES= ${MASTER_SITE_GNU} +MASTER_SITE_SUBDIR= binutils +PKGNAMEPREFIX= mipsel-linux- + +MAINTAINER= lev@serebryakov.spb.ru + +PATCH_STRIP= -p1 +USE_GMAKE= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --target=${PKGNAMEPREFIX:S/-$//} +USE_LIBTOOL= yes +LIBTOOLFILES= configure bfd/configure binutils/configure etc/configure \ + gas/configure gprof/configure ld/configure opcodes/configure +MAN1= ${PKGNAMEPREFIX}ar.1 ${PKGNAMEPREFIX}nm.1 \ + ${PKGNAMEPREFIX}objdump.1 \ + ${PKGNAMEPREFIX}ranlib.1 ${PKGNAMEPREFIX}size.1 \ + ${PKGNAMEPREFIX}strings.1 ${PKGNAMEPREFIX}strip.1 \ + ${PKGNAMEPREFIX}objcopy.1 ${PKGNAMEPREFIX}addr2line.1 \ + ${PKGNAMEPREFIX}nlmconv.1 ${PKGNAMEPREFIX}c++filt.1 \ + ${PKGNAMEPREFIX}as.1 ${PKGNAMEPREFIX}ld.1 + +PLIST_SUB+= BINUTILS_TARG=${PKGNAMEPREFIX:S/-$//} + +BINARIES= addr2line ar as c++filt gasp ld nm objcopy objdump ranlib \ + size strings strip + +post-install: +.for F in ${BINARIES} + @strip ${PREFIX}/bin/${PKGNAMEPREFIX}$F + @${LN} -f ${PREFIX}/bin/${PKGNAMEPREFIX}$F \ + ${PREFIX}/${PKGNAMEPREFIX:S/-$//}/bin/$F +.endfor + @${MKDIR} ${PREFIX}/${PKGNAMEPREFIX:S/-$//}/lib + @cd ${PREFIX}/lib ; ${MV} libiberty.a \ + ${PREFIX}/${PKGNAMEPREFIX:S/-$//}/lib + @cd ${PREFIX}/lib ; ${MV} lib${PKGNAMEPREFIX}bfd.a \ + ${PREFIX}/${PKGNAMEPREFIX:S/-$//}/lib/libbfd.a + @cd ${PREFIX}/lib ; ${MV} lib${PKGNAMEPREFIX}opcodes.a \ + ${PREFIX}/${PKGNAMEPREFIX:S/-$//}/lib/libopcodes.a + @${MKDIR} ${PREFIX}/${PKGNAMEPREFIX:S/-$//}/include + @cd ${PREFIX}/include ; ${MV} ansidecl.h bfd.h bfdlink.h \ + ${PREFIX}/${PKGNAMEPREFIX:S/-$//}/include + @for F in ${PREFIX}/info/as.info* ${PREFIX}/info/bfd.info* \ + ${PREFIX}/info/binutils.info* ${PREFIX}/info/ld.info* \ + ${PREFIX}/info/gasp.info*; do \ + ${MV} $${F} `echo $${F} | ${SED} 's|info/|info/mipsel-linux-|'`; \ + done + +.include <bsd.port.mk> diff --git a/devel/mipsel-linux-binutils/distinfo b/devel/mipsel-linux-binutils/distinfo new file mode 100644 index 000000000000..7b3ae21178e9 --- /dev/null +++ b/devel/mipsel-linux-binutils/distinfo @@ -0,0 +1 @@ +MD5 (binutils-2.8.1.tar.gz) = 787229d600b8bb58fe7e75ea30445e44 diff --git a/devel/mipsel-linux-binutils/files/patch-aa-mips-1 b/devel/mipsel-linux-binutils/files/patch-aa-mips-1 new file mode 100644 index 000000000000..6e0c57212c15 --- /dev/null +++ b/devel/mipsel-linux-binutils/files/patch-aa-mips-1 @@ -0,0 +1,272 @@ +diff -urN binutils-2.8.1.orig/bfd/elf32-mips.c binutils-2.8.1/bfd/elf32-mips.c +--- binutils-2.8.1.orig/bfd/elf32-mips.c Mon May 26 19:34:03 1997 ++++ binutils-2.8.1/bfd/elf32-mips.c Sat Jun 5 12:43:09 1999 +@@ -5103,36 +5103,43 @@ + } + else + { +- long indx; +- +- if (h == NULL) +- sec = local_sections[r_symndx]; +- else +- { +- BFD_ASSERT (h->root.type == bfd_link_hash_defined +- || (h->root.type +- == bfd_link_hash_defweak)); +- sec = h->root.u.def.section; +- } +- if (sec != NULL && bfd_is_abs_section (sec)) +- indx = 0; +- else if (sec == NULL || sec->owner == NULL) ++ if (r_type == R_MIPS_32) + { +- bfd_set_error (bfd_error_bad_value); +- return false; ++ outrel.r_info = ELF32_R_INFO (0, R_MIPS_REL32); ++ addend += relocation; + } +- else +- { +- asection *osec; ++ else ++ { ++ long indx; + +- osec = sec->output_section; +- indx = elf_section_data (osec)->dynindx; +- if (indx == 0) +- abort (); +- } ++ if (h == NULL) ++ sec = local_sections[r_symndx]; ++ else ++ { ++ BFD_ASSERT (h->root.type == bfd_link_hash_defined ++ || (h->root.type ++ == bfd_link_hash_defweak)); ++ sec = h->root.u.def.section; ++ } ++ if (sec != NULL && bfd_is_abs_section (sec)) ++ indx = 0; ++ else if (sec == NULL || sec->owner == NULL) ++ { ++ bfd_set_error (bfd_error_bad_value); ++ return false; ++ } ++ else ++ { ++ asection *osec; + +- outrel.r_info = ELF32_R_INFO (indx, R_MIPS_REL32); +- addend += relocation; ++ osec = sec->output_section; ++ indx = elf_section_data (osec)->dynindx; ++ if (indx == 0) ++ abort (); ++ } ++ outrel.r_info = ELF32_R_INFO (indx, R_MIPS_REL32); ++ addend += relocation; ++ } + } + + if (! skip) +diff -urN binutils-2.8.1.orig/gas/ChangeLog binutils-2.8.1/gas/ChangeLog +--- binutils-2.8.1.orig/gas/ChangeLog Mon May 26 19:32:45 1997 ++++ binutils-2.8.1/gas/ChangeLog Sat Jun 5 12:43:09 1999 +@@ -1,3 +1,10 @@ ++Tue Oct 21 03:23:59 1997 Ralf Baechle <ralf@gnu.ai.mit.edu> ++ ++ * config/tc-mips.c (macro): Only emit a BFD_RELOC_MIPS_LITERAL ++ when the symbol is in the .lit section. Required for a.out ++ support. ++ (mips_ip): Fix %HI, %hi and %lo operators. ++ + Mon May 26 13:24:25 1997 Ian Lance Taylor <ian@cygnus.com> + + * doc/as.texinfo: Don't use @value in section names or index +diff -urN binutils-2.8.1.orig/gas/config/obj-elf.c binutils-2.8.1/gas/config/obj-elf.c +--- binutils-2.8.1.orig/gas/config/obj-elf.c Mon May 26 19:32:36 1997 ++++ binutils-2.8.1/gas/config/obj-elf.c Sat Jun 5 13:03:43 1999 +@@ -58,7 +58,6 @@ + void obj_elf_version PARAMS ((int)); + static void obj_elf_size PARAMS ((int)); + static void obj_elf_type PARAMS ((int)); +-static void obj_elf_ident PARAMS ((int)); + static void obj_elf_weak PARAMS ((int)); + static void obj_elf_local PARAMS ((int)); + static void obj_elf_common PARAMS ((int)); +@@ -1132,7 +1131,7 @@ + demand_empty_rest_of_line (); + } + +-static void ++void + obj_elf_ident (ignore) + int ignore; + { +diff -urN binutils-2.8.1.orig/gas/config/obj-elf.h binutils-2.8.1/gas/config/obj-elf.h +--- binutils-2.8.1.orig/gas/config/obj-elf.h Mon May 26 19:32:36 1997 ++++ binutils-2.8.1/gas/config/obj-elf.h Sat Jun 5 13:09:46 1999 +@@ -94,6 +94,8 @@ + #define obj_app_file elf_file_symbol + extern void elf_file_symbol PARAMS ((char *)); + ++extern void obj_elf_ident PARAMS ((int)); ++ + extern void obj_elf_section_change_hook PARAMS ((void)); + + extern void obj_elf_section PARAMS ((int)); +diff -urN binutils-2.8.1.orig/gas/config/tc-mips.c binutils-2.8.1/gas/config/tc-mips.c +--- binutils-2.8.1.orig/gas/config/tc-mips.c Mon May 26 19:32:40 1997 ++++ binutils-2.8.1/gas/config/tc-mips.c Sat Jun 5 13:08:28 1999 +@@ -598,6 +598,7 @@ + static void s_align PARAMS ((int)); + static void s_change_sec PARAMS ((int)); + static void s_cons PARAMS ((int)); ++static void s_ident PARAMS ((int)); + static void s_float_cons PARAMS ((int)); + static void s_mips_globl PARAMS ((int)); + static void s_option PARAMS ((int)); +@@ -668,6 +669,7 @@ + {"globl", s_mips_globl, 0}, + {"global", s_mips_globl, 0}, + {"hword", s_cons, 1}, ++ {"ident", s_ident, 1}, + {"int", s_cons, 2}, + {"long", s_cons, 2}, + {"octa", s_cons, 4}, +@@ -4863,13 +4865,22 @@ + else + { + assert (offset_expr.X_op == O_symbol +- && strcmp (segment_name (S_GET_SEGMENT +- (offset_expr.X_add_symbol)), +- ".lit4") == 0 + && offset_expr.X_add_number == 0); +- macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)", +- treg, (int) BFD_RELOC_MIPS_LITERAL, GP); +- return; ++ s = segment_name (S_GET_SEGMENT (offset_expr.X_add_symbol)); ++ if (strcmp (s, ".lit4") == 0) ++ { ++ macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)", ++ treg, (int) BFD_RELOC_MIPS_LITERAL, GP); ++ return; ++ } ++ else ++ { ++ /* FIXME: This won't work for a 64 bit address. */ ++ macro_build_lui ((char *) NULL, &icnt, &offset_expr, AT); ++ macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)", ++ treg, (int) BFD_RELOC_LO16, AT); ++ return; ++ } + } + + case M_LI_D: +@@ -6965,11 +6976,23 @@ + c = my_getSmallExpression (&imm_expr, s); + if (c != '\0') + { +- if (c != 'l') ++ if (c == 'l') + { + if (imm_expr.X_op == O_constant) +- imm_expr.X_add_number = +- (imm_expr.X_add_number >> 16) & 0xffff; ++ { ++ imm_expr.X_add_number &= 0xffff; ++ imm_reloc = BFD_RELOC_LO16; ++ } ++ } ++ else ++ { ++ if (imm_expr.X_op == O_constant) ++ { ++ if (c == 'h' && (imm_expr.X_add_number & 0x8000)) ++ imm_expr.X_add_number += 0x1000; ++ imm_expr.X_add_number = ++ (imm_expr.X_add_number >> 16) & 0xffff; ++ } + else if (c == 'h') + { + imm_reloc = BFD_RELOC_HI16_S; +@@ -7064,11 +7087,22 @@ + break; + + offset_reloc = BFD_RELOC_LO16; +- if (c == 'h' || c == 'H') ++ if (c) + { +- assert (offset_expr.X_op == O_constant); +- offset_expr.X_add_number = +- (offset_expr.X_add_number >> 16) & 0xffff; ++ if (c != 'l') ++ { ++ if (offset_expr.X_op == O_constant) ++ { ++ if (c == 'h' && (offset_expr.X_add_number & 0x8000)) ++ offset_expr.X_add_number += 0x1000; ++ offset_expr.X_add_number = ++ (offset_expr.X_add_number >> 16) & 0xffff; ++ } ++ else if (c == 'h') ++ offset_reloc = BFD_RELOC_HI16_S; ++ else ++ offset_reloc = BFD_RELOC_HI16; ++ } + } + s = expr_end; + continue; +@@ -7081,10 +7115,13 @@ + + case 'u': /* upper 16 bits */ + c = my_getSmallExpression (&imm_expr, s); +- if (imm_expr.X_op == O_constant +- && (imm_expr.X_add_number < 0 +- || imm_expr.X_add_number >= 0x10000)) +- as_bad ("lui expression not in range 0..65535"); ++ if (!c) ++ { ++ if (imm_expr.X_op == O_constant ++ && (imm_expr.X_add_number < 0 ++ || imm_expr.X_add_number >= 0x10000)) ++ as_bad ("lui expression not in range 0..65535"); ++ } + imm_reloc = BFD_RELOC_LO16; + if (c) + { +@@ -9150,6 +9187,14 @@ + mips_enable_auto_align () + { + auto_align = 1; ++} ++ ++static void ++s_ident (ignore) ++ int ignore; ++{ ++ mips_emit_delays (true); ++ obj_elf_ident(0); + } + + static void +diff -urN binutils-2.8.1.orig/opcodes/mips-opc.c binutils-2.8.1/opcodes/mips-opc.c +--- binutils-2.8.1.orig/opcodes/mips-opc.c Mon May 26 21:34:19 1997 ++++ binutils-2.8.1/opcodes/mips-opc.c Wed Oct 7 14:16:21 1998 +@@ -655,10 +655,10 @@ + {"tgeu", "s,t", 0x00000031, 0xfc00003f, RD_s|RD_t|I2|TRAP }, + {"tgeu", "s,j", 0x04090000, 0xfc1f0000, RD_s|I2|TRAP }, /* tgeiu */ + {"tgeu", "s,I", 2, (int) M_TGEU_I, INSN_MACRO }, +-{"tlbp", "", 0x42000008, 0xffffffff, INSN_TLB }, +-{"tlbr", "", 0x42000001, 0xffffffff, INSN_TLB }, +-{"tlbwi", "", 0x42000002, 0xffffffff, INSN_TLB }, +-{"tlbwr", "", 0x42000006, 0xffffffff, INSN_TLB }, ++{"tlbp", "", 0x42000008, 0xffffffff, INSN_TLB|INSN_COP|COD }, ++{"tlbr", "", 0x42000001, 0xffffffff, INSN_TLB|INSN_COP|COD }, ++{"tlbwi", "", 0x42000002, 0xffffffff, INSN_TLB|INSN_COP|COD }, ++{"tlbwr", "", 0x42000006, 0xffffffff, INSN_TLB|INSN_COP|COD }, + {"tlti", "s,j", 0x040a0000, 0xfc1f0000, RD_s|I2|TRAP }, + {"tlt", "s,t", 0x00000032, 0xfc00003f, RD_s|RD_t|I2|TRAP }, + {"tlt", "s,j", 0x040a0000, 0xfc1f0000, RD_s|I2|TRAP }, /* tlti */ diff --git a/devel/mipsel-linux-binutils/files/patch-bb-mips-2 b/devel/mipsel-linux-binutils/files/patch-bb-mips-2 new file mode 100644 index 000000000000..b58ca4520bc6 --- /dev/null +++ b/devel/mipsel-linux-binutils/files/patch-bb-mips-2 @@ -0,0 +1,52 @@ +diff -rubN binutils-2.8.1-mips1/bfd/ChangeLog binutils-2.8.1-mips2/bfd/ChangeLog +--- binutils-2.8.1-mips1/bfd/ChangeLog Mon May 26 10:33:56 1997 ++++ binutils-2.8.1-mips2/bfd/ChangeLog Sat Dec 9 08:49:09 2000 +@@ -1,3 +1,8 @@ ++2000-11-30 Ralf Baechle <ralf@gnu.org> ++ ++ * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit ++ BFDs containing no sections to be merged, regardless of their flags. ++ + Fri May 16 12:10:52 1997 Ian Lance Taylor <ian@cygnus.com> + + * elflink.h (elf_link_add_object_symbols): Don't decrease the +diff -rubN binutils-2.8.1-mips1/bfd/elf32-mips.c binutils-2.8.1-mips2/bfd/elf32-mips.c +--- binutils-2.8.1-mips1/bfd/elf32-mips.c Sat Dec 9 08:50:25 2000 ++++ binutils-2.8.1-mips2/bfd/elf32-mips.c Sat Dec 9 08:49:09 2000 +@@ -1964,6 +1964,8 @@ + flagword old_flags; + flagword new_flags; + boolean ok; ++ boolean null_input_bfd = true; ++ asection *sec; + + /* Check if we have the same endianess */ + if (ibfd->xvec->byteorder != obfd->xvec->byteorder +@@ -2009,6 +2011,27 @@ + old_flags &= ~EF_MIPS_NOREORDER; + + if (new_flags == old_flags) ++ return true; ++ ++ /* Check to see if the input BFD actually contains any sections. ++ If not, its flags may not have been initialised either, but it cannot ++ actually cause any incompatibility. */ ++ for (sec = ibfd->sections; sec != NULL; sec = sec->next) ++ { ++ /* Ignore synthetic sections and empty .text, .data and .bss sections ++ which are automatically generated by gas. */ ++ if (strcmp (sec->name, ".reginfo") ++ && strcmp (sec->name, ".mdebug") ++ && ((!strcmp (sec->name, ".text") ++ || !strcmp (sec->name, ".data") ++ || !strcmp (sec->name, ".bss")) ++ && sec->_raw_size != 0)) ++ { ++ null_input_bfd = false; ++ break; ++ } ++ } ++ if (null_input_bfd) + return true; + + ok = true; diff --git a/devel/mipsel-linux-binutils/files/patch-cc-loaddelay-2 b/devel/mipsel-linux-binutils/files/patch-cc-loaddelay-2 new file mode 100644 index 000000000000..e7d77c107ad6 --- /dev/null +++ b/devel/mipsel-linux-binutils/files/patch-cc-loaddelay-2 @@ -0,0 +1,257 @@ +--- ../cambridge-src/binutils-2.8.1/gas/config/tc-mips.c Thu Sep 9 00:09:29 1999 ++++ binutils-2.8.1/gas/config/tc-mips.c Fri Nov 10 20:28:11 2000 +@@ -3079,12 +3079,14 @@ + else if (mips_pic == SVR4_PIC && ! mips_big_got) + { + expressionS ex; ++ /* If we're at mips2 or higher, we don't need nops after loads */ ++ int use_load_delay = mips_opts.isa < 2; + + /* If this is a reference to an external symbol, we want + lw $reg,<sym>($gp) (BFD_RELOC_MIPS_GOT16) + Otherwise we want + lw $reg,<sym>($gp) (BFD_RELOC_MIPS_GOT16) +- nop ++ nop (if mips1) + addiu $reg,$reg,<sym> (BFD_RELOC_LO16) + If there is a constant, it must be added in after. */ + ex.X_add_number = ep->X_add_number; +@@ -3093,9 +3095,11 @@ + macro_build ((char *) NULL, counter, ep, + mips_opts.isa < 3 ? "lw" : "ld", + "t,o(b)", reg, (int) BFD_RELOC_MIPS_GOT16, GP); +- macro_build ((char *) NULL, counter, (expressionS *) NULL, "nop", ""); ++ if (use_load_delay) ++ macro_build ((char *) NULL, counter, (expressionS *) NULL, "nop", ""); + p = frag_var (rs_machine_dependent, 4, 0, +- RELAX_ENCODE (0, 4, -8, 0, 0, mips_opts.warn_about_macros), ++ RELAX_ENCODE (0, 4, use_load_delay ? -8 : -4, 0, 0, ++ mips_opts.warn_about_macros), + ep->X_add_symbol, (offsetT) 0, (char *) NULL); + macro_build (p, counter, ep, + mips_opts.isa < 3 ? "addiu" : "daddiu", +@@ -3955,13 +3959,13 @@ + lw $tempreg,<sym>($gp) (BFD_RELOC_MIPS_GOT16) + For a local symbol, we want + lw $tempreg,<sym>($gp) (BFD_RELOC_MIPS_GOT16) +- nop ++ nop (if mips1) + addiu $tempreg,$tempreg,<sym> (BFD_RELOC_LO16) + + If we have a small constant, and this is a reference to + an external symbol, we want + lw $tempreg,<sym>($gp) (BFD_RELOC_MIPS_GOT16) +- nop ++ nop (if mips1) + addiu $tempreg,$tempreg,<constant> + For a local symbol, we want the same instruction + sequence, but we output a BFD_RELOC_LO16 reloc on the +@@ -3976,6 +3980,10 @@ + For a local symbol, we want the same instruction + sequence, but we output a BFD_RELOC_LO16 reloc on the + addiu instruction. */ ++ ++ /* If we're at mips2 or higher, we don't need nops after loads */ ++ int use_load_delay = mips_opts.isa < 2; ++ + expr1.X_add_number = offset_expr.X_add_number; + offset_expr.X_add_number = 0; + frag_grow (32); +@@ -3986,7 +3994,7 @@ + { + int off; + +- if (breg == 0) ++ if (breg == 0 || !use_load_delay) + off = 0; + else + { +@@ -3997,14 +4005,19 @@ + "nop", ""); + off = 4; + } +- p = frag_var (rs_machine_dependent, 8 - off, 0, +- RELAX_ENCODE (0, 8 - off, -4 - off, 4 - off, 0, ++ p = frag_var (rs_machine_dependent, ++ (use_load_delay ? 8 : 4) - off, 0, ++ RELAX_ENCODE (0, ++ (use_load_delay ? 8 : 4) - off, ++ -4 - off, ++ (use_load_delay ? 4 : 0) - off, ++ 0, + (breg == 0 + ? mips_opts.warn_about_macros + : 0)), + offset_expr.X_add_symbol, (offsetT) 0, + (char *) NULL); +- if (breg == 0) ++ if (breg == 0 && use_load_delay) + { + macro_build (p, &icnt, (expressionS *) NULL, "nop", ""); + p += 4; +@@ -4019,13 +4032,14 @@ + else if (expr1.X_add_number >= -0x8000 + && expr1.X_add_number < 0x8000) + { +- macro_build ((char *) NULL, &icnt, (expressionS *) NULL, ++ if (use_load_delay) ++ macro_build ((char *) NULL, &icnt, (expressionS *) NULL, + "nop", ""); + macro_build ((char *) NULL, &icnt, &expr1, + mips_opts.isa < 3 ? "addiu" : "daddiu", + "t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16); + (void) frag_var (rs_machine_dependent, 0, 0, +- RELAX_ENCODE (0, 0, -12, -4, 0, 0), ++ RELAX_ENCODE (0, 0, (use_load_delay ? -12 : -8), -4, 0, 0), + offset_expr.X_add_symbol, (offsetT) 0, + (char *) NULL); + } +@@ -4044,14 +4058,19 @@ + off1 = 0; + else + { +- macro_build ((char *) NULL, &icnt, (expressionS *) NULL, +- "nop", ""); ++ off1 = 0; ++ if (mips_opts.isa < 2) ++ { ++ macro_build ((char *) NULL, &icnt, (expressionS *) NULL, ++ "nop", ""); ++ off1 -= 4; ++ } + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, + mips_opts.isa < 3 ? "addu" : "daddu", + "d,v,t", treg, AT, breg); ++ off1 -= 4; + breg = 0; + tempreg = treg; +- off1 = -8; + } + + /* Set mips_optimize around the lui instruction to avoid +@@ -4355,7 +4374,7 @@ + /* If this is a reference to an external symbol, and we are + using a small GOT, we want + lw $25,<sym>($gp) (BFD_RELOC_MIPS_CALL16) +- nop ++ nop (if mips1) + jalr $25 + nop + lw $gp,cprestore($sp) +@@ -4370,7 +4389,7 @@ + lw $gp,cprestore($sp) + If the symbol is not external, we want + lw $25,<sym>($gp) (BFD_RELOC_MIPS_GOT16) +- nop ++ nop (if mips1) + addiu $25,$25,<sym> (BFD_RELOC_LO16) + jalr $25 + nop +@@ -4378,14 +4397,18 @@ + frag_grow (40); + if (! mips_big_got) + { ++ int use_load_delay = mips_opts.isa < 2; ++ + macro_build ((char *) NULL, &icnt, &offset_expr, + mips_opts.isa < 3 ? "lw" : "ld", + "t,o(b)", PIC_CALL_REG, + (int) BFD_RELOC_MIPS_CALL16, GP); +- macro_build ((char *) NULL, &icnt, (expressionS *) NULL, +- "nop", ""); ++ if (use_load_delay) ++ macro_build ((char *) NULL, &icnt, (expressionS *) NULL, ++ "nop", ""); + p = frag_var (rs_machine_dependent, 4, 0, +- RELAX_ENCODE (0, 4, -8, 0, 0, 0), ++ RELAX_ENCODE (0, 4, use_load_delay ? -8 : -4, ++ 0, 0, 0), + offset_expr.X_add_symbol, (offsetT) 0, + (char *) NULL); + } +@@ -4711,11 +4734,11 @@ + { + /* If this is a reference to an external symbol, we want + lw $tempreg,<sym>($gp) (BFD_RELOC_MIPS_GOT16) +- nop ++ nop (if mips1) + <op> $treg,0($tempreg) + Otherwise we want + lw $tempreg,<sym>($gp) (BFD_RELOC_MIPS_GOT16) +- nop ++ nop (if mips1) + addiu $tempreg,$tempreg,<sym> (BFD_RELOC_LO16) + <op> $treg,0($tempreg) + If there is a base register, we add it to $tempreg before +@@ -4724,6 +4747,10 @@ + 16 bits, because we have no way to load the upper 16 bits + (actually, we could handle them for the subset of cases + in which we are not using $at). */ ++ ++ /* If we're at mips2 or higher, we don't need nops after loads */ ++ int use_load_delay = mips_opts.isa < 2; ++ + assert (offset_expr.X_op == O_symbol); + expr1.X_add_number = offset_expr.X_add_number; + offset_expr.X_add_number = 0; +@@ -4734,9 +4761,10 @@ + macro_build ((char *) NULL, &icnt, &offset_expr, + mips_opts.isa < 3 ? "lw" : "ld", + "t,o(b)", tempreg, (int) BFD_RELOC_MIPS_GOT16, GP); +- macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", ""); ++ if (use_load_delay) ++ macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", ""); + p = frag_var (rs_machine_dependent, 4, 0, +- RELAX_ENCODE (0, 4, -8, 0, 0, 0), ++ RELAX_ENCODE (0, 4, use_load_delay ? -8 : -4, 0, 0, 0), + offset_expr.X_add_symbol, (offsetT) 0, + (char *) NULL); + macro_build (p, &icnt, &offset_expr, +@@ -5184,15 +5212,17 @@ + else if (mips_pic == SVR4_PIC && ! mips_big_got) + { + int off; ++ /* If we're at mips2 or higher, we don't need nops after loads */ ++ int use_load_delay = mips_opts.isa < 2; + + /* If this is a reference to an external symbol, we want + lw $at,<sym>($gp) (BFD_RELOC_MIPS_GOT16) +- nop ++ nop (if mips1) + <op> $treg,0($at) + <op> $treg+1,4($at) + Otherwise we want + lw $at,<sym>($gp) (BFD_RELOC_MIPS_GOT16) +- nop ++ nop (if mips1) + <op> $treg,<sym>($at) (BFD_RELOC_LO16) + <op> $treg+1,<sym>+4($at) (BFD_RELOC_LO16) + If there is a base register we add it to $at before the +@@ -5204,7 +5234,7 @@ + if (expr1.X_add_number < -0x8000 + || expr1.X_add_number >= 0x8000 - 4) + as_bad ("PIC code offset overflow (max 16 signed bits)"); +- if (breg == 0) ++ if (breg == 0 || !use_load_delay) + off = 0; + else + off = 4; +@@ -5212,7 +5242,8 @@ + macro_build ((char *) NULL, &icnt, &offset_expr, + mips_opts.isa < 3 ? "lw" : "ld", + "t,o(b)", AT, (int) BFD_RELOC_MIPS_GOT16, GP); +- macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", ""); ++ if (use_load_delay) ++ macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", ""); + if (breg != 0) + macro_build ((char *) NULL, &icnt, (expressionS *) NULL, + mips_opts.isa < 3 ? "addu" : "daddu", +@@ -5234,7 +5265,7 @@ + mips_optimize = hold_mips_optimize; + + (void) frag_var (rs_machine_dependent, 0, 0, +- RELAX_ENCODE (0, 0, -16 - off, -8, 1, 0), ++ RELAX_ENCODE (0, 0, -16 - off, use_load_delay ? -8 : -4, 1, 0), + offset_expr.X_add_symbol, (offsetT) 0, + (char *) NULL); + } diff --git a/devel/mipsel-linux-binutils/pkg-comment b/devel/mipsel-linux-binutils/pkg-comment new file mode 100644 index 000000000000..5396362362b3 --- /dev/null +++ b/devel/mipsel-linux-binutils/pkg-comment @@ -0,0 +1 @@ +GNU binutils for mipsel-linux cross-development (with Linux VR patches) diff --git a/devel/mipsel-linux-binutils/pkg-descr b/devel/mipsel-linux-binutils/pkg-descr new file mode 100644 index 000000000000..3570375c2c00 --- /dev/null +++ b/devel/mipsel-linux-binutils/pkg-descr @@ -0,0 +1,12 @@ +GNU binutils for MIPS Little Endian Linux (mipsel-linux) cross-development + + It is binutils for MIPS Little Endian Linux (mipsel-linux) target. + This target is, for example, Linux VR on NEC's VR-based PDAs (Agenda VR3 + and others), and includes Linux VR pathes. + +Hacked from official SRPMs for RedHat. + +http://dev.agendacomputing.org/ -- Agenda VR3 PDA +http://www.gnu.org/ -- Home page of GNU binutils + +WWW: http://www.linux-vr.org/ -- Linux VR diff --git a/devel/mipsel-linux-binutils/pkg-plist b/devel/mipsel-linux-binutils/pkg-plist new file mode 100644 index 000000000000..990637482a6f --- /dev/null +++ b/devel/mipsel-linux-binutils/pkg-plist @@ -0,0 +1,83 @@ +@comment $FreeBSD$ +%%BINUTILS_TARG%%/bin/addr2line +%%BINUTILS_TARG%%/bin/ar +%%BINUTILS_TARG%%/bin/as +%%BINUTILS_TARG%%/bin/c++filt +%%BINUTILS_TARG%%/bin/gasp +%%BINUTILS_TARG%%/bin/ld +%%BINUTILS_TARG%%/bin/nm +%%BINUTILS_TARG%%/bin/objcopy +%%BINUTILS_TARG%%/bin/objdump +%%BINUTILS_TARG%%/bin/ranlib +%%BINUTILS_TARG%%/bin/strip +%%BINUTILS_TARG%%/bin/size +%%BINUTILS_TARG%%/bin/strings +%%BINUTILS_TARG%%/include/ansidecl.h +%%BINUTILS_TARG%%/include/bfd.h +%%BINUTILS_TARG%%/include/bfdlink.h +%%BINUTILS_TARG%%/lib/ldscripts/elf32bmip.x +%%BINUTILS_TARG%%/lib/ldscripts/elf32bmip.xbn +%%BINUTILS_TARG%%/lib/ldscripts/elf32bmip.xn +%%BINUTILS_TARG%%/lib/ldscripts/elf32bmip.xr +%%BINUTILS_TARG%%/lib/ldscripts/elf32bmip.xs +%%BINUTILS_TARG%%/lib/ldscripts/elf32bmip.xu +%%BINUTILS_TARG%%/lib/ldscripts/elf32lmip.x +%%BINUTILS_TARG%%/lib/ldscripts/elf32lmip.xbn +%%BINUTILS_TARG%%/lib/ldscripts/elf32lmip.xn +%%BINUTILS_TARG%%/lib/ldscripts/elf32lmip.xr +%%BINUTILS_TARG%%/lib/ldscripts/elf32lmip.xs +%%BINUTILS_TARG%%/lib/ldscripts/elf32lmip.xu +%%BINUTILS_TARG%%/lib/ldscripts/mipsbig.x +%%BINUTILS_TARG%%/lib/ldscripts/mipsbig.xbn +%%BINUTILS_TARG%%/lib/ldscripts/mipsbig.xn +%%BINUTILS_TARG%%/lib/ldscripts/mipsbig.xr +%%BINUTILS_TARG%%/lib/ldscripts/mipsbig.xu +%%BINUTILS_TARG%%/lib/ldscripts/mipslit.x +%%BINUTILS_TARG%%/lib/ldscripts/mipslit.xbn +%%BINUTILS_TARG%%/lib/ldscripts/mipslit.xn +%%BINUTILS_TARG%%/lib/ldscripts/mipslit.xr +%%BINUTILS_TARG%%/lib/ldscripts/mipslit.xu +%%BINUTILS_TARG%%/lib/libiberty.a +%%BINUTILS_TARG%%/lib/libbfd.a +%%BINUTILS_TARG%%/lib/libopcodes.a +bin/%%BINUTILS_TARG%%-addr2line +bin/%%BINUTILS_TARG%%-ar +bin/%%BINUTILS_TARG%%-as +bin/%%BINUTILS_TARG%%-c++filt +bin/%%BINUTILS_TARG%%-gasp +bin/%%BINUTILS_TARG%%-ld +bin/%%BINUTILS_TARG%%-nm +bin/%%BINUTILS_TARG%%-objcopy +bin/%%BINUTILS_TARG%%-objdump +bin/%%BINUTILS_TARG%%-ranlib +bin/%%BINUTILS_TARG%%-strip +bin/%%BINUTILS_TARG%%-size +bin/%%BINUTILS_TARG%%-strings +info/%%BINUTILS_TARG%%-bfd.info +info/%%BINUTILS_TARG%%-bfd.info-1 +info/%%BINUTILS_TARG%%-bfd.info-2 +info/%%BINUTILS_TARG%%-bfd.info-3 +info/%%BINUTILS_TARG%%-bfd.info-4 +info/%%BINUTILS_TARG%%-bfd.info-5 +info/%%BINUTILS_TARG%%-binutils.info +info/%%BINUTILS_TARG%%-binutils.info-1 +info/%%BINUTILS_TARG%%-binutils.info-2 +info/%%BINUTILS_TARG%%-ld.info +info/%%BINUTILS_TARG%%-ld.info-1 +info/%%BINUTILS_TARG%%-ld.info-2 +info/%%BINUTILS_TARG%%-ld.info-3 +info/%%BINUTILS_TARG%%-ld.info-4 +info/%%BINUTILS_TARG%%-as.info +info/%%BINUTILS_TARG%%-as.info-1 +info/%%BINUTILS_TARG%%-as.info-2 +info/%%BINUTILS_TARG%%-as.info-3 +info/%%BINUTILS_TARG%%-as.info-4 +info/%%BINUTILS_TARG%%-as.info-5 +info/%%BINUTILS_TARG%%-as.info-6 +info/%%BINUTILS_TARG%%-as.info-7 +info/%%BINUTILS_TARG%%-gasp.info +@dirrm %%BINUTILS_TARG%%/bin +@dirrm %%BINUTILS_TARG%%/include +@dirrm %%BINUTILS_TARG%%/lib/ldscripts +@dirrm %%BINUTILS_TARG%%/lib +@dirrm %%BINUTILS_TARG%% |