I'm testing on an Intel Mac-mini with OS X 10.12. The machine is modern and has Apple Clang 9.0.0 (Apple versioning does not follow LLVM versioning). I'm using the latest config.guess and config.sub. System Integrity Protection (SIP) is enabled.
GnuPG is a little dirty on its compile. But the reason for the bug report is, some of the items look non-trivial:
I think each source file produces a warning for -fno-delete-null-pointer-checks:
libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/Users/jwalton/ok2delete/include -I/Users/jwalton/ok2delete/include -DNDEBUG -g2 -O2 -fno-common -march=native -fPIC -pthread -fno-delete-null-pointer-checks -Wall -MT compat.lo -MD -MP -MF .deps/compat.Tpo -c compat.c -fno-common -DPIC -o .libs/compat.o clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]
And this one looks suspicious, too:
libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/Users/jwalton/ok2delete/include -DNDEBUG -I/Users/jwalton/ok2delete/include -g2 -O0 -fno-common -march=native -fPIC -pthread -fno-delete-null-pointer-checks -Wall -c ./rndjent.c -fno-common -DPIC -o .libs/rndjent.o clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument] In file included from ./rndjent.c:86: ./jitterentropy-base.c:53:13: warning: unknown pragma ignored [-Wunknown-pragmas] #pragma GCC optimize ("O0") ^
For the optimization issue, I believe a better choice would be... modify the makefile recipe for rndjent.c and always apply -O0, -xO0, etc. According to the GNU Make manual, you are allowed to apply flags that are necessary to compile the source file. (This is not a case of ignoring a user's choice if -O0 is required).
So the recipe might look something like this. Autoconf would determine the flag to use for NO_OPT.
rndjent.o: $(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(NO_OPT) -c rndjent.c -o rndjent.o