diff options
author | Jani Välimaa <wally@mageia.org> | 2023-11-21 11:26:30 +0200 |
---|---|---|
committer | Jani Välimaa <wally@mageia.org> | 2023-11-21 11:29:29 +0200 |
commit | 8d00754229423723a6ce256608eb793ca4766ea7 (patch) | |
tree | 27c552b017bbc729b2755cd0af06995faa068e40 | |
parent | 6f8342d2b4fd9dd0a349221af283b64e52e220c5 (diff) | |
download | rpm-setup-8d00754229423723a6ce256608eb793ca4766ea7.tar rpm-setup-8d00754229423723a6ce256608eb793ca4766ea7.tar.gz rpm-setup-8d00754229423723a6ce256608eb793ca4766ea7.tar.bz2 rpm-setup-8d00754229423723a6ce256608eb793ca4766ea7.tar.xz rpm-setup-8d00754229423723a6ce256608eb793ca4766ea7.zip |
macros: set -g when building Vala applications
From https://src.fedoraproject.org/rpms/redhat-rpm-config/c/d097058
Set -g when building Vala applications
This requires the build system support VALAFLAGS. At least Meson and
Automake do.
Using -g is desired because it allows us to see Vala source files and
line numbers in backtraces when possible, falling back to generated C
code otherwise. Line numbers for generated C are almost always less
useful when debugging crashes.
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | macros.in | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,4 @@ +- macros: set -g when building Vala applications - macros: make _FORTIFY_SOURCE flags configurable via %_fortify_level variable - macros: undefine _FORTIFY_SOURCE before defining it to avoid build warnings on some packages defining it already @@ -206,6 +206,9 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} - # the corresponding variable names. %build_fflags %{optflags} %{?_fmoddir:-I%_fmoddir} +# Vala compiler flags. This is used to set VALAFLAGS. +%build_valaflags -g + # Some linkers default to a build-id algoritim that is not supported by rpmbuild, # so we need to specify the right algorithm to use. %_build_id_flags -Wl,--build-id=sha1 @@ -221,7 +224,7 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} - %ldflags %build_ldflags # Expands to shell code to seot the compiler/linker environment -# variables CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, LDFLAGS if they have +# variables CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, VALAFLAGS, LDFLAGS if they have # not been set already. RPM_OPT_FLAGS and RPM_LD_FLAGS have already # been set implicitly at the start of the %%build section. # LT_SYS_LIBRARY_PATH is used by libtool script. @@ -230,6 +233,7 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} - CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \ FCFLAGS="${FCFLAGS:-%{build_fflags}}" ; export FCFLAGS ; \ + VALAFLAGS="${VALAFLAGS:-%{build_valaflags}}" ; export VALAFLAGS ; \ LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \ LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-%_libdir:}" ; export LT_SYS_LIBRARY_PATH |