Skip to content
This repository was archived by the owner on Feb 3, 2019. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ff546c1

Browse files
briansmithOgeon
authored andcommittedApr 15, 2016
Add C++ support. (#15)
Export `CXX` analogously to how `CC` is exported. This is necessary for building crates that have C++ code, such as *ring*, using `cross64` & `cross32`.
1 parent aa771b2 commit ff546c1

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed
 

‎MANUAL.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ arm-linux-gnueabihf-gcc --sysroot=$HOME/pi-tools/arm-bcm2708/arm-bcm2708hardfp-l
135135
```
136136

137137
This is basically an alias for `arm-linux-gnueabihf-gcc`, but with the
138-
`--sysroot` set to where the libraries are kept. The `"$@" part is there to
138+
`--sysroot` set to where the libraries are kept. The `"$@"` part is there to
139139
pass all the incoming argument forwards to `arm-linux-gnueabihf-gcc`. Alright,
140140
make the file executable:
141141

@@ -149,7 +149,11 @@ or
149149
chmod +x ~/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/gcc-sysroot
150150
```
151151

152-
and you should be done! Or, kind of done. There is one thing left.
152+
If your crate requires building C++ code, then you'll need to create a `g++-sysroot` just
153+
like `gcc-sysroot`, substituting `arm-linux-gnueabihf-g++` for `arm-linux-gnueabihf-gcc`
154+
inside.
155+
156+
And you should be done! Or, kind of done. There is one thing left.
153157

154158
##Running Cargo
155159

‎cross32

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if [ "$1" != "doc" ]
1717
then
1818
#Set up our tools for anyting using these variables
1919
export CC="$tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/gcc-sysroot"
20+
export CXX="$tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/g++-sysroot"
2021
export AR="$tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-ar"
2122

2223
#Set target triple
@@ -28,4 +29,4 @@ then
2829
cargo $1 $flags
2930
else
3031
rustc -vV
31-
fi
32+
fi

‎cross64

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if [ "$1" != "doc" ]
1717
then
1818
#Set up our tools for anyting using these variables
1919
export CC="$tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/gcc-sysroot"
20+
export CXX="$tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/g++-sysroot"
2021
export AR="$tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-ar"
2122

2223
#Set target triple
@@ -28,4 +29,4 @@ then
2829
cargo $1 $flags
2930
else
3031
rustc -vV
31-
fi
32+
fi

0 commit comments

Comments
 (0)
This repository has been archived.