Browse Source

Build only kernel with -mno-implicit-float with clang

Fixes issue with float varargs, but breaks some fpu tests (to be investigated)

Signed-off-by: Graham MacDonald <grahamamacdonald@gmail.com>
Graham MacDonald 10 months ago
parent
commit
66a1ca4a33

+ 0 - 1
amd64/clang-3.4.json

@@ -2,7 +2,6 @@
 	{
 		"Name": "buildflags",
 		"Cflags": [
-			"-mno-implicit-float"
 		]
 	}
 ]

+ 0 - 1
amd64/clang-3.5.json

@@ -2,7 +2,6 @@
 	{
 		"Name": "buildflags",
 		"Cflags": [
-			"-mno-implicit-float"
 		]
 	}
 ]

+ 0 - 1
amd64/clang-3.6.json

@@ -2,7 +2,6 @@
 	{
 		"Name": "buildflags",
 		"Cflags": [
-			"-mno-implicit-float"
 		]
 	}
 ]

+ 0 - 1
amd64/clang-3.7.json

@@ -2,7 +2,6 @@
 	{
 		"Name": "buildflags",
 		"Cflags": [
-			"-mno-implicit-float"
 		]
 	}
 ]

+ 0 - 1
amd64/clang-3.8.json

@@ -2,7 +2,6 @@
 	{
 		"Name": "buildflags",
 		"Cflags": [
-			"-mno-implicit-float"
 		]
 	}
 ]

+ 0 - 1
amd64/clang-3.9.json

@@ -2,7 +2,6 @@
 	{
 		"Name": "buildflags",
 		"Cflags": [
-			"-mno-implicit-float"
 		]
 	}
 ]

+ 0 - 1
amd64/clang-4.0.json

@@ -2,7 +2,6 @@
 	{
 		"Name": "buildflags",
 		"Cflags": [
-			"-mno-implicit-float"
 		]
 	}
 ]

+ 0 - 1
amd64/clang-6.0.json

@@ -2,7 +2,6 @@
 	{
 		"Name": "buildflags",
 		"Cflags": [
-			"-mno-implicit-float"
 		]
 	}
 ]

+ 0 - 1
amd64/clang.json

@@ -2,7 +2,6 @@
 	{
 		"Name": "buildflags",
 		"Cflags": [
-			"-mno-implicit-float"
 		]
 	}
 ]

+ 7 - 4
build.json

@@ -2,13 +2,16 @@
 	{
 		"Name": "all",
 		"Projects": [
-			"/sys/src/klibs.json",
 			"/sys/src/libs.json",
 			"/sys/src/cmd",
-			"/sys/src/games/games.json",
-			"/acme/build.json",
+
+			"/sys/src/klibs.json",
+			"/sys/src/9/$ARCH",
+
 			"/sys/src/regress",
-			"/sys/src/9/$ARCH"
+
+			"/acme/build.json",
+			"/sys/src/games/games.json"
 		]
 	}
 ]

+ 1 - 1
rc/bin/tests/runall

@@ -3,7 +3,7 @@
 # Script to run all tests in 'tests'.  If any test fails, this script fails.
 
 # Skip folders or files beginning in '_'
-tests=`{du -a /bin/regress | awk '{print $2}' | grep -v /_}
+tests=`{du -a /bin/regress | field 2 | grep -v /_}
 
 finalstatus=PASS
 for (file in $tests) {

+ 29 - 0
sys/src/9/amd64/cflags.json

@@ -0,0 +1,29 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-ffreestanding",
+			"-fno-builtin",
+			"-fno-omit-frame-pointer",
+			"-fno-stack-protector",
+			"-g",
+			"-gdwarf-2",
+			"-ggdb",
+			"-mcmodel=small",
+			"-mno-red-zone",
+			"-O0",
+			"-static",
+			"-Wall",
+			"-Werror"
+		],
+		"Oflags": [
+			"-z",
+			"noseparate-code",
+			"-z",
+			"max-page-size=0x200000"
+		],
+		"Include": [
+			"/$ARCH/$CC.json"
+		]
+	}
+]

+ 8 - 0
sys/src/9/amd64/clang-3.4.json

@@ -0,0 +1,8 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-mno-implicit-float"
+		]
+	}
+]

+ 8 - 0
sys/src/9/amd64/clang-3.5.json

@@ -0,0 +1,8 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-mno-implicit-float"
+		]
+	}
+]

+ 8 - 0
sys/src/9/amd64/clang-3.6.json

@@ -0,0 +1,8 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-mno-implicit-float"
+		]
+	}
+]

+ 8 - 0
sys/src/9/amd64/clang-3.7.json

@@ -0,0 +1,8 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-mno-implicit-float"
+		]
+	}
+]

+ 8 - 0
sys/src/9/amd64/clang-3.8.json

@@ -0,0 +1,8 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-mno-implicit-float"
+		]
+	}
+]

+ 8 - 0
sys/src/9/amd64/clang-3.9.json

@@ -0,0 +1,8 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-mno-implicit-float"
+		]
+	}
+]

+ 8 - 0
sys/src/9/amd64/clang-4.0.json

@@ -0,0 +1,8 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-mno-implicit-float"
+		]
+	}
+]

+ 8 - 0
sys/src/9/amd64/clang-6.0.json

@@ -0,0 +1,8 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-mno-implicit-float"
+		]
+	}
+]

+ 8 - 0
sys/src/9/amd64/clang.json

@@ -0,0 +1,8 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-mno-implicit-float"
+		]
+	}
+]

+ 1 - 1
sys/src/9/amd64/core.json

