* Makefile.am (OBJ_FORMAT_CFILES): Add config/obj-fdpicelf.c.
(OBJ_FORMAT_HFILES): Add config/obj-fdpicelf.h.
(obj-fdpicelf.o): Define.
* Makefile.in: Regenerate.
* configure.tgt: Set bfd_gas to yes when fmt is fdpicelf.
(bfin-*-*): Delete.
(bfin-*-linux-uclibc): New; set fmt to fdpicelf and em to linux.
(bfin-*-uclinux*): New; set fmt to elf and em to linux.
* config/obj-fdpicelf.c: New.
* config/obj-fdpicelf.h: Likewise.
* config/tc-bfin.c (bfin_flags, bfin_pic_flag): Set default based on
the OBJ_FDPIC_ELF define.
(OPTION_NOPIC): Define.
(md_longopts): Add mnopic and mno-fdpic.
(md_parse_option): Handle OPTION_NOPIC.
+2008-04-23 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.am (OBJ_FORMAT_CFILES): Add config/obj-fdpicelf.c.
+ (OBJ_FORMAT_HFILES): Add config/obj-fdpicelf.h.
+ (obj-fdpicelf.o): Define.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Set bfd_gas to yes when fmt is fdpicelf.
+ (bfin-*-*): Delete.
+ (bfin-*-linux-uclibc): New; set fmt to fdpicelf and em to linux.
+ (bfin-*-uclinux*): New; set fmt to elf and em to linux.
+ * config/obj-fdpicelf.c: New.
+ * config/obj-fdpicelf.h: Likewise.
+ * config/tc-bfin.c (bfin_flags, bfin_pic_flag): Set default based on
+ the OBJ_FDPIC_ELF define.
+ (OPTION_NOPIC): Define.
+ (md_longopts): Add mnopic and mno-fdpic.
+ (md_parse_option): Handle OPTION_NOPIC.
+
2008-04-23 Paolo Bonzini <bonzini@gnu.org>
* aclocal.m4: Regenerate.
config/obj-ecoff.c \
config/obj-elf.c \
config/obj-evax.c \
+ config/obj-fdpicelf.c \
config/obj-som.c
OBJ_FORMAT_HFILES = \
config/obj-ecoff.h \
config/obj-elf.h \
config/obj-evax.h \
+ config/obj-fdpicelf.h \
config/obj-som.h
# Emulation header files in config
$(COMPILE) -c $(srcdir)/config/obj-elf.c
obj-evax.o : $(srcdir)/config/obj-evax.c
$(COMPILE) -c $(srcdir)/config/obj-evax.c
+obj-fdpicelf.o : $(srcdir)/config/obj-fdpicelf.c
+ $(COMPILE) -c $(srcdir)/config/obj-fdpicelf.c
obj-multi.o : $(srcdir)/config/obj-multi.c
$(COMPILE) -c $(srcdir)/config/obj-multi.c
obj-som.o : $(srcdir)/config/obj-som.c
config/obj-ecoff.c \
config/obj-elf.c \
config/obj-evax.c \
+ config/obj-fdpicelf.c \
config/obj-som.c
OBJ_FORMAT_HFILES = \
config/obj-ecoff.h \
config/obj-elf.h \
config/obj-evax.h \
+ config/obj-fdpicelf.h \
config/obj-som.h
$(COMPILE) -c $(srcdir)/config/obj-elf.c
obj-evax.o : $(srcdir)/config/obj-evax.c
$(COMPILE) -c $(srcdir)/config/obj-evax.c
+obj-fdpicelf.o : $(srcdir)/config/obj-fdpicelf.c
+ $(COMPILE) -c $(srcdir)/config/obj-fdpicelf.c
obj-multi.o : $(srcdir)/config/obj-multi.c
$(COMPILE) -c $(srcdir)/config/obj-multi.c
obj-som.o : $(srcdir)/config/obj-som.c
--- /dev/null
+#include "obj-elf.c"
--- /dev/null
+#define OBJ_FDPIC_ELF 1
+#include "obj-elf.h"
/* Flags to set in the elf header */
#define DEFAULT_FLAGS 0
-static flagword bfin_flags = DEFAULT_FLAGS;
-static const char *bfin_pic_flag = (const char *)0;
+#ifdef OBJ_FDPIC_ELF
+# define DEFAULT_FDPIC EF_BFIN_FDPIC
+#else
+# define DEFAULT_FDPIC 0
+#endif
+
+static flagword bfin_flags = DEFAULT_FLAGS | DEFAULT_FDPIC;
+static const char *bfin_pic_flag = DEFAULT_FDPIC ? "-mfdpic" : (const char *)0;
/* Registers list. */
struct bfin_reg_entry
const char *md_shortopts = "";
#define OPTION_FDPIC (OPTION_MD_BASE)
+#define OPTION_NOPIC (OPTION_MD_BASE + 1)
struct option md_longopts[] =
{
- { "mfdpic", no_argument, NULL, OPTION_FDPIC },
+ { "mfdpic", no_argument, NULL, OPTION_FDPIC },
+ { "mnopic", no_argument, NULL, OPTION_NOPIC },
+ { "mno-fdpic", no_argument, NULL, OPTION_NOPIC },
{ NULL, no_argument, NULL, 0 },
};
bfin_flags |= EF_BFIN_FDPIC;
bfin_pic_flag = "-mfdpic";
break;
+
+ case OPTION_NOPIC:
+ bfin_flags &= ~(EF_BFIN_FDPIC);
+ bfin_pic_flag = 0;
+ break;
}
return 1;
arm-*-riscix*) fmt=aout em=riscix ;;
avr-*-*) fmt=elf bfd_gas=yes ;;
- bfin-*-*) fmt=elf bfd_gas=yes ;;
+
+ bfin-*-linux-uclibc) fmt=fdpicelf em=linux ;;
+ bfin-*-uclinux*) fmt=elf em=linux ;;
bfin-*elf) fmt=elf ;;
+
cr16-*-elf*) fmt=elf ;;
cris-*-linux-* | crisv32-*-linux-*)
;;
esac
case ${fmt} in
- elf | ecoff | multi | som)
+ elf | ecoff | fdpicelf | multi | som)
bfd_gas=yes
;;
esac