Great. It works on PowerPC with configure options "./configure", "./configure --enable-power-crypto-ext", and "./configure --enable-fat" and get the expected results.
However, there are two warning popped up when configured with --enable-power-crypto-ext
gcm.c: In function ‘nettle_gcm_set_key’: gcm.c:287:3: warning: implicit declaration of function ‘_nettle_gcm_init_key’; did you mean ‘nettle_gcm_set_key’? [-Wimplicit-function-declaration] 287 | _nettle_gcm_init_key(key->h); | ^~~~~~~~~~~~~~~~~~~~ | nettle_gcm_set_key gcm.c:287:3: warning: nested extern declaration of ‘_nettle_gcm_init_key’ [-Wnested-externs] gcm.c: In function ‘gcm_hash_sizes’: gcm.c:325:3: warning: implicit declaration of function ‘_nettle_gcm_hash’; did you mean ‘nettle_get_hashes’? [-Wimplicit-function-declaration] 325 | _nettle_gcm_hash(key, x, GCM_BLOCK_SIZE, buffer); | ^~~~~~~~~~~~~~~~ | nettle_get_hashes gcm.c:325:3: warning: nested extern declaration of ‘_nettle_gcm_hash’ [-Wnested-externs]
To suppress these warnings we need to declare a prototype for _nettle_gcm_init_key() and _nettle_gcm_hash() if "HAVE_NATIVE_gcm_init_key" and "HAVE_NATIVE_gcm_hash" are defined respectively.
Also, I think an error will pop up in x86_64 build if gcm_hash8 is enabled, we can fix this error by replacing the line 156 "#define gcm_hash _nettle_gcm_hash8" with "#define _nettle_gcm_hash _nettle_gcm_hash8"
Let me know if you want me to make a pull request for these changes.
regards, Mamone
On Thu, Nov 26, 2020 at 9:13 PM Niels Möller nisse@lysator.liu.se wrote:
Niels Möller nisse@lysator.liu.se writes:
Maamoun TK maamoun.tk@googlemail.com writes:
I'll make a pull request for fat build support.
Done!
I added two comments on the merge request.
I reorganized the ifdefs a bit more, and pushed to the ppc-gcm branch. Tested on gcc112. Please try it out.
Regards, /Niels
-- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance.