1- # ` hexagon-unknown- qurt `
1+ # ` hexagon-qurt `
22
33** Tier: 3**
44
55Rust for Hexagon QuRT (Qualcomm Real-Time OS).
66
7- | Target | Description |
8- | -------------------- | -------------------------------------------- |
9- | hexagon-unknown- qurt | Hexagon 32-bit QuRT (position independent) |
7+ | Target | Description |
8+ | -------------------- | ------------|
9+ | hexagon-qurt | Hexagon 32-bit QuRT |
1010
1111## Target maintainers
1212
@@ -28,6 +28,13 @@ Functions marked `extern "C"` use the [Hexagon architecture calling convention](
2828This target generates position-independent ELF binaries by default, making it
2929suitable for both static images and dynamic shared objects.
3030
31+ ## Linking
32+
33+ This target selects ` rust-lld ` by default. Another option to use is
34+ [ eld] ( https://github.com/qualcomm/eld ) , which is also provided with
35+ [ the opensource hexagon toolchain] ( https://github.com/quic/toolchain_for_hexagon )
36+ and the [ Hexagon SDK] ( https://softwarecenter.qualcomm.com/catalog/item/Hexagon_SDK ) .
37+
3138## Building the target
3239
3340You can build Rust with support for the target by adding it to the ` target `
@@ -37,9 +44,9 @@ list in `bootstrap.toml`:
3744[build ]
3845build-stage = 1
3946host = [" <target for your host>" ]
40- target = [" <target for your host>" , " hexagon-unknown- qurt" ]
47+ target = [" <target for your host>" , " hexagon-qurt" ]
4148
42- [target .hexagon-unknown- qurt ]
49+ [target .hexagon-qurt ]
4350cc = " hexagon-clang"
4451cxx = " hexagon-clang++"
4552ranlib = " hexagon-ranlib"
@@ -64,7 +71,7 @@ configuration with additional linker flags:
6471
6572``` sh
6673# Build a static executable for QuRT
67- cargo build --target hexagon-unknown- qurt \
74+ cargo build --target hexagon-qurt \
6875 -C link-args=" -static -nostdlib" \
6976 -C link-args=" -L/opt/Hexagon_SDK/6.3.0.0/rtos/qurt/computev69/lib" \
7077 -C link-args=" -lqurt -lc"
@@ -82,7 +89,7 @@ For shared libraries that can be dynamically loaded by QuRT applications:
8289
8390``` sh
8491# Build a shared object for QuRT
85- cargo build --target hexagon-unknown- qurt \
92+ cargo build --target hexagon-qurt \
8693 --crate-type=cdylib \
8794 -C link-args=" -shared -fPIC" \
8895 -C link-args=" -L/opt/Hexagon_SDK/6.3.0.0/rtos/qurt/computev69/lib"
@@ -101,7 +108,7 @@ The target can be customized for different use cases:
101108### For Static Images
102109``` toml
103110# In .cargo/config.toml
104- [target .hexagon-unknown- qurt ]
111+ [target .hexagon-qurt ]
105112rustflags = [
106113 " -C" , " link-args=-static" ,
107114 " -C" , " link-args=-nostdlib" ,
@@ -112,7 +119,7 @@ rustflags = [
112119### For Shared Objects
113120``` toml
114121# In .cargo/config.toml
115- [target .hexagon-unknown- qurt ]
122+ [target .hexagon-qurt ]
116123rustflags = [
117124 " -C" , " link-args=-shared" ,
118125 " -C" , " link-args=-fPIC" ,
@@ -122,7 +129,7 @@ rustflags = [
122129
123130## Testing
124131
125- Since ` hexagon-unknown- qurt ` requires the QuRT runtime environment, testing requires
132+ Since ` hexagon-qurt ` requires the QuRT runtime environment, testing requires
126133either:
127134- Hexagon hardware with QuRT
128135- ` hexagon-sim `
@@ -132,9 +139,8 @@ either:
132139
133140This target requires the proprietary [ Hexagon SDK toolchain for C interoperability] ( https://softwarecenter.qualcomm.com/catalog/item/Hexagon_SDK ) :
134141
135- - ** SDK Path** : ` /opt/Hexagon_SDK/6.3.0.0/ `
142+ - ** Sample SDK Path** : ` /opt/Hexagon_SDK/6.3.0.0/ `
136143- ** Toolchain** : Use ` hexagon-clang ` from the Hexagon SDK
137- - ** Headers** : QuRT and POSIX headers are automatically included
138144- ** Libraries** : Link against QuRT system libraries as needed
139145
140146### C Interoperability Example
0 commit comments