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

arch: arm: cmse: re-introduce workaround for typeof #19195

Conversation

ioannisg
Copy link
Member

The GNU ARM Embedded "8-2019-q3-update" toolchain
erroneously uses "typeof" instead of "typeof".
To work around this we define typeof to be able to
support it.

This reverts commit 01a71ea.

Signed-off-by: Ioannis Glaropoulos Ioannis.Glaropoulos@nordicsemi.no

@ioannisg
Copy link
Member Author

Relates to #19182

@zephyrbot zephyrbot added the area: ARM ARM (32-bit) Architecture label Sep 16, 2019
@galak
Copy link
Collaborator

galak commented Sep 16, 2019

Can we add some gcc version checking. Thus it will be clear if/when we might want to remove this in the future.

@ioannisg ioannisg force-pushed the arch_arm_re_introduce_typeof_workaround branch from 077cb40 to 00c1d83 Compare September 16, 2019 16:37
@ioannisg
Copy link
Member Author

Can we add some gcc version checking. Thus it will be clear if/when we might want to remove this in the future.

That's what I wanted to avoid, @galak ; have ifdefs with toolchain versions. Like this , the workaround is more generic and not strictly coupled with a GCC release.

It, simply, defines the intrinsic if not already defined

@ioannisg ioannisg requested a review from mbolivar September 16, 2019 16:40
@ioannisg ioannisg added the area: Toolchains Toolchains label Sep 16, 2019
@ioannisg ioannisg added this to the v2.1.0 milestone Sep 16, 2019
@galak
Copy link
Collaborator

galak commented Sep 16, 2019

Hmm, than maybe a comment about some versions of gcc-8 being broken.

@ioannisg
Copy link
Member Author

ioannisg commented Sep 17, 2019

Hmm, than maybe a comment about some versions of gcc-8 being broken.

@galak something like:


/* Required for C99 compilation (required for GCC-8 where typeof
 * is used instead of __typeof__)
 */

???

@galak
Copy link
Collaborator

galak commented Sep 17, 2019

@galak something like:


/* Required for C99 compilation (required for GCC-8 where typeof
 * is used instead of __typeof__)
 */

???

Yes, but something like required for GCC-8.1 & GCC-8.2. It sounded like from @sigvartmh that GCC-8.3 has the fix.

@ioannisg
Copy link
Member Author

@galak something like:


/* Required for C99 compilation (required for GCC-8 where typeof
 * is used instead of __typeof__)
 */

???

Yes, but something like required for GCC-8.1 & GCC-8.2. It sounded like from @sigvartmh that GCC-8.3 has the fix.

Right, I 'l ll add the minor versions, too.

The GNU ARM Embedded "8-2019-q3-update" toolchain
erroneously uses "typeof" instead of "__typeof__".
To work around this we define typeof to be able to
support it.

This reverts commit 01a71ea.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
@sigvartmh
Copy link
Collaborator

@galak No I had patched my toolchain files when I tried it yesterday, forgot I had done that.

So all versions of arm-none-eabi-gcc 8 are bad for arm_cmse.h

@ioannisg ioannisg force-pushed the arch_arm_re_introduce_typeof_workaround branch from 00c1d83 to d780c12 Compare September 17, 2019 12:32
@ioannisg
Copy link
Member Author

@galak No I had patched my toolchain files when I tried it yesterday, forgot I had done that.

So all versions of arm-none-eabi-gcc 8 are bad for arm_cmse.h

@galak I updated the comment based on the feedback from @sigvartmh

@carlescufi carlescufi merged commit a78e5a2 into zephyrproject-rtos:master Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM ARM (32-bit) Architecture area: Toolchains Toolchains
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants