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

test-ref-configs.pl fails with Clang #2051

Closed
simonbutcher opened this issue Oct 3, 2018 · 3 comments · Fixed by #2053
Closed

test-ref-configs.pl fails with Clang #2051

simonbutcher opened this issue Oct 3, 2018 · 3 comments · Fixed by #2053
Labels

Comments

@simonbutcher
Copy link
Contributor

Description

  • Type: Bug
  • Priority: Major

Bug

mbed TLS build:
Version: mbedtls-2.13.1

Executing test-ref-configs.pl with clang fails with a series of build errors.

Extract from the build.

  CC    x509/req_app.c
  Gen   test_suite_aes.ofb.c
  CC    test_suite_aes.ofb.c
suites/helpers.function:238:13: error: unused function 'hexify'
      [-Werror,-Wunused-function]
static void hexify( unsigned char *obuf, const unsigned char *ibuf, int len )
            ^
suites/helpers.function:292:23: error: unused function 'unhexify_alloc'
      [-Werror,-Wunused-function]
static unsigned char *unhexify_alloc( const char *ibuf, size_t *olen )
                      ^
suites/helpers.function:343:12: error: unused function 'rnd_zero_rand'
      [-Werror,-Wunused-function]
static int rnd_zero_rand( void *rng_state, unsigned char *output, size_t len )
           ^
suites/helpers.function:370:12: error: unused function 'rnd_buffer_rand'
      [-Werror,-Wunused-function]
static int rnd_buffer_rand( void *rng_state, unsigned char *output, size_t len )
           ^
suites/helpers.function:416:12: error: unused function 'rnd_pseudo_rand'
      [-Werror,-Wunused-function]
static int rnd_pseudo_rand( void *rng_state, unsigned char *output, size_t len )
           ^
5 errors generated.
Makefile:102: recipe for target 'test_suite_aes.ofb' failed
make[1]: *** [test_suite_aes.ofb] Error 1
Makefile:21: recipe for target 'tests' failed
make: *** [tests] Error 2
Failed to build: config-suite-b.h
@ciarmcom
Copy link

ciarmcom commented Oct 3, 2018

ARM Internal Ref: IOTSSL-2563

@simonbutcher
Copy link
Contributor Author

This appears to be a duplicate of #1628. As that was raised first I'm closing this issue.

@gilles-peskine-arm
Copy link
Contributor

Fundamentally the bug is in test-ref-configs.pl: it doesn't invoke make properly. It should run make CFLAGS='-Os -Werror', not make CFLAGS='-Os -Werror -Wall -Wextra'. Perhaps there's a bug in the makefile as well, but that's less clear to me: we run $(CC) $(LOCAL_CFLAGS) $(CFLAGS), should we invert the order of CFLAGS and LOCAL_CFLAGS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants