Re: Keyboard driver resets system when key is pressed.
Posted: Sat Aug 31, 2024 2:45 pm
So I'm deciding to not build a cross-compiler because it.. it takes too long.
Because of that, I'm using these as my GCC args:
But, when I compile, I get this error:
I've tried adding but that doesn't work, I get another error:
Added , still didn't work, got this error:
So yeah. I'm out of ideas
UPDATE: I added -m32... that made it WAY worse.
Because of that, I'm using these as my GCC args:
Code: Select all
-ffreestanding -mgeneral-regs-only -Wall -Wextra -Werror
Code: Select all
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
Code: Select all
-nostartfiles
Code: Select all
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000001000
ld: attempted static link of dynamic object `build/main.o'
Code: Select all
-static
Code: Select all
ld: cannot use executable file 'build/main.o' as input to a link
UPDATE: I added -m32... that made it WAY worse.
Code: Select all
/usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/12/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: cannot find libgcc_s.so.1: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/12/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc: No such file or directory