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

Commit e978170

Browse files
committed
Add aarch64 support to toolchain
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.
1 parent 39c73d8 commit e978170

13 files changed

+172
-152
lines changed

.github/workflows/build-os.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ jobs:
4949
5050
- name: Build duckOS (Release)
5151
run: |
52-
cd cmake-build
53-
cmake .. -DCMAKE_TOOLCHAIN_FILE=cmake-build/CMakeToolchain.txt -DCMAKE_BUILD_TYPE=Release
52+
cd build/i386
53+
cmake ../.. -DCMAKE_TOOLCHAIN_FILE=build/i386/CMakeToolchain.txt -DCMAKE_BUILD_TYPE=Release
5454
make install
5555
5656
- name: Make image
5757
run: |
58-
cd cmake-build
58+
cd build/i386
5959
make image
6060
6161
- name: Upload image
6262
uses: actions/upload-artifact@v3
6363
with:
6464
name: Disk Image
65-
path: cmake-build/duckOS.img
65+
path: build/i386/duckOS.img
6666

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ _deps
8484

8585
# CMake
8686
cmake-build*/
87+
build/
8788

8889
#
8990
# DUCKOS-SPECIFIC

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ ADD_SUBDIRECTORY(services/)
7070
ADD_SUBDIRECTORY(programs/)
7171

7272
ADD_CUSTOM_TARGET(image
73-
COMMAND ${CMAKE_COMMAND} -E env "SOURCE_DIR=${CMAKE_SOURCE_DIR}" ${CMAKE_SOURCE_DIR}/scripts/image.sh $(IMAGE_DEV)
73+
COMMAND ${CMAKE_COMMAND} -E env "SOURCE_DIR=${CMAKE_SOURCE_DIR}" "ARCH=${CMAKE_SYSTEM_PROCESSOR}" ${CMAKE_SOURCE_DIR}/scripts/image.sh $(IMAGE_DEV)
7474
BYPRODUCTS ${CMAKE_BINARY_DIR}/duckOS.img
7575
USES_TERMINAL
7676
)

INSTRUCTIONS.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@
2828
- You must also install [macFUSE](https://osxfuse.github.io) and `fuse-ext2`
2929
- 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)
3030
- 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.
31+
3132
## Building the toolchain
3233
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.)
34+
- This will default to i386. If you'd like to build for a different architecture, specify it with the `ARCH` environment variable.
35+
- Supported targets are `i386` and `aarch64`.
3336
2. Make a cup of coffee or tea and wait. It will take a while to compile.
34-
3. Once it's done, the toolchain will be in `toolchain/tools`, and the sysroot in `cmake-build/root`.
37+
3. Once it's done, the toolchain will be in `toolchain/tools`, and the sysroot in `build/[arch]/root`.
3538

3639
### Editing the toolchain
37-
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.
40+
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.
3841

3942
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.
4043

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

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

5053
## Building and running duckOS
51-
1. In the `cmake-build` directory, run `make install` to build the kernel & programs.
54+
1. In the `build/[arch]` directory, run `make install` to build the kernel & programs.
5255
2. Run `make image` to make the disk image.
5356
4. Run `make qemu` to run qemu with the image you just made.
5457
5. Enjoy!

libraries/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
ADD_COMPILE_OPTIONS(-O3 -msse2)
1+
ADD_COMPILE_OPTIONS(-O3)
2+
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
3+
ADD_COMPILE_OPTIONS(-msse2)
4+
ENDIF()
25
ADD_SUBDIRECTORY(libc/)
36
ADD_SUBDIRECTORY(libpond/)
47
ADD_SUBDIRECTORY(ld/)

