When Fedora moved to using gcc 7.0.1, the gnupg 1.4 ARM build started failing the tests. If it is built using -O1 they pass, if you use -O2 they fail. I filed a bug with our gcc maintainers and they tracked it down to the old mpi/longlong.h header. See https://bugzilla.redhat.com/show_bug.cgi?id=1424619 and the fix is supposed to be https://gcc.gnu.org/ml/gcc-patches/2005-10/msg00546.html
I see that longlong.h has been patched for libgcrypt (https://dev.gnupg.org/rC8aa4f2161cf643ce36d87d2e2786b546736f8232) but that it is slightly different. I'd give patching it a try myself, but I don't know anything about ARM assembly or what _CLOBBER_CC is supposed to do.
Could someone take a look at this and port the changes to the 1.4 stable branch? Thanks!