Skip to content

Commit f5dab4c

Browse files
committed
linuxppc now builds.
1 parent eca5fd7 commit f5dab4c

File tree

7 files changed

+87
-1
lines changed

7 files changed

+87
-1
lines changed

build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from build.ab import export
22

3-
PLATS = ["pc86", "cpm", "linux386", "linux68k"]
3+
PLATS = ["pc86", "cpm", "linux386", "linux68k", "linuxppc"]
44

55
# This contains the platform-independent host tooling required to build the plats.
66
export(

mach/powerpc/libem/build.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from build import PLATS
2+
from build.ack import ackclibrary
3+
from glob import glob
4+
5+
for plat in PLATS:
6+
ackclibrary(
7+
name=f"lib_{plat}",
8+
srcs=glob("mach/powerpc/libem/*.s"),
9+
plat=plat,
10+
)

mach/powerpc/libend/build.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from build import PLATS
2+
from build.ack import ackclibrary
3+
4+
for plat in PLATS:
5+
ackclibrary(
6+
name=f"lib_{plat}",
7+
srcs=[
8+
"./edata.s",
9+
"./em_end.s",
10+
"./end.s",
11+
"./etext.s",
12+
],
13+
plat=plat,
14+
)

mach/powerpc/ncg/build.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from build.c import clibrary
2+
3+
clibrary(name="ncg", hdrs={"mach.h": "./mach.h", "mach.c": "./mach.c"})

plat/linuxppc/build.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
from build.ab import export
2+
from build.ack import ackcfile
3+
from mach.proto.ncg.build import build_ncg
4+
from mach.proto.top.build import build_top
5+
from plat.build import build_plat_libs
6+
import importlib
7+
8+
build_as = importlib.import_module("mach.proto.as.build").build_as
9+
10+
build_as(name="as", arch="powerpc")
11+
build_ncg(name="ncg", arch="powerpc")
12+
build_top(name="top", arch="powerpc")
13+
build_plat_libs(name="plat_libs", arch="powerpc", plat="linuxppc")
14+
15+
ackcfile(name="boot", srcs=["./boot.s"], plat="linuxppc")
16+
17+
export(
18+
name="tools",
19+
items={
20+
"$(PLATDEP)/linuxppc/as": ".+as",
21+
"$(PLATDEP)/linuxppc/ncg": ".+ncg",
22+
"$(PLATDEP)/linuxppc/top": ".+top",
23+
"$(PLATIND)/descr/linuxppc": "./descr",
24+
},
25+
)
26+
27+
export(
28+
name="all",
29+
items={
30+
"$(PLATIND)/linuxppc/boot.o": ".+boot",
31+
"$(PLATIND)/linuxppc/libsys.a": "./libsys",
32+
},
33+
deps=[
34+
".+tools",
35+
".+plat_libs",
36+
"util/ack+all",
37+
"plat/linuxppc/include+all",
38+
],
39+
)

plat/linuxppc/include/build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from build.ab import export
2+
from build.ack import clibrary
3+
4+
clibrary(name="include", deps=["plat/linux/include"])
5+
6+
export(name="all", deps=["plat/linux/include+all"])

plat/linuxppc/libsys/build.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from build.ack import ackclibrary
2+
from glob import glob
3+
4+
ackclibrary(
5+
name="libsys",
6+
plat="linuxppc",
7+
srcs=(
8+
glob("plat/linuxppc/libsys/*.s")
9+
+ glob("plat/linux/libsys/*.c")
10+
+ glob("plat/linux/libsys/*.s")
11+
+ glob("plat/linux/libsys/*.h")
12+
),
13+
deps=["lang/cem/libcc.ansi/headers", "plat/linuxppc/include"],
14+
)

0 commit comments

Comments
 (0)