diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-04-23 18:40:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-04-23 18:40:34 +0000 |
commit | fe4fa32c96bc16ffbdb13ed722f63b88721b5f8d (patch) | |
tree | 4818c0449af831829cd11af09ed878566e103829 | |
parent | 554387026911a74af6e23cd8791d16ce5a1a0070 (diff) | |
download | gdb-fe4fa32c96bc16ffbdb13ed722f63b88721b5f8d.zip gdb-fe4fa32c96bc16ffbdb13ed722f63b88721b5f8d.tar.gz gdb-fe4fa32c96bc16ffbdb13ed722f63b88721b5f8d.tar.bz2 |
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.
-rw-r--r-- | gas/ChangeLog | 18 | ||||
-rw-r--r-- | gas/Makefile.am | 4 | ||||
-rw-r--r-- | gas/Makefile.in | 4 | ||||
-rw-r--r-- | gas/config/obj-fdpicelf.c | 1 | ||||
-rw-r--r-- | gas/config/obj-fdpicelf.h | 2 | ||||
-rw-r--r-- | gas/config/tc-bfin.c | 20 | ||||
-rw-r--r-- | gas/configure.tgt | 7 |
7 files changed, 51 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 8f95163..6e5e5e4 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,21 @@ +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. diff --git a/gas/Makefile.am b/gas/Makefile.am index cdae173..617247f 100644 --- a/gas/Makefile.am +++ b/gas/Makefile.am @@ -364,6 +364,7 @@ OBJ_FORMAT_CFILES = \ config/obj-ecoff.c \ config/obj-elf.c \ config/obj-evax.c \ + config/obj-fdpicelf.c \ config/obj-som.c OBJ_FORMAT_HFILES = \ @@ -372,6 +373,7 @@ 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 @@ -586,6 +588,8 @@ obj-elf.o : $(srcdir)/config/obj-elf.c $(DEP_@target_cpu_type@_elf) $(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 diff --git a/gas/Makefile.in b/gas/Makefile.in index 77f2543..2d89648 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -608,6 +608,7 @@ OBJ_FORMAT_CFILES = \ config/obj-ecoff.c \ config/obj-elf.c \ config/obj-evax.c \ + config/obj-fdpicelf.c \ config/obj-som.c OBJ_FORMAT_HFILES = \ @@ -616,6 +617,7 @@ OBJ_FORMAT_HFILES = \ config/obj-ecoff.h \ config/obj-elf.h \ config/obj-evax.h \ + config/obj-fdpicelf.h \ config/obj-som.h @@ -2586,6 +2588,8 @@ obj-elf.o : $(srcdir)/config/obj-elf.c $(DEP_@target_cpu_type@_elf) $(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 diff --git a/gas/config/obj-fdpicelf.c b/gas/config/obj-fdpicelf.c new file mode 100644 index 0000000..a992b35 --- /dev/null +++ b/gas/config/obj-fdpicelf.c @@ -0,0 +1 @@ +#include "obj-elf.c" diff --git a/gas/config/obj-fdpicelf.h b/gas/config/obj-fdpicelf.h new file mode 100644 index 0000000..9f1af5d --- /dev/null +++ b/gas/config/obj-fdpicelf.h @@ -0,0 +1,2 @@ +#define OBJ_FDPIC_ELF 1 +#include "obj-elf.h" diff --git a/gas/config/tc-bfin.c b/gas/config/tc-bfin.c index 4652efa..3991622 100644 --- a/gas/config/tc-bfin.c +++ b/gas/config/tc-bfin.c @@ -50,8 +50,14 @@ FILE *errorf; /* 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 @@ -305,10 +311,13 @@ const char FLT_CHARS[] = "fFdDxX"; 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 }, }; @@ -327,6 +336,11 @@ md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED) 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; diff --git a/gas/configure.tgt b/gas/configure.tgt index 1d7e10d..a9c76ee 100644 --- a/gas/configure.tgt +++ b/gas/configure.tgt @@ -125,8 +125,11 @@ case ${generic_target} in 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-*) @@ -416,7 +419,7 @@ case ${cpu_type} in ;; esac case ${fmt} in - elf | ecoff | multi | som) + elf | ecoff | fdpicelf | multi | som) bfd_gas=yes ;; esac |