Browse Source

First steps to build for clang aarch64

Signed-off-by: Graham MacDonald <grahamamacdonald@gmail.com>
Graham MacDonald 5 months ago
parent
commit
c86b843356
3 changed files with 16 additions and 4 deletions
  1. 4 1
      aarch64/cflags.json
  2. 8 0
      aarch64/clang.json
  3. 4 3
      sys/src/9/aarch64/clean.json

+ 4 - 1
aarch64/cflags.json

@@ -12,6 +12,9 @@
 			"-static",
 			"-Wall",
 			"-Werror"
+		],
+		"Include": [
+			"/$ARCH/$CC.json"
 		]
 	}
-]
+]

+ 8 - 0
aarch64/clang.json

@@ -0,0 +1,8 @@
+[
+        {
+                "Name": "buildflags",
+                "Cflags": [
+                        "--target=aarch64-none-elf"
+                ]
+        }
+]

+ 4 - 3
sys/src/9/aarch64/clean.json

@@ -1,7 +1,8 @@
-{
-	"clean": {
+[
+	{
+		"Name": "clean",
 		"Pre": [
 			"rm -f systab.c harvey aarch64.c cpu.c *.o *.root.c *.out errstr.h init.h init ../boot/libboot.a ../boot/*.o boot*.c"
 		]
 	}
-}
+]