New comment by echoptic on void-packages repository https://github.com/void-linux/void-packages/pull/49016#issuecomment-1974763576 Comment: > Overwriting do_build will now not build the package if natively compiled. You probably want `make_use_env=yes` instead, the `gnu-makefile` buildstyle already sets `CC`. > > Edit: `make_use_env` is already used, so you want the opposite, but then it might not use the right cflags, you could just `vsed -e '/^CC/d' -i Makefile` in `post_patch`. Natively compiling works for me: ``` ./xbps-src pkg qbe => xbps-src: updating repositories for host (x86_64)... [*] Updating repository `https://repo-default.voidlinux.org/current/bootstrap/x86_64-repodata' ... [*] Updating repository `https://repo-default.voidlinux.org/current/x86_64-repodata' ... [*] Updating repository `https://repo-default.voidlinux.org/current/nonfree/x86_64-repodata' ... [*] Updating repository `https://repo-default.voidlinux.org/current/debug/x86_64-repodata' ... [*] Updating repository `https://repo-default.voidlinux.org/current/multilib/bootstrap/x86_64-repodata' ... [*] Updating repository `https://repo-default.voidlinux.org/current/multilib/x86_64-repodata' ... [*] Updating repository `https://repo-default.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ... => xbps-src: updating software in / masterdir... => xbps-src: cleaning up / masterdir... => qbe-1.2_1: removing autodeps, please wait... => qbe-1.2_1: building with [gnu-makefile] for x86_64... => qbe-1.2_1: running do-fetch hook: 00-distfiles ... => qbe-1.2_1: running do-extract hook: 00-distfiles ... => qbe-1.2_1: extracting distfile(s), please wait... => qbe-1.2_1: running do-patch hook: 00-patches ... => qbe-1.2_1: running pre-configure hook: 00-gnu-configure-asneeded ... => qbe-1.2_1: running pre-configure hook: 01-override-config ... => qbe-1.2_1: running pre-configure hook: 02-script-wrapper ... => qbe-1.2_1: running pre-build hook: 02-script-wrapper ... => qbe-1.2_1: running do_build ... => qbe-1.2_1: skipping check (XBPS_CHECK_PKGS is disabled) ... => qbe-1.2_1: running pre-install hook: 00-libdir ... => qbe-1.2_1: running pre-install hook: 02-script-wrapper ... => qbe-1.2_1: running pre-install hook: 98-fixup-gir-path ... => qbe-1.2_1: running do_install ... cc -std=c99 -g -Wall -Wextra -Wpedantic -c main.c -o main.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c util.c -o util.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c parse.c -o parse.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c abi.c -o abi.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c cfg.c -o cfg.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c mem.c -o mem.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c ssa.c -o ssa.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c alias.c -o alias.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c load.c -o load.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c copy.c -o copy.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c fold.c -o fold.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c simpl.c -o simpl.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c live.c -o live.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c spill.c -o spill.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c rega.c -o rega.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c emit.c -o emit.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c amd64/targ.c -o amd64/targ.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c amd64/sysv.c -o amd64/sysv.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c amd64/isel.c -o amd64/isel.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c amd64/emit.c -o amd64/emit.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c arm64/targ.c -o arm64/targ.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c arm64/abi.c -o arm64/abi.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c arm64/isel.c -o arm64/isel.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c arm64/emit.c -o arm64/emit.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c rv64/targ.c -o rv64/targ.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c rv64/abi.c -o rv64/abi.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c rv64/isel.c -o rv64/isel.o cc -std=c99 -g -Wall -Wextra -Wpedantic -c rv64/emit.c -o rv64/emit.o cc -Wl,-z,relro -Wl,-z,now -Wl,--as-needed main.o util.o parse.o abi.o cfg.o mem.o ssa.o alias.o load.o copy.o fold.o simpl.o live.o spill.o rega.o emit.o amd64/targ.o amd64/sysv.o amd64/isel.o amd64/emit.o arm64/targ.o arm64/abi.o arm64/isel.o arm64/emit.o rv64/targ.o rv64/abi.o rv64/isel.o rv64/emit.o -o qbe mkdir -p "/destdir//qbe-1.2/usr/bin" install -m755 qbe "/destdir//qbe-1.2/usr/bin/qbe" => qbe-1.2_1: running post_install ... => qbe-1.2_1: running post-install hook: 00-compress-info-files ... => qbe-1.2_1: running post-install hook: 00-fixup-gir-path ... => qbe-1.2_1: running post-install hook: 00-libdir ... => qbe-1.2_1: running post-install hook: 00-uncompress-manpages ... => qbe-1.2_1: running post-install hook: 01-remove-misc ... => qbe-1.2_1: running post-install hook: 02-remove-libtool-archives ... => qbe-1.2_1: running post-install hook: 02-remove-perl-files ... => qbe-1.2_1: running post-install hook: 02-remove-python-bytecode-files ... => qbe-1.2_1: running post-install hook: 03-remove-empty-dirs ... => WARNING: qbe-1.2_1: removed empty dir: /usr/lib => qbe-1.2_1: running post-install hook: 04-create-xbps-metadata-scripts ... => qbe-1.2_1: running post-install hook: 05-generate-gitrevs ... => qbe-1.2_1: running post-install hook: 06-strip-and-debug-pkgs ... Stripped position-independent executable: /usr/bin/qbe => qbe-1.2_1: running post-install hook: 10-pkglint-devel-paths ... => qbe-1.2_1: running post-install hook: 11-pkglint-elf-in-usrshare ... => qbe-1.2_1: running post-install hook: 12-rename-python3-c-bindings ... => qbe-1.2_1: running post-install hook: 13-pkg-config-clean-xbps-cross-base-ref ... => qbe-1.2_1: running post-install hook: 14-fix-permissions ... => qbe-1.2_1: running post-install hook: 80-prepare-32bit ... => qbe-1.2_1: running post-install hook: 98-shlib-provides ... => qbe-1.2_1: running post-install hook: 99-pkglint-warn-cross-cruft ... => qbe-1.2_1: running pre-pkg hook: 03-rewrite-python-shebang ... => qbe-1.2_1: running pre-pkg hook: 04-generate-runtime-deps ... SONAME: libc.so.6 <-> glibc>=2.38_1 => qbe-1.2_1: running pre-pkg hook: 05-generate-32bit-runtime-deps ... => qbe-1.2_1: running pre-pkg hook: 90-set-timestamps ... => qbe-1.2_1: setting mtimes to Sat Mar 2 10:15:33 AM UTC 2024 => qbe-1.2_1: running pre-pkg hook: 99-pkglint-subpkgs ... => qbe-1.2_1: running pre-pkg hook: 99-pkglint ... => qbe-1.2_1: running pre-pkg hook: 999-collected-rdeps ... glibc>=2.38_1 => qbe-1.2_1: running do-pkg hook: 00-gen-pkg ... => Creating qbe-1.2_1.x86_64.xbps for repository /host/binpkgs/qbe-update ... => qbe-1.2_1: running post-pkg hook: 00-register-pkg ... => Registering new packages to /host/binpkgs/qbe-update index: added `qbe-1.2_1' (x86_64). index: 1 packages registered. => qbe-1.2_1: removing autodeps, please wait... => qbe-1.2_1: cleaning build directory... => qbe: removing files from destdir... ```