Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC 10.3 Bugfix 1 - Constant literal address fix #8393

Merged
merged 3 commits into from
Dec 2, 2021

Conversation

earlephilhower
Copy link
Collaborator

Fixes a hard-to-track bug in GCC 10.x.
earlephilhower/newlib-xtensa#19

GCC 10.3 had an issue with addressing constant literals which would result
in crazy offsets being used and random crashes in production. Update
with an upstream GCC 11 bugfix.

Fixes esp8266#8314 and other hard-to-track bugs.

GCC 10.3 had an issue with addressing constant literals which would result
in crazy offsets being used and random crashes in production.  Update
with an upstream GCC 11 bugfix.
@d-a-v d-a-v added the alpha included in alpha release label Nov 29, 2021
@bwjohns4
Copy link

bwjohns4 commented May 7, 2022

@mcspr , I see your PIO package for this (mcspr/toolchain-xtensa @ ~5.100300.211127). Would it be possible to upload the binaries for 'darwin_arm64'?

@mcspr
Copy link
Collaborator

mcspr commented May 7, 2022

@bwjohns4
Copy link

bwjohns4 commented May 7, 2022

@mcspr , So it's the exact same files from the release packaged for PIO? Wonder how I tell my M1 MAC to just use the x64 intel version and virtualize it with Rosetta??

Do you know why the default pckage works fine on the M1 MAC but this toolchain does not and instead errors out on could not find darwin_arm64?

@mcspr
Copy link
Collaborator

mcspr commented May 7, 2022

Hmm... The registry payload returns x86_64 version for both, I suppose package.json was modified to include it

{
  "checksum": {"sha256": "0a40e1cc5f6f9cedd85d3d4dac548bfb5535c015c40cb10a7755f7dbd3f1db4c"},
  "download_url": "https://dl.registry.platformio.org/download/platformio/tool/toolchain-xtensa/2.100300.210717/toolchain-xtensa-darwin_x86_64-2.100300.210717.tar.gz",
  "name": "toolchain-xtensa-darwin_x86_64-2.100300.210717.tar.gz",
  "size": 75089523,
  "system": ["darwin_x86_64", "darwin_arm64"]
}

@mcspr
Copy link
Collaborator

mcspr commented May 8, 2022

For a follow-up, does darwin_arm64 arch work now?
(ref. registry api response, there is now a special version with a +darwin suffix. I assume that will work, but I wonder if it needed to be a real version bump)

@bwjohns4
Copy link

bwjohns4 commented May 9, 2022

It does work now! Did that GCC build require manual patching? How should I regard the integrity of this compiler vs some of the other OS compilers? Won't they all generate slightly different firmware binary since they're different GCC binaries themselves? Is any one system more reliable/trusted than another?

@mcspr
Copy link
Collaborator

mcspr commented May 9, 2022

Just my misunderstanding of the question 🤷
It is doing x86_64 emulation, no binary differences should manifest. You can check the test script in the linked issue if you want to check for this specific problem.

The repo above was about actual darwin_arm64 binaries possibility, but that's going to happen some time in the future.

mcspr added a commit to mcspr/platform-espressif8266 that referenced this pull request Jul 19, 2023
See esp8266/Arduino#8393
Missed when updating to Core 3.1.x, fix optimisation bug(s)
valeros pushed a commit to platformio/platform-espressif8266 that referenced this pull request Jul 19, 2023
See esp8266/Arduino#8393
Missed when updating to Core 3.1.x, fix optimisation bug(s)
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
Fixes a hard-to-track bug in GCC 10.x.
earlephilhower/newlib-xtensa#19
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102115

GCC 10.3 had an issue with addressing constant integer literals which would
result in crazy offsets being used and random crashes in production.
Update with an upstream GCC 11 bugfix by @jjsuwa-sys3175
earlephilhower/esp-quick-toolchain#31
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=dcb2873cd32b263643bfd9d1298b35d6cd028f0a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha included in alpha release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants