Re: Is there convenient way to setup Fedora compilation flags outside of the RPM build?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Florian Weimer writes:

After installing redhat-rpm-config, this works in bash and similar
shells:

$ eval `rpm --eval %set_build_flags`

Maybe we can make it more clear in buildflags.md that this macro is a
shell script fragment?

I find it more convenient to generate parameters for an autoconf-generated configure script. I do not need to always use the same build flags as rpm. Sometimes you want to build without optimizations, for debugging purposes.

What I do is

./configure `rpmflags`

with "rpmflags" being this script:

#! /bin/bash

echo -n "CXXFLAGS='"
rpm -E '%build_cxxflags' | tr -d '\012'
echo -n "' CFLAGS='"
rpm -E '%build_cflags' | sed 's/ *$//' | tr -d '\012'
echo -n "' LDFLAGS='"
rpm -E '%build_ldflags' | sed 's/ *$//' | tr -d '\012'
echo "'"

I suppose I can turn this inside-out, and change this to use %set_build_flags and directly run configure.

Attachment: pgpEuY5BT7pD0.pgp
Description: PGP signature

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux