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", "cpm",
"linux386", "linux386",
"linux68k", "linux68k",
"linuxppc",
"pc86", "pc86",
"rpi", "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 name be
from .m.g from .m.g
to .s to .s
program {EM}/lib/ack/{ARCH}/ncg program {EM}/lib/ack/{PLATFORM}/ncg
mapflag -gdb GF=-gdb mapflag -gdb GF=-gdb
args {GF?} < args {GF?} <
stdout stdout
need .e need .e
end end
name asopt # FIXME(dtrg): not working yet
from .s #name asopt
to .so # from .s
program {EM}/lib/ack/{ARCH}/top # to .so
args # program {EM}/lib/ack/{PLATFORM}/top
optimizer # args
stdin # optimizer
stdout # stdin
end # stdout
#end
name as name as
from .s.so from .s.so
to .o to .o
program {EM}/lib/ack/{ARCH}/as program {EM}/lib/ack/{PLATFORM}/as
args - -o > < args - -o > <
prep cond prep cond
end end
@ -74,7 +75,6 @@ name led
(.mod:{TAIL}={PLATFORMDIR}/libmodula2.a) \ (.mod:{TAIL}={PLATFORMDIR}/libmodula2.a) \
(.ocm:{TAIL}={PLATFORMDIR}/liboccam.a) \ (.ocm:{TAIL}={PLATFORMDIR}/liboccam.a) \
(.ocm.b.mod.c.p:{TAIL}={PLATFORMDIR}/libc.a) \ (.ocm.b.mod.c.p:{TAIL}={PLATFORMDIR}/libc.a) \
{PLATFORMDIR}/liblinux.a \
{PLATFORMDIR}/libem.a \ {PLATFORMDIR}/libem.a \
{PLATFORMDIR}/libsys.a \ {PLATFORMDIR}/libsys.a \
{PLATFORMDIR}/libend.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"
}
}