Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add aarch64 support to toolchain
Browse files Browse the repository at this point in the history
Now, the toolchain is located in a subdirectory according to architecture (toolchain/tools/[arch]), as are the builds (build/[arch]). The instructions have been updated accordingly.
  • Loading branch information
byteduck committed Jul 22, 2024
1 parent 39c73d8 commit e978170
Show file tree
Hide file tree
Showing 13 changed files with 172 additions and 152 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ jobs:
- name: Build duckOS (Release)
run: |
cd cmake-build
cmake .. -DCMAKE_TOOLCHAIN_FILE=cmake-build/CMakeToolchain.txt -DCMAKE_BUILD_TYPE=Release
cd build/i386
cmake ../.. -DCMAKE_TOOLCHAIN_FILE=build/i386/CMakeToolchain.txt -DCMAKE_BUILD_TYPE=Release
make install
- name: Make image
run: |
cd cmake-build
cd build/i386
make image
- name: Upload image
uses: actions/upload-artifact@v3
with:
name: Disk Image
path: cmake-build/duckOS.img
path: build/i386/duckOS.img

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ _deps

# CMake
cmake-build*/
build/

#
# DUCKOS-SPECIFIC
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ADD_SUBDIRECTORY(services/)
ADD_SUBDIRECTORY(programs/)

