qt5-core - Detecting and Compiling AES Support on Build System

Raphael Kubo da Costa rakuco at FreeBSD.org
Sat Feb 23 17:32:34 GMT 2019


(re-sending from the right email address)

On 2/18/19 12:57 AM, Bryan Erickson wrote:
[...]
 > I have modified the make.conf of the build system to include the 
following:
 >
 > CPUTYPE?=sandybridge
 > CFLAGS= -mno-aes
 >
 > However, neither of the changes seem to impact the resulting error 
message.
 >
 > Looking at the build logs, I can see the issue:
 >
 > This is the Qt Open Source Edition.
 > You have already accepted the terms of the Open Source license.
 > Running configuration tests...
 > Checking for valid makespec... yes
 > Checking for target architecture... x86_64
 > Checking for SSE2 instructions... yes
 > Checking for AES new instructions... yes
[...]
 > But it does see my custom CFLAGS and CPUType:
[...]
 > Would you have any advice on how to proceed?
 >
 > Is there an additional modification that I need to my make.conf or is 
there some method for the build process to override the checks if the 
CFLAGS state no AES or the CPUTYPE is of a processor which doesn't have 
AES support?

If I understood you correctly, you're building the packages on a machine 
that does support AES, but you have control over CPUTYPE and other flags 
on a per-target basis, so that you can set them to a different value for 
your SandyBridge machine that doesn't support AES, right?

You essentially need to pass -no-aesni to Qt's configure script. We 
already do something similar in spirit to disable SSE2 on i386 when it's 
not supported (see Mk/Uses/qt-dist.mk). I think the quickest option for 
you would be patching that file and adding a check for 
CPUTYPE=="sandybridge" and passing that extra argument in CONFIGURE_ARGS.

We could do that in the ports tree, but there doesn't seem to be an 
entry for aesni we could check in bsd.cpu.mk as far as I can see.


More information about the kde-freebsd mailing list