|
@@ -235,7 +235,7 @@ objcopy(
|
|
|
outfile="elf32-i386",
|
|
|
)
|
|
|
|
|
|
-HRVYDEPS =[
|
|
|
+HRVYDEPS = [
|
|
|
":amd64cpu",
|
|
|
":error",
|
|
|
":errstr",
|
|
@@ -243,34 +243,36 @@ HRVYDEPS =[
|
|
|
":sys",
|
|
|
":inith",
|
|
|
]
|
|
|
+STD_COMPILER_OPTIONS = [
|
|
|
+ "-mcmodel=kernel",
|
|
|
+ "-O0",
|
|
|
+ "-static",
|
|
|
+ "-mno-red-zone",
|
|
|
+ "-ffreestanding",
|
|
|
+ "-fno-builtin",
|
|
|
+ "-DKERNDATE=1433623937",
|
|
|
+ "-g",
|
|
|
+ "-Wall",
|
|
|
+ "-Werror",
|
|
|
+ "-W",
|
|
|
+ "-Wno-sign-compare",
|
|
|
+ "-Wno-missing-field-initializers",
|
|
|
+ "-Wno-unused-parameter",
|
|
|
+ "-Wno-unused-function",
|
|
|
+ "-Wno-missing-braces",
|
|
|
+ "-Wno-parentheses",
|
|
|
+ "-Wno-unknown-pragmas",
|
|
|
+ "-D__HARVEY__",
|
|
|
+ "-U_LINUX",
|
|
|
+ "-U__linux__",
|
|
|
+ "-fasm",
|
|
|
+]
|
|
|
+
|
|
|
+load("//sys/src/9/amd64/${CC}.BUILD", "COMPILER_FLAGS")
|
|
|
|
|
|
cc_binary(
|
|
|
name="harvey",
|
|
|
- copts=[
|
|
|
- # "-c", this is always on
|
|
|
- "-std=c11",
|
|
|
- "-mcmodel=kernel",
|
|
|
- "-O0",
|
|
|
- "-static",
|
|
|
- "-mno-red-zone",
|
|
|
- "-ffreestanding",
|
|
|
- "-fno-builtin",
|
|
|
- "-DKERNDATE=1433623937",
|
|
|
- "-g",
|
|
|
- "-Wall",
|
|
|
- "-W",
|
|
|
- "-Wno-unused-function",
|
|
|
- "-Wno-sign-compare",
|
|
|
- "-Wno-missing-field-initializers",
|
|
|
- "-Wno-unused-parameter",
|
|
|
- "-Wno-missing-braces",
|
|
|
- "-Wno-parentheses",
|
|
|
- "-Wno-unknown-pragmas",
|
|
|
- "-D__HARVEY__",
|
|
|
- "-U_LINUX",
|
|
|
- "-U__linux__",
|
|
|
- "-fasm",
|
|
|
- ],
|
|
|
+ copts=STD_COMPILER_OPTIONS + COMPILER_FLAGS,
|
|
|
srcs=AMD64SRCS,
|
|
|
includes=[
|
|
|
"//sys/include",
|