mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-02 21:00:13 -05:00
build: select a working C++20 compiler for RPM builds
A compiler activated while installing dependencies does not survive in the caller's shell, so make rpm could fall back to one that can't compile mergerfs. Route the RPM build through buildtools/run-rpmbuild, which keeps an explicit compiler and otherwise activates an installed GCC Toolset when the default can't handle C++20. RPMBUILD and RPMBUILD_FLAGS override the rpmbuild command. Rocky 8's toolsets lack the annobin plugin the distribution's RPM flags load. Test the effective compiler with the RPM flags and pass --undefine _annotated_build only when that fails, instead of guessing from the compiler's path in build-mergerfs. Native and container builds use the same check.
This commit is contained in:
parent
11e759101d
commit
d83e01b40a
4 changed files with 106 additions and 16 deletions
3
Makefile
3
Makefile
|
|
@ -351,7 +351,8 @@ rpm: tarball
|
|||
$(SED) 's/__VERSION__/$(VERSION)/g' mergerfs.spec > \
|
||||
rpmbuild/SOURCES/mergerfs.spec
|
||||
cp -ar mergerfs-$(VERSION).tar.gz rpmbuild/SOURCES
|
||||
$(RPMBUILD) $(RPMBUILD_FLAGS) -ba rpmbuild/SOURCES/mergerfs.spec \
|
||||
./buildtools/run-rpmbuild $(RPMBUILD) $(RPMBUILD_FLAGS) \
|
||||
-ba rpmbuild/SOURCES/mergerfs.spec \
|
||||
--define "_topdir $(CURDIR)/rpmbuild"
|
||||
|
||||
.PHONY: install-build-pkgs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue