This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/20980] New: CFLAGS environment variable replaces vital options


https://sourceware.org/bugzilla/show_bug.cgi?id=20980

            Bug ID: 20980
           Summary: CFLAGS environment variable replaces vital options
           Product: glibc
           Version: 2.23
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: bryanh@giraffe-data.com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

I had trouble using CFLAGS.

It's customary for a build system to add the value of the CFLAGS environment
variable to various compile commands.  In the case of GNU libc, the INSTALL
file says CFLAGS is for setting optimization options, but also inconsistently
suggests adding options such as -mcpu to CFLAGS.

In practice, the make files use CFLAGS for -O2 and -g, where appropriate, and
any value of the CFLAGS environment variable overrides and gets added to the
compile commands.

And here's an important fact: -O is not optional.  At least one file refuses to
compile unless you're optimizing.

I think the make files should just append the CFLAGS value to their -g and -O2,
so that a user setting doesn't implicitly delete those options (but can still
override them).

Barring that, I think the INSTALL file should contain detailed instructions on
what you have to include in CFLAGS if you set it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]