public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35851] New: gcc should report an error and not a warning if fstack-protector is not supported
@ 2008-04-06 21:22 g dot esp at free dot fr
2008-04-06 21:29 ` [Bug c/35851] " rguenth at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: g dot esp at free dot fr @ 2008-04-06 21:22 UTC (permalink / raw)
To: gcc-bugs
glibc-2.7 test for ssp support and use ssp if no error is reported
configure:6449: gcc -B/tools_alpha/bin/ -g -O2 -fstack-protector
-o conftest conftest.c 1>&5
conftest.c:1: warning: -fstack-protector not supported for this target
configure:6452: $? = 0
configure:6461: result: yes
If warning is changed to error, glibc configure now work
I look in gcc-4.2.3 and gcc-4.3 code at gcc/toplev.c
/* Targets must be able to place spill slots at lower addresses. If the
target already uses a soft frame pointer, the transition is trivial. */
if (!FRAME_GROWS_DOWNWARD && flag_stack_protect)
{
warning (0, "-fstack-protector not supported for this target");
flag_stack_protect = 0;
}
if (!flag_stack_protect)
warn_stack_protect = 0;
So with only a warning emittted by gcc, configure receive 0 and report that ssp
work.
I try changing the warning to an error on gcc-4.2.3 and now glib-2.7 configure
on alpha rightfully find
checking for -fstack-protector... no
--- gcc-4.2.3/gcc/toplev.c.old 2007-09-01 17:28:30.000000000 +0200
+++ gcc-4.2.3/gcc/toplev.c 2008-04-06 17:08:14.000000000 +0200
@@ -1834,7 +1834,7 @@
target already uses a soft frame pointer, the transition is trivial. */
if (!FRAME_GROWS_DOWNWARD && flag_stack_protect)
{
- warning (0, "-fstack-protector not supported for this target");
+ error ("-fstack-protector not supported for this target");
flag_stack_protect = 0;
}
if (!flag_stack_protect)
--
Summary: gcc should report an error and not a warning if fstack-
protector is not supported
Product: gcc
Version: 4.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: g dot esp at free dot fr
GCC host triplet: alpha-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35851
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/35851] gcc should report an error and not a warning if fstack-protector is not supported
2008-04-06 21:22 [Bug c/35851] New: gcc should report an error and not a warning if fstack-protector is not supported g dot esp at free dot fr
@ 2008-04-06 21:29 ` rguenth at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-04-06 21:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-04-06 21:28 -------
Use -Werror.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35851
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-06 21:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-06 21:22 [Bug c/35851] New: gcc should report an error and not a warning if fstack-protector is not supported g dot esp at free dot fr
2008-04-06 21:29 ` [Bug c/35851] " rguenth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).