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 8625 | ||
---|---|---|---|
1 | #!/bin/bash |
1 | #!/bin/bash |
2 | 2 | ||
3 | # Copyright maxcodehack, 2021 |
3 | # Copyright maxcodehack, 2021 |
4 | # ld options for build for KolibriOS |
4 | # ld 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 "kld: no input files" |
9 | echo "kld: no 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 "kld: KLIBC variable not set" |
16 | echo "kld: KLIBC variable not set" |
17 | exit 1 |
17 | exit 1 |
18 | fi |
18 | fi |
19 | 19 | ||
20 | # LD Flags for KolibriOS |
20 | # LD Flags for KolibriOS |
21 | FLAGS="-m elf_i386 -nostdlib" |
21 | FLAGS="-m elf_i386 -nostdlib" |
22 | 22 | ||
23 | # And, execute ld: |
23 | # And, execute ld: |
24 | ld $FLAGS -L $KLIBC/bin/lib -T $KLIBC/tests/static.lds $KLIBC/bin/lib/crt0.o $* |
24 | ld $FLAGS -L $KLIBC/lib -T $KLIBC/static.lds $KLIBC/lib/crt0.o $* |