warning: _FORTIFY_SOURCE requires compiling with optimization (-O) #485

Closed
opened 2026-10-05 04:24:35 +02:00 by adam · 0 comments
Owner

Debug build on Fedora 21:

$ g++ --version
g++ (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ./configure --enable-debug
[...]
checking whether compiler predefines _FORTIFY_SOURCE... no
[...]

$ make V=1
[...]
g++ -I./../include -I../include    -std=c++11 -D_FORTIFY_SOURCE=2 -ggdb3 -Wall -W -Wno-unused-parameter -Woverloaded-virtual -Wshadow -pthread -fvisibility=hidden -fPIC -include znc/zncconfig.h -c -o autocycle.o autocycle.cpp  -MD -MF .depend/autocycle.o.dep
In file included from /usr/include/c++/4.9.2/x86_64-redhat-linux/bits/os_defines.h:39:0,
                 from /usr/include/c++/4.9.2/x86_64-redhat-linux/bits/c++config.h:2109,
                 from /usr/include/c++/4.9.2/bits/stl_algobase.h:59,
                 from /usr/include/c++/4.9.2/bits/stl_tree.h:61,
                 from /usr/include/c++/4.9.2/map:60,
                 from ./../include/znc/ZNCString.h:21,
                 from ./../include/znc/Nick.h:21,
                 from ./../include/znc/Chan.h:21,
                 from autocycle.cpp:17:
/usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^
[...]
Debug build on Fedora 21: ``` $ g++ --version g++ (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6) Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ ./configure --enable-debug [...] checking whether compiler predefines _FORTIFY_SOURCE... no [...] $ make V=1 [...] g++ -I./../include -I../include -std=c++11 -D_FORTIFY_SOURCE=2 -ggdb3 -Wall -W -Wno-unused-parameter -Woverloaded-virtual -Wshadow -pthread -fvisibility=hidden -fPIC -include znc/zncconfig.h -c -o autocycle.o autocycle.cpp -MD -MF .depend/autocycle.o.dep In file included from /usr/include/c++/4.9.2/x86_64-redhat-linux/bits/os_defines.h:39:0, from /usr/include/c++/4.9.2/x86_64-redhat-linux/bits/c++config.h:2109, from /usr/include/c++/4.9.2/bits/stl_algobase.h:59, from /usr/include/c++/4.9.2/bits/stl_tree.h:61, from /usr/include/c++/4.9.2/map:60, from ./../include/znc/ZNCString.h:21, from ./../include/znc/Nick.h:21, from ./../include/znc/Chan.h:21, from autocycle.cpp:17: /usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] # warning _FORTIFY_SOURCE requires compiling with optimization (-O) ^ [...] ``` <!-- github-sync-id:58809756 -->
adam closed this issue 2026-10-05 04:24:35 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#485