Mostly add support for the experimental and largely broken linuxppc platform.

(Doesn't quite build.)

--HG--
branch : dtrg-experimental-powerpc-branch
This commit is contained in:
David Given 2016-09-15 23:12:03 +02:00
parent 4703db0fff
commit 45a950571d
8 changed files with 121 additions and 12 deletions

View file

@ -8,6 +8,7 @@ vars.plats = {
"cpm",
"linux386",
"linux68k",
"linuxppc",
"pc86",
"rpi",
}

View file

@ -0,0 +1,14 @@
for _, plat in ipairs(vars.plats) do
acklibrary {
name = "lib_"..plat,
srcs = {
"./*.s",
"./*.c"
},
vars = { plat = plat },
deps = {
"h+emheaders"
}
}
end

View file

@ -0,0 +1,8 @@
for _, plat in ipairs(vars.plats) do
acklibrary {
name = "lib_"..plat,
srcs = { "./*.s" },
vars = { plat = plat },
}
end

View file

@ -0,0 +1,25 @@
include("plat/build.lua")
ackfile {
name = "boot",
srcs = { "./boot.s" },
vars = { plat = "linuxppc" }
}
build_plat_libs {
name = "libs",
arch = "powerpc",
plat = "linuxppc",
}
installable {
name = "pkg",
map = {
"+tools",
"+libs",
"./include+pkg",
["$(PLATIND)/linuxppc/boot.o"] = "+boot",
["$(PLATIND)/linuxppc/libsys.a"] = "./libsys+lib",
}
}

View file

@ -0,0 +1,21 @@
include("plat/build.lua")
build_as {
name = "as",
arch = "powerpc",
}
build_ncg {
name = "ncg",
arch = "powerpc",
}
return installable {
name = "tools",
map = {
["$(PLATDEP)/linuxppc/as"] = "+as",
["$(PLATDEP)/linuxppc/ncg"] = "+ncg",
["$(PLATIND)/descr/linuxppc"] = "./descr",
"util/opt+pkg",
}
}

View file

@ -35,25 +35,26 @@ var C_INCLUDES=-I{PLATFORMDIR}/include -I{EM}/share/ack/include/ansi
name be
from .m.g
to .s
program {EM}/lib/ack/{ARCH}/ncg
program {EM}/lib/ack/{PLATFORM}/ncg
mapflag -gdb GF=-gdb
args {GF?} <
stdout
need .e
end
name asopt
from .s
to .so
program {EM}/lib/ack/{ARCH}/top
args
optimizer
stdin
stdout
end
# FIXME(dtrg): not working yet
#name asopt
# from .s
# to .so
# program {EM}/lib/ack/{PLATFORM}/top
# args
# optimizer
# stdin
# stdout
#end
name as
from .s.so
to .o
program {EM}/lib/ack/{ARCH}/as
program {EM}/lib/ack/{PLATFORM}/as
args - -o > <
prep cond
end
@ -74,7 +75,6 @@ name led
(.mod:{TAIL}={PLATFORMDIR}/libmodula2.a) \
(.ocm:{TAIL}={PLATFORMDIR}/liboccam.a) \
(.ocm.b.mod.c.p:{TAIL}={PLATFORMDIR}/libc.a) \
{PLATFORMDIR}/liblinux.a \
{PLATFORMDIR}/libem.a \
{PLATFORMDIR}/libsys.a \
{PLATFORMDIR}/libend.a

View file

@ -0,0 +1,24 @@
include("plat/build.lua")
headermap = {}
packagemap = {}
local function addheader(h)
headermap[h] = "./"..h
packagemap["$(PLATIND)/linuxppc/include/"..h] = "./"..h
end
addheader("ack/config.h")
addheader("sys/ioctl.h")
addheader("unistd.h")
acklibrary {
name = "headers",
hdrs = headermap
}
installable {
name = "pkg",
map = packagemap
}

View file

@ -0,0 +1,16 @@
acklibrary {
name = "lib",
srcs = {
"./*.s",
"plat/linux/libsys/*.c",
"plat/linux/libsys/*.s",
},
deps = {
"lang/cem/libcc.ansi/headers+headers",
"plat/linuxppc/include+headers",
},
vars = {
plat = "linuxppc"
}
}