libraries/libc/setjmp.h

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ struct __jmp_struct {
3333
long int ebp;
3434
long int esp;
3535
long int eip;
36+
#elif defined(__aarch64__)
37+
// TODO
3638
#else
3739
IMPLEMENT OTHER ARCHES...
3840
#endif

scripts/base-system.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ rsync -auH --inplace "${SOURCE_DIR}/base/"* "$FS_DIR" || (echo "Couldn't copy ba
2020
rsync -auH --inplace "root/"* "$FS_DIR"/ || (echo "Couldn't copy root." && exit 1)
2121

2222
msg "Copying toolchain libs and headers..."
23-
rsync -aH --update -t -r "${SOURCE_DIR}/toolchain/tools/i686-pc-duckos/lib/"* "$FS_DIR"/lib || (echo "Couldn't copy libs." && exit 1)
24-
rsync -aH --update -t -r "${SOURCE_DIR}/toolchain/tools/i686-pc-duckos/include/"* "$FS_DIR"/usr/include || (echo "Couldn't copy headers." && exit 1)
23+
rsync -aH --update -t -r "${SOURCE_DIR}/toolchain/tools/$ARCH/$ARCH-pc-duckos/lib/"* "$FS_DIR"/lib || (echo "Couldn't copy libs." && exit 1)
24+
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)
2525

2626
msg "Setting up root filesystem..."
2727
msg "Setting up devices..."

toolchain/CMakeToolchain.txt.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
set(CMAKE_SYSTEM_NAME duckOS)
2-
set(TOOLCHAIN_ROOT_DIR @DUCKOS_SOURCE_DIR@/toolchain/tools)
2+
set(TOOLCHAIN_ROOT_DIR @DUCKOS_SOURCE_DIR@/toolchain/tools/@DUCKOS_ARCH@)
33
set(TOOLCHAIN_BIN_DIR ${TOOLCHAIN_ROOT_DIR}/bin/)
4-
set(TOOLCHAIN_PLATFORM i686-pc-duckos)
5-
set(CMAKE_SYSTEM_PROCESSOR i386)
4+
set(TOOLCHAIN_PLATFORM @DUCKOS_TARGET@)
5+
set(CMAKE_SYSTEM_PROCESSOR @DUCKOS_ARCH@)
66
set(TOOLCHAIN_PREFIX ${TOOLCHAIN_PLATFORM}-)
77
list(APPEND CMAKE_MODULE_PATH "@DUCKOS_SOURCE_DIR@/toolchain/CMake")
88

toolchain/binutils-2.41.patch

+87-52
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
diff --git a/bfd/config.bfd b/bfd/config.bfd
2-
index bdee5395..e5fb7e6a 100644
2+
index bdee5395..0c2578b6 100644
33
--- a/bfd/config.bfd
44
+++ b/bfd/config.bfd
5-
@@ -346,8 +346,19 @@ case "${targ}" in
5+
@@ -288,6 +288,11 @@ case "${targ}" in
6+
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"
7+
want64=true
8+
;;
9+
+ aarch64-*-duckos*)
10+
+ targ_defvec=aarch64_elf64_le_vec
11+
+ targ_selfvecs=
12+
+ want64=true
13+
+ ;;
14+
aarch64_be-*-linux* | aarch64_be-*-netbsd*)
15+
targ_defvec=aarch64_elf64_be_vec
16+
targ_selvecs="aarch64_elf64_le_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_be_vec arm_elf32_le_vec"
17+
@@ -346,8 +351,19 @@ case "${targ}" in
618
targ_selvecs=alpha_vms_lib_txt_vec
719
want64=true
820
;;
@@ -34,20 +46,19 @@ index f6ede1d0..683660c5 100755
3446
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
3547
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
3648
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
37-
diff --git a/gas/config/te-duckos.h b/gas/config/te-duckos.h
38-
new file mode 100644
39-
index 00000000..f6f8bc29
40-
--- /dev/null
41-
+++ b/gas/config/te-duckos.h
42-
@@ -0,0 +1,2 @@
43-
+#include "te-generic.h"
44-
+#define TE_DuckOS 1
45-
\ No newline at end of file
4649
diff --git a/gas/configure.tgt b/gas/configure.tgt
47-
index 3429f850..d11975c9 100644
50+
index 3429f850..74328132 100644
4851
--- a/gas/configure.tgt
4952
+++ b/gas/configure.tgt
50-
@@ -223,6 +223,7 @@ case ${generic_target} in
53+
@@ -136,6 +136,7 @@ case ${generic_target} in
54+
aarch64*-*-netbsd*) fmt=elf em=nbsd;;
55+
aarch64*-*-nto*) fmt=elf;;
56+
aarch64*-*-openbsd*) fmt=elf;;
57+
+ aarch64*-*-duckos*) fmt=elf em=duckos ;;
58+
aarch64*-*-pe* | aarch64*-*-mingw*) fmt=coff em=pepaarch64 ;;
59+
alpha-*-*vms*) fmt=evax ;;
60+
alpha-*-osf*) fmt=ecoff ;;
61+
@@ -223,6 +224,7 @@ case ${generic_target} in
5162
h8300-*-elf) fmt=elf ;;
5263
h8300-*-linux*) fmt=elf em=linux ;;
5364

