[PATCH] urngd: fixes compilation with glibc

Rafał Miłecki rafal at milecki.pl
Wed Sep 27 13:08:14 PDT 2023

On 16.09.2023 05:55, Chukun Pan wrote:
> When compiling with glibc it will result in error:
> 1. #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
> Fix this by compiling with optimization (-O2) by default.
> 2. jitterentropy-base.c:(.text+0x39f8): undefined reference to `pthread_join'
> Fix this by always linking pthread.

Others already said we can't switch to -O2, I'll just add some references.

At some point jitterentropy-library switched from -O0 to -O2:
3130cd99d7fa ("replace LSFR with SHA-3 256")

That was however explicitly changed back later with the:
20184e97af8f ("Compile Jitter RNG without optimizations")

Also jitterentropy-rngd uses -O0:
f1bc39ae713a ("use -O0")

More information about the openwrt-devel mailing list