ADD_CUSTOM_TARGET(image
COMMAND ${CMAKE_COMMAND} -E env "SOURCE_DIR=${CMAKE_SOURCE_DIR}" ${CMAKE_SOURCE_DIR}/scripts/image.sh $(IMAGE_DEV)
COMMAND ${CMAKE_COMMAND} -E env "SOURCE_DIR=${CMAKE_SOURCE_DIR}" "ARCH=${CMAKE_SYSTEM_PROCESSOR}" ${CMAKE_SOURCE_DIR}/scripts/image.sh $(IMAGE_DEV)
BYPRODUCTS ${CMAKE_BINARY_DIR}/duckOS.img
USES_TERMINAL
)
Expand Down
13 changes: 8 additions & 5 deletions INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@
- You must also install [macFUSE](https://osxfuse.github.io) and `fuse-ext2`
- The latest version of FUSE-ext2 can be built by running `toolchain/build-ext2-fuse.sh`. Alternatively, an older binary version is available [here](https://github.com/gpz500/fuse-ext2/releases)
- If you are on an Apple Silicon Mac, you may need to set the `CPATH=/opt/homebrew/include` and `LIBRARY_PATH=/opt/homebrew/lib` environment variables to get the toolchain to build.

## Building the toolchain
1. Open the `toolchain` directory in your terminal and run `build-toolchain.sh`. (You will need an internet connection as it downloads the needed binutils/gcc releases from the GNU ftp site.)
- This will default to i386. If you'd like to build for a different architecture, specify it with the `ARCH` environment variable.
- Supported targets are `i386` and `aarch64`.
2. Make a cup of coffee or tea and wait. It will take a while to compile.
3. Once it's done, the toolchain will be in `toolchain/tools`, and the sysroot in `cmake-build/root`.
3. Once it's done, the toolchain will be in `toolchain/tools`, and the sysroot in `build/[arch]/root`.

### Editing the toolchain
If you'd like to edit the c library, you can run `build-toolchain.sh libc` to recompile libc and libstdc++. If you just want to compile libc and not libstdc++, you can run `make libc` in the `cmake-build` folder.
If you'd like to edit the c library, you can run `build-toolchain.sh libc` to recompile libc and libstdc++. If you just want to compile libc and not libstdc++, you can run `make libc` in the `build/[arch]` folder.

If you'd like to edit gcc or binutils, you can run the `edit-toolchain.sh` script to download patch binutils and gcc and setup a git repository for each one. Then, use the `gen-patches.sh` script to generate patch files for each one.

Expand All @@ -44,11 +47,11 @@ To build something from the `edit` directory, pass the `edited-[thing]` to the `

## Configuring cmake
1. Make sure you've built the toolchain first.
2. Go to the `cmake-build` directory.
3. From that directory, run `cmake .. -DCMAKE_TOOLCHAIN_FILE=cmake-build/CMakeToolchain.txt`.
2. Go to the `build/[arch]` directory.
3. From that directory, run `cmake ../.. -DCMAKE_TOOLCHAIN_FILE=build/[arch]/CMakeToolchain.txt`.

## Building and running duckOS
1. In the `cmake-build` directory, run `make install` to build the kernel & programs.
1. In the `build/[arch]` directory, run `make install` to build the kernel & programs.
2. Run `make image` to make the disk image.
4. Run `make qemu` to run qemu with the image you just made.
5. Enjoy!
Expand Down
5 changes: 4 additions & 1 deletion libraries/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ADD_COMPILE_OPTIONS(-O3 -msse2)
ADD_COMPILE_OPTIONS(-O3)
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
ADD_COMPILE_OPTIONS(-msse2)
ENDIF()
ADD_SUBDIRECTORY(libc/)
ADD_SUBDIRECTORY(libpond/)
ADD_SUBDIRECTORY(ld/)
Expand Down
2 changes: 2 additions & 0 deletions libraries/libc/setjmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ struct __jmp_struct {
long int ebp;
long int esp;
long int eip;
#elif defined(__aarch64__)
// TODO
#else
IMPLEMENT OTHER ARCHES...
#endif
Expand Down
4 changes: 2 additions & 2 deletions scripts/base-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ rsync -auH --inplace "${SOURCE_DIR}/base/"* "$FS_DIR" || (echo "Couldn't copy ba
rsync -auH --inplace "root/"* "$FS_DIR"/ || (echo "Couldn't copy root." && exit 1)

msg "Copying toolchain libs and headers..."
rsync -aH --update -t -r "${SOURCE_DIR}/toolchain/tools/i686-pc-duckos/lib/"* "$FS_DIR"/lib || (echo "Couldn't copy libs." && exit 1)
rsync -aH --update -t -r "${SOURCE_DIR}/toolchain/tools/i686-pc-duckos/include/"* "$FS_DIR"/usr/include || (echo "Couldn't copy headers." && exit 1)
rsync -aH --update -t -r "${SOURCE_DIR}/toolchain/tools/$ARCH/$ARCH-pc-duckos/lib/"* "$FS_DIR"/lib || (echo "Couldn't copy libs." && exit 1)
rsync -aH --update -t -r "${SOURCE_DIR}/toolchain/tools/$ARCH/$ARCH-pc-duckos/include/"* "$FS_DIR"/usr/include || (echo "Couldn't copy headers." && exit 1)

msg "Setting up root filesystem..."
msg "Setting up devices..."
Expand Down
6 changes: 3 additions & 3 deletions toolchain/CMakeToolchain.txt.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
set(CMAKE_SYSTEM_NAME duckOS)
set(TOOLCHAIN_ROOT_DIR @DUCKOS_SOURCE_DIR@/toolchain/tools)
set(TOOLCHAIN_ROOT_DIR @DUCKOS_SOURCE_DIR@/toolchain/tools/@DUCKOS_ARCH@)
set(TOOLCHAIN_BIN_DIR ${TOOLCHAIN_ROOT_DIR}/bin/)
set(TOOLCHAIN_PLATFORM i686-pc-duckos)
set(CMAKE_SYSTEM_PROCESSOR i386)
set(TOOLCHAIN_PLATFORM @DUCKOS_TARGET@)
set(CMAKE_SYSTEM_PROCESSOR @DUCKOS_ARCH@)
set(TOOLCHAIN_PREFIX ${TOOLCHAIN_PLATFORM}-)
list(APPEND CMAKE_MODULE_PATH "@DUCKOS_SOURCE_DIR@/toolchain/CMake")

Expand Down
139 changes: 87 additions & 52 deletions toolchain/binutils-2.41.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
diff --git a/bfd/config.bfd b/bfd/config.bfd
index bdee5395..e5fb7e6a 100644
index bdee5395..0c2578b6 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -346,8 +346,19 @@ case "${targ}" in
@@ -288,6 +288,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 aarch64_pei_le_vec aarch64_pe_le_vec"
want64=true
;;
+ aarch64-*-duckos*)
+ targ_defvec=aarch64_elf64_le_vec
+ targ_selfvecs=
+ want64=true
+ ;;
aarch64_be-*-linux* | aarch64_be-*-netbsd*)
targ_defvec=aarch64_elf64_be_vec
targ_selvecs="aarch64_elf64_le_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_be_vec arm_elf32_le_vec"
@@ -346,8 +351,19 @@ case "${targ}" in
targ_selvecs=alpha_vms_lib_txt_vec
want64=true
;;
Expand Down Expand Up @@ -34,20 +46,19 @@ index f6ede1d0..683660c5 100755
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff --git a/gas/config/te-duckos.h b/gas/config/te-duckos.h
new file mode 100644
index 00000000..f6f8bc29
--- /dev/null
+++ b/gas/config/te-duckos.h
@@ -0,0 +1,2 @@
+#include "te-generic.h"
+#define TE_DuckOS 1
\ No newline at end of file
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 3429f850..d11975c9 100644
index 3429f850..74328132 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -223,6 +223,7 @@ case ${generic_target} in
@@ -136,6 +136,7 @@ case ${generic_target} in
aarch64*-*-netbsd*) fmt=elf em=nbsd;;
aarch64*-*-nto*) fmt=elf;;
aarch64*-*-openbsd*) fmt=elf;;
+ aarch64*-*-duckos*) fmt=elf em=duckos ;;
aarch64*-*-pe* | aarch64*-*-mingw*) fmt=coff em=pepaarch64 ;;
alpha-*-*vms*) fmt=evax ;;
alpha-*-osf*) fmt=ecoff ;;
@@ -223,6 +224,7 @@ case ${generic_target} in
h8300-*-elf) fmt=elf ;;
h8300-*-linux*) fmt=elf em=linux ;;

Expand All @@ -56,7 +67,7 @@ index 3429f850..d11975c9 100644
i386-*-beos*) fmt=elf ;;
i386-*-elfiamcu) fmt=elf arch=iamcu ;;
diff --git a/ld/Makefile.am b/ld/Makefile.am
index c3adbb0c..c25c4fe1 100644
index c3adbb0c..2fe444a8 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -274,6 +274,7 @@ ALL_EMULATION_SOURCES = \
Expand All @@ -67,23 +78,39 @@ index c3adbb0c..c25c4fe1 100644
eelf_i386.c \
eelf_i386_be.c \
eelf_i386_fbsd.c \
@@ -455,6 +456,7 @@ ALL_64_EMULATION_SOURCES = \
@@ -384,6 +385,7 @@ ALL_64_EMULATION_SOURCES = \
eaarch64fbsd.c \
eaarch64fbsdb.c \
eaarch64haiku.c \
+ eaarch64duckos.c \
eaarch64linux.c \
eaarch64linux32.c \
eaarch64linux32b.c \
@@ -455,6 +457,7 @@ ALL_64_EMULATION_SOURCES = \
eelf64tilegx.c \
eelf64tilegx_be.c \
eelf_mipsel_haiku.c \
+ eelf_x86_64_duckos.c \
eelf_x86_64.c \
eelf_x86_64_cloudabi.c \
eelf_x86_64_fbsd.c \
@@ -773,6 +775,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@@ -773,6 +776,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32xtensa.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32z80.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_duckos.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_haiku.Pc@am__quote@
@@ -951,6 +954,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@@ -879,6 +883,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsd.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsdb.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64haiku.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64duckos.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Pc@am__quote@
@@ -951,6 +956,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx_be.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_mipsel_haiku.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Pc@am__quote@
Expand All @@ -92,7 +119,7 @@ index c3adbb0c..c25c4fe1 100644
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_haiku.Pc@am__quote@
diff --git a/ld/Makefile.in b/ld/Makefile.in
index d1a56026..cefc1438 100644
index d1a56026..a0d2197a 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -775,6 +775,7 @@ ALL_EMULATION_SOURCES = \
Expand All @@ -103,39 +130,63 @@ index d1a56026..cefc1438 100644
eelf_i386.c \
eelf_i386_be.c \
eelf_i386_fbsd.c \
@@ -955,6 +956,7 @@ ALL_64_EMULATION_SOURCES = \
@@ -884,6 +885,7 @@ ALL_64_EMULATION_SOURCES = \
eaarch64fbsd.c \
eaarch64fbsdb.c \
eaarch64haiku.c \
+ eaarch64duckos.c \
eaarch64linux.c \
eaarch64linux32.c \
eaarch64linux32b.c \
@@ -955,6 +957,7 @@ ALL_64_EMULATION_SOURCES = \
eelf64tilegx.c \
eelf64tilegx_be.c \
eelf_mipsel_haiku.c \
+ eelf_x86_64_duckos.c \
eelf_x86_64.c \
eelf_x86_64_cloudabi.c \
eelf_x86_64_fbsd.c \
@@ -1458,6 +1460,7 @@ distclean-compile:
@@ -1265,6 +1268,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsdb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64haiku.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64duckos.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Po@am__quote@
@@ -1458,6 +1462,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx_be.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_duckos.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_haiku.Po@am__quote@
@@ -1468,6 +1471,7 @@ distclean-compile:
@@ -1468,6 +1473,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_mipsel_haiku.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_s390.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_duckos.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_cloudabi.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@
@@ -2490,6 +2494,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@@ -2490,6 +2496,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32xtensa.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32z80.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_duckos.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_haiku.Pc@am__quote@
@@ -2668,6 +2673,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@@ -2596,6 +2603,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsd.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsdb.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64haiku.Pc@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64duckos.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Pc@am__quote@
@@ -2668,6 +2676,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx_be.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_mipsel_haiku.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Pc@am__quote@
Expand All @@ -144,10 +195,20 @@ index d1a56026..cefc1438 100644
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Pc@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_haiku.Pc@am__quote@
diff --git a/ld/configure.tgt b/ld/configure.tgt
index c62b9581..873ecbe4 100644
index c62b9581..dedecae4 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -375,6 +375,9 @@ i[3-7]86-*-linux-*) targ_emul=elf_i386
@@ -97,6 +97,9 @@ aarch64-*-freebsd*) targ_emul=aarch64fbsd
aarch64-*-fuchsia*) targ_emul=aarch64elf
targ_extra_emuls="aarch64elfb armelf armelfb"
;;
+aarch64-*-duckos*) targ_emul=aarch64duckos
+ targ_extra_emuls=aarch64elf
+ ;;
aarch64_be-*-linux-gnu_ilp32)
targ_emul=aarch64linux32b
targ_extra_libpath="aarch64linuxb aarch64linux aarch64linux32 armelfb_linux_eabi armelf_linux_eabi"
@@ -375,6 +378,9 @@ i[3-7]86-*-linux-*) targ_emul=elf_i386
targ64_extra_emuls="elf_x86_64 elf32_x86_64"
targ64_extra_libpath="elf_x86_64 elf32_x86_64"
;;
Expand All @@ -157,7 +218,7 @@ index c62b9581..873ecbe4 100644
i[3-7]86-*-redox*) targ_emul=elf_i386
targ_extra_emuls=elf_x86_64
;;
@@ -1008,6 +1011,10 @@ x86_64-*-linux-*) targ_emul=elf_x86_64
@@ -1008,6 +1014,10 @@ x86_64-*-linux-*) targ_emul=elf_x86_64
targ_extra_libpath="elf_i386 elf32_x86_64"
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
;;
Expand All @@ -168,29 +229,3 @@ index c62b9581..873ecbe4 100644
x86_64-*-redox*) targ_emul=elf_x86_64
targ_extra_emuls=elf_i386
;;
diff --git a/ld/emulparams/elf_duckos.sh b/ld/emulparams/elf_duckos.sh
new file mode 100644
index 00000000..cf8255bd
--- /dev/null
+++ b/ld/emulparams/elf_duckos.sh
@@ -0,0 +1 @@
+ELF_INTERPRETER_NAME=\"/lib/ld-duckos.so\"
\ No newline at end of file
diff --git a/ld/emulparams/elf_i386_duckos.sh b/ld/emulparams/elf_i386_duckos.sh
new file mode 100644
index 00000000..41cfd2c4
--- /dev/null
+++ b/ld/emulparams/elf_i386_duckos.sh
@@ -0,0 +1,2 @@
+source_sh ${srcdir}/emulparams/elf_i386.sh
+source_sh ${srcdir}/emulparams/elf_duckos.sh
\ No newline at end of file
diff --git a/ld/emulparams/elf_x86_64_duckos.sh b/ld/emulparams/elf_x86_64_duckos.sh
new file mode 100644
index 00000000..8060bf86
--- /dev/null
+++ b/ld/emulparams/elf_x86_64_duckos.sh
@@ -0,0 +1,2 @@
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
+source_sh ${srcdir}/emulparams/elf_duckos.sh
\ No newline at end of file
2 changes: 1 addition & 1 deletion toolchain/build-ext2-fuse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export PATH="/usr/local/opt/m4/bin:$PATH"
if [[ "$(uname -s)" != "Darwin" ]]; then
fail "FUSE-ext2 is only needed on macOS."
fi
pushd "$DIR"/../cmake-build
pushd "$DIR"/../build
if [ ! -d fuse-ext2 ]; then
msg "Cloning alperakcanfuse-ext2..."
git clone https://github.com/alperakcan/fuse-ext2.git
Expand Down
Loading

0 comments on commit e978170

Please sign in to comment.