@@ -56,7 +67,7 @@ index 3429f850..d11975c9 100644
5667
i386-*-beos*) fmt=elf ;;
5768
i386-*-elfiamcu) fmt=elf arch=iamcu ;;
5869
diff --git a/ld/Makefile.am b/ld/Makefile.am
59-
index c3adbb0c..c25c4fe1 100644
70+
index c3adbb0c..2fe444a8 100644
6071
--- a/ld/Makefile.am
6172
+++ b/ld/Makefile.am
6273
@@ -274,6 +274,7 @@ ALL_EMULATION_SOURCES = \
@@ -67,23 +78,39 @@ index c3adbb0c..c25c4fe1 100644
6778
eelf_i386.c \
6879
eelf_i386_be.c \
6980
eelf_i386_fbsd.c \
70-
@@ -455,6 +456,7 @@ ALL_64_EMULATION_SOURCES = \
81+
@@ -384,6 +385,7 @@ ALL_64_EMULATION_SOURCES = \
82+
eaarch64fbsd.c \
83+
eaarch64fbsdb.c \
84+
eaarch64haiku.c \
85+
+ eaarch64duckos.c \
86+
eaarch64linux.c \
87+
eaarch64linux32.c \
88+
eaarch64linux32b.c \
89+
@@ -455,6 +457,7 @@ ALL_64_EMULATION_SOURCES = \
7190
eelf64tilegx.c \
7291
eelf64tilegx_be.c \
7392
eelf_mipsel_haiku.c \
7493
+ eelf_x86_64_duckos.c \
7594
eelf_x86_64.c \
7695
eelf_x86_64_cloudabi.c \
7796
eelf_x86_64_fbsd.c \
78-
@@ -773,6 +775,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
97+
@@ -773,6 +776,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
7998
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32xtensa.Pc@am__quote@
8099
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32z80.Pc@am__quote@
81100
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Pc@am__quote@
82101
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_duckos.Pc@am__quote@
83102
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Pc@am__quote@
84103
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Pc@am__quote@
85104
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_haiku.Pc@am__quote@
86-
@@ -951,6 +954,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
105+
@@ -879,6 +883,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
106+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsd.Pc@am__quote@
107+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsdb.Pc@am__quote@
108+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64haiku.Pc@am__quote@
109+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64duckos.Pc@am__quote@
110+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux.Pc@am__quote@
111+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Pc@am__quote@
112+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Pc@am__quote@
113+
@@ -951,6 +956,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
87114
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx_be.Pc@am__quote@
88115
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_mipsel_haiku.Pc@am__quote@
89116
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Pc@am__quote@
@@ -92,7 +119,7 @@ index c3adbb0c..c25c4fe1 100644
92119
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Pc@am__quote@
93120
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_haiku.Pc@am__quote@
94121
diff --git a/ld/Makefile.in b/ld/Makefile.in
95-
index d1a56026..cefc1438 100644
122+
index d1a56026..a0d2197a 100644
96123
--- a/ld/Makefile.in
97124
+++ b/ld/Makefile.in
98125
@@ -775,6 +775,7 @@ ALL_EMULATION_SOURCES = \
@@ -103,39 +130,63 @@ index d1a56026..cefc1438 100644
103130
eelf_i386.c \
104131
eelf_i386_be.c \
105132
eelf_i386_fbsd.c \
106-
@@ -955,6 +956,7 @@ ALL_64_EMULATION_SOURCES = \
133+
@@ -884,6 +885,7 @@ ALL_64_EMULATION_SOURCES = \
134+
eaarch64fbsd.c \
135+
eaarch64fbsdb.c \
136+
eaarch64haiku.c \
137+
+ eaarch64duckos.c \
138+
eaarch64linux.c \
139+
eaarch64linux32.c \
140+
eaarch64linux32b.c \
141+
@@ -955,6 +957,7 @@ ALL_64_EMULATION_SOURCES = \
107142
eelf64tilegx.c \
108143
eelf64tilegx_be.c \
109144
eelf_mipsel_haiku.c \
110145
+ eelf_x86_64_duckos.c \
111146
eelf_x86_64.c \
112147
eelf_x86_64_cloudabi.c \
113148
eelf_x86_64_fbsd.c \
114-
@@ -1458,6 +1460,7 @@ distclean-compile:
149+
@@ -1265,6 +1268,7 @@ distclean-compile:
150+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsd.Po@am__quote@
151+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsdb.Po@am__quote@
152+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64haiku.Po@am__quote@
153+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64duckos.Po@am__quote@
154+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux.Po@am__quote@
155+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Po@am__quote@
156+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Po@am__quote@
157+
@@ -1458,6 +1462,7 @@ distclean-compile:
115158
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx.Po@am__quote@
116159
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx_be.Po@am__quote@
117160
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Po@am__quote@
118161
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_duckos.Po@am__quote@
119162
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Po@am__quote@
120163
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Po@am__quote@
121164
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_haiku.Po@am__quote@
122-
@@ -1468,6 +1471,7 @@ distclean-compile:
165+
@@ -1468,6 +1473,7 @@ distclean-compile:
123166
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_mipsel_haiku.Po@am__quote@
124167
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_s390.Po@am__quote@
125168
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Po@am__quote@
126169
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_duckos.Po@am__quote@
127170
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_cloudabi.Po@am__quote@
128171
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Po@am__quote@
129172
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_haiku.Po@am__quote@
130-
@@ -2490,6 +2494,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
173+
@@ -2490,6 +2496,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
131174
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32xtensa.Pc@am__quote@
132175
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32z80.Pc@am__quote@
133176
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Pc@am__quote@
134177
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_duckos.Pc@am__quote@
135178
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Pc@am__quote@
136179
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Pc@am__quote@
137180
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_haiku.Pc@am__quote@
138-
@@ -2668,6 +2673,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
181+
@@ -2596,6 +2603,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
182+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsd.Pc@am__quote@
183+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsdb.Pc@am__quote@
184+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64haiku.Pc@am__quote@
185+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64duckos.Pc@am__quote@
186+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux.Pc@am__quote@
187+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Pc@am__quote@
188+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Pc@am__quote@
189+
@@ -2668,6 +2676,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
139190
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx_be.Pc@am__quote@
140191
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_mipsel_haiku.Pc@am__quote@
141192
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Pc@am__quote@
@@ -144,10 +195,20 @@ index d1a56026..cefc1438 100644
144195
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Pc@am__quote@
145196
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_haiku.Pc@am__quote@
146197
diff --git a/ld/configure.tgt b/ld/configure.tgt
147-
index c62b9581..873ecbe4 100644
198+
index c62b9581..dedecae4 100644
148199
--- a/ld/configure.tgt
149200
+++ b/ld/configure.tgt
150-
@@ -375,6 +375,9 @@ i[3-7]86-*-linux-*) targ_emul=elf_i386
201+
@@ -97,6 +97,9 @@ aarch64-*-freebsd*) targ_emul=aarch64fbsd
202+
aarch64-*-fuchsia*) targ_emul=aarch64elf
203+
targ_extra_emuls="aarch64elfb armelf armelfb"
204+
;;
205+
+aarch64-*-duckos*) targ_emul=aarch64duckos
206+
+ targ_extra_emuls=aarch64elf
207+
+ ;;
208+
aarch64_be-*-linux-gnu_ilp32)
209+
targ_emul=aarch64linux32b
210+
targ_extra_libpath="aarch64linuxb aarch64linux aarch64linux32 armelfb_linux_eabi armelf_linux_eabi"
211+
@@ -375,6 +378,9 @@ i[3-7]86-*-linux-*) targ_emul=elf_i386
151212
targ64_extra_emuls="elf_x86_64 elf32_x86_64"
152213
targ64_extra_libpath="elf_x86_64 elf32_x86_64"
153214
;;
@@ -157,7 +218,7 @@ index c62b9581..873ecbe4 100644
157218
i[3-7]86-*-redox*) targ_emul=elf_i386
158219
targ_extra_emuls=elf_x86_64
159220
;;
160-
@@ -1008,6 +1011,10 @@ x86_64-*-linux-*) targ_emul=elf_x86_64
221+
@@ -1008,6 +1014,10 @@ x86_64-*-linux-*) targ_emul=elf_x86_64
161222
targ_extra_libpath="elf_i386 elf32_x86_64"
162223
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
163224
;;
@@ -168,29 +229,3 @@ index c62b9581..873ecbe4 100644
168229
x86_64-*-redox*) targ_emul=elf_x86_64
169230
targ_extra_emuls=elf_i386
170231
;;
171-
diff --git a/ld/emulparams/elf_duckos.sh b/ld/emulparams/elf_duckos.sh
172-
new file mode 100644
173-
index 00000000..cf8255bd
174-
--- /dev/null
175-
+++ b/ld/emulparams/elf_duckos.sh
176-
@@ -0,0 +1 @@
177-
+ELF_INTERPRETER_NAME=\"/lib/ld-duckos.so\"
178-
\ No newline at end of file
179-
diff --git a/ld/emulparams/elf_i386_duckos.sh b/ld/emulparams/elf_i386_duckos.sh
180-
new file mode 100644
181-
index 00000000..41cfd2c4
182-
--- /dev/null
183-
+++ b/ld/emulparams/elf_i386_duckos.sh
184-
@@ -0,0 +1,2 @@
185-
+source_sh ${srcdir}/emulparams/elf_i386.sh
186-
+source_sh ${srcdir}/emulparams/elf_duckos.sh
187-
\ No newline at end of file
188-
diff --git a/ld/emulparams/elf_x86_64_duckos.sh b/ld/emulparams/elf_x86_64_duckos.sh
189-
new file mode 100644
190-
index 00000000..8060bf86
191-
--- /dev/null
192-
+++ b/ld/emulparams/elf_x86_64_duckos.sh
193-
@@ -0,0 +1,2 @@
194-
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
195-
+source_sh ${srcdir}/emulparams/elf_duckos.sh
196-
\ No newline at end of file

toolchain/build-ext2-fuse.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export PATH="/usr/local/opt/m4/bin:$PATH"
66
if [[ "$(uname -s)" != "Darwin" ]]; then
77
fail "FUSE-ext2 is only needed on macOS."
88
fi
9-
pushd "$DIR"/../cmake-build
9+
pushd "$DIR"/../build
1010
if [ ! -d fuse-ext2 ]; then
1111
msg "Cloning alperakcanfuse-ext2..."
1212
git clone https://github.com/alperakcan/fuse-ext2.git

0 commit comments

Comments
 (0)