[Bug 242521] security/nss: fix build on powerpc*

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Dec 11 12:43:49 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242521

--- Comment #5 from Jan Beich <jbeich at FreeBSD.org> ---
Comment on attachment 209861
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=209861
patch

> altivec-types.h:19:1: error: use of 'long long' in AltiVec types is invalid without '-mvsx'

Hmm, Clang 9.0.0 doesn't complain. Tested via -target
powerpc64-unknown-freebsd13.0. Given 

> +.if ${ARCH} == powerpc64
> +CFLAGS+=	-mvsx

Adding -mvsx globally (for all files) would defeat runtime detection and make
the binary package unusable without VSX support (assuming auto-vectorization).
Can you try adding -mvsx after -maltivec? If it works submit the fix upstream.

# To build via GYP use build.sh in root directory
$ rg -- -maltivec
lib/freebl/freebl.gyp
162:        '-maltivec'
166:        '-maltivec'

lib/freebl/Makefile
793:$(OBJDIR)/$(PROG_PREFIX)gcm-ppc$(OBJ_SUFFIX): CFLAGS += -mcrypto -maltivec

> +    sysctlbyname("hw.cpu_features", &hwcaps, &len, NULL, 0);

hw.cpu_features (unlike hw.cpu_features2) will never return PPC_FEATURE2_*.
Also, won't build on FreeBSD 11 due to incorrect includes. See upstream review
comment.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the freebsd-gecko mailing list