Skip to content

Commit

Permalink
PR26667, Add powerpc64le-*-freebsd* support
Browse files Browse the repository at this point in the history
	PR 26667
bfd/
	* config.bfd: Add powerpc64le-*-freebsd*.
	* configure.ac: Add powerpc_elf64_fbsd_le_vec.
	* elf64-ppc.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define for
	freebsd.
	* targets.c (powerpc_elf64_fbsd_le_vec): Declare.
	(_bfd_target_vector): Add it.
	* configure: Regenerate.
ld/
	* Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf64lppc_fbsd.c.
	Include $(DEPDIR)/eelf64lppc_fbsd.Pc.
	* configure.tgt: Add powerpc64le-*-freebsd*.
	* emulparams/elf64lppc_fbsd.sh: New file.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
  • Loading branch information
bdragon28 authored and amodra committed Oct 6, 2020
1 parent 0897537 commit 6afcdeb
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bfd/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2020-10-06 Brandon Bergren <[email protected]>

* config.bfd: Add powerpc64le-*-freebsd*.
* configure.ac: Add powerpc_elf64_fbsd_le_vec.
* elf64-ppc.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define for
freebsd.
* targets.c (powerpc_elf64_fbsd_le_vec): Declare.
(_bfd_target_vector): Add it.
* configure: Regenerate.

2020-10-05 Kamil Rytarowski <[email protected]>

* config.bfd (aarch64-*-netbsd*, aarch64_be-*-netbsd*): Add target.
Expand Down
5 changes: 5 additions & 0 deletions bfd/config.bfd
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,11 @@ case "${targ}" in
targ_selvecs="powerpc_elf64_vec powerpc_elf32_vec powerpc_elf32_fbsd_vec powerpc_elf32_le_vec rs6000_xcoff_vec rs6000_xcoff64_vec rs6000_xcoff64_aix_vec"
want64=true
;;
powerpc64le-*-freebsd*)
targ_defvec=powerpc_elf64_fbsd_le_vec
targ_selvecs="powerpc_elf64_vec powerpc_elf32_vec powerpc_elf32_fbsd_vec powerpc_elf32_le_vec rs6000_xcoff_vec rs6000_xcoff64_vec rs6000_xcoff64_aix_vec"
want64=true
;;
powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux* | \
powerpc64-*-*bsd*)
targ_defvec=powerpc_elf64_vec
Expand Down
1 change: 1 addition & 0 deletions bfd/configure
Original file line number Diff line number Diff line change
Expand Up @@ -14914,6 +14914,7 @@ do
powerpc_elf64_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
powerpc_elf64_le_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
powerpc_elf64_fbsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
powerpc_elf64_fbsd_le_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
powerpc_xcoff_vec) tb="$tb coff-rs6000.lo $xcoff" ;;
pru_elf32_vec) tb="$tb elf32-pru.lo elf32.lo $elf" ;;
riscv_elf32_vec) tb="$tb elf32-riscv.lo elfxx-riscv.lo elf32.lo $elf" ;;
Expand Down
1 change: 1 addition & 0 deletions bfd/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ do
powerpc_elf64_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
powerpc_elf64_le_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
powerpc_elf64_fbsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
powerpc_elf64_fbsd_le_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
powerpc_xcoff_vec) tb="$tb coff-rs6000.lo $xcoff" ;;
pru_elf32_vec) tb="$tb elf32-pru.lo elf32.lo $elf" ;;
riscv_elf32_vec) tb="$tb elf32-riscv.lo elfxx-riscv.lo elf32.lo $elf" ;;
Expand Down
2 changes: 2 additions & 0 deletions bfd/elf64-ppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -17717,7 +17717,9 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
/* FreeBSD support */

#undef TARGET_LITTLE_SYM
#define TARGET_LITTLE_SYM powerpc_elf64_fbsd_le_vec
#undef TARGET_LITTLE_NAME
#define TARGET_LITTLE_NAME "elf64-powerpcle-freebsd"

