alnyan/yggdrasil: *-yggdrasil target-level support

This commit is contained in:
Mark Poliakov 2024-03-14 21:43:32 +02:00
parent c7f28aad0c
commit fb7a89968a
8 changed files with 38 additions and 5 deletions

View File

@ -284,6 +284,11 @@ case "${targ}" in
targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
want64=true
;;
aarch64-*-yggdrasil*)
targ_defvec=aarch64_elf64_le_vec
targ_selvecs=
want64=true
;;
aarch64-*-linux* | aarch64-*-netbsd* | aarch64-*-nto* | aarch64-*-gnu*)
targ_defvec=aarch64_elf64_le_vec
targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec aarch64_pei_le_vec aarch64_pe_le_vec"
@ -705,6 +710,11 @@ case "${targ}" in
targ_selvecs="i386_elf32_vec"
want64=true
;;
x86_64-*-yggdrasil*)
targ_defvec=x86_64_elf64_vec
targ_selvecs=
want64=true
;;
x86_64-*-netbsd* | x86_64-*-openbsd*)
targ_defvec=x86_64_elf64_vec
targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_coff_vec i386_pei_vec x86_64_pe_vec x86_64_pei_vec"

2
config.sub vendored
View File

@ -1766,7 +1766,7 @@ case $os in
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
| fiwix* | mlibc* | cos* | mbr* )
| fiwix* | mlibc* | cos* | mbr* | yggdrasil* )
;;
# This one is extra strict with allowed versions
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)

View File

@ -438,6 +438,7 @@ case ${generic_target} in
z8k-*-coff | z8k-*-sim) fmt=coff ;;
*-*-yggdrasil*) fmt=elf;;
*-*-aout | *-*-scout) fmt=aout ;;
*-*-cloudabi*) fmt=elf em=cloudabi ;;
*-*-dragonfly*) fmt=elf em=dragonfly ;;

View File

@ -386,6 +386,7 @@ ALL_64_EMULATION_SOURCES = \
eaarch64fbsd.c \
eaarch64fbsdb.c \
eaarch64haiku.c \
eaarch64yggdrasil.c \
eaarch64linux.c \
eaarch64linux32.c \
eaarch64linux32b.c \
@ -465,6 +466,7 @@ ALL_64_EMULATION_SOURCES = \
eelf_x86_64_fbsd.c \
eelf_x86_64_haiku.c \
eelf_x86_64_sol2.c \
eelf_x86_64_yggdrasil.c \
ehppa64linux.c \
ei386pep.c \
emmo.c

View File

@ -896,6 +896,7 @@ ALL_64_EMULATION_SOURCES = \
eaarch64fbsd.c \
eaarch64fbsdb.c \
eaarch64haiku.c \
eaarch64yggdrasil.c \
eaarch64linux.c \
eaarch64linux32.c \
eaarch64linux32b.c \
@ -975,6 +976,7 @@ ALL_64_EMULATION_SOURCES = \
eelf_x86_64_fbsd.c \
eelf_x86_64_haiku.c \
eelf_x86_64_sol2.c \
eelf_x86_64_yggdrasil.c \
ehppa64linux.c \
ei386pep.c \
emmo.c
@ -1286,6 +1288,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linuxb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64nto.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64pe.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64yggdrasil.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5ppc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5rs6.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaixppc.Po@am__quote@
@ -1492,6 +1495,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_haiku.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_sol2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_yggdrasil.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300elf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300elf_linux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300helf.Po@am__quote@

View File

@ -124,6 +124,10 @@ aarch64-*-gnu*)
aarch64-*-haiku*) targ_emul=aarch64haiku
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb armelf_haiku $targ_extra_libpath"
;;
aarch64-*-yggdrasil*)
targ_emul=aarch64yggdrasil
targ_extra_emuls="aarch64elf $targ_extra_libpath"
;;
aarch64-*-nto*) targ_emul=aarch64nto
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb"
;;
@ -1009,6 +1013,10 @@ x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi
x86_64-*-haiku*) targ_emul=elf_x86_64_haiku
targ_extra_emuls="elf_x86_64 elf_i386_haiku"
;;
x86_64-*-yggdrasil*)
targ_emul=elf_x86_64_yggdrasil
targ_extra_emuls="elf_x86_64"
;;
x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu"
targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64"

View File

@ -0,0 +1,5 @@
ARCH=aarch64
ELFSIZE=64
TEXT_START_ADDR=0x40000
source_sh ${srcdir}/emulparams/aarch64elf.sh

View File

@ -0,0 +1,3 @@
TEXT_START_ADDR=0x40000
source_sh ${srcdir}/emulparams/elf_x86_64.sh