tech-toolchain archive

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

Re: ABI issues with gcc



On Jan 23, 10:36pm, martin%duskware.de@localhost (Martin Husemann) wrote:
-- Subject: Re: ABI issues with gcc

| On Thu, Jan 23, 2014 at 10:13:47PM +0100, Martin Husemann wrote:
| > While gcc is not fixed, we should add -Wno-error=stack-protector
| > for the affected archs when using gcc 4.8.
| 
| Like this:

The warnings are not bogus, it is not stack-protecting. I.e. the warnings
are invalid, but they affect negatively SSP protection.

christos

| 
| Index: bsd.sys.mk
| ===================================================================
| RCS file: /cvsroot/src/share/mk/bsd.sys.mk,v
| retrieving revision 1.236
| diff -u -b -r1.236 bsd.sys.mk
| --- bsd.sys.mk        16 Jan 2014 01:19:46 -0000      1.236
| +++ bsd.sys.mk        23 Jan 2014 21:35:59 -0000
| @@ -109,6 +109,16 @@
|  CPPFLAGS+=   -D_FORTIFY_SOURCE=2
|  .endif
|  COPTS+=      -fstack-protector -Wstack-protector 
| +
| +# gcc 4.8 on vax, sh and m68k gives bogus warnings, see
| +# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674
| +.if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC} == "48" && \
| +     ( ${MACHINE_ARCH} == "sh3eb" || ${MACHINE_ARCH} == "sh3el" || \
| +       ${MACHINE_ARCH} == "vax" || ${MACHINE_ARCH} == "m68k" || \
| +       ${MACHINE_ARCH} == "m68000" )
| +COPTS+=      -Wno-error=stack-protector 
| +.endif
| +
|  COPTS+=      ${${ACTIVE_CC} == "clang":? --param ssp-buffer-size=1 :}
|  COPTS+=      ${${ACTIVE_CC} == "gcc":? --param ssp-buffer-size=1 :}
|  .endif
| 
| 
| Martin
-- End of excerpt from Martin Husemann




Home | Main Index | Thread Index | Old Index