Skip to content

Compilation issue: jitterentropy.c fails to build when optimisation is set in CFLAGS. #889

@dreirund

Description

@dreirund

I created an Arch Linux AUR package robrix-git (↗ build recipe) and built it.

Upon doing so, I encountered that I had to pass -O0 to the $CFLAGS, otherwise compilation would abort when trying to compile jitterentropy.c:

  cargo:warning=   47 |  #error "The CPU Jitter random number generator must not be compiled with optimizations. See documentation. Use the compiler switch -O0 for compiling jitterentropy.c."

By default, I have -O3 in the $CFLAGS to create optimised code. Where I now have passed -O0, this applies to all C sources which get compiled by the cargo build run.
Can you make that -O0 is explicitly passed by your build system to the sources that need it, so that the rest can still use optimisation?

Regards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions