Subversion Repositories Kolibri OS

Rev

Rev 8622 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8622 Rev 8636
1
#!/bin/bash
1
#!/bin/bash
2
 
2
 
3
# Copyright maxcodehack, 2021
3
# Copyright maxcodehack, 2021
4
# gcc options for build for KolibriOS
4
# gcc options for build for KolibriOS
5
 
5
 
6
# We start w/o param?
6
# We start w/o param?
7
if [ -z "$*" ]
7
if [ -z "$*" ]
8
then
8
then
9
	echo -e "\033[1;31mfatal error: \033[0mno input files"
9
	echo -e "\033[1;31mfatal error: \033[0mno input files"
10
	exit 1
10
	exit 1
11
fi
11
fi
12
 
12
 
13
# KLIBC variable exists?
13
# KLIBC variable exists?
14
if [ -z "$KLIBC" ]
14
if [ -z "$KLIBC" ]
15
then
15
then
16
	echo -e "\033[1;31mfatal error: \033[0mKLIBC variable not set"
16
	echo -e "\033[1;31mfatal error: \033[0mKLIBC variable not set"
17
	exit 1
17
	exit 1
18
fi
18
fi
19
 
19
 
20
# GCC Flags for KolibriOS
20
# GCC Flags for KolibriOS
21
FLAGS="-c -m32 -nostdinc -fno-common -fno-builtin -fno-leading-underscore -fno-pie -fno-stack-protector -fno-stack-check -mpreferred-stack-boundary=2"
21
FLAGS="-c -m32 -nostdinc -fno-common -fno-builtin -fno-leading-underscore -fno-pie -fno-stack-protector -fno-stack-check -mpreferred-stack-boundary=2"
-
 
22
KOS_PLATFORM="-Ulinux -U__linux -U__linux__ -U__gnu_linux__ -U__unix__ -U__unix -Uunix -Dkolibri -D__kolibri -D__kolibri__"
22
 
23
 
23
# And, execute gcc:
24
# And, execute gcc:
24
gcc $FLAGS -I $KLIBC/source/include $*
25
gcc $FLAGS $KOS_PLATFORM -I$KLIBC/source/include $*