This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug build/21234] New: use of CFLAGS makes glibc detect no optimization
- From: "hlfqdhj at 163 dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 08 Mar 2017 14:47:57 +0000
- Subject: [Bug build/21234] New: use of CFLAGS makes glibc detect no optimization
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=21234
Bug ID: 21234
Summary: use of CFLAGS makes glibc detect no optimization
Product: glibc
Version: 2.25
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: hlfqdhj at 163 dot com
CC: carlos at redhat dot com
Target Milestone: ---
Hi there,
Sorry if this is a duplicate.
I was trying to build glibc with CC set to '/usr/bin/gcc', CFLAGS set as
'-march=native' and --disable-sanity-check (since I'd like it to be installed
to /usr/local). It fails nearly immediately, saying that glibc cannot be
compiled without optimization.
Later, I attempt to try with CC set directly as '-march=native -O2' (It seems
that CFLAGS is sorted), and it compiles until vprintf.c, complaining:
In file included from ../bits/libc-header-start.h:33:0,
from ../libio/stdio.h:28,
from ../include/stdio.h:5,
from vprintf.c:20:
../include/features.h:373:4: error: #warning _FORTIFY_SOURCE requires compiling
with optimization (-O) [-Werror=cpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
And I have seen explicit two -O2 from
/usr/bin/gcc -march=native -O2 vprintf.c -c -std=gnu11 -fgnu89-inline -O2
-Wall -Werror -Wundef -Wwrite-strings -fmerge-all-constants
-fno-stack-protector -frounding-math -fstack-protector-strong -march=x86-64
-mtune=generic -pipe -Wstrict-prototypes -Wold-style-definition -fexceptions
-ftls-model=initial-exec -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I../include
(MUCH MORE...)
The preprocessor seems fail to detect optimization.
--
You are receiving this mail because:
You are on the CC list for the bug.