Browse Source

Move plan9-extensions option into only those places that need it

Now you can start to fix the individual things. It's not in
core.json any more.

You can start with bufio, which is a mess.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 3 years ago
parent
commit
88a59408b0
46 changed files with 119 additions and 21 deletions
  1. 0 1
      amd64/include/cflags.json
  2. 0 1
      amd64/include/klib.json
  3. 0 1
      external_example/Makefile
  4. 0 1
      riscv/include/cflags.json
  5. 0 1
      riscv/include/klib.json
  6. 0 1
      sys/src/9/boot/BUILD
  7. 0 1
      sys/src/9/boot/boot.json
  8. 0 1
      sys/src/9/riscv/core.json
  9. 0 1
      sys/src/9/riscv/inith.json
  10. 0 2
      sys/src/FLAGS
  11. 3 0
      sys/src/cmd/acme/build.json
  12. 7 2
      sys/src/cmd/aux/aux.json
  13. 3 0
      sys/src/cmd/aux/gps/gps.json
  14. 1 0
      sys/src/cmd/aux/vga/vga.json
  15. 7 2
      sys/src/cmd/build.json
  16. 3 0
      sys/src/cmd/diff/diff.json
  17. 3 0
      sys/src/cmd/disk/9660/9660.json
  18. 3 0
      sys/src/cmd/disk/disk.json
  19. 3 0
      sys/src/cmd/disk/kfs/kfs.json
  20. 3 0
      sys/src/cmd/disk/prep/fdisk.json
  21. 3 0
      sys/src/cmd/disk/prep/prep.json
  22. 1 2
      sys/src/cmd/ip/ipconfig/BUILD
  23. 3 0
      sys/src/cmd/ndb/dns.json
  24. 3 0
      sys/src/cmd/ndb/dnsdebug.json
  25. 3 0
      sys/src/cmd/ndb/dnstcp.json
  26. 3 0
      sys/src/cmd/ndb/ndb.json
  27. 3 0
      sys/src/cmd/rio/rio.json
  28. 3 0
      sys/src/cmd/sam/build.json
  29. 3 0
      sys/src/cmd/samterm/build.json
  30. 4 0
      sys/src/libauth/libauth.json
  31. 4 0
      sys/src/libauthsrv/libauthsrv.json
  32. 4 0
      sys/src/libavl/libavl.json
  33. 4 0
      sys/src/libbio/libbio.json
  34. 1 0
      sys/src/libc/klibc.json
  35. 1 0
      sys/src/libc/libc.json
  36. 4 0
      sys/src/libcontrol/libcontrol.json
  37. 4 0
      sys/src/libdisk/build.json
  38. 4 0
      sys/src/libdraw/klibdraw.json
  39. 4 0
      sys/src/libdraw/libdraw.json
  40. 4 0
      sys/src/libframe/libframe.json
  41. 4 0
      sys/src/liblex/liblex.json
  42. 3 0
      sys/src/libndb/libndb.json
  43. 6 4
      sys/src/libs.json
  44. 3 0
      sys/src/libsec/klibsec.json
  45. 3 0
      sys/src/libsec/libsec.json
  46. 1 0
      sys/src/libusb/build.json

+ 0 - 1
amd64/include/cflags.json

@@ -4,7 +4,6 @@
 			"-ffreestanding",
 			"-fno-builtin",
 			"-fno-omit-frame-pointer",
-			"-fplan9-extensions",
 			"-fvar-tracking",
 			"-fvar-tracking-assignments",
 			"-g",

+ 0 - 1
amd64/include/klib.json

