Generate our CROSSTOOL
I want to add a second cortex-m4f one, which is mostly the same, and not
have to maintain two of them. Actually doing that is coming in a
separate change.
Change-Id: I6e985de31b7741a7aa27a1d221d28623192f0a08
diff --git a/tools/cpp/CROSSTOOL b/tools/cpp/CROSSTOOL
index b29c5ad..9306652 100644
--- a/tools/cpp/CROSSTOOL
+++ b/tools/cpp/CROSSTOOL
@@ -1,131 +1,187 @@
+# GENERATED FILE. DO NOT EDIT
+# Generated by tools/cpp/gen_crosstool.py
major_version: "local"
minor_version: ""
default_target_cpu: "same_as_host"
-
default_toolchain {
cpu: "roborio"
toolchain_identifier: "roborio_linux"
}
-
default_toolchain {
cpu: "k8"
toolchain_identifier: "k8_linux"
}
-
default_toolchain {
cpu: "armeabi-v7a"
toolchain_identifier: "stub_armeabi-v7a"
}
-
default_toolchain {
cpu: "armhf-debian"
toolchain_identifier: "clang_linux_armhf"
}
-
default_toolchain {
cpu: "cortex-m4f"
toolchain_identifier: "cortex-m4f"
}
-
toolchain {
+ toolchain_identifier: "stub_armeabi-v7a"
+ host_system_name: "armeabi-v7a"
+ target_system_name: "armeabi-v7a"
+ target_cpu: "armeabi-v7a"
+ target_libc: "armeabi-v7a"
+ compiler: "compiler"
abi_version: "armeabi-v7a"
abi_libc_version: "armeabi-v7a"
- builtin_sysroot: ""
- compiler: "compiler"
- host_system_name: "armeabi-v7a"
- needsPic: true
+ tool_path {
+ name: "ar"
+ path: "/bin/false"
+ }
+ tool_path {
+ name: "compat-ld"
+ path: "/bin/false"
+ }
+ tool_path {
+ name: "cpp"
+ path: "/bin/false"
+ }
+ tool_path {
+ name: "dwp"
+ path: "/bin/false"
+ }
+ tool_path {
+ name: "gcc"
+ path: "/bin/false"
+ }
+ tool_path {
+ name: "gcov"
+ path: "/bin/false"
+ }
+ tool_path {
+ name: "ld"
+ path: "/bin/false"
+ }
+ tool_path {
+ name: "nm"
+ path: "/bin/false"
+ }
+ tool_path {
+ name: "objcopy"
+ path: "/bin/false"
+ }
+ tool_path {
+ name: "objdump"
+ path: "/bin/false"
+ }
+ tool_path {
+ name: "strip"
+ path: "/bin/false"
+ }
supports_gold_linker: false
- supports_incremental_linker: false
- supports_fission: false
- supports_interface_shared_objects: false
+ supports_thin_archives: false
+ needsPic: true
+ builtin_sysroot: ""
supports_normalizing_ar: false
supports_start_end_lib: false
- supports_thin_archives: false
- target_libc: "armeabi-v7a"
- target_cpu: "armeabi-v7a"
- target_system_name: "armeabi-v7a"
- toolchain_identifier: "stub_armeabi-v7a"
-
- tool_path { name: "ar" path: "/bin/false" }
- tool_path { name: "compat-ld" path: "/bin/false" }
- tool_path { name: "cpp" path: "/bin/false" }
- tool_path { name: "dwp" path: "/bin/false" }
- tool_path { name: "gcc" path: "/bin/false" }
- tool_path { name: "gcov" path: "/bin/false" }
- tool_path { name: "ld" path: "/bin/false" }
-
- tool_path { name: "nm" path: "/bin/false" }
- tool_path { name: "objcopy" path: "/bin/false" }
- tool_path { name: "objdump" path: "/bin/false" }
- tool_path { name: "strip" path: "/bin/false" }
+ supports_interface_shared_objects: false
+ supports_incremental_linker: false
+ supports_fission: false
}
-
toolchain {
+ toolchain_identifier: "k8_linux"
+ host_system_name: "local"
+ target_system_name: "k8"
+ target_cpu: "k8"
+ target_libc: "local"
+ compiler: "clang"
abi_version: "local"
abi_libc_version: "local"
- builtin_sysroot: ""
- compiler: "clang"
- host_system_name: "local"
- needsPic: true
+ tool_path {
+ name: "ar"
+ path: "clang_3p6/x86_64-linux-gnu-ar"
+ }
+ tool_path {
+ name: "compat-ld"
+ path: "clang_3p6/x86_64-linux-gnu-ld"
+ }
+ tool_path {
+ name: "cpp"
+ path: "clang_3p6/x86_64-linux-gnu-cpp"
+ }
+ tool_path {
+ name: "dwp"
+ path: "clang_3p6/x86_64-linux-gnu-dwp"
+ }
+ tool_path {
+ name: "gcc"
+ path: "clang_3p6/x86_64-linux-gnu-clang-3.6"
+ }
+ tool_path {
+ name: "gcov"
+ path: "clang_3p6/x86_64-linux-gnu-gcov"
+ }
+ tool_path {
+ name: "ld"
+ path: "clang_3p6/x86_64-linux-gnu-ld"
+ }
+ tool_path {
+ name: "nm"
+ path: "clang_3p6/x86_64-linux-gnu-nm"
+ }
+ tool_path {
+ name: "objcopy"
+ path: "clang_3p6/x86_64-linux-gnu-objcopy"
+ }
+ tool_path {
+ name: "objdump"
+ path: "clang_3p6/x86_64-linux-gnu-objdump"
+ }
+ tool_path {
+ name: "strip"
+ path: "clang_3p6/x86_64-linux-gnu-strip"
+ }
supports_gold_linker: false
- supports_incremental_linker: false
- supports_fission: false
- supports_interface_shared_objects: false
- supports_normalizing_ar: false
- supports_start_end_lib: false
supports_thin_archives: false
- target_libc: "local"
- target_cpu: "k8"
- target_system_name: "k8"
- toolchain_identifier: "k8_linux"
-
- # These paths are relative to //tools/cpp.
- tool_path { name: "ar" path: "clang_3p6/x86_64-linux-gnu-ar" }
- tool_path { name: "compat-ld" path: "clang_3p6/x86_64-linux-gnu-ld" }
- tool_path { name: "cpp" path: "clang_3p6/x86_64-linux-gnu-cpp" }
- tool_path { name: "dwp" path: "clang_3p6/x86_64-linux-gnu-dwp" }
- tool_path { name: "gcc" path: "clang_3p6/x86_64-linux-gnu-clang-3.6" }
- tool_path { name: "gcov" path: "clang_3p6/x86_64-linux-gnu-gcov" }
- # C(++) compiles invoke the compiler (as that is the one knowing where
- # to find libraries), but we provide LD so other rules can invoke the linker.
- tool_path { name: "ld" path: "clang_3p6/x86_64-linux-gnu-ld" }
- tool_path { name: "nm" path: "clang_3p6/x86_64-linux-gnu-nm" }
- tool_path { name: "objcopy" path: "clang_3p6/x86_64-linux-gnu-objcopy" }
- objcopy_embed_flag: "-I"
- objcopy_embed_flag: "binary"
- tool_path { name: "objdump" path: "clang_3p6/x86_64-linux-gnu-objdump" }
- tool_path { name: "strip" path: "clang_3p6/x86_64-linux-gnu-strip" }
- linking_mode_flags { mode: DYNAMIC }
-
+ needsPic: true
compiler_flag: "--sysroot=external/clang_3p6_repo/"
compiler_flag: "-nostdinc"
compiler_flag: "-isystem"
- compiler_flag: "external/clang_3p6_repo/usr/include",
+ compiler_flag: "external/clang_3p6_repo/usr/include"
compiler_flag: "-isystem"
- compiler_flag: "external/clang_3p6_repo/usr/include/x86_64-linux-gnu",
+ compiler_flag: "external/clang_3p6_repo/usr/include/x86_64-linux-gnu"
compiler_flag: "-isystem"
- compiler_flag: "external/clang_3p6_repo/usr/lib/llvm-3.6/lib/clang/3.6.2/include",
-
+ compiler_flag: "external/clang_3p6_repo/usr/lib/llvm-3.6/lib/clang/3.6.2/include"
+ compiler_flag: "-D__STDC_FORMAT_MACROS"
+ compiler_flag: "-D__STDC_CONSTANT_MACROS"
+ compiler_flag: "-D__STDC_LIMIT_MACROS"
+ compiler_flag: "-D_FILE_OFFSET_BITS=64"
+ compiler_flag: "-DAOS_ARCHITECTURE_arm_frc"
+ compiler_flag: "-U_FORTIFY_SOURCE"
+ compiler_flag: "-D_FORTIFY_SOURCE=1"
+ compiler_flag: "-fstack-protector"
+ compiler_flag: "-fPIE"
+ compiler_flag: "-fcolor-diagnostics"
+ compiler_flag: "-fmessage-length=80"
+ compiler_flag: "-fmacro-backtrace-limit=0"
+ compiler_flag: "-Wall"
+ compiler_flag: "-Wextra"
+ compiler_flag: "-Wpointer-arith"
+ compiler_flag: "-Wstrict-aliasing"
+ compiler_flag: "-Wcast-qual"
+ compiler_flag: "-Wcast-align"
+ compiler_flag: "-Wwrite-strings"
+ compiler_flag: "-Wtype-limits"
+ compiler_flag: "-Wsign-compare"
+ compiler_flag: "-Wformat=2"
+ compiler_flag: "-Werror"
+ compiler_flag: "-fno-omit-frame-pointer"
+ compiler_flag: "-pipe"
+ compiler_flag: "-ggdb3"
cxx_flag: "-isystem"
cxx_flag: "external/clang_3p6_repo/usr/include/c++/4.9"
cxx_flag: "-isystem"
cxx_flag: "external/clang_3p6_repo/usr/include/x86_64-linux-gnu/c++/4.9"
cxx_flag: "-isystem"
cxx_flag: "external/clang_3p6_repo/usr/include/c++/4.9/backward"
-
- # TODO(bazel-team): In theory, the path here ought to exactly match the path
- # used by gcc. That works because bazel currently doesn't track files at
- # absolute locations and has no remote execution, yet. However, this will need
- # to be fixed, maybe with auto-detection?
- cxx_builtin_include_directory: '%package(@clang_3p6_repo//usr)%/include/c++/4.9'
- cxx_builtin_include_directory: '%package(@clang_3p6_repo//usr)%/include/x86_64-linux-gnu/c++/4.9'
- cxx_builtin_include_directory: '%package(@clang_3p6_repo//usr)%/include/c++/4.9/backward'
- cxx_builtin_include_directory: '%package(@clang_3p6_repo//usr)%/local/include'
- cxx_builtin_include_directory: '%package(@clang_3p6_repo//usr)%/lib/llvm-3.6/lib/clang/3.6.2/include'
- cxx_builtin_include_directory: '%package(@clang_3p6_repo//usr)%/include/x86_64-linux-gnu'
- cxx_builtin_include_directory: '%package(@clang_3p6_repo//usr)%/include'
- cxx_builtin_include_directory: '%package(@clang_3p6_repo//usr)%/lib/clang/3.6.2/include'
-
linker_flag: "-nodefaultlibs"
linker_flag: "--sysroot=external/clang_3p6_repo/"
linker_flag: "-lstdc++"
@@ -137,10 +193,48 @@
linker_flag: "-Lexternal/clang_3p6/lib/x86_64-linux-gnu"
linker_flag: "-Lexternal/clang_3p6/usr/lib/x86_64-linux-gnu"
linker_flag: "-Lexternal/clang_3p6/usr/lib/gcc/x86_64-linux-gnu"
-
+ linker_flag: "-no-canonical-prefixes"
+ linker_flag: "-fuse-ld=gold"
+ linker_flag: "-Wl,-z,relro,-z,now"
+ linker_flag: "-lm"
+ linker_flag: "-Wl,--build-id=md5"
+ linker_flag: "-Wl,--hash-style=gnu"
+ linker_flag: "-Wl,--warn-execstack"
+ linker_flag: "-Wl,--detect-odr-violations"
+ objcopy_embed_flag: "-I"
+ objcopy_embed_flag: "binary"
+ compilation_mode_flags {
+ mode: OPT
+ compiler_flag: "-O2"
+ compiler_flag: "-DNDEBUG"
+ compiler_flag: "-ffunction-sections"
+ compiler_flag: "-fdata-sections"
+ linker_flag: "-Wl,--gc-sections"
+ }
+ linking_mode_flags {
+ mode: DYNAMIC
+ }
+ cxx_builtin_include_directory: "%package(@clang_3p6_repo//usr)%/include/c++/4.9"
+ cxx_builtin_include_directory: "%package(@clang_3p6_repo//usr)%/include/x86_64-linux-gnu/c++/4.9"
+ cxx_builtin_include_directory: "%package(@clang_3p6_repo//usr)%/include/c++/4.9/backward"
+ cxx_builtin_include_directory: "%package(@clang_3p6_repo//usr)%/local/include"
+ cxx_builtin_include_directory: "%package(@clang_3p6_repo//usr)%/lib/llvm-3.6/lib/clang/3.6.2/include"
+ cxx_builtin_include_directory: "%package(@clang_3p6_repo//usr)%/include/x86_64-linux-gnu"
+ cxx_builtin_include_directory: "%package(@clang_3p6_repo//usr)%/include"
+ cxx_builtin_include_directory: "%package(@clang_3p6_repo//usr)%/lib/clang/3.6.2/include"
+ builtin_sysroot: ""
+ unfiltered_cxx_flag: "-no-canonical-prefixes"
+ unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
+ unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
+ unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
+ unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
+ supports_normalizing_ar: false
+ supports_start_end_lib: false
+ supports_interface_shared_objects: false
+ supports_incremental_linker: false
+ supports_fission: false
feature {
name: "opt"
- implies: "all_modes"
flag_set {
action: "preprocess-assemble"
action: "c-compile"
@@ -152,11 +246,10 @@
flag: "-DAOS_DEBUG=0"
}
}
+ implies: "all_modes"
}
-
feature {
name: "dbg"
- implies: "all_modes"
flag_set {
action: "preprocess-assemble"
action: "c-compile"
@@ -171,11 +264,10 @@
flag: "-fno-omit-frame-pointer"
}
}
+ implies: "all_modes"
}
-
feature {
name: "fastbuild"
- implies: "all_modes"
flag_set {
action: "preprocess-assemble"
action: "c-compile"
@@ -187,8 +279,8 @@
flag: "-DAOS_DEBUG=0"
}
}
+ implies: "all_modes"
}
-
feature {
name: "all_modes"
flag_set {
@@ -218,53 +310,95 @@
action: "c++-module-compile"
action: "c-compile"
flag_group {
- # We always want to compile with -pthread semantics.
flag: "-pthread"
}
}
}
-
- # Anticipated future default.
- # This makes GCC and Clang do what we want when called through symlinks.
- unfiltered_cxx_flag: "-no-canonical-prefixes"
- linker_flag: "-no-canonical-prefixes"
-
- # Things that the code wants defined.
+ feature {
+ name: "pie_for_linking"
+ flag_set {
+ action: "c++-link-executable"
+ flag_group {
+ flag: "-pie"
+ }
+ }
+ enabled: true
+ }
+}
+toolchain {
+ toolchain_identifier: "roborio_linux"
+ host_system_name: "roborio"
+ target_system_name: "roborio"
+ target_cpu: "roborio"
+ target_libc: "roborio"
+ compiler: "gcc"
+ abi_version: "roborio"
+ abi_libc_version: "roborio"
+ tool_path {
+ name: "ar"
+ path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-ar"
+ }
+ tool_path {
+ name: "compat-ld"
+ path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-ld"
+ }
+ tool_path {
+ name: "cpp"
+ path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-cpp"
+ }
+ tool_path {
+ name: "dwp"
+ path: "/bin/false"
+ }
+ tool_path {
+ name: "gcc"
+ path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-gcc"
+ }
+ tool_path {
+ name: "gcov"
+ path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-gcov-4.9"
+ }
+ tool_path {
+ name: "ld"
+ path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-ld"
+ }
+ tool_path {
+ name: "nm"
+ path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-nm"
+ }
+ tool_path {
+ name: "objcopy"
+ path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-objcopy"
+ }
+ tool_path {
+ name: "objdump"
+ path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-objdump"
+ }
+ tool_path {
+ name: "strip"
+ path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-strip"
+ }
+ supports_gold_linker: false
+ supports_thin_archives: false
+ needsPic: true
+ compiler_flag: "--sysroot=external/arm_frc_linux_gnueabi_repo/usr/arm-frc-linux-gnueabi"
+ compiler_flag: "-nostdinc"
+ compiler_flag: "-isystem"
+ compiler_flag: "external/arm_frc_linux_gnueabi_repo/usr/lib/x86_64-linux-gnu/gcc/arm-frc-linux-gnueabi/5.4.0/include"
+ compiler_flag: "-isystem"
+ compiler_flag: "external/arm_frc_linux_gnueabi_repo/usr/lib/x86_64-linux-gnu/gcc/arm-frc-linux-gnueabi/5.4.0/include-fixed"
+ compiler_flag: "-isystem"
+ compiler_flag: "external/arm_frc_linux_gnueabi_repo/usr/arm-frc-linux-gnueabi/usr/include"
+ compiler_flag: "-mfpu=neon"
compiler_flag: "-D__STDC_FORMAT_MACROS"
compiler_flag: "-D__STDC_CONSTANT_MACROS"
compiler_flag: "-D__STDC_LIMIT_MACROS"
compiler_flag: "-D_FILE_OFFSET_BITS=64"
- # TODO(Brian): Rename this or something.
compiler_flag: "-DAOS_ARCHITECTURE_arm_frc"
-
- linker_flag: "-fuse-ld=gold"
-
- # Make C++ compilation deterministic. Use linkstamping instead of these
- # compiler symbols.
- unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
- unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
- unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
- unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
- # Security hardening on by default.
- # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
- # We need to undef it before redefining it as some distributions now have
- # it enabled by default.
compiler_flag: "-U_FORTIFY_SOURCE"
- compiler_flag: "-D_FORTIFY_SOURCE=1"
compiler_flag: "-fstack-protector"
compiler_flag: "-fPIE"
- linker_flag: "-Wl,-z,relro,-z,now"
-
- # Pretty much everything needs this, including parts of the glibc STL...
- linker_flag: "-lm"
-
- # Enable coloring even if there's no attached terminal. Bazel removes the
- # escape sequences if --nocolor is specified.
- compiler_flag: "-fcolor-diagnostics"
- compiler_flag: "-fmessage-length=80"
- compiler_flag: "-fmacro-backtrace-limit=0"
-
+ compiler_flag: "-fdiagnostics-color=always"
compiler_flag: "-Wall"
compiler_flag: "-Wextra"
compiler_flag: "-Wpointer-arith"
@@ -276,92 +410,11 @@
compiler_flag: "-Wsign-compare"
compiler_flag: "-Wformat=2"
compiler_flag: "-Werror"
-
- # Keep stack frames for debugging, even in opt mode.
+ compiler_flag: "-Wunused-local-typedefs"
compiler_flag: "-fno-omit-frame-pointer"
-
- # Don't use temp files while compiling.
+ compiler_flag: "-D__has_feature(x)=0"
compiler_flag: "-pipe"
-
- # Stamp the binary with a unique identifier.
- linker_flag: "-Wl,--build-id=md5"
- linker_flag: "-Wl,--hash-style=gnu"
- linker_flag: "-Wl,--warn-execstack"
- linker_flag: "-Wl,--detect-odr-violations"
-
- # Enable debug symbols.
compiler_flag: "-ggdb3"
-
- compilation_mode_flags {
- mode: OPT
-
- compiler_flag: "-O2"
-
- # Disable assertions
- compiler_flag: "-DNDEBUG"
-
- # Removal of unused code and data at link time (can this increase binary size in some cases?).
- compiler_flag: "-ffunction-sections"
- compiler_flag: "-fdata-sections"
- linker_flag: "-Wl,--gc-sections"
- }
- feature {
- name: "pie_for_linking"
- enabled: true
- flag_set {
- action: "c++-link-executable"
- flag_group {
- flag: "-pie"
- }
- }
- }
-}
-
-toolchain {
- abi_version: "roborio"
- abi_libc_version: "roborio"
- builtin_sysroot: ""
- compiler: "gcc"
- host_system_name: "roborio"
- needsPic: true
- supports_gold_linker: false
- supports_incremental_linker: false
- supports_fission: false
- supports_interface_shared_objects: false
- supports_normalizing_ar: false
- supports_start_end_lib: false
- supports_thin_archives: false
- target_libc: "roborio"
- target_cpu: "roborio"
- target_system_name: "roborio"
- toolchain_identifier: "roborio_linux"
-
- tool_path { name: "ar" path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-ar" }
- tool_path { name: "compat-ld" path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-ld" }
- tool_path { name: "cpp" path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-cpp" }
- tool_path { name: "dwp" path: "/bin/false" }
- tool_path { name: "gcc" path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-gcc" }
- tool_path { name: "gcov" path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-gcov-4.9" }
- # C(++) compiles invoke the compiler (as that is the one knowing where
- # to find libraries), but we provide LD so other rules can invoke the linker.
- tool_path { name: "ld" path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-ld" }
- tool_path { name: "nm" path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-nm" }
- tool_path { name: "objcopy" path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-objcopy" }
- objcopy_embed_flag: "-I"
- objcopy_embed_flag: "binary"
- tool_path { name: "objdump" path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-objdump" }
- tool_path { name: "strip" path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-strip" }
- linking_mode_flags { mode: DYNAMIC }
-
- compiler_flag: "--sysroot=external/arm_frc_linux_gnueabi_repo/usr/arm-frc-linux-gnueabi"
- compiler_flag: "-nostdinc"
- compiler_flag: "-isystem"
- compiler_flag: "external/arm_frc_linux_gnueabi_repo/usr/lib/x86_64-linux-gnu/gcc/arm-frc-linux-gnueabi/5.4.0/include",
- compiler_flag: "-isystem"
- compiler_flag: "external/arm_frc_linux_gnueabi_repo/usr/lib/x86_64-linux-gnu/gcc/arm-frc-linux-gnueabi/5.4.0/include-fixed"
- compiler_flag: "-isystem"
- compiler_flag: "external/arm_frc_linux_gnueabi_repo/usr/arm-frc-linux-gnueabi/usr/include"
-
cxx_flag: "-isystem"
cxx_flag: "external/arm_frc_linux_gnueabi_repo/usr/arm-frc-linux-gnueabi/include/c++/5.4.0"
cxx_flag: "-isystem"
@@ -376,11 +429,28 @@
cxx_flag: "external/arm_frc_linux_gnueabi_repo/usr/arm-frc-linux-gnueabi/include"
cxx_flag: "-isystem"
cxx_flag: "external/arm_frc_linux_gnueabi_repo/usr/arm-frc-linux-gnueabi/usr/include"
-
- # TODO(bazel-team): In theory, the path here ought to exactly match the path
- # used by gcc. That works because bazel currently doesn't track files at
- # absolute locations and has no remote execution, yet. However, this will need
- # to be fixed, maybe with auto-detection?
+ linker_flag: "-lstdc++"
+ linker_flag: "-Ltools/cpp/arm-frc-linux-gnueabi/libs"
+ linker_flag: "-no-canonical-prefixes"
+ linker_flag: "-Wl,-z,relro,-z,now"
+ linker_flag: "-lm"
+ linker_flag: "-pass-exit-codes"
+ linker_flag: "-Wl,--build-id=md5"
+ linker_flag: "-Wl,--hash-style=gnu"
+ objcopy_embed_flag: "-I"
+ objcopy_embed_flag: "binary"
+ compilation_mode_flags {
+ mode: OPT
+ compiler_flag: "-O2"
+ compiler_flag: "-DNDEBUG"
+ compiler_flag: "-D_FORTIFY_SOURCE=1"
+ compiler_flag: "-ffunction-sections"
+ compiler_flag: "-fdata-sections"
+ linker_flag: "-Wl,--gc-sections"
+ }
+ linking_mode_flags {
+ mode: DYNAMIC
+ }
cxx_builtin_include_directory: "%package(@arm_frc_linux_gnueabi_repo//usr/arm-frc-linux-gnueabi/include)%/c++/5.4.0"
cxx_builtin_include_directory: "%package(@arm_frc_linux_gnueabi_repo//usr/arm-frc-linux-gnueabi/include)%/c++/5.4.0/arm-frc-linux-gnueabi"
cxx_builtin_include_directory: "%package(@arm_frc_linux_gnueabi_repo//usr/arm-frc-linux-gnueabi/include)%/c++/5.4.0/backward"
@@ -388,13 +458,19 @@
cxx_builtin_include_directory: "%package(@arm_frc_linux_gnueabi_repo//usr/lib/x86_64-linux-gnu/gcc/arm-frc-linux-gnueabi/5.4.0/include-fixed)%"
cxx_builtin_include_directory: "%package(@arm_frc_linux_gnueabi_repo//usr/arm-frc-linux-gnueabi/include)%"
cxx_builtin_include_directory: "%package(@arm_frc_linux_gnueabi_repo//usr/arm-frc-linux-gnueabi/usr/include)%"
-
- linker_flag: "-lstdc++"
- linker_flag: "-Ltools/cpp/arm-frc-linux-gnueabi/libs"
-
+ builtin_sysroot: ""
+ unfiltered_cxx_flag: "-no-canonical-prefixes"
+ unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
+ unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
+ unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
+ unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
+ supports_normalizing_ar: false
+ supports_start_end_lib: false
+ supports_interface_shared_objects: false
+ supports_incremental_linker: false
+ supports_fission: false
feature {
name: "opt"
- implies: "all_modes"
flag_set {
action: "preprocess-assemble"
action: "c-compile"
@@ -406,11 +482,10 @@
flag: "-DAOS_DEBUG=0"
}
}
+ implies: "all_modes"
}
-
feature {
name: "dbg"
- implies: "all_modes"
flag_set {
action: "preprocess-assemble"
action: "c-compile"
@@ -425,11 +500,10 @@
flag: "-fno-omit-frame-pointer"
}
}
+ implies: "all_modes"
}
-
feature {
name: "fastbuild"
- implies: "all_modes"
flag_set {
action: "preprocess-assemble"
action: "c-compile"
@@ -441,8 +515,8 @@
flag: "-DAOS_DEBUG=0"
}
}
+ implies: "all_modes"
}
-
feature {
name: "all_modes"
flag_set {
@@ -472,54 +546,100 @@
action: "c++-module-compile"
action: "c-compile"
flag_group {
- # We always want to compile with -pthread semantics.
flag: "-pthread"
}
}
}
-
- compiler_flag: "-mfpu=neon"
- # TODO(brians): See if it will run with this enabled.
- #compiler_flag: "-mhwdiv=arm,thumb"
-
- # Anticipated future default.
- # This makes GCC and Clang do what we want when called through symlinks.
- unfiltered_cxx_flag: "-no-canonical-prefixes"
- linker_flag: "-no-canonical-prefixes"
-
- # Things that the code wants defined.
+ feature {
+ name: "pie_for_linking"
+ flag_set {
+ action: "c++-link-executable"
+ flag_group {
+ flag: "-pie"
+ }
+ }
+ enabled: true
+ }
+}
+toolchain {
+ toolchain_identifier: "clang_linux_armhf"
+ host_system_name: "linux"
+ target_system_name: "arm_a15"
+ target_cpu: "armhf-debian"
+ target_libc: "glibc_2.19"
+ compiler: "clang"
+ abi_version: "clang_3.6"
+ abi_libc_version: "glibc_2.19"
+ tool_path {
+ name: "ar"
+ path: "linaro_linux_gcc/arm-linux-gnueabihf-ar"
+ }
+ tool_path {
+ name: "compat-ld"
+ path: "linaro_linux_gcc/arm-linux-gnueabihf-ld"
+ }
+ tool_path {
+ name: "cpp"
+ path: "linaro_linux_gcc/clang_bin/clang"
+ }
+ tool_path {
+ name: "dwp"
+ path: "linaro_linux_gcc/arm-linux-gnueabihf-dwp"
+ }
+ tool_path {
+ name: "gcc"
+ path: "linaro_linux_gcc/clang_bin/clang"
+ }
+ tool_path {
+ name: "gcov"
+ path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-gcov-4.9"
+ }
+ tool_path {
+ name: "ld"
+ path: "linaro_linux_gcc/arm-linux-gnueabihf-ld"
+ }
+ tool_path {
+ name: "nm"
+ path: "linaro_linux_gcc/arm-linux-gnueabihf-nm"
+ }
+ tool_path {
+ name: "objcopy"
+ path: "linaro_linux_gcc/arm-linux-gnueabihf-objcopy"
+ }
+ tool_path {
+ name: "objdump"
+ path: "linaro_linux_gcc/arm-linux-gnueabihf-objdump"
+ }
+ tool_path {
+ name: "strip"
+ path: "linaro_linux_gcc/arm-linux-gnueabihf-strip"
+ }
+ supports_gold_linker: false
+ supports_thin_archives: true
+ needsPic: true
+ compiler_flag: "-target"
+ compiler_flag: "armv7a-arm-linux-gnueabif"
+ compiler_flag: "--sysroot=external/linaro_linux_gcc_4_9_repo/arm-linux-gnueabihf/libc"
+ compiler_flag: "-mfloat-abi=hard"
+ compiler_flag: "-mfpu=vfpv3-d16"
+ compiler_flag: "-nostdinc"
+ compiler_flag: "-isystem"
+ compiler_flag: "/usr/lib/clang/3.6/include"
+ compiler_flag: "-isystem"
+ compiler_flag: "external/linaro_linux_gcc_4_9_repo/lib/gcc/arm-linux-gnueabihf/4.9.3/include"
+ compiler_flag: "-isystem"
+ compiler_flag: "external/linaro_linux_gcc_4_9_repo/arm-linux-gnueabihf/libc/usr/include"
+ compiler_flag: "-isystem"
+ compiler_flag: "external/linaro_linux_gcc_4_9_repo/lib/gcc/arm-linux-gnueabihf/4.9.3/include-fixed"
compiler_flag: "-D__STDC_FORMAT_MACROS"
compiler_flag: "-D__STDC_CONSTANT_MACROS"
compiler_flag: "-D__STDC_LIMIT_MACROS"
compiler_flag: "-D_FILE_OFFSET_BITS=64"
- # TODO(Brian): Rename this or something.
- compiler_flag: "-DAOS_ARCHITECTURE_arm_frc"
-
- #linker_flag: "-fuse-ld=gold"
-
- # Make C++ compilation deterministic. Use linkstamping instead of these
- # compiler symbols.
- unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
- unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
- unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
- unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
- # Security hardening on by default.
- # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
- # We need to undef it before redefining it as some distributions now have
- # it enabled by default.
+ compiler_flag: "-DAOS_ARCHITECTURE_armhf"
compiler_flag: "-U_FORTIFY_SOURCE"
compiler_flag: "-fstack-protector"
compiler_flag: "-fPIE"
- linker_flag: "-Wl,-z,relro,-z,now"
-
- # Pretty much everything needs this, including parts of the glibc STL...
- linker_flag: "-lm"
-
- # Enable coloring even if there's no attached terminal. Bazel removes the
- # escape sequences if --nocolor is specified.
compiler_flag: "-fdiagnostics-color=always"
-
compiler_flag: "-Wall"
compiler_flag: "-Wextra"
compiler_flag: "-Wpointer-arith"
@@ -532,103 +652,9 @@
compiler_flag: "-Wformat=2"
compiler_flag: "-Werror"
compiler_flag: "-Wunused-local-typedefs"
-
- # Keep stack frames for debugging, even in opt mode.
compiler_flag: "-fno-omit-frame-pointer"
- compiler_flag: "-D__has_feature(x)=0"
-
- # Don't use temp files while compiling.
compiler_flag: "-pipe"
-
- # Have GCC return the exit code from ld.
- linker_flag: "-pass-exit-codes"
-
- # Stamp the binary with a unique identifier.
- linker_flag: "-Wl,--build-id=md5"
- linker_flag: "-Wl,--hash-style=gnu"
- #linker_flag: "-Wl,--warn-execstack"
- #linker_flag: "-Wl,--detect-odr-violations"
-
- # Enable debug symbols.
compiler_flag: "-ggdb3"
-
- compilation_mode_flags {
- mode: OPT
-
- compiler_flag: "-O2"
-
- # Disable assertions
- compiler_flag: "-DNDEBUG"
- compiler_flag: "-D_FORTIFY_SOURCE=1"
-
- # Removal of unused code and data at link time (can this increase binary size in some cases?).
- compiler_flag: "-ffunction-sections"
- compiler_flag: "-fdata-sections"
- linker_flag: "-Wl,--gc-sections"
- }
- feature {
- name: "pie_for_linking"
- enabled: true
- flag_set {
- action: "c++-link-executable"
- flag_group {
- flag: "-pie"
- }
- }
- }
-}
-
-toolchain {
- abi_version: "clang_3.6"
- abi_libc_version: "glibc_2.19"
- builtin_sysroot: ""
- compiler: "clang"
- host_system_name: "linux"
- needsPic: true
- supports_gold_linker: false
- supports_incremental_linker: false
- supports_fission: false
- supports_interface_shared_objects: false
- supports_normalizing_ar: true
- supports_start_end_lib: false
- supports_thin_archives: true
- target_libc: "glibc_2.19"
- target_cpu: "armhf-debian"
- target_system_name: "arm_a15"
- toolchain_identifier: "clang_linux_armhf"
-
- tool_path { name: "ar" path: "linaro_linux_gcc/arm-linux-gnueabihf-ar" }
- tool_path { name: "compat-ld" path: "linaro_linux_gcc/arm-linux-gnueabihf-ld" }
- tool_path { name: "cpp" path: "linaro_linux_gcc/clang_bin/clang" }
- tool_path { name: "dwp" path: "linaro_linux_gcc/arm-linux-gnueabihf-dwp" }
- tool_path { name: "gcc" path: "linaro_linux_gcc/clang_bin/clang" }
- tool_path { name: "gcov" path: "arm-frc-linux-gnueabi/arm-frc-linux-gnueabi-gcov-4.9" }
- # C(++) compiles invoke the compiler (as that is the one knowing where
- # to find libraries), but we provide LD so other rules can invoke the linker.
- tool_path { name: "ld" path: "linaro_linux_gcc/arm-linux-gnueabihf-ld" }
- tool_path { name: "nm" path: "linaro_linux_gcc/arm-linux-gnueabihf-nm" }
- tool_path { name: "objcopy" path: "linaro_linux_gcc/arm-linux-gnueabihf-objcopy" }
- objcopy_embed_flag: "-I"
- objcopy_embed_flag: "binary"
- tool_path { name: "objdump" path: "linaro_linux_gcc/arm-linux-gnueabihf-objdump" }
- tool_path { name: "strip" path: "linaro_linux_gcc/arm-linux-gnueabihf-strip" }
- linking_mode_flags { mode: DYNAMIC }
-
- compiler_flag: "-target"
- compiler_flag: "armv7a-arm-linux-gnueabif"
- compiler_flag: "--sysroot=external/linaro_linux_gcc_4_9_repo/arm-linux-gnueabihf/libc"
- compiler_flag: "-mfloat-abi=hard"
- compiler_flag: "-mfpu=vfpv3-d16"
-
- compiler_flag: "-nostdinc"
- compiler_flag: "-isystem"
- compiler_flag: "/usr/lib/clang/3.6/include"
- compiler_flag: "-isystem"
- compiler_flag: "external/linaro_linux_gcc_4_9_repo/lib/gcc/arm-linux-gnueabihf/4.9.3/include"
- compiler_flag: "-isystem"
- compiler_flag: "external/linaro_linux_gcc_4_9_repo/arm-linux-gnueabihf/libc/usr/include"
- compiler_flag: "-isystem"
- compiler_flag: "external/linaro_linux_gcc_4_9_repo/lib/gcc/arm-linux-gnueabihf/4.9.3/include-fixed"
cxx_flag: "-isystem"
cxx_flag: "external/linaro_linux_gcc_4_9_repo/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf"
cxx_flag: "-isystem"
@@ -637,19 +663,6 @@
cxx_flag: "external/linaro_linux_gcc_4_9_repo/include/c++/4.9.3/arm-linux-gnueabihf"
cxx_flag: "-isystem"
cxx_flag: "external/linaro_linux_gcc_4_9_repo/include/c++/4.9.3"
-
- cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//include)%"
- cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/libc/usr/include)%"
- cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/libc/usr/lib/include)%"
- cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/libc/lib/gcc/arm-linux-gnueabihf/4.9.3/include-fixed)%"
- cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//include)%/c++/4.9.3"
- cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/libc/lib/gcc/arm-linux-gnueabihf/4.9.3/include)%"
- cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/libc/lib/gcc/arm-linux-gnueabihf/4.9.3/include-fixed)%"
- cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//lib/gcc/arm-linux-gnueabihf/4.9.3/include)%"
- cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//lib/gcc/arm-linux-gnueabihf/4.9.3/include-fixed)%"
- cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/include)%/c++/4.9.3"
- cxx_builtin_include_directory: '/usr/lib/clang/3.6/include'
-
linker_flag: "-target"
linker_flag: "armv7a-arm-linux-gnueabif"
linker_flag: "--sysroot=external/linaro_linux_gcc_4_9_repo/arm-linux-gnueabihf/libc"
@@ -660,10 +673,49 @@
linker_flag: "-Lexternal/linaro_linux_gcc_4_9_repo/arm-linux-gnueabihf/libc/usr/lib"
linker_flag: "-Bexternal/linaro_linux_gcc_4_9_repo/arm-linux-gnueabihf/bin"
linker_flag: "-Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3"
-
+ linker_flag: "-no-canonical-prefixes"
+ linker_flag: "-Wl,-z,relro,-z,now"
+ linker_flag: "-lm"
+ linker_flag: "-Wl,--build-id=md5"
+ linker_flag: "-Wl,--hash-style=gnu"
+ objcopy_embed_flag: "-I"
+ objcopy_embed_flag: "binary"
+ compilation_mode_flags {
+ mode: OPT
+ compiler_flag: "-O2"
+ compiler_flag: "-DNDEBUG"
+ compiler_flag: "-D_FORTIFY_SOURCE=1"
+ compiler_flag: "-ffunction-sections"
+ compiler_flag: "-fdata-sections"
+ linker_flag: "-Wl,--gc-sections"
+ }
+ linking_mode_flags {
+ mode: DYNAMIC
+ }
+ cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//include)%"
+ cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/libc/usr/include)%"
+ cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/libc/usr/lib/include)%"
+ cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/libc/lib/gcc/arm-linux-gnueabihf/4.9.3/include-fixed)%"
+ cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//include)%/c++/4.9.3"
+ cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/libc/lib/gcc/arm-linux-gnueabihf/4.9.3/include)%"
+ cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/libc/lib/gcc/arm-linux-gnueabihf/4.9.3/include-fixed)%"
+ cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//lib/gcc/arm-linux-gnueabihf/4.9.3/include)%"
+ cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//lib/gcc/arm-linux-gnueabihf/4.9.3/include-fixed)%"
+ cxx_builtin_include_directory: "%package(@linaro_linux_gcc_4_9_repo//arm-linux-gnueabihf/include)%/c++/4.9.3"
+ cxx_builtin_include_directory: "/usr/lib/clang/3.6/include"
+ builtin_sysroot: ""
+ unfiltered_cxx_flag: "-no-canonical-prefixes"
+ unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
+ unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
+ unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
+ unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
+ supports_normalizing_ar: true
+ supports_start_end_lib: false
+ supports_interface_shared_objects: false
+ supports_incremental_linker: false
+ supports_fission: false
feature {
name: "opt"
- implies: "all_modes"
flag_set {
action: "preprocess-assemble"
action: "c-compile"
@@ -675,11 +727,10 @@
flag: "-DAOS_DEBUG=0"
}
}
+ implies: "all_modes"
}
-
feature {
name: "dbg"
- implies: "all_modes"
flag_set {
action: "preprocess-assemble"
action: "c-compile"
@@ -694,11 +745,10 @@
flag: "-fno-omit-frame-pointer"
}
}
+ implies: "all_modes"
}
-
feature {
name: "fastbuild"
- implies: "all_modes"
flag_set {
action: "preprocess-assemble"
action: "c-compile"
@@ -710,8 +760,8 @@
flag: "-DAOS_DEBUG=0"
}
}
+ implies: "all_modes"
}
-
feature {
name: "all_modes"
flag_set {
@@ -741,150 +791,152 @@
action: "c++-module-compile"
action: "c-compile"
flag_group {
- # We always want to compile with -pthread semantics.
flag: "-pthread"
}
}
}
-
- # Anticipated future default.
- # This makes GCC and Clang do what we want when called through symlinks.
- unfiltered_cxx_flag: "-no-canonical-prefixes"
- linker_flag: "-no-canonical-prefixes"
-
- # Things that the code wants defined.
- compiler_flag: "-D__STDC_FORMAT_MACROS"
- compiler_flag: "-D__STDC_CONSTANT_MACROS"
- compiler_flag: "-D__STDC_LIMIT_MACROS"
- compiler_flag: "-D_FILE_OFFSET_BITS=64"
- # TODO(Brian): Rename this or something.
- compiler_flag: "-DAOS_ARCHITECTURE_armhf"
-
- # Make C++ compilation deterministic. Use linkstamping instead of these
- # compiler symbols.
- unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
- unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
- unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
- unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
- # Security hardening on by default.
- # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
- # We need to undef it before redefining it as some distributions now have
- # it enabled by default.
- compiler_flag: "-U_FORTIFY_SOURCE"
- compiler_flag: "-fstack-protector"
- compiler_flag: "-fPIE"
- linker_flag: "-Wl,-z,relro,-z,now"
-
- # Pretty much everything needs this, including parts of the glibc STL...
- linker_flag: "-lm"
-
- # Enable coloring even if there's no attached terminal. Bazel removes the
- # escape sequences if --nocolor is specified.
- compiler_flag: "-fdiagnostics-color=always"
-
- compiler_flag: "-Wall"
- compiler_flag: "-Wextra"
- compiler_flag: "-Wpointer-arith"
- compiler_flag: "-Wstrict-aliasing"
- compiler_flag: "-Wcast-qual"
- compiler_flag: "-Wcast-align"
- compiler_flag: "-Wwrite-strings"
- compiler_flag: "-Wtype-limits"
- compiler_flag: "-Wsign-compare"
- compiler_flag: "-Wformat=2"
- compiler_flag: "-Werror"
- compiler_flag: "-Wunused-local-typedefs"
-
- # Keep stack frames for debugging, even in opt mode.
- compiler_flag: "-fno-omit-frame-pointer"
-
- # Don't use temp files while compiling.
- compiler_flag: "-pipe"
-
- # Stamp the binary with a unique identifier.
- linker_flag: "-Wl,--build-id=md5"
- linker_flag: "-Wl,--hash-style=gnu"
- #linker_flag: "-Wl,--warn-execstack"
- #linker_flag: "-Wl,--detect-odr-violations"
-
- # Enable debug symbols.
- compiler_flag: "-ggdb3"
-
- compilation_mode_flags {
- mode: OPT
-
- compiler_flag: "-O2"
-
- # Disable assertions
- compiler_flag: "-DNDEBUG"
- compiler_flag: "-D_FORTIFY_SOURCE=1"
-
- # Removal of unused code and data at link time (can this increase binary size in some cases?).
- compiler_flag: "-ffunction-sections"
- compiler_flag: "-fdata-sections"
- linker_flag: "-Wl,--gc-sections"
- }
feature {
name: "pie_for_linking"
- enabled: true
flag_set {
action: "c++-link-executable"
flag_group {
flag: "-pie"
}
}
+ enabled: true
}
}
-
toolchain {
+ toolchain_identifier: "cortex-m4f"
+ host_system_name: "local"
+ target_system_name: "cortex-m4f"
+ target_cpu: "cortex-m4f"
+ target_libc: "cortex-m4f"
+ compiler: "gcc"
abi_version: "cortex-m4f"
abi_libc_version: "cortex-m4f"
- builtin_sysroot: ""
- compiler: "gcc"
- host_system_name: "local"
- needsPic: false
+ tool_path {
+ name: "ar"
+ path: "/usr/bin/arm-none-eabi-ar"
+ }
+ tool_path {
+ name: "compat-ld"
+ path: "/usr/bin/arm-none-eabi-ld"
+ }
+ tool_path {
+ name: "cpp"
+ path: "/usr/bin/arm-none-eabi-cpp"
+ }
+ tool_path {
+ name: "dwp"
+ path: "/usr/bin/arm-none-eabi-dwp"
+ }
+ tool_path {
+ name: "gcc"
+ path: "/usr/bin/arm-none-eabi-gcc"
+ }
+ tool_path {
+ name: "gcov"
+ path: "/usr/bin/arm-none-eabi-gcov"
+ }
+ tool_path {
+ name: "ld"
+ path: "/usr/bin/arm-none-eabi-ld"
+ }
+ tool_path {
+ name: "nm"
+ path: "/usr/bin/arm-none-eabi-nm"
+ }
+ tool_path {
+ name: "objcopy"
+ path: "/usr/bin/arm-none-eabi-objcopy"
+ }
+ tool_path {
+ name: "objdump"
+ path: "/usr/bin/arm-none-eabi-objdump"
+ }
+ tool_path {
+ name: "strip"
+ path: "/usr/bin/arm-none-eabi-strip"
+ }
supports_gold_linker: false
- supports_incremental_linker: false
- supports_fission: false
- supports_interface_shared_objects: false
- supports_normalizing_ar: false
- supports_start_end_lib: false
supports_thin_archives: false
- target_libc: "cortex-m4f"
- target_cpu: "cortex-m4f"
- target_system_name: "cortex-m4f"
- toolchain_identifier: "cortex-m4f"
-
- tool_path { name: "ar" path: "/usr/bin/arm-none-eabi-ar" }
- tool_path { name: "compat-ld" path: "/usr/bin/arm-none-eabi-ld" }
- tool_path { name: "cpp" path: "/usr/bin/arm-none-eabi-cpp" }
- tool_path { name: "dwp" path: "/usr/bin/arm-none-eabi-dwp" }
- tool_path { name: "gcc" path: "/usr/bin/arm-none-eabi-gcc" }
- tool_path { name: "gcov" path: "/usr/bin/arm-none-eabi-gcov" }
- # C(++) compiles invoke the compiler (as that is the one knowing where
- # to find libraries), but we provide LD so other rules can invoke the linker.
- tool_path { name: "ld" path: "/usr/bin/arm-none-eabi-ld" }
- tool_path { name: "nm" path: "/usr/bin/arm-none-eabi-nm" }
- tool_path { name: "objcopy" path: "/usr/bin/arm-none-eabi-objcopy" }
+ needsPic: false
+ compiler_flag: "-D__STDC_FORMAT_MACROS"
+ compiler_flag: "-D__STDC_CONSTANT_MACROS"
+ compiler_flag: "-D__STDC_LIMIT_MACROS"
+ compiler_flag: "-D__MK64FX512__"
+ compiler_flag: "-DF_CPU=120000000"
+ compiler_flag: "-Wl,--gc-sections"
+ compiler_flag: "-D__have_long32"
+ compiler_flag: "-fstack-protector"
+ compiler_flag: "-mcpu=cortex-m4"
+ compiler_flag: "-mfpu=fpv4-sp-d16"
+ compiler_flag: "-mthumb"
+ compiler_flag: "-mfloat-abi=hard"
+ compiler_flag: "-fno-strict-aliasing"
+ compiler_flag: "-fmessage-length=80"
+ compiler_flag: "-fmax-errors=20"
+ compiler_flag: "-Wall"
+ compiler_flag: "-Wextra"
+ compiler_flag: "-Wpointer-arith"
+ compiler_flag: "-Wcast-qual"
+ compiler_flag: "-Wwrite-strings"
+ compiler_flag: "-Wtype-limits"
+ compiler_flag: "-Wsign-compare"
+ compiler_flag: "-Wformat=2"
+ compiler_flag: "-Werror"
+ compiler_flag: "-Wstrict-aliasing=2"
+ compiler_flag: "-Wdouble-promotion"
+ compiler_flag: "-pipe"
+ compiler_flag: "-g"
+ compiler_flag: "-fno-common"
+ compiler_flag: "-ffreestanding"
+ compiler_flag: "-fbuiltin"
+ linker_flag: "-no-canonical-prefixes"
+ linker_flag: "-mcpu=cortex-m4"
+ linker_flag: "-mfpu=fpv4-sp-d16"
+ linker_flag: "-mthumb"
+ linker_flag: "-mfloat-abi=hard"
+ linker_flag: "-fno-strict-aliasing"
+ linker_flag: "--specs=nano.specs"
+ linker_flag: "-lgcc"
+ linker_flag: "-lstdc++"
+ linker_flag: "-lm"
+ linker_flag: "-lc"
+ linker_flag: "-Tmotors/core/mk64fx512.ld"
objcopy_embed_flag: "-I"
objcopy_embed_flag: "binary"
- tool_path { name: "objdump" path: "/usr/bin/arm-none-eabi-objdump" }
- tool_path { name: "strip" path: "/usr/bin/arm-none-eabi-strip" }
- linking_mode_flags { mode: FULLY_STATIC }
-
- # TODO(bazel-team): In theory, the path here ought to exactly match the path
- # used by gcc. That works because bazel currently doesn't track files at
- # absolute locations and has no remote execution, yet. However, this will need
- # to be fixed, maybe with auto-detection?
- cxx_builtin_include_directory: '/usr/lib/gcc/arm-none-eabi/4.8/include'
- cxx_builtin_include_directory: '/usr/lib/gcc/arm-none-eabi/4.8/include-fixed'
- cxx_builtin_include_directory: '/usr/lib/arm-none-eabi/include'
- cxx_builtin_include_directory: '/usr/include/newlib',
-
+ compilation_mode_flags {
+ mode: OPT
+ compiler_flag: "-O2"
+ compiler_flag: "-finline-functions"
+ compiler_flag: "-ffast-math"
+ compiler_flag: "-funroll-loops"
+ compiler_flag: "-DNDEBUG"
+ compiler_flag: "-ffunction-sections"
+ linker_flag: "-Wl,--gc-sections"
+ }
+ linking_mode_flags {
+ mode: FULLY_STATIC
+ }
+ cxx_builtin_include_directory: "/usr/lib/gcc/arm-none-eabi/4.8/include"
+ cxx_builtin_include_directory: "/usr/lib/gcc/arm-none-eabi/4.8/include-fixed"
+ cxx_builtin_include_directory: "/usr/lib/arm-none-eabi/include"
+ cxx_builtin_include_directory: "/usr/include/newlib"
+ builtin_sysroot: ""
+ unfiltered_cxx_flag: "-no-canonical-prefixes"
+ unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
+ unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
+ unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
+ unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
+ supports_normalizing_ar: false
+ supports_start_end_lib: false
+ supports_interface_shared_objects: false
+ supports_incremental_linker: false
+ supports_fission: false
feature {
name: "dbg"
- implies: "all_modes"
flag_set {
action: "preprocess-assemble"
action: "c-compile"
@@ -896,8 +948,8 @@
flag: "-fno-omit-frame-pointer"
}
}
+ implies: "all_modes"
}
-
feature {
name: "opt"
implies: "all_modes"
@@ -906,7 +958,6 @@
name: "fastbuild"
implies: "all_modes"
}
-
feature {
name: "all_modes"
flag_set {
@@ -929,145 +980,28 @@
}
}
}
-
- # Anticipated future default.
- # This makes GCC and Clang do what we want when called through symlinks.
- unfiltered_cxx_flag: "-no-canonical-prefixes"
- linker_flag: "-no-canonical-prefixes"
-
- # Things that the code wants defined.
- compiler_flag: "-D__STDC_FORMAT_MACROS"
- compiler_flag: "-D__STDC_CONSTANT_MACROS"
- compiler_flag: "-D__STDC_LIMIT_MACROS"
-
- # Some identifiers for what MCU we're using.
- compiler_flag: "-D__MK64FX512__"
- compiler_flag: "-DF_CPU=120000000"
-
- compiler_flag: "-Wl,--gc-sections"
-
- # Newlib's stdint.h does this, but GCC's freestanding stdint.h doesn't use
- # newlib's so we have to do it manually...
- compiler_flag: "-D__have_long32"
-
- # Make C++ compilation deterministic. Use linkstamping instead of these
- # compiler symbols.
- unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
- unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
- unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
- unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
- # Security hardening on by default.
- # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
- # We need to undef it before redefining it as some distributions now have
- # it enabled by default.
- compiler_flag: "-fstack-protector"
- compiler_flag: "-mcpu=cortex-m4"
- compiler_flag: "-mfpu=fpv4-sp-d16"
- compiler_flag: "-mthumb"
- compiler_flag: "-mfloat-abi=hard"
- compiler_flag: "-fno-strict-aliasing"
- linker_flag: "-mcpu=cortex-m4"
- linker_flag: "-mfpu=fpv4-sp-d16"
- linker_flag: "-mthumb"
- linker_flag: "-mfloat-abi=hard"
- linker_flag: "-fno-strict-aliasing"
- linker_flag: "--specs=nano.specs"
-
- # Pretty much everything needs this, including parts of the glibc STL...
- linker_flag: "-lgcc"
- linker_flag: "-lstdc++"
- linker_flag: "-lm"
- linker_flag: "-lc"
- linker_flag: "-Tmotors/core/mk64fx512.ld"
-
- compiler_flag: "-fmessage-length=80"
- compiler_flag: "-fmax-errors=20"
-
- compiler_flag: "-Wall"
- compiler_flag: "-Wextra"
- compiler_flag: "-Wpointer-arith"
- compiler_flag: "-Wcast-qual"
- compiler_flag: "-Wwrite-strings"
- compiler_flag: "-Wtype-limits"
- compiler_flag: "-Wsign-compare"
- compiler_flag: "-Wformat=2"
- compiler_flag: "-Werror"
- compiler_flag: "-Wstrict-aliasing=2"
-
- # Be annoying about using doubles places we probably didn't mean to, because
- # the FPU only does single-precision.
- compiler_flag: "-Wdouble-promotion"
-
- # Don't use temp files while compiling.
- compiler_flag: "-pipe"
-
- # Stamp the binary with a unique identifier.
- # TODO(austin): Put these back in.
- #linker_flag: "-Wl,--build-id=md5"
- #linker_flag: "-Wl,--hash-style=gnu"
-
- # Enable debug symbols.
- compiler_flag: "-g"
-
- # Common symbols are weird and not what we want, so just give multiple
- # declaration errors instead.
- compiler_flag: "-fno-common"
-
- # We're not a hosted environment (no file IO, main is called from our code,
- # etc).
- compiler_flag: "-ffreestanding"
- # However, we still want to optimize things like memcpy.
- compiler_flag: "-fbuiltin"
-
- compilation_mode_flags {
- mode: OPT
-
- # Freescale recommends this combination for reducing cycle count.
- # http://www.nxp.com/assets/documents/data/en/application-notes/AN4808.pdf
- compiler_flag: "-O2"
- compiler_flag: "-finline-functions"
-
- # This is definitely worth it for us. It makes the FPU a lot more useful,
- # especially with complex arithmetic, which matters a lot.
- compiler_flag: "-ffast-math"
-
- # It seems like this is a good idea, at least for the number crunching code.
- # Might want to look into moving it to copts on specific rules if the code
- # size increase becomes a problem.
- compiler_flag: "-funroll-loops"
-
- # Disable assertions
- compiler_flag: "-DNDEBUG"
-
- # Removal of unused code and data at link time (can this increase binary size in some cases?).
- compiler_flag: "-ffunction-sections"
- #compiler_flag: "-fdata-sections"
- linker_flag: "-Wl,--gc-sections"
- }
-
feature {
- name: 'include_paths'
+ name: "include_paths"
flag_set {
- action: 'preprocess-assemble'
- action: 'c-compile'
- action: 'c++-compile'
- action: 'c++-header-parsing'
- action: 'c++-header-preprocessing'
- action: 'c++-module-compile'
+ action: "preprocess-assemble"
+ action: "c-compile"
+ action: "c++-compile"
+ action: "c++-header-parsing"
+ action: "c++-header-preprocessing"
+ action: "c++-module-compile"
flag_group {
- iterate_over: 'quote_include_paths'
- flag: '-iquote'
- flag: '%{quote_include_paths}'
+ flag: "-iquote"
+ flag: "%{quote_include_paths}"
+ iterate_over: "quote_include_paths"
}
flag_group {
- iterate_over: 'include_paths'
- flag: '-I%{include_paths}'
+ flag: "-I%{include_paths}"
+ iterate_over: "include_paths"
}
flag_group {
- iterate_over: 'system_include_paths'
- flag: '-I'
- flag: '%{system_include_paths}'
+ flag: "-I"
+ flag: "%{system_include_paths}"
+ iterate_over: "system_include_paths"
}
}
}