Message ID | 55BF7F2D.2040605@gmail.com |
---|---|
State | New |
Headers | show |
On 08/03/2015 08:48 AM, Martin Sebor wrote: > On 08/03/2015 05:55 AM, Jan-Benedict Glaw wrote: >> On Sun, 2015-08-02 17:15:27 -0600, Martin Sebor <msebor@gmail.com> wrote: >>>> OK for the trunk. Sorry for the delay. >>> >>> Thank you. Committed in revision 226480. >> >> ...und breaks native builds. When doing builds using config-list.mk, I >> first build a GCC for the build machine, then re-build a >> cross-configured GCC with that. > > I don't know if pragma GCC diagnostic is valid in Go (still waiting > for my build to finish to confirm) but disabling the warning in > cases where the calls are known to be safe should fix the compilation > error. My understanding is the runtime is shared across gcc-go and golang. So the push/pop diagnostics may not be appropriate. Ian Taylor should have the final say about the best way forward. Jeff
Index: runtime/mprof.goc =================================================================== --- runtime/mprof.goc (revision 226505) +++ runtime/mprof.goc (working copy) @@ -404,10 +404,15 @@ func Stack(b Slice, all bool) (n int) { byte *pc, *sp; bool enablegc; - + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wframe-address" + sp = runtime_getcallersp(&b); pc = (byte*)(uintptr)runtime_getcallerpc(&b); +#pragma GCC diagnostic pop + if(all) { runtime_semacquire(&runtime_worldsema, false); runtime_m()->gcing = 1;