From c0a1d61a572f15cc14928c1429ff4404f6c8c0d1 Mon Sep 17 00:00:00 2001 From: maxcodehack Date: Thu, 4 Mar 2021 19:46:14 +0000 Subject: [PATCH] [klibc][kgcc] Undef 'linux' and define 'kolibri' git-svn-id: svn://kolibrios.org@8636 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/kolibri-libc/linuxtools/kgcc | 3 ++- contrib/kolibri-libc/linuxtools/kld | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/kolibri-libc/linuxtools/kgcc b/contrib/kolibri-libc/linuxtools/kgcc index 2c8f726d05..959763ac4a 100644 --- a/contrib/kolibri-libc/linuxtools/kgcc +++ b/contrib/kolibri-libc/linuxtools/kgcc @@ -19,6 +19,7 @@ fi # GCC Flags for KolibriOS FLAGS="-c -m32 -nostdinc -fno-common -fno-builtin -fno-leading-underscore -fno-pie -fno-stack-protector -fno-stack-check -mpreferred-stack-boundary=2" +KOS_PLATFORM="-Ulinux -U__linux -U__linux__ -U__gnu_linux__ -U__unix__ -U__unix -Uunix -Dkolibri -D__kolibri -D__kolibri__" # And, execute gcc: -gcc $FLAGS -I $KLIBC/source/include $* +gcc $FLAGS $KOS_PLATFORM -I$KLIBC/source/include $* diff --git a/contrib/kolibri-libc/linuxtools/kld b/contrib/kolibri-libc/linuxtools/kld index 78c969435d..cd24437edb 100644 --- a/contrib/kolibri-libc/linuxtools/kld +++ b/contrib/kolibri-libc/linuxtools/kld @@ -21,4 +21,4 @@ fi FLAGS="-m elf_i386 -nostdlib" # And, execute ld: -ld $FLAGS -L $KLIBC/lib -T $KLIBC/static.lds $KLIBC/lib/crt0.o $* +ld $FLAGS -L$KLIBC/lib -T$KLIBC/static.lds $KLIBC/lib/crt0.o $*