@@ -3,7 +3,6 @@
 		"Cflags": [
 			"-mcmodel=kernel",
 			"-O0",
-			"-fplan9-extensions",
 			"-mno-red-zone",
 			"-ffreestanding",
 			"-fno-builtin",

+ 0 - 1
external_example/Makefile

@@ -1,7 +1,6 @@
 CFLAGS=-nostdinc \
 	-mcmodel=small \
 	-O0 \
-	-fplan9-extensions \
 	-mno-red-zone \
 	-ffreestanding \
 	-fno-builtin \

+ 0 - 1
riscv/include/cflags.json

@@ -4,7 +4,6 @@
 			"-ffreestanding",
 			"-fno-builtin",
 			"-fno-omit-frame-pointer",
-			"-fplan9-extensions",
 			"-fvar-tracking",
 			"-fvar-tracking-assignments",
 			"-g",

+ 0 - 1
riscv/include/klib.json

@@ -2,7 +2,6 @@
 	"KernelLibs": {
 		"Cflags": [
 			"-O0",
-			"-fplan9-extensions",
 			"-ffreestanding",
 			"-fno-builtin",
 			"-Wall",

+ 0 - 1
sys/src/9/boot/BUILD

@@ -19,7 +19,6 @@ cc_library(
         "-Wno-unknown-pragmas",
         "-O0",
         "-static",
-        "-fplan9-extensions",
         "-mno-red-zone",
         "-ffreestanding",
         "-fno-builtin",

+ 0 - 1
sys/src/9/boot/boot.json

@@ -8,7 +8,6 @@
 			"-Wno-unknown-pragmas",
 			"-O0",
 			"-static",
-			"-fplan9-extensions",
 			"-ffreestanding",
 			"-fno-builtin"
 		],

+ 0 - 1
sys/src/9/riscv/core.json

@@ -3,7 +3,6 @@
 		"Cflags": [
 			"-O0",
 			"-static",
-			"-fplan9-extensions",
 			"-ffreestanding",
 			"-fno-builtin",
 			"-DKERNDATE=1433623937",

+ 0 - 1
sys/src/9/riscv/inith.json

@@ -8,7 +8,6 @@
 			"-Wno-unknown-pragmas",
 			"-O0",
 			"-static",
-			"-fplan9-extensions",
 			"-ffreestanding",
 			"-fno-builtin"
 		],

+ 0 - 2
sys/src/FLAGS

@@ -40,7 +40,6 @@ CMD_LINK_OPTS = [
 KLIB_COMPILER_FLAGS = [
 	"-mcmodel=kernel",
 	"-O0",
-	"-fplan9-extensions",
 	"-mno-red-zone",
 	"-ffreestanding",
 	"-fno-builtin",
@@ -59,7 +58,6 @@ LIB_COMPILER_FLAGS = [
     "-ffreestanding",
     "-fno-builtin",
     "-fno-omit-frame-pointer",
-    "-fplan9-extensions",
     "-fvar-tracking",
     "-fvar-tracking-assignments",
     "-g",

+ 3 - 0
sys/src/cmd/acme/build.json

@@ -1,5 +1,8 @@
 {
 	"acme": {
+	    "CFlags": [
+		    "-fplan9-extensions"
+		],
 		"Include": [
 			"../cmd.json"
 		],

+ 7 - 2
sys/src/cmd/aux/aux.json

@@ -1,12 +1,17 @@
 {
 	"Aux": {
+	    "CFlags": [
+		"-fplan9-extensions"
+		],
 		"Include": [
 			"../cmd.json"
 		],
 		"Install": "/$ARCH/bin/aux",
-		"Projects": [
+	    "WhoCares": [
 			"mnihongo/mnihongo.json",
-			"flashfs/flashfs.json",
+			"flashfs/flashfs.json"
+		],
+		"Projects": [
 			"console/screenconsole.json",
 			"console/comconsole.json",
 			"console/pipeconsole.json",

+ 3 - 0
sys/src/cmd/aux/gps/gps.json

@@ -1,5 +1,8 @@
 {
 	"gpsfs": {
+	    "CFlags": [
+		"-fplan9-extensions"
+		],
 		"Include": [
 			"../../cmd.json"
 		],

+ 1 - 0
sys/src/cmd/aux/vga/vga.json

@@ -1,6 +1,7 @@
 {
 	"vga": {
 		"Cflags": [
+		    "-fplan9-extensions",
 			"-I", "/"
 		],
 		"Include": [

+ 7 - 2
sys/src/cmd/build.json

@@ -1,5 +1,8 @@
 {
 	"Cmd": {
+		"CFlags": [
+			"-fplan9-extensions"
+		],
 		"Include": [
 			"cmd.json"
 		],
@@ -135,6 +138,10 @@
 			"cmd.json"
 		],
 		"Install": "/$ARCH/bin/",
+		"WhoCares": [
+			"cdfs/cdfs.json",
+			"cifs/cifs.json"
+		],
 		"Projects": [
 			"9660srv/9660srv.json",
 			"acme/build.json",
@@ -143,8 +150,6 @@
 			"aux/aux.json",
 			"bzip2/bzip2.json",
 			"cb/cb.json",
-			"cdfs/cdfs.json",
-			"cifs/cifs.json",
 			"con/con.json",
 			"dial/dial.json",
 			"diff/diff.json",

+ 3 - 0
sys/src/cmd/diff/diff.json

@@ -1,5 +1,8 @@
 {
 	"diff": {
+	"CFlags": [
+		"-fplan9-extensions"
+	],
 		"Include": [
 			"../cmd.json"
 		],

+ 3 - 0
sys/src/cmd/disk/9660/9660.json

@@ -1,5 +1,8 @@
 {
 	"dump9660": {
+		"CFlags": [
+		"-fplan9-extensions"
+		],
 		"Include": [
 			"../../cmd.json"
 		],

+ 3 - 0
sys/src/cmd/disk/disk.json

@@ -1,5 +1,8 @@
 {
 	"disk": {
+		"CFlags": [
+		"-fplan9-extensions"
+		],
 		"Include": [
 			"../cmd.json"
 		],

+ 3 - 0
sys/src/cmd/disk/kfs/kfs.json

@@ -1,5 +1,8 @@
 {
 	"kfs": {
+		"CFlags": [
+		"-fplan9-extensions"
+		],
 		"Include": [
 			"../../cmd.json"
 		],

+ 3 - 0
sys/src/cmd/disk/prep/fdisk.json

@@ -1,5 +1,8 @@
 {
 	"fdisk": {
+		"CFlags": [
+		"-fplan9-extensions"
+		],
 		"Include": [
 			"../../cmd.json"
 		],

+ 3 - 0
sys/src/cmd/disk/prep/prep.json

@@ -1,5 +1,8 @@
 {
 	"prep": {
+		"CFlags": [
+		"-fplan9-extensions"
+		],
 		"Include": [
 			"../../cmd.json"
 		],

+ 1 - 2
sys/src/cmd/ip/ipconfig/BUILD

@@ -17,7 +17,6 @@ cc_binary(
 		"-std=c11",
 		"-mcmodel=small",
 		"-O0",
-		"-fplan9-extensions",
 		"-mno-red-zone",
 		"-ffreestanding",
 		"-fno-builtin",
@@ -42,4 +41,4 @@ cc_binary(
 		"main.c",
 		"ppp.c",
 	],
-)
+)

+ 3 - 0
sys/src/cmd/ndb/dns.json

@@ -1,5 +1,8 @@
 {
 	"dns": {
+	"CFlags": [
+		"-fplan9-extensions"
+	],
 		"Include": [
 			"../cmd.json"
 		],

+ 3 - 0
sys/src/cmd/ndb/dnsdebug.json

@@ -1,5 +1,8 @@
 {
 	"dnsdebug": {
+	"CFlags": [
+		"-fplan9-extensions"
+	],
 		"Include": [
 			"/sys/src/cmd/cmd.json"
 		],

+ 3 - 0
sys/src/cmd/ndb/dnstcp.json

@@ -1,5 +1,8 @@
 {
 	"dnstcp": {
+	"CFlags": [
+		"-fplan9-extensions"
+	],
 		"Include": [
 			"/sys/src/cmd/cmd.json"
 		],

+ 3 - 0
sys/src/cmd/ndb/ndb.json

@@ -1,5 +1,8 @@
 {
 	"ndb": {
+	"CFlags": [
+		"-fplan9-extensions"
+	],
 		"Include": [
 			"/sys/src/cmd/cmd.json"
 		],

+ 3 - 0
sys/src/cmd/rio/rio.json

@@ -1,5 +1,8 @@
 {
 	"rio": {
+		"CFlags": [
+		"-fplan9-extensions"
+		],
 		"Include": [
 			"/sys/src/cmd/cmd.json"
 		],

+ 3 - 0
sys/src/cmd/sam/build.json

@@ -1,5 +1,8 @@
 {
 	"sam": {
+	"CFlags": [
+		"-fplan9-extensions"
+	],
 		"Include": [
 			"../cmd.json"
 		],

+ 3 - 0
sys/src/cmd/samterm/build.json

@@ -1,5 +1,8 @@
 {
 	"samterm": {
+	"CFlags": [
+		"-fplan9-extensions"
+	],
 		"Include": [
 			"../cmd.json"
 		],

+ 4 - 0
sys/src/libauth/libauth.json

@@ -1,5 +1,9 @@
 {
 	"libauth": {
+		"Cflags": [
+			"-fplan9-extensions",
+			"-Werror"
+		],
 		"Include": [
 			"../lib.json"
 		],

+ 4 - 0
sys/src/libauthsrv/libauthsrv.json

@@ -1,5 +1,9 @@
 {
 	"libauthsrv": {
+		"Cflags": [
+			"-fplan9-extensions",
+			"-Werror"
+		],
 		"Include": [
 			"../lib.json"
 		],

+ 4 - 0
sys/src/libavl/libavl.json

@@ -1,5 +1,9 @@
 {
 	"libavl": {
+		"Cflags": [
+			"-fplan9-extensions",
+			"-Werror"
+		],
 		"Include": [
 			"../lib.json"
 		],

+ 4 - 0
sys/src/libbio/libbio.json

@@ -1,5 +1,9 @@
 {
 	"libbio": {
+		"Cflags": [
+			"-fplan9-extensions",
+			"-Werror"
+		],
 		"Include": [
 			"../lib.json"
 		],

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

@@ -1,6 +1,7 @@
 {
 	"KernelLibc": {
 		"Cflags": [
+			"-fplan9-extensions",
 			"-fasm",
 			"-Werror"
 		],

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

@@ -1,6 +1,7 @@
 {
 "Libc": {
 	"Cflags": [
+		"-fplan9-extensions",
 		"-fasm",
 		"-Werror"
 	],

+ 4 - 0
sys/src/libcontrol/libcontrol.json

@@ -1,5 +1,9 @@
 {
 	"libcontrol": {
+		"Cflags": [
+		    "-fplan9-extensions",
+			"-Werror"
+		],
 		"Include": [
 			"../lib.json"
 		],

+ 4 - 0
sys/src/libdisk/build.json

@@ -1,5 +1,9 @@
 {
 	"libdisk": {
+		"Cflags": [
+		    "-fplan9-extensions",
+			"-Werror"
+		],
 		"Include": [
 			"../lib.json"
 		],

+ 4 - 0
sys/src/libdraw/klibdraw.json

@@ -1,5 +1,9 @@
 {
 	"KernelLibdraw": {
+		"Cflags": [
+			"-fplan9-extensions",
+			"-Werror"
+		],
 		"Include": [
 			"/$ARCH/include/klib.json"
 		],

+ 4 - 0
sys/src/libdraw/libdraw.json

@@ -1,5 +1,9 @@
 {
 	"Libdraw": {
+		"Cflags": [
+			"-fplan9-extensions",
+			"-Werror"
+		],
 		"Include": [
 			"../lib.json"
 		],

+ 4 - 0
sys/src/libframe/libframe.json

@@ -1,5 +1,9 @@
 {
 	"libframe": {
+		"Cflags": [
+		    "-fplan9-extensions",
+			"-Werror"
+		],
 		"Include": [
 			"../lib.json"
 		],

+ 4 - 0
sys/src/liblex/liblex.json

@@ -1,5 +1,9 @@
 {
 	"liblex": {
+		"Cflags": [
+		    "-fplan9-extensions",
+			"-Werror"
+		],
 		"Include": [
 			"../lib.json"
 		],

+ 3 - 0
sys/src/libndb/libndb.json

@@ -1,5 +1,8 @@
 {
 	"libndb": {
+	    "CFlags": [
+		"-fplan9-extensions"
+		],
 		"Include": [
 			"../lib.json"
 		],

+ 6 - 4
sys/src/libs.json

@@ -1,11 +1,15 @@
 {
 	"libs.json": {
+		"WhoCares": [
+			"/sys/src/libmach/libmach.json",
+			"/sys/src/libString/libString.json",
+			"/sys/src/libstdio/libstdio.json",
+			"/sys/src/lib9p/lib9p.json"
+		],
 		"Projects": [
 			"/sys/src/libc/libc.json",
 			"/sys/src/libip/libip.json",
 			"/sys/src/libdraw/libdraw.json",
-			"/sys/src/lib9p/lib9p.json",
-			"/sys/src/libString/libString.json",
 			"/sys/src/libauth/libauth.json",
 			"/sys/src/libauthsrv/libauthsrv.json",
 			"/sys/src/libavl/libavl.json",
@@ -19,7 +23,6 @@
 			"/sys/src/libgeometry/libgeometry.json",
 			"/sys/src/libhttpd/libhttpd.json",
 			"/sys/src/liblex/liblex.json",
-			"/sys/src/libmach/libmach.json",
 			"/sys/src/libmemdraw/libmemdraw.json",
 			"/sys/src/libmemlayer/libmemlayer.json",
 			"/sys/src/libmp/libmp.json",
@@ -28,7 +31,6 @@
 			"/sys/src/libplumb/libplumb.json",
 			"/sys/src/libregexp/libregexp.json",
 			"/sys/src/libsec/libsec.json",
-			"/sys/src/libstdio/libstdio.json",
 			"/sys/src/libthread/libthread.json",
 			"/sys/src/libusb",
 			"/sys/src/libventi/libventi.json"

+ 3 - 0
sys/src/libsec/klibsec.json

@@ -1,5 +1,8 @@
 {
 	"Kernellibsec": {
+		"CFlags": [
+			"-fplan9-extensions"
+		],
 		"Include": [
 			"/$ARCH/include/klib.json"
 		],

+ 3 - 0
sys/src/libsec/libsec.json

@@ -1,5 +1,8 @@
 {
 	"libsec": {
+		"CFlags": [
+			"-fplan9-extensions"
+		],
 		"Include": [
 			"../lib.json"
 		],

+ 1 - 0
sys/src/libusb/build.json

@@ -1,6 +1,7 @@
 {
 	"Libusb": {
 		"Cflags": [
+		    "-fplan9-extensions",
 			"-fasm",
 			"-Werror"
 		],