]>
iEval git - authen-passphrase-scrypt.git/blob - scrypt-1.2.1/libcperciva/cpusupport/Build/cpusupport.sh
1 # Should be sourced by `command -p sh path/to/cpusupport.sh "$PATH"` from
3 if ! [ ${PATH} = "$1" ]; then
4 echo "WARNING: POSIX violation: $SHELL's command -p resets \$PATH" 1>&2
7 # Standard output should be written to cpusupport-config.h, which is both a
8 # C header file defining CPUSUPPORT_ARCH_FEATURE macros and sourceable sh
9 # code which sets CFLAGS_ARCH_FEATURE environment variables.
10 SRCDIR
=`command -p dirname "$0"`
16 if ! [ -f ${SRCDIR}/cpusupport-
$ARCH-$FEATURE.c
]; then
19 printf "Checking if compiler supports $ARCH $FEATURE feature..." 1>&2
21 if ${CC} ${CFLAGS} -D_POSIX_C_SOURCE=200809L ${CFLAG} \
22 ${SRCDIR}/cpusupport-
$ARCH-$FEATURE.c
2>/dev
/null
; then
34 echo "#define CPUSUPPORT_${ARCH}_${FEATURE} 1"
37 echo " yes, via $CFLAG" 1>&2
38 echo "#define CPUSUPPORT_${ARCH}_${FEATURE} 1"
39 echo "#ifdef cpusupport_dummy"
40 echo "export CFLAGS_${ARCH}_${FEATURE}=\"${CFLAG}\""
47 feature X86 SSE2
"" "-msse2" "-msse2 -Wno-cast-align"
48 feature X86 AESNI
"" "-maes" "-maes -Wno-cast-align" "-maes -Wno-missing-prototypes -Wno-cast-qual"
This page took 0.044455 seconds and 5 git commands to generate.