From 0c70c9d269cb95d3d6aa1e8985ced591241beb09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 14 Oct 2019 23:06:52 +0200 Subject: [PATCH] Pass -Og to EXTRA_CFLAGS as well as to CFLAGS_NODIST - to CFLAGS_NODIST to take precedence as CFLAGS_NODIST go after EXTRA_CFLAGS - to EXTRA_CFLAGS to "bake it in" and build extension modules with -Og - call make regen-all with the same flags, as it invokes gcc as well --- python38.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python38.spec b/python38.spec index 0fa642f..f9a8bea 100644 --- a/python38.spec +++ b/python38.spec @@ -683,14 +683,15 @@ BuildPython() { $ExtraConfigArgs \ %{nil} +%global flags_override EXTRA_CFLAGS="$MoreCFlags" CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags" + %if %{without bootstrap} # Regenerate generated files (needs python3) - %make_build regen-all PYTHON_FOR_REGEN="python%{pybasever}" + %make_build %{flags_override} regen-all PYTHON_FOR_REGEN="python%{pybasever}" %endif - # Invoke the build - %make_build CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags" + %make_build %{flags_override} popd echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfName