Repository navigation
Add Raspberry PI build #11675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Raspberry PI build #11675
Changes from all commits
80442de
c7a78d7
0ca2379
56127f4
35a7c9f
fe798da
0e673f4
a32d821
d554afe
148009c
e7d30d3
2b47c6b
cd4008f
298cf40
3c379a6
0efde24
6666367
c848583
a74bded
550260b
f1bb14d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| package(default_visibility = ['//visibility:public']) | ||
|
|
||
| filegroup( | ||
| name = 'gcc', | ||
| srcs = [ | ||
| 'bin/arm-linux-gnueabihf-gcc', | ||
| ], | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = 'ar', | ||
| srcs = [ | ||
| 'bin/arm-linux-gnueabihf-ar', | ||
| ], | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = 'ld', | ||
| srcs = [ | ||
| 'bin/arm-linux-gnueabihf-ld', | ||
| ], | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = 'nm', | ||
| srcs = [ | ||
| 'bin/arm-linux-gnueabihf-nm', | ||
| ], | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = 'objcopy', | ||
| srcs = [ | ||
| 'bin/arm-linux-gnueabihf-objcopy', | ||
| ], | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = 'objdump', | ||
| srcs = [ | ||
| 'bin/arm-linux-gnueabihf-objdump', | ||
| ], | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = 'strip', | ||
| srcs = [ | ||
| 'bin/arm-linux-gnueabihf-strip', | ||
| ], | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = 'as', | ||
| srcs = [ | ||
| 'bin/arm-linux-gnueabihf-as', | ||
| ], | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = 'compiler_pieces', | ||
| srcs = glob([ | ||
| 'arm-linux-gnueabihf/**', | ||
| 'libexec/**', | ||
| 'lib/gcc/arm-linux-gnueabihf/**', | ||
| 'include/**', | ||
| ]), | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = 'compiler_components', | ||
| srcs = [ | ||
| ':gcc', | ||
| ':ar', | ||
| ':ld', | ||
| ':nm', | ||
| ':objcopy', | ||
| ':objdump', | ||
| ':strip', | ||
| ':as', | ||
| ], | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,9 +43,10 @@ limitations under the License. | |
| #elif defined(__arm__) | ||
| #define PLATFORM_POSIX | ||
|
|
||
| // Since there's no macro for the Raspberry Pi, assume we're on a mobile | ||
| // platform if we're compiling for the ARM CPU. | ||
| // Require an outside macro to tell us if we're building for Raspberry Pi. | ||
| #if !defined(RASPBERRY_PI) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add this define to the Makefile for the Pi too? Hopefully that will go away eventually, but for now it would be good to keep them in sync.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
| #define IS_MOBILE_PLATFORM | ||
| #endif // !defined(RASPBERRY_PI) | ||
|
|
||
| #else | ||
| // If no platform specified, use: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| package(default_visibility = ["//visibility:public"]) | ||
|
|
||
| cc_toolchain_suite( | ||
| name = "toolchain", | ||
| toolchains = { | ||
| "armeabi|compiler": ":cc-compiler-armeabi", | ||
| "local|compiler": ":cc-compiler-local", | ||
| }, | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = "empty", | ||
| srcs = [], | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = "arm_linux_all_files", | ||
| srcs = [ | ||
| "@arm_compiler//:compiler_pieces", | ||
| ], | ||
| ) | ||
|
|
||
| cc_toolchain( | ||
| name = "cc-compiler-local", | ||
| all_files = ":empty", | ||
| compiler_files = ":empty", | ||
| cpu = "local", | ||
| dwp_files = ":empty", | ||
| dynamic_runtime_libs = [":empty"], | ||
| linker_files = ":empty", | ||
| objcopy_files = ":empty", | ||
| static_runtime_libs = [":empty"], | ||
| strip_files = ":empty", | ||
| supports_param_files = 1, | ||
| ) | ||
|
|
||
| cc_toolchain( | ||
| name = "cc-compiler-armeabi", | ||
| all_files = ":arm_linux_all_files", | ||
| compiler_files = ":arm_linux_all_files", | ||
| cpu = "armeabi", | ||
| dwp_files = ":empty", | ||
| dynamic_runtime_libs = [":empty"], | ||
| linker_files = ":arm_linux_all_files", | ||
| objcopy_files = "arm_linux_all_files", | ||
| static_runtime_libs = [":empty"], | ||
| strip_files = "arm_linux_all_files", | ||
| supports_param_files = 1, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this file also be under third_party/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved.