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

20240624-arm-thumb-includes #7679

Closed
wants to merge 1 commit into from

Conversation

douzzer
Copy link
Contributor

@douzzer douzzer commented Jun 24, 2024

src/include.am and configure.ac: build ARM thumb sources only on thumb builds, to avoid "ISO C forbids an empty translation unit".

motivated by this defect report:

[cross-armv7a-armasm-fips-140-3-ready-sp-all-testsuite-sanitizer] [210 of 264] [2312cb4563]
    setting up FIPS "ready"... done [fips="master" (0437f961f5), wolfCrypt=current OID under test (2312cb4563)]
    using armv7a-unknown-linux-gnueabihf-gcc 12.3.1
    configure...   real 0m19.219s  user 0m8.545s  sys 0m12.250s
    build...wolfcrypt/src/port/arm/thumb2-sha3-asm_c.c:1171: error: ISO C forbids an empty translation unit [-Werror=pedantic]

tested with wolfssl-multi-test.sh ... check-source-text cross-armv7a-all-armasm-testsuite-sanitizer cross-armv7a-armasm-fips-140-3-ready-sp-all-testsuite-sanitizer cross-aarch64-armasm-fips-140-3-dev-all-unittest-sanitizer

note, I added an optional thumb-armasm scenario to multi-test but couldn't get it to build -- oodles of assembler errors like this:

wolfcrypt/src/port/arm/thumb2-sha256-asm.S:164: Error: selected processor does not support `strd r4,r5,[sp,#32]' in Thumb mode

…b builds, to avoid "ISO C forbids an empty translation unit".
@SparkiDev
Copy link
Contributor

The thumb2 code won't work with thumb only processors.
Thumb2 instructions aren't really supported until ARMv7-M.
For example the Cortex-M0/M0+/M1 which are ARMv6-M have some Thumb2 instructions.
ARMv6 doesn't have Thumb2 instructions while ARMv6T2 does.

@SparkiDev
Copy link
Contributor

#7681

@douzzer
Copy link
Contributor Author

douzzer commented Jun 25, 2024

closing in favor of #7681 and, as discussed, because this PR isn't quite the right idea.

@douzzer douzzer closed this Jun 25, 2024
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.

2 participants