diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template index 0b6707b59d..af40ec6645 100644 --- a/srcpkgs/cross-i686-linux-musl/template +++ b/srcpkgs/cross-i686-linux-musl/template @@ -151,6 +151,13 @@ _musl_build() { cd ${wrksrc}/musl-${_musl_version} msg_normal "Building cross musl libc\n" + # Apply musl patches if there are any + if [ -d "${XBPS_SRCPKGDIR}/musl/patches" ]; then + for f in ${XBPS_SRCPKGDIR}/musl/patches/*.patch; do + _apply_patch -p0 "$f" + done + fi + CC="${_triplet}-gcc" CFLAGS="-Os -pipe -fPIC ${_archflags}" \ ./configure --prefix=/usr @@ -166,7 +173,7 @@ _libucontext_build() { cd ${wrksrc}/libucontext-${_libucontext_version} msg_normal "Building cross libucontext\n" - sed -i arch/x86/startcontext.S -e \ + vsed -i arch/x86/startcontext.S -e \ "s;__i686.get_pc_thunk.bx;i686_get_pc_thunk_bx;g" # it's ok if we're static only here @@ -197,11 +204,11 @@ _gcc_build() { _args+=" --enable-lto" _args+=" --enable-default-pie" _args+=" --enable-default-ssp" + _args+=" --enable-libssp" _args+=" --disable-libsanitizer" _args+=" --disable-multilib" _args+=" --disable-libmpx" _args+=" --disable-libmudflap" - _args+=" --enable-libssp" _args+=" --enable-libada" _args+=" --enable-libquadmath" _args+=" --enable-shared"