mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-28 15:34:31 +00:00
128 lines
3.8 KiB
Diff
128 lines
3.8 KiB
Diff
diff --git a/bfd/config.bfd b/bfd/config.bfd
|
|
index 6553aac1e99..40429e9bf43 100644
|
|
--- a/bfd/config.bfd
|
|
+++ b/bfd/config.bfd
|
|
@@ -1502,6 +1502,20 @@ case "${targ}" in
|
|
;;
|
|
#endif
|
|
|
|
+ i[3-7]86-*-fennix*)
|
|
+ targ_defvec=i386_elf32_vec
|
|
+ targ_selvecs=
|
|
+ targ64_selvecs=x86_64_elf64_vec
|
|
+ ;;
|
|
+
|
|
+#ifdef BFD64
|
|
+ x86_64-*-fennix*)
|
|
+ targ_defvec=x86_64_elf64_vec
|
|
+ targ_selvecs=i386_elf32_vec
|
|
+ want64=true
|
|
+ ;;
|
|
+#endif
|
|
+
|
|
# END OF targmatch.h
|
|
bpf-*-*)
|
|
echo "*** Configuration $targ is not fully supported." >&2
|
|
diff --git a/config.sub b/config.sub
|
|
index 2c6a07ab3c3..d279b50dc8b 100755
|
|
--- a/config.sub
|
|
+++ b/config.sub
|
|
@@ -1768,7 +1768,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* | ironclad* )
|
|
+ | fiwix* | mlibc* | cos* | mbr* | ironclad* | fennix* )
|
|
;;
|
|
# This one is extra strict with allowed versions
|
|
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
|
diff --git a/gas/configure.tgt b/gas/configure.tgt
|
|
index d58f21873a3..fa4215b9cff 100644
|
|
--- a/gas/configure.tgt
|
|
+++ b/gas/configure.tgt
|
|
@@ -267,6 +267,7 @@ case ${generic_target} in
|
|
i386-*-*nt*) fmt=coff em=pe ;;
|
|
i386-*-rdos*) fmt=elf ;;
|
|
i386-*-darwin*) fmt=macho ;;
|
|
+ i386-*-fennix*) fmt=elf em=gnu ;;
|
|
|
|
ia16-*-elf*) fmt=elf ;;
|
|
|
|
diff --git a/ld/Makefile.am b/ld/Makefile.am
|
|
index 6a9833e5775..fb4f866ef55 100644
|
|
--- a/ld/Makefile.am
|
|
+++ b/ld/Makefile.am
|
|
@@ -279,6 +279,7 @@ ALL_EMULATION_SOURCES = \
|
|
eelf_i386.c \
|
|
eelf_i386_be.c \
|
|
eelf_i386_fbsd.c \
|
|
+ eelf_i386_fennix.c \
|
|
eelf_i386_haiku.c \
|
|
eelf_i386_ldso.c \
|
|
eelf_i386_sol2.c \
|
|
@@ -463,6 +464,7 @@ ALL_64_EMULATION_SOURCES = \
|
|
eelf_x86_64.c \
|
|
eelf_x86_64_cloudabi.c \
|
|
eelf_x86_64_fbsd.c \
|
|
+ eelf_x86_64_fennix.c \
|
|
eelf_x86_64_haiku.c \
|
|
eelf_x86_64_sol2.c \
|
|
ehppa64linux.c \
|
|
diff --git a/ld/configure.tgt b/ld/configure.tgt
|
|
index f937f78b876..ea5491a1447 100644
|
|
--- a/ld/configure.tgt
|
|
+++ b/ld/configure.tgt
|
|
@@ -409,6 +409,11 @@ i[3-7]86-*-elf* | i[3-7]86-*-rtems* | i[3-7]86-*-genode*)
|
|
i[3-7]86-*-dragonfly*) targ_emul=elf_i386
|
|
targ_extra_emuls="elf_iamcu i386bsd"
|
|
;;
|
|
+i[3-7]86-*-fennix*)
|
|
+ targ_emul=elf_i386_fennix
|
|
+ targ_extra_emuls=elf_i386
|
|
+ targ64_extra_emuls="elf_x86_64_fennix elf_x86_64"
|
|
+ ;;
|
|
i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
|
|
targ_emul=elf_i386_fbsd
|
|
targ_extra_emuls="elf_i386 elf_iamcu i386bsd"
|
|
@@ -1045,6 +1050,9 @@ x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia* | x86_64-*-genode*)
|
|
x86_64-*-dragonfly*) targ_emul=elf_x86_64
|
|
targ_extra_emuls="elf_i386 elf_iamcu"
|
|
;;
|
|
+x86_64-*-fennix*) targ_emul=elf_x86_64_fennix
|
|
+ targ_extra_emuls="elf_i386_fennix elf_x86_64 elf_i386"
|
|
+ ;;
|
|
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
|
|
targ_emul=elf_x86_64_fbsd
|
|
targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_iamcu"
|
|
@@ -1112,6 +1120,10 @@ case "${target}" in
|
|
NATIVE_LIB_DIRS='/lib /usr/lib /usr/pkg/lib /usr/local/lib'
|
|
;;
|
|
|
|
+*-*-fennix*)
|
|
+ NATIVE_LIB_DIRS='/lib /usr/lib'
|
|
+ ;;
|
|
+
|
|
*-*-freebsd*)
|
|
NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib'
|
|
;;
|
|
diff --git a/ld/emulparams/elf_i386_fennix.sh b/ld/emulparams/elf_i386_fennix.sh
|
|
new file mode 100644
|
|
index 00000000000..19b75a06cf9
|
|
--- /dev/null
|
|
+++ b/ld/emulparams/elf_i386_fennix.sh
|
|
@@ -0,0 +1,4 @@
|
|
+source_sh ${srcdir}/emulparams/elf_i386.sh
|
|
+GENERATE_SHLIB_SCRIPT=yes
|
|
+GENERATE_PIE_SCRIPT=yes
|
|
+TEXT_START_ADDR=0x400000
|
|
diff --git a/ld/emulparams/elf_x86_64_fennix.sh b/ld/emulparams/elf_x86_64_fennix.sh
|
|
new file mode 100644
|
|
index 00000000000..1509ec7fe53
|
|
--- /dev/null
|
|
+++ b/ld/emulparams/elf_x86_64_fennix.sh
|
|
@@ -0,0 +1,4 @@
|
|
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
|
|
+GENERATE_SHLIB_SCRIPT=yes
|
|
+GENERATE_PIE_SCRIPT=yes
|
|
+TEXT_START_ADDR=0x400000
|