dosemu2 / fdpp

FreeDOS plus-plus, 64bit DOS
GNU General Public License v3.0
195 stars 17 forks source link

Hardcoded x86_64 ld #251

Closed jschwartzenberg closed 1 month ago

jschwartzenberg commented 1 month ago

Trying to build on an i386 system, results in:

x86_64-linux-gnu-ld -melf_i386 -static -Map=../fdppkrnl.35.10.map -o ../fdppkrnl.35.10.elf \
        --emit-relocs  -T/home/julius/checkouts/fdpp/fdpp/kernel/kernel.ld kernel.o entry.o io.o console.o serial.o printer.o execrh.o nlssupt.o procsupt.o dosidle.o int2f.o nls_hc.o intr.o irqstack.o cpu.o plt.o cdata.o floppy.o rdpcclk.o wrpcclk.o wratclk.o
bash: regel 1: x86_64-linux-gnu-ld: opdracht niet gevonden
make[2]: *** [makefile:60: ../fdppkrnl.35.10.elf] Fout 127
make[2]: Map '/home/julius/checkouts/fdpp/fdpp/kernel' wordt verlaten
make[1]: *** [makefile:61: fdppkrnl.35.10.elf] Fout 2
make[1]: Map '/home/julius/checkouts/fdpp/fdpp' wordt verlaten
make: *** [makefile:3: all] Fout 2

Running the correct ld manually allows fdpp to compile without issues:

$ cd fdpp/kernel/
$ ld -melf_i386 -static -Map=../fdppkrnl.35.10.map -o ../fdppkrnl.35.10.elf         --emit-relocs  -T/home/julius/checkouts/fdpp/fdpp/kernel/kernel.ld kernel.o entry.o io.o console.o serial.o printer.o execrh.o nlssupt.o procsupt.o dosidle.o int2f.o nls_hc.o intr.o irqstack.o cpu.o plt.o cdata.o floppy.o rdpcclk.o wrpcclk.o wratclk.o
$ cd -
$ make
...

I guess #146 might solve this.

stsp commented 1 month ago

Can you install package binutils-x86-64-linux-gnu?

jschwartzenberg commented 1 month ago

Yes, it's indeed there!

stsp commented 1 month ago

Where? You mean, its installed but doesn't work?

jschwartzenberg commented 1 month ago

I didn't check with it yet. But is there a reason to use its ld instead of the regular one?

stsp commented 1 month ago

Yes: on non-x86 arches. But you can as well use configure.meson. It should find the right linker.