@@ -24,7 +24,7 @@
 			"/sys/src/libc/9syscall"
 		],
 		"Include": [
-			"/$ARCH/$CC.json"
+			"$CC.json"
 		],
 		"Libs": [
 			"/$ARCH/lib/klibmemlayer.a",

+ 10 - 0
sys/src/9/amd64/gcc-4.8.json

@@ -0,0 +1,10 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-fno-pie",
+			"-fvar-tracking",
+			"-fvar-tracking-assignments"
+		]
+	}
+]

+ 10 - 0
sys/src/9/amd64/gcc-5.json

@@ -0,0 +1,10 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-fno-pie",
+			"-fvar-tracking",
+			"-fvar-tracking-assignments"
+		]
+	}
+]

+ 10 - 0
sys/src/9/amd64/gcc-6.json

@@ -0,0 +1,10 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-fno-pie",
+			"-fvar-tracking",
+			"-fvar-tracking-assignments"
+		]
+	}
+]

+ 10 - 0
sys/src/9/amd64/gcc-7.json

@@ -0,0 +1,10 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-fno-pie",
+			"-fvar-tracking",
+			"-fvar-tracking-assignments"
+		]
+	}
+]

+ 10 - 0
sys/src/9/amd64/gcc-8.json

@@ -0,0 +1,10 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-fno-pie",
+			"-fvar-tracking",
+			"-fvar-tracking-assignments"
+		]
+	}
+]

+ 10 - 0
sys/src/9/amd64/gcc.json

@@ -0,0 +1,10 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+			"-fno-pie",
+			"-fvar-tracking",
+			"-fvar-tracking-assignments"
+		]
+	}
+]

+ 8 - 0
sys/src/9/amd64/icc.json

@@ -0,0 +1,8 @@
+[
+	{
+		"Name": "buildflags",
+		"Cflags": [
+				"-Wno-main
+			]
+	}
+]

+ 1 - 1
amd64/klib.json

@@ -13,7 +13,7 @@
 			"-g"
 		],
 		"Include": [
-			"/$ARCH/$CC.json"
+			"$CC.json"
 		],
 		"Oflags": [
 			"-static"

+ 1 - 5
sys/src/9/boot/bootconf.json

@@ -12,11 +12,7 @@
 		],
 		"Oflags": [
 			"-e_main",
-			"-static",
-			"-z",
-			"noseparate-code",
-			"-z",
-			"max-page-size=0x200000"
+			"-static"
 		],
 		"Post": [
 			"rm -f *.o *.a",

+ 1 - 1
sys/src/libc/klibc.json

@@ -5,7 +5,7 @@
 			"-fasm"
 		],
 		"Include": [
-			"/$ARCH/klib.json",
+			"/sys/src/9/$ARCH/klib.json",
 			"$ARCH/build.json"
 		],
 		"Install": "/$ARCH/lib/",

+ 1 - 1
sys/src/libdraw/klibdraw.json

@@ -2,7 +2,7 @@
 	{
 		"Name": "KernelLibdraw",
 		"Include": [
-			"/$ARCH/klib.json"
+			"/sys/src/9/$ARCH/klib.json"
 		],
 		"Install": "/$ARCH/lib/",
 		"Library": "klibdraw.a",

+ 1 - 1
sys/src/libip/klibip.json

@@ -2,7 +2,7 @@
 	{
 		"Name": "KernelLibip",
 		"Include": [
-			"/$ARCH/klib.json"
+			"/sys/src/9/$ARCH/klib.json"
 		],
 		"Install": "/$ARCH/lib/",
 		"Library": "klibip.a",

+ 1 - 1
sys/src/libmemdraw/klibmemdraw.json

@@ -2,7 +2,7 @@
 	{
 		"Name": "KernelLibmemdraw",
 		"Include": [
-			"/$ARCH/klib.json"
+			"/sys/src/9/$ARCH/klib.json"
 		],
 		"Install": "/$ARCH/lib/",
 		"Library": "klibmemdraw.a",

+ 1 - 1
sys/src/libmemlayer/klibmemlayer.json

@@ -2,7 +2,7 @@
 	{
 		"Name": "KernelLibmemlayer",
 		"Include": [
-			"/$ARCH/klib.json"
+			"/sys/src/9/$ARCH/klib.json"
 		],
 		"Install": "/$ARCH/lib/",
 		"Library": "klibmemlayer.a",

+ 1 - 1
sys/src/libsec/klibsec.json

@@ -2,7 +2,7 @@
 	{
 		"Name": "Kernellibsec",
 		"Include": [
-			"/$ARCH/klib.json"
+			"/sys/src/9/$ARCH/klib.json"
 		],
 		"Install": "/$ARCH/lib/",
 		"Library": "klibsec.a",

+ 1 - 1
sys/src/libufs/klibufs.json

@@ -2,7 +2,7 @@
 	{
 		"Name": "Kernellibufs",
 		"Include": [
-			"/$ARCH/klib.json"
+			"/sys/src/9/$ARCH/klib.json"
 		],
 		"Install": "/$ARCH/lib/",
 		"Library": "klibufs.a",

+ 2 - 1
sys/src/regress/build.json

@@ -3,7 +3,8 @@
 		"Name": "Regress",
 		"Projects": [
 			"_old",
-			"fpu"
+			"fpu",
+			"libc"
 		],
 		"Include": [
 			"/sys/src/cmd/cmd.json"

+ 12 - 0
sys/src/regress/libc/build.json

@@ -0,0 +1,12 @@
+[
+	{
+		"Name": "libc",
+		"Include": [
+			"/sys/src/cmd/cmd.json"
+		],
+		"Install": "/$ARCH/bin/regress/libc",
+		"SourceFilesCmd": [
+			"*.c"
+		]
+	}
+]

sys/src/regress/_old/vseprint.c → sys/src/regress/libc/vseprint.c