diff --git a/macros.gnat.in b/macros.gnat.in index 5a11dc0..23e2aa3 100644 --- a/macros.gnat.in +++ b/macros.gnat.in @@ -39,12 +39,12 @@ # (Otherwise -gnatwe could turn quite harmless conditions into build failures.) # -gnatyN turns off style checks. They are irrelevant to packagers. -%Gnatlink_flags %{__global_ldflags} -g +%Gnatlink_flags %{?__global_ldflags} -g # -g makes Gnatlink refrain from deleting binder files so that they can be # included in debuginfo packages. %Gnatmake_optflags -cargs %{Ada_optflags} -largs %{Gnatlink_flags} -margs %{GNAT_builder_flags} -%GPRbuild_optflags -cargs:Ada %{Ada_optflags} -cargs:C %{optflags} -cargs:C++ %{optflags} -cargs:Fortran %{optflags} -I%{_fmoddir} -largs %{__global_ldflags} -gargs %{GNAT_builder_flags} +%GPRbuild_optflags -cargs:Ada %{Ada_optflags} -cargs:C %{optflags} -cargs:C++ %{optflags} -cargs:Fortran %{optflags} -I%{_fmoddir} -largs %{?__global_ldflags} -gargs %{GNAT_builder_flags} # Gnatmake_optflags and GPRbuild_optflags contain both the parameters for the # builder itself and parameters that the builder shall pass to the tools it # invokes. -margs and -gargs must be used after all other mode switches to @@ -63,7 +63,7 @@ CFLAGS="${CFLAGS:-%{optflags}}" \\\ CXXFLAGS="${CXXFLAGS:-%{optflags}}" \\\ FFLAGS="${FFLAGS:-%{optflags} -I%{_fmoddir}}" \\\ - LDFLAGS="${LDFLAGS:-%{__global_ldflags}}" \\\ + LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}" \\\ GNATLINKFLAGS="${GNATLINKFLAGS:--g}" \\\ dirgpr=directories.gpr \\\ prefix=%{_prefix} \\\