shadlyd15 / DoomLinux

A bash script to build a minimal linux operating system just to play Doom.
MIT License
402 stars 24 forks source link

gcc 10 caused build to fail #2

Closed martin-zs closed 2 years ago

martin-zs commented 2 years ago

My compiler (gcc -v) is "gcc version 10.2.1 20210110 (Debian 10.2.1-6)" And because of that I'm hitting this problem: https://lore.kernel.org/lkml/20200124181811.4780-1-hjl.tools@gmail.com/ When I run "make bzImage -j$(nproc)" ...

  CC      arch/x86/boot/compressed/acpi.o
  LD      arch/x86/boot/compressed/vmlinux
ld: arch/x86/boot/compressed/pgtable_64.o:(.bss+0x0): multiple definition of `__force_order'; arch/x86/boot/compressed/kaslr_64.o:(.bss+0x0): first defined here
ld: arch/x86/boot/compressed/head_64.o: warning: relocation in read-only section `.head.text'
ld: warning: creating DT_TEXTREL in a PIE
make[2]: *** [arch/x86/boot/compressed/Makefile:118: arch/x86/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/x86/boot/Makefile:112: arch/x86/boot/compressed/vmlinux] Error 2
make: *** [arch/x86/Makefile:284: bzImage] Error 2

So the solution for me was to do exactly what was in the submitted patch edit $STAGING/linux-${KERNEL_VERSION}/arch/x86/boot/compressed/kaslr_64.c and delete the line "unsigned long __force_order"

I'm just posting this here in case it helps others.

shadlyd15 commented 2 years ago

Thanks! @martin-zs