#undef TARGET_BIG_SYM
#define TARGET_BIG_SYM powerpc_elf64_fbsd_vec
Expand Down
2 changes: 2 additions & 0 deletions bfd/targets.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@ extern const bfd_target powerpc_elf32_vxworks_vec;
extern const bfd_target powerpc_elf64_vec;
extern const bfd_target powerpc_elf64_le_vec;
extern const bfd_target powerpc_elf64_fbsd_vec;
extern const bfd_target powerpc_elf64_fbsd_le_vec;
extern const bfd_target powerpc_xcoff_vec;
extern const bfd_target pru_elf32_vec;
extern const bfd_target riscv_elf32_vec;
Expand Down Expand Up @@ -1224,6 +1225,7 @@ static const bfd_target * const _bfd_target_vector[] =
&powerpc_elf64_vec,
&powerpc_elf64_le_vec,
&powerpc_elf64_fbsd_vec,
&powerpc_elf64_fbsd_le_vec,
#endif
#if 0
/* This has the same magic number as RS/6000. */
Expand Down
9 changes: 9 additions & 0 deletions ld/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2020-10-06 Brandon Bergren <[email protected]>

* Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf64lppc_fbsd.c.
Include $(DEPDIR)/eelf64lppc_fbsd.Pc.
* configure.tgt: Add powerpc64le-*-freebsd*.
* emulparams/elf64lppc_fbsd.sh: New file.
* Makefile.in: Regenerate.
* po/BLD-POTFILES.in: Regenerate.

2020-10-05 T.K. Chia <[email protected]>

PR gas/26694
Expand Down
2 changes: 2 additions & 0 deletions ld/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ ALL_64_EMULATION_SOURCES = \
eelf64btsmip_fbsd.c \
eelf64hppa.c \
eelf64lppc.c \
eelf64lppc_fbsd.c \
eelf64lriscv.c \
eelf64lriscv_lp64f.c \
eelf64lriscv_lp64.c \
Expand Down Expand Up @@ -911,6 +912,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc_fbsd.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64f.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64.Pc@am__quote@
Expand Down
3 changes: 3 additions & 0 deletions ld/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ ALL_64_EMULATION_SOURCES = \
eelf64btsmip_fbsd.c \
eelf64hppa.c \
eelf64lppc.c \
eelf64lppc_fbsd.c \
eelf64lriscv.c \
eelf64lriscv_lp64f.c \
eelf64lriscv_lp64.c \
Expand Down Expand Up @@ -1355,6 +1356,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc_fbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64f.Po@am__quote@
Expand Down Expand Up @@ -2506,6 +2508,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64btsmip_fbsd.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64hppa.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lppc_fbsd.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64f.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64lriscv_lp64.Pc@am__quote@
Expand Down
4 changes: 4 additions & 0 deletions ld/configure.tgt
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,10 @@ powerpc64-*-freebsd*)
tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
tdir_elf32ppc_fbsd=$tdir_elf32ppc
;;
powerpc64le-*-freebsd*)
targ_emul=elf64lppc_fbsd
targ_extra_emuls="elf64lppc"
;;
powerpc-*-vxworks*)
targ_emul=elf32ppcvxworks
targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
Expand Down
6 changes: 6 additions & 0 deletions ld/emulparams/elf64lppc_fbsd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source_sh ${srcdir}/emulparams/elf64lppc.sh
source_sh ${srcdir}/emulparams/elf_fbsd.sh

OUTPUT_FORMAT="elf64-powerpcle-freebsd"
DEFAULT_PLT_STATIC_CHAIN=1

1 change: 1 addition & 0 deletions ld/po/BLD-POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ eelf64btsmip.c
eelf64btsmip_fbsd.c
eelf64hppa.c
eelf64lppc.c
eelf64lppc_fbsd.c
eelf64lriscv.c
eelf64lriscv_lp64.c
eelf64lriscv_lp64f.c
Expand Down

0 comments on commit 6afcdeb

Please sign in to comment.