Changes between Version 17 and Version 18 of venice/bsp
- Timestamp:
- 04/13/2022 08:20:29 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
venice/bsp
v17 v18 226 226 === Cross compile examples 227 227 228 Examples of cross-compiling :228 Examples of cross-compiling using the buildroot toolchain 229 229 * ANSI-C hello world: 230 230 {{{#!bash … … 241 241 EOF 242 242 . ./setup-environment # setup environment for buildroot toolchain 243 ${CROSS_COMPILE}gcc helloworld.c -o helloworld 244 }}} 243 ${CROSS_COMPILE}gcc helloworld.c --static -o helloworld 244 }}} 245 - Note that if you want to use shared libraries you would either need to copy the toolchains libc (buildroot/output/target/lib/) to the target so that the interpreter and shared libs are present or you can use Ubuntu's cross-toolchain instead (see [wiki:/ubuntu#hello-world.c ubuntu/cross-compile]) 245 246 * C++ hello world: 246 247 {{{#!bash … … 256 257 EOF 257 258 . ./setup-environment # setup environment for buildroot toolchain 258 ${CROSS_COMPILE}gcc helloworld.cpp -lstdc++ -o helloworld 259 }}} 259 ${CROSS_COMPILE}gcc helloworld.cpp --static -lstdc++ -o helloworld 260 }}} 261 - Note that if you want to use shared libraries you would either need to copy the toolchains libc (buildroot/output/target/lib/) to the target so that the interpreter and shared libs are present or you can use Ubuntu's cross-toolchain instead (see [wiki:/ubuntu#hello-world.c ubuntu/cross-compile]) 260 262 * kernel module: 261 263 {{{#!bash