Fix compilation problems on ARM

This commit is contained in:
Douglas Stebila 2019-08-07 08:47:40 -04:00
parent c976003169
commit 4f9f811a3d
3 changed files with 8 additions and 3 deletions

View File

@ -25,14 +25,14 @@ version: 2
- run:
name: Install the emulation handlers
command: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- run:
- run: # Skipping sig-sphincs because it exhausts memory on CircleCI
name: Run the tests in a container
command: |
docker run -e SKIP_TESTS=style --rm -v `pwd`:`pwd` -w `pwd` dstebila/liboqs:debian-buster-${ARCH}-0.1.0 /bin/bash -c "
uname -a &&
file /bin/ls &&
autoreconf -i &&
./configure --enable-silent-rules --disable-sig-sphincs &&
./configure --enable-silent-rules ${CONFIGURE_ARGS} &&
make -j &&
make check &&
mkdir -p test-results/pytest &&
@ -52,14 +52,17 @@ jobs:
<<: *emulatedjob
environment:
ARCH: aarch64
CONFIGURE_ARGS: --disable-sig-sphincs # sig-sphincs exhausts memory on CircleCI servers
debian-buster-armhf:
<<: *emulatedjob
environment:
ARCH: armhf
CONFIGURE_ARGS: --disable-sig-sphincs --disable-sig-qtesla # sig-sphincs exhausts memory on CircleCI servers; qTesla fails on armhf
debian-buster-armel:
<<: *emulatedjob
environment:
ARCH: armel
CONFIGURE_ARGS: --disable-sig-sphincs --disable-sig-qtesla # sig-sphincs exhausts memory on CircleCI servers; qTesla fails on armel
ubuntu-xenial-x86_64-gcc49:
<<: *oqsjob
environment:

View File

@ -26,6 +26,8 @@ autoreconf -i
hacks=(
gcc_cv_compiler=true # Detecting at this phase isn't good for cross compilation
CFLAGS=-D_ARM_ # Several files aren't using the right define
--disable-sig-picnic # Problems building Picnic using cross compilation
--disable-sig-qtesla # qTesla fails on armhf and armel
)
./configure --disable-shared --enable-static --host="${CHOST}" --build="$CBUILD" CC="${CHOST}-gcc" --with-openssl="${PREFIX}" "${hacks[@]}"

View File

@ -79,7 +79,7 @@ OQS_API void OQS_randombytes_nist_kat_init(unsigned char *entropy_input, unsigne
DRBG_ctx.reseed_counter = 1;
}
void OQS_randombytes_nist_kat(unsigned char *x, unsigned long long xlen) {
void OQS_randombytes_nist_kat(unsigned char *x, size_t xlen) {
unsigned char block[16];
int i = 0;