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:
parent
4703db0fff
commit
45a950571d
|
@ -8,6 +8,7 @@ vars.plats = {
|
|||
"cpm",
|
||||
"linux386",
|
||||
"linux68k",
|
||||
"linuxppc",
|
||||
"pc86",
|
||||
"rpi",
|
||||
}
|
||||
|
|
14
mach/powerpc/libem/build.lua
Normal file
14
mach/powerpc/libem/build.lua
Normal 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
|
||||
|
8
mach/powerpc/libend/build.lua
Normal file
8
mach/powerpc/libend/build.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
for _, plat in ipairs(vars.plats) do
|
||||
acklibrary {
|
||||
name = "lib_"..plat,
|
||||
srcs = { "./*.s" },
|
||||
vars = { plat = plat },
|
||||
}
|
||||
end
|
||||
|
25
plat/linuxppc/build-pkg.lua
Normal file
25
plat/linuxppc/build-pkg.lua
Normal 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",
|
||||
}
|
||||
}
|
||||
|
21
plat/linuxppc/build-tools.lua
Normal file
21
plat/linuxppc/build-tools.lua
Normal 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",
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
24
plat/linuxppc/include/build.lua
Normal file
24
plat/linuxppc/include/build.lua
Normal 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
|
||||
}
|
||||
|
16
plat/linuxppc/libsys/build.lua
Normal file
16
plat/linuxppc/libsys/build.lua
Normal 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"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue