Skip to content

Commit e5fab24

Browse files
committed
Updates for next release:
- Updated strip patch for all bash-scripts for smaller binary size. - Updated assets. - Updated docs.
1 parent eeab149 commit e5fab24

File tree

9 files changed

+95
-121
lines changed

9 files changed

+95
-121
lines changed

QT_build_instructions.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
2626

2727
<table align="center"><tr><td align="center">
2828

29-
<img alt="QT" src="https://raw.githubusercontent.com/abhiTronix/Imbakup/master/Images/gcc/qt-comp.png">
29+
<img alt="QT" src="https://raw.githubusercontent.com/abhiTronix/Imbakup/master/Images/gcc/qt.png">
3030

3131
</td></tr></table>
3232

@@ -815,10 +815,8 @@ This Project source-code and its precompiled binaries are licensed under the [**
815815

816816
# Acknowledgments
817817

818-
Thank you,
819-
820818
- This document is insipired by [Qt-Instructions for Raspberry Pi 4](https://github.com/UvinduW/Cross-Compiling-Qt-for-Raspberry-Pi-4). Huge thanks to @UvinduW.
821-
- [QT framework](https://www.qt.io/), for providing the source files
819+
- Thank you [QT framework](https://www.qt.io/), for providing the source files
822820

823821
[downloads]:https://sourceforge.net/projects/raspberry-pi-cross-compilers/files
824822
[license]:https://github.com/abhiTronix/raspberry-pi-cross-compilers/blob/master/LICENSE

README.md

+67-94
Large diffs are not rendered by default.

build-scripts/CI/CIBB_32b

+3-3
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,15 @@ if [ -n "$(ls -A "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build)" ]; then rm -r
191191
cd "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build || exit
192192
../configure --target=$TARGET --prefix= --with-arch=$ARCH --with-fpu=$FPU --with-float=hard --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --disable-multilib
193193
make -s -j$(getconf _NPROCESSORS_ONLN)
194-
make -s install DESTDIR="$INSTALLDIR"
194+
make -s install-strip DESTDIR="$INSTALLDIR"
195195
if [ -n "$(ls -A "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build/*; fi
196196

197197
echo "Building Cross GCC $GCC_VERSION BASE Binaries..."
198198
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-$GCC_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-$GCC_VERSION/build/*; fi
199199
cd "$DOWNLOADDIR"/gcc-$GCC_VERSION/build || exit
200200
../configure --prefix= --target=$TARGET --enable-languages=$LANGUAGES --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --with-arch=$ARCH --with-fpu=$FPU --with-float=hard --disable-multilib
201201
make -s -j$(getconf _NPROCESSORS_ONLN) all-gcc
202-
make -s install-gcc DESTDIR="$INSTALLDIR"
202+
make -s install-strip-gcc DESTDIR="$INSTALLDIR"
203203
if [ -n "$(ls -A "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build/*; fi
204204
cd "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build || exit
205205
../configure --prefix=/usr --build="$MACHTYPE" --host=$TARGET --target=$TARGET --with-arch=$ARCH --with-fpu=$FPU --with-float=hard --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --with-headers="$SYSROOTDIR"/usr/include --with-lib="$SYSROOTDIR"/usr/lib --disable-multilib libc_cv_forced_unwind=yes
@@ -217,7 +217,7 @@ make -s install DESTDIR="$SYSROOTDIR"
217217
cd "$DOWNLOADDIR"/gcc-$GCC_VERSION/build || exit
218218
if [ -n "$(ls -A "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build/*; fi
219219
make -s -j$(getconf _NPROCESSORS_ONLN)
220-
make -s install DESTDIR="$INSTALLDIR"
220+
make -s install-strip DESTDIR="$INSTALLDIR"
221221

222222
mv "$BUILDDIR"/cross-pi-gcc-"$GCC_VERSION"-$FOLDER_VERSION "$HOME"
223223
cd "$HOME" || exit

build-scripts/CI/CIBB_64b

+3-3
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ if [ -n "$(ls -A "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build)" ]; then rm -r
174174
cd "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build || exit
175175
../configure --target=$TARGET --prefix= --with-arch=$ARCH --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --disable-multilib
176176
make -s -j$(getconf _NPROCESSORS_ONLN)
177-
make -s install DESTDIR="$INSTALLDIR"
177+
make -s install-strip DESTDIR="$INSTALLDIR"
178178
if [ -n "$(ls -A "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build/*; fi
179179

180180
echo "Building Cross GCC $GCC_VERSION BASE Binaries..."
181181
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-$GCC_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-$GCC_VERSION/build/*; fi
182182
cd "$DOWNLOADDIR"/gcc-$GCC_VERSION/build || exit
183183
../configure --prefix= --target=$TARGET --enable-languages=$LANGUAGES --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --with-arch=$ARCH --disable-multilib
184184
make -s -j$(getconf _NPROCESSORS_ONLN) all-gcc
185-
make -s install-gcc DESTDIR="$INSTALLDIR"
185+
make -s install-strip-gcc DESTDIR="$INSTALLDIR"
186186
if [ -n "$(ls -A "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build/*; fi
187187
cd "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build || exit
188188
../configure --prefix=/usr --build="$MACHTYPE" --host=$TARGET --target=$TARGET --with-arch=$ARCH --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --with-headers="$SYSROOTDIR"/usr/include --with-lib="$SYSROOTDIR"/usr/lib --disable-multilib libc_cv_forced_unwind=yes
@@ -200,7 +200,7 @@ make -s install DESTDIR="$SYSROOTDIR"
200200
cd "$DOWNLOADDIR"/gcc-$GCC_VERSION/build || exit
201201
if [ -n "$(ls -A "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build/*; fi
202202
make -s -j$(getconf _NPROCESSORS_ONLN)
203-
make -s install DESTDIR="$INSTALLDIR"
203+
make -s install-strip DESTDIR="$INSTALLDIR"
204204
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-$GCC_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-$GCC_VERSION/build/*; fi
205205

206206
mv "$BUILDDIR"/cross-pi-gcc-"$GCC_VERSION"-$FOLDER_VERSION "$HOME"

build-scripts/CI/CICTB_32b

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ if [ "$GCC_VERSION" != "$GCCBASE_VERSION" ]; then
200200
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build/*; fi
201201
../configure --prefix= --target=$TARGET --enable-languages=$LANGUAGES --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --with-arch=$ARCH --with-fpu=$FPU --with-float=hard --disable-multilib
202202
make -s -j$(nproc)
203-
make -s install DESTDIR="$INSTALLDIR"
203+
make -s install-strip DESTDIR="$INSTALLDIR"
204204
fi
205205

206206
cd "$DOWNLOADDIR"/gcc-"$GCC_VERSION" || exit

build-scripts/CI/CICTB_64b

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ if [ "$GCC_VERSION" != "$GCCBASE_VERSION" ]; then
152152
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build/*; fi
153153
../configure --prefix= --target=$TARGET --enable-languages=$LANGUAGES --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --with-arch=$ARCH --disable-multilib
154154
make -s -j$(nproc)
155-
make -s install DESTDIR="$INSTALLDIR"
155+
make -s install-strip DESTDIR="$INSTALLDIR"
156156
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build/*; fi
157157
fi
158158

build-scripts/README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
2323
===============================================
2424
-->
2525

26-
# <img alt="Banner" src="https://raw.githubusercontent.com/abhiTronix/Imbakup/master/Images/gcc/banners-a.png">
26+
# <img alt="Banner" src="https://raw.githubusercontent.com/abhiTronix/Imbakup/master/Images/gcc/build-script.png">
2727

28-
### Open source is awesome [![Open Source Love png1](https://badges.frapsoft.com/os/v1/open-source.png?v=103)](https://github.com/abhiTronix/raspberry-pi-cross-compilers)
28+
&nbsp;
2929

3030
This project now provides user-friendly open-sourced bash build-scripts that auto-generates Compressed Cross & Native GCC ARM/ARM64 Toolchain binaries targeting Raspberry Pi 32-bit & 64-bit OSes. If you need additional language support or need to compile another suitable GCC version toolchains for your Raspberry Pi, then you can manually compile any GCC toolchains by running suitable build-scripts yourself through your system terminal.
3131

@@ -35,7 +35,7 @@ This project now provides user-friendly open-sourced bash build-scripts that aut
3535

3636
### RTBuilder_64b: Raspberry Pi Toolchains Builder 64-bit
3737

38-
* This script auto-generates Compressed Cross & Native GCC ARM64 Toolchain binaries targeting any Raspberry Pi 64-bit (like Pi64) OSes.
38+
* This script auto-generates Compressed Cross & Native GCC ARM64 Toolchain binaries targeting any Raspberry Pi 64-bit Stretch(Debian 9) & Buster(Debian 10) OSes.
3939

4040

4141

@@ -103,7 +103,7 @@ You can run these bash scripts to manually compile any GCC toolchains version th
103103

104104
3. **Run scripts:**
105105

106-
### `RTBuilder_32b`: Raspberry Pi Toolchains Builder 32-bit
106+
### [`RTBuilder_32b`](#): Raspberry Pi Toolchains Builder 32-bit
107107

108108

109109
* **Usage parameters:** This script requires a few command-line parameters, just run `./RTBuilder_32b` on terminal:
@@ -129,11 +129,13 @@ You can run these bash scripts to manually compile any GCC toolchains version th
129129

130130
```
131131

132-
*This will take some time _(approximately 55mins on 8cores)_, so grab a coffee :coffee:. On returning you will find `native-gcc-{GCC_VERSION}-pi_{PI_TYPE}.tar.gz` and `cross-gcc-{GCC_VERSION}-pi_{PI_TYPE}.tar.gz` at your `$HOME` directory.*
132+
This will take some time _(approximately 55mins on 8cores)_, so grab a coffee :coffee:. On returning you will find `native-gcc-{GCC_VERSION}-pi_{PI_TYPE}.tar.gz` and `cross-gcc-{GCC_VERSION}-pi_{PI_TYPE}.tar.gz` at your `$HOME` directory.
133+
133134

135+
&emsp;
134136

135137

136-
### `RTBuilder_64b`: Raspberry Pi Toolchains Builder 64-bit
138+
### [`RTBuilder_64b`](#): Raspberry Pi Toolchains Builder 64-bit
137139

138140

139141
* **Usage parameters:** This script requires few command-line parameters, just run `./RTBuilder_64b`:
@@ -157,7 +159,7 @@ You can run these bash scripts to manually compile any GCC toolchains version th
157159

158160
```
159161

160-
*This will take some time _(approximately 55mins on 8cores)_, so grab a coffee :coffee:. On returning you will find `native-gcc-{GCC_VERSION}-pi_64.tar.gz` and `cross-gcc-{GCC_VERSION}-pi_64.tar.gz` at your `$HOME` directory.*
162+
This will take some time _(approximately 55mins on 8cores)_, so grab a coffee :coffee:. On returning you will find `native-gcc-{GCC_VERSION}-pi_64.tar.gz` and `cross-gcc-{GCC_VERSION}-pi_64.tar.gz` at your `$HOME` directory.
161163

162164
&nbsp;
163165

build-scripts/RTBuilder_32b

+8-7
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
# This script auto downloads, compiles, and compresses Cross & Native GCC ARM Toolchain binaries
2525
# targeting Raspberry Pi 32-bit Stretch(Debian 9) and Buster(Debian 10) OSes only.
2626

27+
set -eo pipefail
28+
2729
helpfunction() {
2830
#helper function that prints custom usage help menu
2931
echo ""
@@ -53,15 +55,14 @@ while getopts "g:r:o:V" opt; do
5355
VERBOSE=1
5456
echo "Info: Activated verbose output!"
5557
echo ""
56-
set -eov pipefail # Set verbose mode.
58+
set -v # Set verbose mode.
5759
;;
5860
?) helpfunction ;; #prints help function for invalid parameter
5961
esac
6062
done
6163
#validates parameters and print usage helper function in case parameters are missing
6264
if [ -z "$VERBOSE" ]; then
6365
VERBOSE=0
64-
set -eo pipefail # stop the script and exit with return code != 0 if errored
6566
fi
6667
if [ -z "$GCC_VERSION" ] || [ -z "$RPI_TYPE" ] || [ -z "$RPIOS_TYPE" ]; then
6768
echo "Error: Required parameters are missing!"
@@ -156,7 +157,7 @@ mkdir -p "$INSTALLDIR"
156157
cd "$DOWNLOADDIR" || exit
157158

158159
if [ ! -d "linux" ]; then
159-
wget -q https://github.com/$(wget -q https://github.com/raspberrypi/linux/releases/latest -O - | grep -E '/.*/.*/.*.tar.gz' -o)
160+
wget -q https://github.com/$(wget -q https://github.com/raspberrypi/linux/releases/latest -O - | grep -E '/.*/.*/.*.tar.gz' -o | head -n1)
160161
tar xf raspberrypi*.tar.gz
161162
mv linux* linux
162163
rm ./*.tar.*
@@ -228,15 +229,15 @@ if [ -n "$(ls -A "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build)" ]; then rm -r
228229
cd "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build || exit
229230
../configure --target=$TARGET --prefix= --with-arch=$ARCH --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --with-fpu=$FPU --with-float=hard --disable-multilib
230231
make -s -j$(nproc)
231-
make -s install DESTDIR="$INSTALLDIR"
232+
make -s install-strip DESTDIR="$INSTALLDIR"
232233
if [ -n "$(ls -A "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/binutils-$BINUTILS_VERSION/build/*; fi
233234

234235
echo "Building Cross GCC $GCCBASE_VERSION Binaries..."
235236
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-$GCCBASE_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-$GCCBASE_VERSION/build/*; fi
236237
cd "$DOWNLOADDIR"/gcc-$GCCBASE_VERSION/build || exit
237238
../configure --prefix= --target=$TARGET --enable-languages=$LANGUAGES --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --with-arch=$ARCH --with-fpu=$FPU --with-float=hard --disable-multilib
238239
make -s -j$(nproc) all-gcc
239-
make -s install-gcc DESTDIR="$INSTALLDIR"
240+
make -s install-strip-gcc DESTDIR="$INSTALLDIR"
240241
if [ -n "$(ls -A "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build/*; fi
241242
cd "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build || exit
242243
../configure --prefix=/usr --build="$MACHTYPE" --host=$TARGET --target=$TARGET --with-arch=$ARCH --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --with-fpu=$FPU --with-float=hard --with-headers="$SYSROOTDIR"/usr/include --with-lib="$SYSROOTDIR"/usr/lib --disable-multilib libc_cv_forced_unwind=yes
@@ -254,15 +255,15 @@ make -s install DESTDIR="$SYSROOTDIR"
254255
cd "$DOWNLOADDIR"/gcc-$GCCBASE_VERSION/build || exit
255256
if [ -n "$(ls -A "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/build/*; fi
256257
make -s -j$(nproc)
257-
make -s install DESTDIR="$INSTALLDIR"
258+
make -s install-strip DESTDIR="$INSTALLDIR"
258259
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-$GCCBASE_VERSION/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-$GCCBASE_VERSION/build/*; fi
259260

260261
if [ "$GCC_VERSION" != "$GCCBASE_VERSION" ]; then
261262
cd "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build || exit
262263
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build/*; fi
263264
../configure --prefix= --target=$TARGET --enable-languages=$LANGUAGES --with-sysroot=/$TARGET/libc --with-build-sysroot="$SYSROOTDIR" --with-arch=$ARCH --with-fpu=$FPU --with-float=hard --disable-multilib
264265
make -s -j$(nproc)
265-
make -s install DESTDIR="$INSTALLDIR"
266+
make -s install-strip DESTDIR="$INSTALLDIR"
266267
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build/*; fi
267268

268269
echo "Building GCC Native GCC $GCC_VERSION Binaries..."

build-scripts/RTBuilder_64b

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ if [ "$GCC_VERSION" != "$GCCBASE_VERSION" ]; then
261261
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build/*; fi
262262
../configure --prefix= --build="$MACHTYPE" --host=$TARGET --target=$TARGET --enable-languages=$LANGUAGES --with-arch=$ARCH --disable-multilib --program-suffix=-"$GCC_VERSION"
263263
make -s -j$(nproc)
264-
make -s install-strip DESTDIR="$BUILDDIR"/native-pi-gcc-"$GCC_VERSION"-$FOLDER_VERSION
264+
make -s install DESTDIR="$BUILDDIR"/native-pi-gcc-"$GCC_VERSION"-$FOLDER_VERSION
265265
if [ -n "$(ls -A "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build)" ]; then rm -rf "$DOWNLOADDIR"/gcc-"$GCC_VERSION"/build/*; fi
266266
cd "$DOWNLOADDIR"/gcc-"$GCC_VERSION" || exit
267267
cat gcc/limitx.h gcc/glimits.h gcc/limity.h >"$BUILDDIR"/native-pi-gcc-"$GCC_VERSION"-$FOLDER_VERSION/lib/gcc/$TARGET/"$GCC_VERSION"/include-fixed/limits.h

0 commit comments

Comments
 (0)