Kevin Kofler wrote:

> Rex Dieter wrote:
>> It should capture all of CFLAGS, CXXFLAGS, LDFLAGS , see
>> https://src.fedoraproject.org/rpms/qt5/blob/master/f/macros.qt5
>> where it pulls from %{optflags} and %{?__global_ldflags} as appropriate
> 
> It will capture CFLAGS, CXXFLAGS, LDFLAGS from the environment, but it
> will not pick up the correct defaults from the specfile if the specfile
> does not export the environment variables.
> 
> You are using rpm --eval %{?_qt5_qmake_flags} from the shell script to get
> the flags. That spawns a separate instance of RPM, which will not see any
> defines/globals in the specfile. So %{optflags} and %{?__global_ldflags}
> will be the global RPM defaults, unaffected by any settings in the
> specfile. The only way flags from the specfile will be picked up is
> through the *FLAGS environment variables, because those override the
> %{optflags} and/or %{?__global_ldflags} in the definition of
> %{_qt5_qmake_flags}.

caveats accepted.  (requiring use of exported *FLAGS environment vars)

Better ideas or implementations welcome (I have none at the moment)

-- Rex
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org

Reply via email to