4040 tar xzf $HIDAPI_VER.tar.gz && rm $HIDAPI_VER.tar.gz
4141 pushd hidapi-$HIDAPI_VER
4242 ./bootstrap
43- ./configure --prefix=$PWD/dist --host=${CONF_HOST} --enable-shared=no --enable-static=yes --disable-testgui CC=${HOST_CC}
43+ ./configure --prefix=$PWD/dist --host=${CONF_HOST} --enable-shared=no --enable-static=yes --disable-testgui CC=${HOST_CC} CFLAGS=-std=gnu99
4444 make
4545 MAKEFLAGS= make install
4646 popd
146146
147147build_linux :
148148 stage : build_openocd
149- image : $CI_DOCKER_REGISTRY/openocd-ci-env:1
149+ image : $CI_DOCKER_REGISTRY/esp32-toolchain
150150 tags :
151151 - build
152152 artifacts :
@@ -155,14 +155,19 @@ build_linux:
155155 expire_in : 2 weeks
156156 variables :
157157 PLATFORM_NAME : " linux-amd64"
158+ CONF_HOST : " x86_64-linux-gnu"
159+ HOST_CC : ${CONF_HOST}-gcc
158160 needs :
159161 - job : style_check
160162 script :
161163 - *get_release_name
162164 - !reference [.add_gitlab_key, script]
163165 - !reference [.submodules_mirror_update, script]
164- - apt-get update
165- - apt-get install libhidapi-dev -y
166+ - apt-get update || true
167+ - apt-get install systemd libudev-dev --force-yes -y # needed for hidapi build
168+ - *buildx_hidapi
169+ - *buildx_libjaylink
170+ - export PKG_CONFIG_PATH=$PWD/hidapi-$HIDAPI_VER/dist/lib/pkgconfig/:$PWD/$LIBJAYLINK_VER/dist/lib/pkgconfig
166171 - ./bootstrap
167172 - mkdir _build
168173 - pushd _build/
@@ -174,7 +179,7 @@ build_linux:
174179 - *dist_archive
175180
176181# Just to test build with latest gcc.
177- . build_linux_gcc_latest :
182+ build_linux_gcc_latest :
178183 stage : build_openocd
179184 image : $CI_DOCKER_REGISTRY/openocd-ci-env:1
180185 tags :
@@ -187,7 +192,7 @@ build_linux:
187192 - !reference [.submodules_mirror_update, script]
188193 - ./bootstrap
189194 - ./configure ${OPENOCD_CONFIGURE_OPTS}
190- - make -j8
195+ - make -j`nproc`
191196
192197build_linux_armhf_test :
193198 extends : .build_linux_arm_template
0 commit comments