The build process doesn't contain any configure script, just Makefiles with hardcoded values for CC, CXX and other flags.
Created attachment 418350 [details] build.log Note that it is often useful to attach a build.log for the failing build so that an example of a broken instance is available and can be used for diagnosing issues.
Created attachment 418352 [details, diff] refind-0.10.0.ebuild.patch Adds eclasses and wrappers for respecting CC/CXX/CFLAGS during build.
Created attachment 418588 [details, diff] refind-0.10.0.ebuild.patch Slightly modified version of attachment 418352 [details, diff] that addresses a QA warning about adding preprocessor flags to CXXFLAGS.
My testing of this seems to show that it works fine, however I would appreciate anyone else willing to test the built binaries from this to ensure altering CC/CFLAGS/etc has no unexpected affects before this is committed to the tree.
Created attachment 420790 [details, diff] refind-0.10.0.ebuild.patch No, your patch doesn't fixes it, mainly because you're using CXX{,FLAGS} while refind doesn't contain any C++ code. So here's my patch that actually fixes the build for me.
Created attachment 420982 [details] refind-0.10.0-r1:build.log rindeal, thanks for your patch. This does appear to fix it however it does produce a number of warnings during compile (see attached build.log) - I'm not sure what impact these may have on the built binaries so again would appreciate further testing. Also, this patch resolves the problem with this version, however refind-0.10.1 (bug 569806 ) includes changes to the build environment which makes this patch cause build failures.
AFAIK, GCC becomes stricter and stricter each version so if the code uses some hacks and you're compiling it with v5.3 it emits lots of warnings. Maybe try fiddling with -std= flags and see if that helps. I'm currently not at my machine so I cannot investigate the build failures of v0.10.1.
So, 1) adding "-Wno-incompatible-pointer-types" to CFLAGS helps with 99% of warnings. 2) v0.10.1 fails with my patch, because its Makefiles ignore LDFLAGS.
(In reply to rindeal from comment #8) > 1) adding "-Wno-incompatible-pointer-types" to CFLAGS helps with 99% of > warnings. Using the ebuild produced from attachment 420790 [details, diff] with the additional "-Wno-incompatible-pointer-types" allows the build to complete with fewer warnings, however the built EFI executable refuses to load on my system.
Created attachment 440188 [details, diff] Build rEFInd using user defined flags This proposed patch is made for version 0.10.2 (and could also be a correction for bug 563226) and is TianoCore aware, so requires patch of bug 588440 to be integrated in the portage tree. I will provide another patch without this requirement.
Created attachment 440240 [details, diff] Build rEFInd using user defined flags Sorry, there was a tipo in my previous patch. Here is a corrected one.
Created attachment 440242 [details, diff] Build rEFInd using user defined flags (gnuefi only) Here is the same patch working only with GNU EFI (cannot be built using TianoCore, so not requiring correction of bug 588440). Note that this patch is only the previous one from which TianoCore references have been removed. No tests where done on it.
Created attachment 440952 [details, diff] Build rEFInd using user defined flags Test flags before adding them.
Also created a PR: ahttps://github.com/gentoo/gentoo/pull/1921
Any news on this? Thanks
Fixed in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1244bd61402c6de3d791eed2f018c906758c00fc