public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/67169] New: -fstack-check=no doesn't disable stack checking
@ 2015-08-10 11:12 dwmw2 at infradead dot org
  2015-08-15 11:48 ` [Bug target/67169] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dwmw2 at infradead dot org @ 2015-08-10 11:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67169

            Bug ID: 67169
           Summary: -fstack-check=no doesn't disable stack checking
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dwmw2 at infradead dot org
  Target Milestone: ---

$ echo 'void foo(void) { char lots[8192]; }' | i686-w64-mingw32-gcc -S -o- -xc
- -fstack-check=no
        .file   ""
        .text
        .globl  _foo
        .def    _foo;   .scl    2;      .type   32;     .endef
_foo:
        pushl   %ebp
        movl    %esp, %ebp
        movl    $8192, %eax
        call    ___chkstk_ms
        subl    %eax, %esp
        nop
        leave
        ret
        .ident  "GCC: (GNU) 5.1.0 20150422 (Fedora MinGW 5.1.0-2.fc22)"


This is causing me problems when building the EDK II UEFI implementation.
Building that with MinGW is useful because it reproduces a number of
LLP64-related issues which would otherwise require Windows to discover.

If I use '-fstack-check=specific' *that* does seem to do what I want. But I'm
not sure I should be suggesting that as an upstream fix for the MinGW build,
because it seems wrong.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/67169] -fstack-check=no doesn't disable stack checking
  2015-08-10 11:12 [Bug c/67169] New: -fstack-check=no doesn't disable stack checking dwmw2 at infradead dot org
@ 2015-08-15 11:48 ` pinskia at gcc dot gnu.org
  2015-08-15 13:27 ` dwmw2 at infradead dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-08-15 11:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67169

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |i686-w64-mingw32
          Component|c                           |target

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I suspect i686-w64-mingw32 can never be used for self host binaries.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/67169] -fstack-check=no doesn't disable stack checking
  2015-08-10 11:12 [Bug c/67169] New: -fstack-check=no doesn't disable stack checking dwmw2 at infradead dot org
  2015-08-15 11:48 ` [Bug target/67169] " pinskia at gcc dot gnu.org
@ 2015-08-15 13:27 ` dwmw2 at infradead dot org
  2015-09-10  7:35 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dwmw2 at infradead dot org @ 2015-08-15 13:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67169

--- Comment #2 from David Woodhouse <dwmw2 at infradead dot org> ---
(In reply to Andrew Pinski from comment #1)
> I suspect i686-w64-mingw32 can never be used for self host binaries.

It has been. EDKII has toolchain configurations for it:
http://tianocore.sourceforge.net/wiki/Unix-like_systems#Build_gcc_x64_UEFI_cross_compiler


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/67169] -fstack-check=no doesn't disable stack checking
  2015-08-10 11:12 [Bug c/67169] New: -fstack-check=no doesn't disable stack checking dwmw2 at infradead dot org
  2015-08-15 11:48 ` [Bug target/67169] " pinskia at gcc dot gnu.org
  2015-08-15 13:27 ` dwmw2 at infradead dot org
@ 2015-09-10  7:35 ` ebotcazou at gcc dot gnu.org
  2015-09-10  8:45 ` dwmw2 at infradead dot org
  2015-09-10  8:58 ` [Bug target/67169] add an option to disable stack checking on x86 for UEFI ebotcazou at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2015-09-10  7:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67169

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |ebotcazou at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> If I use '-fstack-check=specific' *that* does seem to do what I want. But
> I'm not sure I should be suggesting that as an upstream fix for the MinGW
> build, because it seems wrong.

No, -fstack-check=specific only changes the stack checking method.  In any
case, stack checking is required by the ABI on Windows so cannot be disabled.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/67169] -fstack-check=no doesn't disable stack checking
  2015-08-10 11:12 [Bug c/67169] New: -fstack-check=no doesn't disable stack checking dwmw2 at infradead dot org
                   ` (2 preceding siblings ...)
  2015-09-10  7:35 ` ebotcazou at gcc dot gnu.org
@ 2015-09-10  8:45 ` dwmw2 at infradead dot org
  2015-09-10  8:58 ` [Bug target/67169] add an option to disable stack checking on x86 for UEFI ebotcazou at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dwmw2 at infradead dot org @ 2015-09-10  8:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67169

--- Comment #4 from David Woodhouse <dwmw2 at infradead dot org> ---
It's required by Windows but not by UEFI, which otherwise has the same ABI. We
had previously been able to build UEFI firmware with MinGW.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/67169] add an option to disable stack checking on x86 for UEFI
  2015-08-10 11:12 [Bug c/67169] New: -fstack-check=no doesn't disable stack checking dwmw2 at infradead dot org
                   ` (3 preceding siblings ...)
  2015-09-10  8:45 ` dwmw2 at infradead dot org
@ 2015-09-10  8:58 ` ebotcazou at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2015-09-10  8:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67169

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2015-09-10
         Resolution|INVALID                     |---
            Summary|-fstack-check=no doesn't    |add an option to disable
                   |disable stack checking      |stack checking on x86 for
                   |                            |UEFI
     Ever confirmed|0                           |1
           Severity|normal                      |enhancement

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> It's required by Windows but not by UEFI, which otherwise has the same ABI.

OK.  Let's reopen it as a target-specific enhancement request then.

> We had previously been able to build UEFI firmware with MinGW.

Presumably because you had only small frames?


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-09-10  8:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-10 11:12 [Bug c/67169] New: -fstack-check=no doesn't disable stack checking dwmw2 at infradead dot org
2015-08-15 11:48 ` [Bug target/67169] " pinskia at gcc dot gnu.org
2015-08-15 13:27 ` dwmw2 at infradead dot org
2015-09-10  7:35 ` ebotcazou at gcc dot gnu.org
2015-09-10  8:45 ` dwmw2 at infradead dot org
2015-09-10  8:58 ` [Bug target/67169] add an option to disable stack checking on x86 for UEFI ebotcazou at gcc dot gnu.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).