Skip to content

Use generated source files from Mbed TLS #97

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

Merged
merged 3 commits into from
Apr 29, 2019

Conversation

Patater
Copy link
Contributor

@Patater Patater commented Apr 26, 2019

There are a handful of generated source files that both Mbed Crypto and Mbed TLS can create. When created from Mbed Crypto, they contain only symbols, errors, options and other things visible within Mbed Crypto itself. When Mbed TLS generates these source files, it uses symbols, errors, options and other things visible from both Mbed TLS and Mbed Crypto. When building libmbedcrypto.a or libmbedcrypto.so as a submodule from Mbed TLS, use the Mbed-TLS-generated files as these are the most comprehensive and useful to the rest of Mbed TLS.

Don't depend on the C compiler's default output file name and path. Make
knows what it wants to build and where it should go, and this may not
always align with the C compiler default, so tell the C compilter to
output to the Make target explicitly.
@Patater Patater added bug Something isn't working needs: review The pull request is ready for review. This generally means that it has no known issues. needs: ci Needs a passing full CI run labels Apr 26, 2019
library/Makefile Outdated

# For files generated by the parent project (Mbed TLS) when building Mbed
# Crypto as a submodule, ensure that the parent project instance is used.
ifdef USE_CRYPTO_SUBMODULE
Copy link
Contributor

@AndrzejKurek AndrzejKurek Apr 26, 2019

Choose a reason for hiding this comment

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

I'd recommend changing that to an ifneq ($(USE_CRYPTO_SUBMODULE), 0), same as here:
Mbed-TLS/mbedtls@fc5a7f5
since USE_CRYPTO_SUBMODULE=0 will also have it defined.

Copy link
Contributor

@AndrzejKurek AndrzejKurek left a comment

Choose a reason for hiding this comment

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

One change requested.

@Patater Patater force-pushed the tls-generated-sources branch from f345d4a to c8cba4f Compare April 26, 2019 14:14
@Patater
Copy link
Contributor Author

Patater commented Apr 26, 2019

Rebased to use more robust option checking.

@Patater Patater requested a review from AndrzejKurek April 26, 2019 14:16
Patater added 2 commits April 26, 2019 15:41
When building as a submodule of a parent project, like Mbed TLS, use the
parent projects generated source files (error.c, version.c,
version_features.c)
When building as a submodule of a parent project, like Mbed TLS, use the
parent projects generated source files (error.c, version.c,
version_features.c)
@Patater Patater force-pushed the tls-generated-sources branch from c8cba4f to 18d4789 Compare April 26, 2019 14:41
@Patater
Copy link
Contributor Author

Patater commented Apr 26, 2019

Rebased to use ifeq 1 in order to do the right thing when the variable is not defined.

@Patater Patater removed the needs: ci Needs a passing full CI run label Apr 29, 2019
@Patater Patater requested a review from dgreen-arm April 29, 2019 09:55
Copy link
Contributor

@dgreen-arm dgreen-arm left a comment

Choose a reason for hiding this comment

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

LGTM

@Patater Patater removed the needs: review The pull request is ready for review. This generally means that it has no known issues. label Apr 29, 2019
@Patater Patater merged commit b978282 into ARMmbed:development Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants