Page MenuHomeFreeBSD

gcc 4.9.1 compilation fixes for aesni
ClosedPublic

Authored by rodrigc on Apr 12 2015, 9:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 8:27 PM
Unknown Object (File)
Nov 14 2024, 5:18 PM
Unknown Object (File)
Nov 3 2024, 11:51 AM
Unknown Object (File)
Nov 3 2024, 11:51 AM
Unknown Object (File)
Nov 3 2024, 11:51 AM
Unknown Object (File)
Oct 1 2024, 1:29 PM
Unknown Object (File)
Oct 1 2024, 7:08 AM
Unknown Object (File)
Sep 30 2024, 3:12 PM

Details

Summary

In the version of gcc in the FreeBSD tree, this modification was made to
the compiler:
https://svnweb.freebsd.org/base?view=revision&revision=r242182

#if STDC_HOSTED
#include <mm_malloc.h>
#endif

A similar change was done to clang in the FreeBSD tree:
https://svnweb.freebsd.org/base?view=revision&revision=r218893

However, for external gcc toolchains, this patch is not in the compiler's header
file.

This patch to FreeBSD's aesni code allows compilation with an external
gcc toolchain

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

rodrigc retitled this revision from to gcc 4.9.1 compilation fixes for aesni.
rodrigc updated this object.
rodrigc edited the test plan for this revision. (Show Details)
rodrigc added a reviewer: jmg.
rodrigc added a subscriber: Unknown Object (MLST).

hmm.. maybe we should put this hack into a different header file and just include that one… since all these files are in crypto/aesni, why not a local header (use quotes) that is named gnuhack.h or something (can't think of a good name right now)?

Right now it's only three files, but I have work that may expand the number of files that this hack is required to be added too, and if we need to add hacks for other compilers, or if gnu changes how things are, then we can update the hacks in one location, instead of n locations.

dim added inline comments.
sys/crypto/aesni/aesni_wrap.c
49 ↗(On Diff #4798)

This part seems to be superfluous, since "aesencdec.h", just two files above this one, already defines _MM_MALLOC_INCLUDED.

rodrigc edited edge metadata.

OK, here's an updated diff where things are separated out into a different header file.

kib added inline comments.
sys/crypto/aesni/aesencdec.h
30

Why this line uses "" ?

we should either include both w/ quotes or both w/ angle braces… I personally would prefer quotes, but that's me, but I won't object to angle braces.

sys/crypto/aesni/aesencdec.h
30

so it looks like the same directory as the file instead of having to specify a full path.. similar to how this header is included in aesni_wrap.c...

rodrigc updated this revision to Diff 4852.

Closed by commit rS281606 (authored by @rodrigc).