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" targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
want64=true want64=true
;; ;;
aarch64-*-yggdrasil*)
targ_defvec=aarch64_elf64_le_vec
targ_selvecs=
want64=true
;;
aarch64-*-linux* | aarch64-*-netbsd* | aarch64-*-nto* | aarch64-*-gnu*) aarch64-*-linux* | aarch64-*-netbsd* | aarch64-*-nto* | aarch64-*-gnu*)
targ_defvec=aarch64_elf64_le_vec 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" 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" targ_selvecs="i386_elf32_vec"
want64=true want64=true
;; ;;
x86_64-*-yggdrasil*)
targ_defvec=x86_64_elf64_vec
targ_selvecs=
want64=true
;;
x86_64-*-netbsd* | x86_64-*-openbsd*) x86_64-*-netbsd* | x86_64-*-openbsd*)
targ_defvec=x86_64_elf64_vec 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" 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* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
| fiwix* | mlibc* | cos* | mbr* ) | fiwix* | mlibc* | cos* | mbr* | yggdrasil* )
;; ;;
# This one is extra strict with allowed versions # This one is extra strict with allowed versions
sco3.2v2 | sco3.2v[4-9]* | sco5v6*) sco3.2v2 | sco3.2v[4-9]* | sco5v6*)

View File

@ -6,12 +6,12 @@
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or # the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING3. If not see # along with this program; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>. # <http://www.gnu.org/licenses/>.
@ -340,7 +340,7 @@ case ${generic_target} in
moxie-*-uclinux) fmt=elf em=linux ;; moxie-*-uclinux) fmt=elf em=linux ;;
moxie-*-moxiebox*) fmt=elf endian=little ;; moxie-*-moxiebox*) fmt=elf endian=little ;;
moxie-*-*) fmt=elf ;; moxie-*-*) fmt=elf ;;
mt-*-elf) fmt=elf bfd_gas=yes ;; mt-*-elf) fmt=elf bfd_gas=yes ;;
msp430-*-*) fmt=elf ;; msp430-*-*) fmt=elf ;;
@ -429,7 +429,7 @@ case ${generic_target} in
wasm32-*-*) fmt=elf ;; wasm32-*-*) fmt=elf ;;
xstormy16-*-*) fmt=elf ;; xstormy16-*-*) fmt=elf ;;
xgate-*-*) fmt=elf ;; xgate-*-*) fmt=elf ;;
xtensa*-*-*) fmt=elf ;; xtensa*-*-*) fmt=elf ;;
@ -438,6 +438,7 @@ case ${generic_target} in
z8k-*-coff | z8k-*-sim) fmt=coff ;; z8k-*-coff | z8k-*-sim) fmt=coff ;;
*-*-yggdrasil*) fmt=elf;;
*-*-aout | *-*-scout) fmt=aout ;; *-*-aout | *-*-scout) fmt=aout ;;
*-*-cloudabi*) fmt=elf em=cloudabi ;; *-*-cloudabi*) fmt=elf em=cloudabi ;;
*-*-dragonfly*) fmt=elf em=dragonfly ;; *-*-dragonfly*) fmt=elf em=dragonfly ;;

View File

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

View File

@ -896,6 +896,7 @@ ALL_64_EMULATION_SOURCES = \
eaarch64fbsd.c \ eaarch64fbsd.c \
eaarch64fbsdb.c \ eaarch64fbsdb.c \
eaarch64haiku.c \ eaarch64haiku.c \
eaarch64yggdrasil.c \
eaarch64linux.c \ eaarch64linux.c \
eaarch64linux32.c \ eaarch64linux32.c \
eaarch64linux32b.c \ eaarch64linux32b.c \
@ -975,6 +976,7 @@ ALL_64_EMULATION_SOURCES = \
eelf_x86_64_fbsd.c \ eelf_x86_64_fbsd.c \
eelf_x86_64_haiku.c \ eelf_x86_64_haiku.c \
eelf_x86_64_sol2.c \ eelf_x86_64_sol2.c \
eelf_x86_64_yggdrasil.c \
ehppa64linux.c \ ehppa64linux.c \
ei386pep.c \ ei386pep.c \
emmo.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)/eaarch64linuxb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64nto.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)/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)/eaix5ppc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5rs6.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@ @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_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_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_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.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300elf_linux.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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300helf.Po@am__quote@

View File

@ -124,6 +124,10 @@ aarch64-*-gnu*)
aarch64-*-haiku*) targ_emul=aarch64haiku aarch64-*-haiku*) targ_emul=aarch64haiku
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb armelf_haiku $targ_extra_libpath" 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 aarch64-*-nto*) targ_emul=aarch64nto
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" 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 x86_64-*-haiku*) targ_emul=elf_x86_64_haiku
targ_extra_emuls="elf_x86_64 elf_i386_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 x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu" targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu"
targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64" 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