Browse Source

More clang changes to fix exceptions when using SSE code

vseprint test now passes.  Also remove -mno-red-zone switch for user cflags.

Signed-off-by: Graham MacDonald <grahamamacdonald@gmail.com>
Graham MacDonald 5 years ago
parent
commit
cd68ec9c16
4 changed files with 6 additions and 2 deletions
  1. 0 1
      amd64/cflags.json
  2. 1 0
      amd64/clang.json
  3. 3 0
      sys/src/libacpi/acpica/acpiflags.json
  4. 2 1
      sys/src/regress/libc/vseprint.c

+ 0 - 1
amd64/cflags.json

@@ -10,7 +10,6 @@
 			"-gdwarf-2",
 			"-ggdb",
 			"-mcmodel=small",
-			"-mno-red-zone",
 			"-O0",
 			"-static",
 			"-Wall",

+ 1 - 0
amd64/clang.json

@@ -2,6 +2,7 @@
 	{
 		"Name": "buildflags",
 		"Cflags": [
+			"-mstack-alignment=4"
 		]
 	}
 ]

+ 3 - 0
sys/src/libacpi/acpica/acpiflags.json

@@ -31,6 +31,9 @@
 			"-I",
 			"/sys/include/acpi/acpica"
 		],
+		"Include": [
+			"/$ARCH/$CC.json"
+		],
 		"IncludeCanNotUsedWUnusedYet": [
 			"../../lib.json"
 		],

+ 2 - 1
sys/src/regress/libc/vseprint.c

@@ -10,6 +10,7 @@
 
 #include <u.h>
 #include <libc.h>
+
 void
 testvseprint(char *buf, int n, char *fmt, ...)
 {
@@ -33,5 +34,5 @@ main()
 	}
 
 	print("PASS\n");
-	exits("PASS");
+	exits(nil);
 }