Skip to content

Commit e7353d2

Browse files
committed
[DEBUG] Critical bug-fix for Bullseye Toolchains (Fixes #89)
- Added patched `Makfile.patch` file that contains critical bug-fix for Glibc `2.31`. - Bug can explained as follows: On platforms where long double has the same ABI as double, glibc-2.31 defines long double functions as aliases for the corresponding double functions. The declarations of those functions in <math.h> are disabled to avoid problems with aliases having incompatible types, but GCC 10 now gives errors for incompatible types when the long double function is known to GCC as a built-in function, not just when there is an incompatible header declaration. More info. on this patch: https://sourceware.org/git/?p=glibc.git;a=patch;h=49348beafe9ba150c9bd48595b3f372299bddbb0;hp=cbd156990489568eb8c1b97ace3ad24fc784e049 - Added missing docs files.
1 parent ddcbd3c commit e7353d2

10 files changed

+1769
-0
lines changed

build-scripts/CI/CIBB_32b

+6
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ if [ ! -d "glibc-$GLIBC_VERSION" ]; then
189189
tar xf glibc-$GLIBC_VERSION.tar.bz2
190190
cd glibc-$GLIBC_VERSION || exit
191191
mkdir -p build
192+
# apply critical patch if Glibc 2.31 and GCC 10 series are being built
193+
if [[ "$GCCBASE_VERSION" =~ ^10.* ]] && [ "$GLIBC_VERSION" = "2.31" ]; then
194+
echo "Applying patch!"
195+
curl -o Makefile.patch https://raw.githubusercontent.com/abhiTronix/raspberry-pi-cross-compilers/master/patches/Makefile.patch
196+
mv Makefile.patch math/Makefile
197+
fi
192198
cd "$DOWNLOADDIR" || exit
193199
rm ./*.tar.*
194200
fi

build-scripts/CI/CIBB_64b

+6
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ if [ ! -d "glibc-$GLIBC_VERSION" ]; then
170170
tar xf glibc-$GLIBC_VERSION.tar.bz2
171171
cd glibc-$GLIBC_VERSION || exit
172172
mkdir -p build
173+
# apply critical patch if Glibc 2.31 and GCC 10 series are being built
174+
if [[ "$GCCBASE_VERSION" =~ ^10.* ]] && [ "$GLIBC_VERSION" = "2.31" ]; then
175+
echo "Applying patch!"
176+
curl -o Makefile.patch https://raw.githubusercontent.com/abhiTronix/raspberry-pi-cross-compilers/master/patches/Makefile.patch
177+
mv Makefile.patch math/Makefile
178+
fi
173179
cd "$DOWNLOADDIR" || exit
174180
rm ./*.tar.*
175181
fi

build-scripts/RTBuilder_32b

+6
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ if [ ! -d "glibc-$GLIBC_VERSION" ]; then
197197
tar xf glibc-$GLIBC_VERSION.tar.bz2
198198
cd glibc-$GLIBC_VERSION || exit
199199
mkdir -p build
200+
# apply critical patch if Glibc 2.31 and GCC 10 series are being built
201+
if [[ "$GCCBASE_VERSION" =~ ^10.* ]] && [ "$GLIBC_VERSION" = "2.31" ]; then
202+
echo "Applying patch!"
203+
curl -o Makefile.patch https://raw.githubusercontent.com/abhiTronix/raspberry-pi-cross-compilers/master/patches/Makefile.patch
204+
mv Makefile.patch math/Makefile
205+
fi
200206
cd "$DOWNLOADDIR" || exit
201207
rm ./*.tar.*
202208
fi

build-scripts/RTBuilder_64b

+6
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ if [ ! -d "glibc-$GLIBC_VERSION" ]; then
182182
tar xf glibc-$GLIBC_VERSION.tar.bz2
183183
cd glibc-$GLIBC_VERSION || exit
184184
mkdir -p build
185+
# apply critical patch if Glibc 2.31 and GCC 10 series are being built
186+
if [[ "$GCCBASE_VERSION" =~ ^10.* ]] && [ "$GLIBC_VERSION" = "2.31" ]; then
187+
echo "Applying patch!"
188+
curl -o Makefile.patch https://raw.githubusercontent.com/abhiTronix/raspberry-pi-cross-compilers/master/patches/Makefile.patch
189+
mv Makefile.patch math/Makefile
190+
fi
185191
cd "$DOWNLOADDIR" || exit
186192
rm ./*.tar.*
187193
fi

docs/cross-gcc-bullseye.md

+235
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
<!--
2+
===============================================
3+
Raspberry Pi Toolchains(raspberry-pi-cross-compilers): This project
4+
provides latest automated GCC Cross Compiler & Native (ARM & ARM64)
5+
build-scripts and precompiled standalone toolchains for Raspberry Pi.
6+
7+
8+
Copyright (C) 2020 Abhishek Thakur(@abhiTronix) <[email protected]>
9+
10+
11+
This program is free software: you can redistribute it and/or modify
12+
it under the terms of the GNU General Public License as published by
13+
the Free Software Foundation, either version 3 of the License, or
14+
(at your option) any later version.
15+
16+
This program is distributed in the hope that it will be useful,
17+
but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
GNU General Public License for more details.
20+
21+
You should have received a copy of the GNU General Public License
22+
along with this program. If not, see <https://www.gnu.org/licenses/>.
23+
===============================================
24+
-->
25+
26+
<br>
27+
28+
<h1 align=center><img alt="Description" title="Toolchain Description" src="https://raw.githubusercontent.com/abhiTronix/Imbakup/master/Images/gcc/cross-gcc-buster.png"></h1>
29+
30+
31+
### TL'DR
32+
33+
**What is this project?**
34+
35+
> This project provides the Latest, CI maintained, Precompiled [**Raspberry Pi CPU optimized**](#optimization-flags-involved) GCC Cross & Native (ARM & ARM64) Compressed Standalone Toolchains, that is [**fastest to setup**](#e-toolchain-setup-documentation) and saves you tons of time and helps you to get quickly started with software development on Pi.
36+
37+
**Who will benefit from the project?**
38+
39+
> This project benefits everyone, from Professional Devs to a college research Student, looking for latest easy-to-use precompiled GCC toolchains for their Hobby Raspberry Pi project(s).
40+
41+
42+
43+
44+
<br>
45+
46+
-------------------------
47+
48+
<br>
49+
50+
This project now utilizes powerful [**Github Actions**][git-action] CI(Continuous Integration) to auto-compile Compressed GCC Cross & Native ARM/ARM64 Toolchain binaries and thereby auto-deploy them to SourceForge repository.
51+
52+
<h3 align=center><img alt="Workflow" title="Toolchain Builder Workflow" src="https://raw.githubusercontent.com/abhiTronix/Imbakup/master/Images/gcc/workflow.png"></h3>
53+
54+
55+
<br>
56+
57+
-------------------------
58+
59+
<br>
60+
61+
## Toolchain Binaries description table:
62+
63+
**Here's a reference table for various CI generated OS targetted precompiled Toolchain Binaries available with this project:**
64+
65+
* **References:**
66+
* **Host OS:** on which the toolchain is executed/used.
67+
* **Target OS:** for which the toolchain generates code.
68+
69+
<br>
70+
71+
| Toolchains | Host OS | Target OS | Current Status | Precompiled GCC versions available |
72+
| :---------- | :--------: | :-------: | :--------: | :------------------------: |
73+
| **Raspberry Pi GCC Cross-Compiler Toolchains (Stretch)** | any x64/x86 Linux machine | Stretch **32-bit OS** (Debian Version 9) only | Stable/Production | 6.3.0, 9.4.0, 10.3.0 |
74+
| **Raspberry Pi GCC Cross-Compiler Toolchains (Buster)** | any x64/x86 Linux machine | Buster **32-bit OS** (Debian Version 10) only | Stable/Production | 8.3.0, 9.4.0, 10.3.0 |
75+
| **Raspberry Pi GCC Cross-Compiler Toolchains (Bullseye)** | any x64/x86 Linux machine | Bullseye **32-bit OS** (Debian Version 11) only | Stable/Production | 10.2.0, 10.3.0 |
76+
| **Raspberry Pi GCC Native-Compiler Toolchains (Stretch)** | Stretch **32-bit OS** (Debian Version 9) only | Stretch **32-bit OS** (Debian Version 9) only | Stable/Production | 9.4.0, 10.3.0 |
77+
| **Raspberry Pi GCC Native-Compiler Toolchains (Buster)** | Buster **32-bit OS** (Debian Version 10) only | Buster **32-bit OS** (Debian Version 10) only | Stable/Production | 9.4.0, 10.3.0 |
78+
| **Raspberry Pi GCC Native-Compiler Toolchains (Bullseye)** | Bullseye **32-bit OS** (Debian Version 11) only | Bullseye **32-bit OS** (Debian Version 11) only | Stable/Production | 10.3.0 |
79+
| **Raspberry Pi GCC 64-Bit Cross-Compiler Toolchains (Stretch)** | any x64/x86 Linux machine | Stretch **64-bit OS** (Debian Version 9) only | Stable/Production | 6.3.0, 9.4.0, 10.3.0 |
80+
| **Raspberry Pi GCC 64-Bit Cross-Compiler Toolchains (Buster)** | any x64/x86 Linux machine | Buster **64-bit OS** (Debian Version 10) only | Stable/Production | 8.3.0, 9.4.0, 10.3.0 |
81+
| **Raspberry Pi GCC 64-Bit Cross-Compiler Toolchains (Bullseye)** | any x64/x86 Linux machine | Bullseye **64-bit OS** (Debian Version 11) only | Stable/Production | 10.2.0, 10.3.0 |
82+
| **Raspberry Pi GCC 64-Bit Native-Compiler Toolchains (Stretch)** | Stretch **64-bit OS** (Debian Version 9) only | Stretch **64-bit OS** (Debian Version 9) only | Stable/Production | 9.4.0, 10.3.0 |
83+
| **Raspberry Pi GCC 64-Bit Native-Compiler Toolchains (Buster)** | Buster **64-bit OS** (Debian Version 10) only | Buster **64-bit OS** (Debian Version 10) only | Stable/Production | 9.4.0, 10.3.0 |
84+
| **Raspberry Pi GCC 64-Bit Native-Compiler Toolchains (Bullseye)** | Bullseye **64-bit OS** (Debian Version 11) only | Bullseye **64-bit OS** (Debian Version 11) only | Stable/Production | 10.3.0 |
85+
| **Exclusive/Experimental Toolchains** | x86/x86_64 Pi Desktop | x86/x86_64 Pi Desktop | Beta/Experimental | 10.3.0 (x86), 10.3.0 (x86_64) |
86+
87+
88+
**Tip:** _To get the location of each Binary of this project on SourceForge, you can also check out [this Reference Tree](https://github.com/abhiTronix/raspberry-pi-cross-compilers/wiki/Toolchain-Binaries-Reference-Tree#toolchain-binaries-reference-tree)._
89+
90+
91+
<br>
92+
93+
-------------------------
94+
95+
<br>
96+
97+
98+
## Toolchain Setup Documentation:
99+
100+
These precompiled toolchains setup requires just three easy steps - **Downloading, Extracting and Linking**:
101+
102+
* #### [WIKI-Documentation (en-English)](https://github.com/abhiTronix/raspberry-pi-cross-compilers/wiki)
103+
104+
<br>
105+
106+
-------------------------
107+
108+
<br>
109+
110+
## Supported Toolchains Programming Languages:
111+
- C++
112+
- Fortran
113+
- C
114+
- Any other language support can be easily [compiled](#scroll-build-scripts).
115+
116+
<br>
117+
118+
-------------------------
119+
120+
<br>
121+
122+
123+
## Supporting this Project
124+
125+
**If these binaries helped you big time, please consider supporting it through any size donations.**
126+
127+
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?logo=paypal&style=for-the-badge)](https://paypal.me/AbhiTronix)
128+
129+
***You can also share your [**thoughts**](https://sourceforge.net/projects/raspberry-pi-cross-compilers/reviews) or just drop a [star](https://github.com/abhiTronix/raspberry-pi-cross-compilers/stargazers).***
130+
131+
<br>
132+
133+
-------------------------
134+
135+
<br>
136+
137+
138+
# Additional Information
139+
140+
### Supported ARM Devices:
141+
142+
- All Raspberry Pi hardware/versions/models are currently supported.
143+
- Any other ARM Device(such as android, IoT) with similar Hardware architecture(see [Optimization Flags](#optimization-flags-involved)) should also work.
144+
145+
### Optimization Flags Involved:
146+
147+
**These toolchains are built with these following system-specific LTO _(Link Time Optimization)_ flags, therefore you can easily take advantage of your Raspberry Pi's CPU specific features with these Toolchains while compiling your programs:**
148+
149+
**Important:** The latest Raspberry Pi 4 uses a Broadcom BCM2711 SoC with a 1.5 GHz 64-bit quad-core ARM Cortex-A72 processor, that also have armv8-a architecture similar to Raspberry Pi 3B+, therefore it is also officially supported!
150+
151+
| Raspberry Pi Board | Link Time Optimization Flags |
152+
|---|---|
153+
| Raspberry Pi - *Zero/W/WH & 1 Model A/B/A+/B+* | `-march=armv6 -mfloat-abi=hard -mfpu=vfp` |
154+
| Raspberry Pi - *2 & 3 Model A/B* | `-march=armv7-a -mfloat-abi=hard -mfpu=neon-vfpv4` |
155+
| Raspberry Pi - *3 & 4 Model A+/B+ & Compute 3/3-lite/3+ (32-Bit)* | `-march=armv8-a -mfloat-abi=hard -mfpu=neon-fp-armv8` |
156+
| Raspberry Pi - *3 & 4 Model A+/B+ & Compute 3/3-lite/3+ (64-Bit)* | `-march=armv8-a+fp+simd` |
157+
158+
159+
<br>
160+
161+
-------------------------
162+
163+
<br>
164+
165+
166+
## Citing
167+
168+
**Here is a Bibtex entry you can use to cite this project in a publication:**
169+
170+
```BibTeX
171+
@misc{raspberry-pi-cross-compilers,
172+
Title = {Raspberry Pi Toolchains},
173+
Author = {Abhishek Thakur},
174+
howpublished = {\url{https://github.com/abhiTronix/raspberry-pi-cross-compilers}},
175+
year = {2020}
176+
}
177+
```
178+
179+
180+
<br>
181+
182+
-------------------------
183+
184+
<br>
185+
186+
187+
## Copyright License
188+
189+
**Copyright © 2020 abhiTronix**
190+
191+
This Project source-code and its precompiled binaries are licensed under the [**GPLv3**][license] license.
192+
193+
<br>
194+
195+
-------------------------
196+
197+
<br>
198+
199+
200+
## Acknowledgments
201+
202+
Thank you,
203+
204+
- [GNU project][gnu] for providing the latest source code.
205+
- [Raspberry Pi project][pi-project] for providing the latest kernel and docs.
206+
- [GitHub Actions][git-action] for making it easier to automate Toolchain Builder workflows.
207+
- [Sourceforge project][sf-project] for allowing me to publish these binaries.
208+
209+
210+
211+
[downloads-badge]:https://img.shields.io/sourceforge/dt/raspberry-pi-cross-compilers?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAAYFBMVEVHcEz/OwDzfCD0fCDzfCDzfR/zfCD9fiHzfCD0fCDzfCD0fSDzeyDzfB/zfCDzfCDzfCD/WgPzfCDxfx7wfCH0fCDzfCDzfCDzfB/zfCDzfCD0fCDzfCDyfCD1fCDzfCAr6LXeAAAAH3RSTlMAAXuI/oNpCPhIlYq2oYC37wN2IRDO5sI926lfUycyJgWG0gAABKZJREFUeAHt3P9Os0gUxvEzOhZobUvL71r73P9dbkzfJcW3wPCcnRzN8v1b48cjhWEmUdbW1tbW1tbWPrr8WVUrP7cXjJSXv88MZL/Q7IvfZ8aL/MzOGG+3mlfzal7N/0vzpq43Yt5hkfkN8Dj8OvNXh19mJtTmZnM1YTZXE2ZzNWE2VxNmczVhNlcTZls1YT4Tr2HWZpfDUk2Yp9E4/FDz9De8/FCzuK2BmjBbqgmzvZow26t5M6+2N9ur3wgzobYw82p7860g1MbmA9JMvneaVJubpUKvNpr1tPlVntQBSFti1kbmHo2cuK4NzVIDgK+Sv9X7KbWpucS9vRBqI7Nrcc9fCbWFeXBAV5eE2sbsKvzJb4VQW5jlhj7fEmoLszyYfOUItYH50+Ohq8RX683yjscqF1+tN18xLBOlOr75VNYY1ohOHd8s7h3fu8nTTryaN4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mVubiTJzM1HhKbP9QuRZfm9vnqgsnvUfk9fW1tbW1tb+AZhQydEXZaX4AAAAAElFTkSuQmCC
212+
[license-badge]:https://img.shields.io/github/license/abhiTronix/raspberry-pi-cross-compilers.svg?style=for-the-badge
213+
[kofi-badge]:https://www.ko-fi.com/img/githubbutton_sm.svg
214+
215+
[downloads]:https://sourceforge.net/projects/raspberry-pi-cross-compilers
216+
[license]:https://github.com/abhiTronix/raspberry-pi-cross-compilers/blob/master/LICENSE
217+
[kofi]:https://ko-fi.com/W7W8WTYO
218+
[gnu]:https://gcc.gnu.org/
219+
[pi-project]:https://www.raspberrypi.org/
220+
[sf-project]:https://sourceforge.net
221+
[git-action]:https://github.com/features/actions
222+
[tar]:https://www.gnu.org/software/tar/
223+
[pigz]:https://zlib.net/pigz/
224+
225+
[cc-stretch-630]:https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Stretch/GCC%206.3.0/
226+
227+
[cc-buster-830]:https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%208.3.0/
228+
229+
[nc-stretch-920]:https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Native-Compiler%20Toolchains/Stretch/
230+
[nc-buster-920]:https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Native-Compiler%20Toolchains/Buster/
231+
[cc-64-630]:https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Bonus%20Raspberry%20Pi%20GCC%2064-Bit%20Toolchains/Raspberry%20Pi%20GCC%2064-Bit%20Cross-Compiler%20Toolchains/GCC%206.3.0/
232+
[cc-64-830]:https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Bonus%20Raspberry%20Pi%20GCC%2064-Bit%20Toolchains/Raspberry%20Pi%20GCC%2064-Bit%20Cross-Compiler%20Toolchains/GCC%208.3.0/
233+
[cc-64-920]:https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Bonus%20Raspberry%20Pi%20GCC%2064-Bit%20Toolchains/Raspberry%20Pi%20GCC%2064-Bit%20Cross-Compiler%20Toolchains/GCC%209.2.0/
234+
[nc-64-830]:https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Bonus%20Raspberry%20Pi%20GCC%2064-Bit%20Toolchains/Raspberry%20Pi%20GCC%2064-Bit%20Native-Compiler%20Toolchains/GCC%208.3.0/
235+
[nc-64-920]:https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Bonus%20Raspberry%20Pi%20GCC%2064-Bit%20Toolchains/Raspberry%20Pi%20GCC%2064-Bit%20Native-Compiler%20Toolchains/GCC%209.2.0/

0 commit comments

Comments
 (0)