Comments (16)
Try export LEX=flex
before running
make
. Maybe you have flex installed.
If not - install.
I have no idea why you need to change
nasm flags. We have aarch64 build on
LP, so the fewer changes you do, the
more chances to succeed.
from fdpp.
Alright... I don't know what to say. It's kinda awkward, but after exporting LEX
variable I tried to reproduce the bug which happened during linking.
Previously LD said that elf_i386 is unsupported and listed all aarch64 targets (e.g. aarch64linux, aarch64elf32...) - hence changes on line 76 and 81 - but then it complained about wrong elf format. Changing nasm format flag to elf64 seamed to fix it.
Unexpectedly, after exporting LEX
variable and changing nasm format flag to elf32, it worked.
So I did git reset --hard
and only removed -melf_i386
flags from LD. Now works like a charm.
Everything compiled. Clang constantly is screaming about macro redefinitions (but I know that I don't need to worry about those warnings).
The only thing that I'm unsure is one of the last messages:
clang++ -o libfdpp.so.32.10 blockio.o break.o chario.o dosfns.o dsk.o error.o fatdir.o fatfs.o fattab.o fcbfns.o hmamgr.o inthndlr.o ioctl.o memmgr.o misc.o newstuff.o network.o nls.o strings.o sysclk.o systime.o task.o config.o initoem.o main.o inithma.o dyninit.o initdisk.o initclk.o prf.o share.o smalloc.o farhlp_sta.o elf.o thunks.o thunks_c.o thunks_a.o thunks_p.o dosobj.o objhlp.o ctors.o farhlp.o objtrace.o -shared -Wl,-Bsymbolic -Wl,--build-id=sha1 -Wl,-soname=libfdpp.so.32.10 -L/data/data/com.termux/files/usr/lib -lelf
Have 84 undefined symbols
Is this to be expected?
from fdpp.
Yes, this is informational-only msg.
Please run file *.elf
to check the arch
of the resulting file after you removed
melf_i386.
from fdpp.
Clang constantly is screaming about macro redefinitions
Which ones?
from fdpp.
So what CROSS_LD was that?
lld?
from fdpp.
Yes. LLD 16.0.6
from fdpp.
Mea culpa. By trying to edit a comment, I've deleted it by accident. Do you want me to write down the list of macro redefinitions once again?
Recreation of deleted comment:
file ../fdpp/fdpp/*.elf
:
../fdpp/fdpp/fdppkrnl.32.10.elf:
ELF 32-bit LSB executable,
Intel 80386, version 1 (SYSV),
statically linked, not stripped
Clang constantly is screaming about macro redefinitions
Which ones?
- O_SYNC
- O_TRUNC
- O_LARGEFILE
- O_CREATE
- O_ACCMODE
- O_RDWR
- O_RDONLY
- O_WRONLY
from fdpp.
I've got your comment via email.
Does lld list the supported targets and
what option should be used?
from fdpp.
I've played a little bit with $CROSS_LD
.
Under Gnu ld (GNU Binutils 2.40) compilation fails:
ld -melf_i386 -static -Map=fdppkrnl.32.10.map -o fdppkrnl.32.10.elf \
-T/data/data/com.termux/files/home/Projects/fdpp/fdpp/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 --defsym=DOS_PSP=0x60
ld: unrecognised emulation mode: elf_i386
Supported emulations:
aarch64linux,
aarch64elf,
aarch64elf32,
aarch64elf32b,
aarch64elfb,
armelf,
armelfb,
aarch64linuxb,
aarch64linux32,
aarch64linux32b,
armelfb_linux_eabi,
armelf_linux_eabi
make[1]: *** [makefile:76: fdppkrnl.32.10.elf] Error 1
make[1]: Leaving directory '/data/data/com.termux/files/home/Projects/fdpp/fdpp'
make: *** [makefile:13: all] Error 2
While under ld.lld (clang/llvm) compiles without truble with no modifications to makefile.
from fdpp.
Yes, that's the point.
cross-ld should be lld.
How it happened to be something else?
from fdpp.
Macros should now be fixed.
from fdpp.
I wish I would know. I've tried unsetting $CROSS_LD
and reinstalling binutils
, as well as looking for exports... but to no avail.
I think this issue can be closed now. Unless you want it to be mentioned in # 225 as I think it might be a road blocker.
Edit: Ups. My bad. You already did it.
from fdpp.
But lld is not the part of binutils, that's
the problem.
What road blocker?
from fdpp.
But lld is not the part of binutils, that's the problem.
But ld
is. In short, i've tried reinstalling binutils to see if in Termux it sets $CROSS_LD
to ld
.
What raod blocker?
In my understanding if you want to migrate FDPP to GCC, you don't want a dependency on llvm through lld and instead use ld.
I'm not sure if this logic is sound, so please correct me if I'm wrong.
from fdpp.
But ld is.
But its not needed.
makefile takes it only as a fallback,
when lld is unavailable. Such fallback
only works when you build for the same
arch, and otherwise error out as you've
seen before installed lld.
In my understanding if you want to migrate FDPP to GCC
I don't want to.
This is an entirely optional task to support
more compilers.
you don't want a dependency on llvm through lld and instead use ld.
No.
lld provides the support for cross-targets
out of the box. While binutils need a
separate package per every arch, and
such cross-packages are not always
available.
So lld and clang just do the work, and
binutils+gcc do not.
from fdpp.
Ok. Thanks for clarification :)
from fdpp.
Related Issues (20)
- Struct packing fails with clang 16 HOT 8
- crash on redundant conversion
- Some FCB tests are now failing HOT 2
- Please relicense fdpp/smalloc.h HOT 8
- DOSLFN not working with FDPP HOT 5
- Windows' WinFile is setting the time in the future HOT 56
- Don't seem to be able to compile (maybe toolchain breakage) HOT 11
- unaligned reference UB
- evaluate gcc porting
- fdpp install doesn't produce fdppkrnl.elf HOT 3
- Error posted about redundant conversion HOT 5
- Build fails with `kernel.asm:110: error: ELF format does not support segment base references` and subsequent errors. HOT 28
- ELF format does not support segment base references HOT 2
- tests are failing again HOT 8
- prehistorik2 doesn't work HOT 5
- Exploring hard disk size limits HOT 14
- NASM-SEGELF Problem HOT 3
- thunk_gen: extend __CNV_PTR_VOID handling
- just run make? HOT 25
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fdpp.