Added: new boot.S, serial out for Xeon Phi
[barrelfish] / hake / K1om.hs
index 43ce464..8d4f72a 100644 (file)
@@ -28,21 +28,31 @@ import qualified ArchDefaults
 arch = "k1om"
 archFamily = "k1om"
 
-compiler = "x86_64-k1om-barrelfish-gcc"
-objcopy  = "x86_64-k1om-barrelfish-objcopy"
-objdump  = "x86_64-k1om-barrelfish-objdump"
-ar       = "x86_64-k1om-barrelfish-ar"
-ranlib   = "x86_64-k1om-barrelfish-ranlib"
-cxxcompiler = "x86_64-k1om-barrelfish-g++"
+--compiler = "x86_64-k1om-barrelfish-gcc"
+--objcopy  = "x86_64-k1om-barrelfish-objcopy"
+--objdump  = "x86_64-k1om-barrelfish-objdump"
+--ar       = "x86_64-k1om-barrelfish-ar"
+--ranlib   = "x86_64-k1om-barrelfish-ranlib"
+--cxxcompiler = "x86_64-k1om-barrelfish-g++"
+
+
+compiler = "gcc"
+objcopy  = "objcopy"
+objdump  = "objdump"
+ar       = "ar"
+ranlib   = "ranlib"
+cxxcompiler = "g++"
 
 
 ourCommonFlags = [ Str "-m64",
                    Str "-mno-red-zone",
-                   Str "-fPIE",
+                  -- Str "-fPIE",
+                   Str "-fPIC",
                    Str "-fno-stack-protector", 
                    Str "-Wno-unused-but-set-variable",
                    Str "-Wno-packed-bitfield-compat",
 -- the intel mic architecture has no "normal" SIMD extensions
+                   Str "-fno-tree-vectorize",
                    Str "-mno-mmx",
                    Str "-mno-sse",
                    Str "-mno-sse2",
@@ -53,9 +63,11 @@ ourCommonFlags = [ Str "-m64",
                    Str "-mno-sse4a",
                    Str "-mno-3dnow", 
 -- specific Xeon Phi architecture
-                   Str "Wa,-march=k1om",
-                   Str "Wa,-mtune=k1om",
-                   Str "-D__x86__" ]
+--                   Str "-Wa,-march=k1om",
+--                   Str "-Wa,-mtune=k1om",
+                   Str "-D__x86__",
+                   Str "-D__k1om__" ]
+
 
 cFlags = ArchDefaults.commonCFlags
                ++ ArchDefaults.commonFlags
@@ -67,10 +79,14 @@ cxxFlags = ArchDefaults.commonCxxFlags
 
 cDefines = ArchDefaults.cDefines options
 
+-- TODO> -m elf_i386
 ourLdFlags = [ Str "-Wl,-z,max-page-size=0x1000",
+--               Str "-Wl,-b,elf64-k1om",
+--               Str "-Wl,--oformat,elf64-k1om",
                Str "-Wl,--build-id=none",
                Str "-m64" ]
 
+
 ldFlags = ArchDefaults.ldFlags arch ++ ourLdFlags
 ldCxxFlags = ArchDefaults.ldCxxFlags arch ++ ourLdFlags
 
@@ -93,9 +109,12 @@ kernelCFlags = [ Str s | s <- [ "-fno-builtin",
                                 "-std=c99",
                                 "-m64",
                                 "-mno-red-zone",
-                                "-fPIE",
+                               -- "-fPIE",
+                                "-fPIC",
+                                "-e startup_64",
                                 "-fno-stack-protector",
                                 "-U__linux__",
+                                "-D__k1om__",
                                 "-Wall",
                                 "-Wshadow",
                                 "-Wstrict-prototypes",
@@ -107,25 +126,29 @@ kernelCFlags = [ Str s | s <- [ "-fno-builtin",
                                 "-Wno-packed-bitfield-compat",
                                 "-Wno-unused-but-set-variable",
                                 "-Werror",
-                                "-imacros deputy/nodeputy.h" ] ]
---                                "-mno-mmx",
---                                "-mno-sse",
---                                "-mno-sse2",
---                                "-mno-sse3",
---                                "-mno-sse4.1",
---                                "-mno-sse4.2",
---              "-Wno-unused-but-set-variable",
---                                "-mno-sse4",
---                                "-mno-sse4a",
---                                "-mno-3dnow" 
-
+                                "-imacros deputy/nodeputy.h",
+                                "-fno-tree-vectorize",
+                                "-mno-mmx",
+                                "-mno-sse",
+                                "-mno-sse2",
+                                "-mno-sse3",
+                                "-mno-sse4.1",
+                                "-mno-sse4.2",
+                                "-mno-sse4",
+                                "-mno-sse4a",
+                                "-mno-3dnow" ] ]
+       
 
 kernelLdFlags = [ Str s | s <- [ "-Wl,-N",
-                                "-pie",
+                                 --"-Wl,-b,elf64-k1om",
+                                -- "-Wl,-A,k1om",
+                                 --"-Wl,--oformat,elf64-k1om",
+                                 -- "-pie",
+                                 "-fPIC",
                                  "-fno-builtin",
-                                "-nostdlib",
-                                "-Wl,--fatal-warnings",
-                                "-m64" ] ]
+                                 "-nostdlib",
+                                 "-Wl,--fatal-warnings",
+                                 "-m64" ] ]
 
 
 ------------------------------------------------------------------------