Skip to content

Add Espress ld flags to more closely match CMake builds #7293

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

Closed
wants to merge 2 commits into from

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Dec 2, 2022

#7280 added a single -u ... value to Espressif links to force the correct routine to be linked in, instead of a WEAK version.

I looked over the output of ninja.build and found several more things that potentially should be added to the links. I've added this in the Espressif Makefile. I tested with the usual "Internet test" that's in the Learn Guides on an ESP32-S2 and S3, and it works. One of the added -u symbols is relevant to I2C, so I also tried ESp-32S3 I2C with a problematic clock-stretching device and sadly it does not fix things.

I am not sure whether these changes are worth it, but they do make the build "more correct" vis-a-vis the CMake builds. Making this a draft since we might not want to merge.

The FIRST and LAST flag groups were chosen to imitate what the current link is doing. The wrapping functions also have to be positioned early or the link fails.

@dhalbert dhalbert requested review from tannewt and jepler December 2, 2022 01:47
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok adding this.

Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I removed the duplicate. However, let's merge this for 9 instead of 8.1; I'll set a milestone.

@jepler jepler added this to the 9.0.0 milestone May 2, 2023
@dhalbert
Copy link
Collaborator Author

This should be delayed until ESP-IDF v5 update, and reviewed and redone then.

@tannewt
Copy link
Member

tannewt commented Aug 1, 2023

I'm going to close this since it will be redone with the switch to IDF 5 #6913

@tannewt tannewt closed this Aug 1, 2023
@dhalbert dhalbert deleted the espressif-ld-flags branch February 16, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants