Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. #!/bin/bash
  2.  
  3. # Copyright maxcodehack, 2021
  4. # gcc options for build for KolibriOS
  5.  
  6. # We start w/o param?
  7. if [ -z "$*" ]
  8. then
  9.         echo -e "\033[1;31mfatal error: \033[0mno input files"
  10.         exit 1
  11. fi
  12.  
  13. # KLIBC variable exists?
  14. if [ -z "$KLIBC" ]
  15. then
  16.         echo -e "\033[1;31mfatal error: \033[0mKLIBC variable not set"
  17.         exit 1
  18. fi
  19.  
  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"
  22.  
  23. # And, execute gcc:
  24. gcc $FLAGS -I $KLIBC/source/include $*
  25.