Skip to content

allow gcc build to succeed with -DWIN31SUPPORT #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

ecm-pushbx
Copy link
Contributor

I copied config.m to config.mak and enabled the -DWIN31SUPPORT switch like so:

kwin31$ tail config.mak

# XFAT=16
XFAT=32

# Give extra compiler DEFINE flags here
# such as -DDEBUG : extra DEBUG output
#         -DDOSEMU : printf output goes to dosemu log
# set ALLCFLAGS=-DDEBUG
ALLCFLAGS=-DWIN31SUPPORT
NASMFLAGS=-DWIN31SUPPORT

(Is this correct? Is there a better way to set this flag?)

Prior to this commit building with -DWIN31SUPPORT would fail with errors from NASM:

nasm -Dgcc -DWIN31SUPPORT -DWITHFAT32 -i../hdr/ -DXCPU=386 -felf -o kernel.obj kernel.asm
kernel.asm:610: error: ELF format does not support segment base references
kernel.asm:613: error: ELF format does not support segment base references
kernel.asm:614: error: ELF format does not support this use of WRT

I did a small validity check on the resulting structure and it seems to be correct when I call int 2Fh function 1605h, however I do not know whether this works and have not tested or studied this extensively.

@ecm-pushbx
Copy link
Contributor Author

For others following along, I use the following commands to build the kernel:

PATH=~/proj/build-ia16/prefix/bin/:"$PATH"
git clone https://github.com/FDOS/kernel kwin31
cd kwin31
git submodule init
git submodule update --recursive
make all COMPILER=gcc XUPX=

The first command sets up the path to the gcc-ia16 toolchain, set up using https://github.com/tkchia/build-ia16/

@ecm-pushbx
Copy link
Contributor Author

I noticed that with the config.mak file the default appears to be to build the 386-only kernel.

@PerditionC PerditionC merged commit ab3cac6 into FDOS:master Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants