[pacman-dev] [PATCH] makepkg: if "!buildflags" and "debug" coincide, unset the debug buildflags too
If a user has a makepkg.conf policy to enable debug builds, but a PKGBUILD has disabled buildflags, we would unset the *FLAGS but then later append the debug *FLAGS anyway, which would result in some *FLAGS being used, against the wishes of the PKGBUILD author. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 5705bd69..8b39ca9a 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -383,7 +383,7 @@ source_buildfile() { prepare_buildenv() { # clear user-specified buildflags if requested if check_option "buildflags" "n"; then - unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS + unset CPPFLAGS CFLAGS DEBUG_CFLAGS CXXFLAGS DEBUG_CXXFLAGS LDFLAGS fi if check_option "debug" "y"; then -- 2.19.1
On 5/11/18 9:27 am, Eli Schwartz wrote:
If a user has a makepkg.conf policy to enable debug builds, but a PKGBUILD has disabled buildflags, we would unset the *FLAGS but then later append the debug *FLAGS anyway, which would result in some *FLAGS being used, against the wishes of the PKGBUILD author.
OK - thanks. A
participants (2)
-
Allan McRae
-
Eli Schwartz