Subversion Repositories Kolibri OS

Rev

Rev 9774 | Rev 9844 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. if tup.getconfig("NO_FASM") ~= "" then return end
  2. if tup.getconfig("NO_GCC") ~= "" then return end
  3. HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../../../" or tup.getconfig("HELPERDIR")
  4. tup.include(HELPERDIR .. "/use_gcc.lua")
  5.  
  6. CFLAGS = " -r -nostdinc -nostdlib -DGNUC -D_BUILD_LIBC "
  7. INCLUDES = " -I../include"
  8.  
  9. GAS_SRC = {
  10.     "setjmp/setjmp.s",
  11.     "setjmp/longjmp.s",
  12.     "math/round.s",
  13.     "math/atan.s",
  14.     "math/pow2.s",
  15.     "math/log10.s",
  16.     "math/exp.s",
  17.     "math/pow10.s",
  18.     "math/log.s",
  19.     "math/pow.s",
  20.     "math/ceil.s",
  21.     "math/cos.s",
  22.     "math/sin.s",
  23.     "math/asin.s",
  24.     "math/modf.s",
  25.     "math/floor.s",
  26.     "math/fabs.s",
  27.     "math/fmod.s",
  28.     "math/log2.s",
  29.     "math/acos.s",
  30.     "math/modfl.s",
  31.     "math/atan2.s",
  32.     "math/sqrt.s",
  33.     "math/tan.s",
  34.     "string/memset.s",
  35.     "string/memmove.s"
  36. }
  37.  
  38. OBJS = {}
  39.  
  40. tup.append_table(OBJS,
  41.   tup.foreach_rule(GAS_SRC, "as --32 %f -o %o", "%B.o")
  42. )
  43.  
  44. table.insert(OBJS, "libc.c");
  45.  
  46. tup.rule(OBJS, "kos32-tcc" .. CFLAGS .. INCLUDES .. " -o %o %f " .. " && strip %o --strip-unneeded " , "libc.o")
  47. tup.rule("libc.o", "objconv -fcoff32 %f %o " .. tup.getconfig("KPACK_CMD"), "%B.obj")
  48.