public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/46986] New: Fails to build due to -Werror with --disable-werror
@ 2010-12-17  0:59 manphiz at gmail dot com
  2010-12-17  1:08 ` [Bug go/46986] Go is not supported on Darwin pinskia at gcc dot gnu.org
                   ` (47 more replies)
  0 siblings, 48 replies; 49+ messages in thread
From: manphiz at gmail dot com @ 2010-12-17  0:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

           Summary: Fails to build due to -Werror with --disable-werror
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
        AssignedTo: ian@airs.com
        ReportedBy: manphiz@gmail.com


Building latest trunk with go enabled fails with -Werror, even with
--disable-werror specified. Relevant build log:


libtool: compile:  /tmp/gcc-build/./gcc/xgcc -B/tmp/gcc-build/./gcc/
-B/usr/local/x86_64-apple-darwin10.5.0/bin/
-B/usr/local/x86_64-apple-darwin10.5.0/lib/ -isystem
/usr/local/x86_64-apple-darwin10.5.0/include -isystem
/usr/local/x86_64-apple-darwin10.5.0/sys-include -DHAVE_CONFIG_H -I.
-I/Users/dxy/VCS/GIT/gcc/libgo -I /Users/dxy/VCS/GIT/gcc/libgo/runtime
-I/Users/dxy/VCS/GIT/gcc/libgo/../libffi/include -I../libffi/include -pthread
-fexceptions -fplan9-extensions -Wall -Wextra -Wwrite-strings -Wcast-qual
-Werror -minline-all-stringops -I /Users/dxy/VCS/GIT/gcc/libgo/../gcc -I
../../gcc/include -g -O2 -MT go-go.lo -MD -MP -MF .deps/go-go.Tpo -c
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c  -fno-common -DPIC -o
.libs/go-go.o
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c: In function
'runtime_stoptheworld':
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c:378:29: error: 'SIGRTMIN'
undeclared (first use in this function)
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c:378:29: note: each undeclared
identifier is reported only once for each function it appears in
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c: In function
'runtime_starttheworld':
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c:559:29: error: 'SIGRTMIN'
undeclared (first use in this function)
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c: In function
'__go_gc_goroutine_init':
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c:611:7: error: 'SIGRTMIN'
undeclared (first use in this function)
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c:611:7: error: left-hand operand of
comma expression has no effect [-Werror=unused-value]
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c:613:7: error: left-hand operand of
comma expression has no effect [-Werror=unused-value]
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c:620:7: error: left-hand operand of
comma expression has no effect [-Werror=unused-value]
/Users/dxy/VCS/GIT/gcc/libgo/runtime/go-go.c:622:7: error: left-hand operand of
comma expression has no effect [-Werror=unused-value]
cc1: all warnings being treated as errors

make[4]: *** [go-go.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libgo] Error 2
make: *** [all] Error 2


Informations:
GCC version: trunk r167954
System: Mac OS X 10.6.5
Configure options: $PATH/configure \
    --prefix=${PREFIX} \
    --with-gmp=${PREFIX} \
    --with-mpfr=${PREFIX} \
    --with-mpc=${PREFIX} \
    --with-ppl=${PREFIX} \
    --with-cloog=${PREFIX} \
    --program-suffix=-4.6 \
    --enable-languages=c,c++,fortran,go \
    --disable-nls \
    --disable-werror \
    --disable-bootstrap \
    --enable-shared \
    --enable-threads \
    --enable-__cxa_init \
    --enable-version-specific-runtime-libs \
    --enable-decimal-float \
    --enable-plugin \
    --enable-lto \
    --enable-full-dynamic-string \
    --enable-concept-checks \
    --enable-libstdcxx-debug \
    --enable-libstdcxx-time


HTH.

Also, it seems bug#46958 and #46965 is related: both failed with -Werror


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
@ 2010-12-17  1:08 ` pinskia at gcc dot gnu.org
  2011-01-05  5:37 ` ian at airs dot com
                   ` (46 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: pinskia at gcc dot gnu.org @ 2010-12-17  1:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-12-17 01:08:12 UTC ---
http://www.maillistarchive.com/threads/1657-gccgo-branch-and-darwin


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
  2010-12-17  1:08 ` [Bug go/46986] Go is not supported on Darwin pinskia at gcc dot gnu.org
@ 2011-01-05  5:37 ` ian at airs dot com
  2011-02-26 23:42 ` comexk at gmail dot com
                   ` (45 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at airs dot com @ 2011-01-05  5:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.05 05:36:57
     Ever Confirmed|0                           |1

--- Comment #2 from Ian Lance Taylor <ian at airs dot com> 2011-01-05 05:36:57 UTC ---
This is going to require some work from somebody familiar with Darwin.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
  2010-12-17  1:08 ` [Bug go/46986] Go is not supported on Darwin pinskia at gcc dot gnu.org
  2011-01-05  5:37 ` ian at airs dot com
@ 2011-02-26 23:42 ` comexk at gmail dot com
  2011-02-27  0:24 ` comexk at gmail dot com
                   ` (44 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: comexk at gmail dot com @ 2011-02-26 23:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

comexk at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |comexk at gmail dot com

--- Comment #3 from comexk at gmail dot com 2011-02-26 23:25:36 UTC ---
I was able to get gcc to compile, and compile and run a trivial Go program on
OS X with the attached patch.  Since I know little about gcc, the patch is just
a hack, but maybe it can help.

The issues it addresses are:

- some of the stuff that mksysinfo.sh generates doesn't compile.

- The frontend hardcodes ".go_export" both in the C++ code and in the argument
to objcopy, but Darwin wants both a segment and section name.

- A lot of code relies on asm() for symbol names, but Darwin wants an
underscore at the beginning (hardcode the underscore; obviously not a good
plan).

- SIGRTMIN is not defined (use SIGUSR1/2).

- xnu doesn't support sem_init() (use pthreads).

- the compiler seems to want an explicit -o with -c, but compiler_c_o in
libtool somehow gets defined as no.

- syscall.Sysctl isn't defined (I didn't bother to fix this but just commented
out the only use).

- a typo in libgo/runtime/go-new-map.c which is probably unrelated and belongs
in another bug.

GCC version: gcc-4.6-20110219 
System: Mac OS X 10.6.6 (with MacPorts installed)
Configuration: ./configure --prefix=/opt/gccgo
--with-boot-ldflags="/opt/local/lib/libiconv.dylib /usr/lib/libiconv.dylib"
--disable-bootstrap --with-ppl=/opt/local --with-cloog=/opt/local
--with-mpfr=/opt/local --enable-gold=no --enable-ld=no
--enable-languages=c,c++,go LDFLAGS="/opt/local/lib/libiconv.dylib
/usr/lib/libiconv.dylib"


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (2 preceding siblings ...)
  2011-02-26 23:42 ` comexk at gmail dot com
@ 2011-02-27  0:24 ` comexk at gmail dot com
  2011-04-21  0:19 ` ian at airs dot com
                   ` (43 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: comexk at gmail dot com @ 2011-02-27  0:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #4 from comexk at gmail dot com 2011-02-26 23:28:09 UTC ---
Created attachment 23482
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23482
hacky patch that should be split up


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (3 preceding siblings ...)
  2011-02-27  0:24 ` comexk at gmail dot com
@ 2011-04-21  0:19 ` ian at airs dot com
  2011-04-28 16:47 ` rguenth at gcc dot gnu.org
                   ` (42 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at airs dot com @ 2011-04-21  0:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.6.0                       |4.5.4
   Target Milestone|---                         |4.6.2

--- Comment #5 from Ian Lance Taylor <ian at airs dot com> 2011-04-21 00:19:10 UTC ---
See also http://code.google.com/p/go/issues/detail?id=463 .


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (4 preceding siblings ...)
  2011-04-21  0:19 ` ian at airs dot com
@ 2011-04-28 16:47 ` rguenth at gcc dot gnu.org
  2011-09-01 18:10 ` afb at users dot sourceforge.net
                   ` (41 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-28 16:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.2                       |---


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (5 preceding siblings ...)
  2011-04-28 16:47 ` rguenth at gcc dot gnu.org
@ 2011-09-01 18:10 ` afb at users dot sourceforge.net
  2011-09-01 18:11 ` afb at users dot sourceforge.net
                   ` (40 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2011-09-01 18:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #6 from Anders F Björklund <afb at users dot sourceforge.net> 2011-09-01 18:09:02 UTC ---
Created attachment 25168
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25168
updated patch for 4.6.1

hello world tests OK on Snow Leopard, with patch


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (6 preceding siblings ...)
  2011-09-01 18:10 ` afb at users dot sourceforge.net
@ 2011-09-01 18:11 ` afb at users dot sourceforge.net
  2011-09-01 22:49 ` howarth at nitro dot med.uc.edu
                   ` (39 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2011-09-01 18:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

Anders F Björklund <afb at users dot sourceforge.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |afb at users dot
                   |                            |sourceforge.net

--- Comment #7 from Anders F Björklund <afb at users dot sourceforge.net> 2011-09-01 18:11:32 UTC ---
Another problem is that the -static-libgo flag doesn't work, because the static
library has the same name and location as the dynamic lib and therefore darwin
will always prefer the dynamic library. It probably needs to be renamed (to
something like libgo_static.a), since otherwise the -Wl,-search_paths_first
flag is needed to avoid picking up libgo.dylib even if it comes later in the
paths...


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (7 preceding siblings ...)
  2011-09-01 18:11 ` afb at users dot sourceforge.net
@ 2011-09-01 22:49 ` howarth at nitro dot med.uc.edu
  2011-09-02  6:40 ` afb at users dot sourceforge.net
                   ` (38 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-09-01 22:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

Jack Howarth <howarth at nitro dot med.uc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |howarth at nitro dot
                   |                            |med.uc.edu

--- Comment #8 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-09-01 22:48:23 UTC ---
(In reply to comment #6)
> Created attachment 25168 [details]
> updated patch for 4.6.1
> 
> hello world tests OK on Snow Leopard, with patch

This patch fails on darwin11 when applied to gcc-4_6-branch...


f=`echo sort/sort.lo | sed -e 's/.lo$/.o/'`; missing-objcopy -j
__GNU_GO.__go_export $f sort.gox.tmp && mv -f sort.gox.tmp sort.gox
/bin/sh: missing-objcopy: command not found
make[4]: *** [sort.gox] Error 127
make[4]: *** Waiting for unfinished jobs....

It seems to required binutils to be installed (which we really want to avoid).


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (8 preceding siblings ...)
  2011-09-01 22:49 ` howarth at nitro dot med.uc.edu
@ 2011-09-02  6:40 ` afb at users dot sourceforge.net
  2011-09-02  8:46 ` afb at users dot sourceforge.net
                   ` (37 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2011-09-02  6:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #9 from Anders F Björklund <afb at users dot sourceforge.net> 2011-09-02 06:40:28 UTC ---
(In reply to comment #8)
> > hello world tests OK on Snow Leopard, with patch
> 
> This patch fails on darwin11 when applied to gcc-4_6-branch...

Seems like the patch worked (= didn't fail to apply),
but that the build failed due to missing dependencies ?

> f=`echo sort/sort.lo | sed -e 's/.lo$/.o/'`; missing-objcopy -j
> __GNU_GO.__go_export $f sort.gox.tmp && mv -f sort.gox.tmp sort.gox
> /bin/sh: missing-objcopy: command not found
> make[4]: *** [sort.gox] Error 127
> make[4]: *** Waiting for unfinished jobs....
> 
> It seems to required binutils to be installed (which we really want to avoid).

Yes, it requires OBJCOPY=gobjcopy. Maybe this requirement
should be replaced with some custom "gox-extract" tool ?

Since the .go_export section name had to be changed, anyway:
http://golang.org/doc/gccgo_install.html#Imports


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (9 preceding siblings ...)
  2011-09-02  6:40 ` afb at users dot sourceforge.net
@ 2011-09-02  8:46 ` afb at users dot sourceforge.net
  2011-09-02  9:07 ` afb at users dot sourceforge.net
                   ` (36 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2011-09-02  8:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #10 from Anders F Björklund <afb at users dot sourceforge.net> 2011-09-02 08:45:22 UTC ---

Here's my attempt at a native version.
(of that "gox-extract" shell script)

Instead of the default variant:
OBJCOPY=${OBJCOPY:-objcopy}
$OBJCOPY -j .go_export $1 $2

The Darwin version could be this:
OTOOL=${OTOOL:-otool}
$OTOOL -s __GNU_GO __go_export $1 |
grep -v "^$1:" | grep -v "Contents of (__GNU_GO,__go_export) section" |
cut -f 2- | tr -d ' ' | xxd -r -p - $2

It doesn't include the objcopy header,
but I believe that is skipped anyway ?


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (10 preceding siblings ...)
  2011-09-02  8:46 ` afb at users dot sourceforge.net
@ 2011-09-02  9:07 ` afb at users dot sourceforge.net
  2011-09-02 11:08 ` afb at users dot sourceforge.net
                   ` (35 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2011-09-02  9:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #11 from Anders F Björklund <afb at users dot sourceforge.net> 2011-09-02 09:06:25 UTC ---
> OTOOL=${OTOOL:-otool}
> $OTOOL -s __GNU_GO __go_export $1 |
> grep -v "^$1:" | grep -v "Contents of (__GNU_GO,__go_export) section" |
> cut -f 2- | tr -d ' ' | xxd -r -p - $2

Apparently -X avoids that header text:
$OTOOL -s __GNU_GO __go_export -X $1 | cut -f 2- | tr -d ' ' | xxd -r -p - $2


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (11 preceding siblings ...)
  2011-09-02  9:07 ` afb at users dot sourceforge.net
@ 2011-09-02 11:08 ` afb at users dot sourceforge.net
  2011-09-02 11:11 ` afb at users dot sourceforge.net
                   ` (34 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2011-09-02 11:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #12 from Anders F Björklund <afb at users dot sourceforge.net> 2011-09-02 11:07:33 UTC ---
> It doesn't include the objcopy header,
> but I believe that is skipped anyway ?

Or at least it was *supposed* to ignore it,
but the Stream_from_file was horribly buggy.
(apparently has a dyslectic problem with
comparisons, aggrevated by copy/paste ?)

It always returned "" instead of any data,
so failed to provide the required magic...
(or any other data beyond that, if asked)
Fixing that class, and it works just fine:

Index: gcc/go/gofrontend/import.cc
===================================================================
--- gcc/go/gofrontend/import.cc    (revision 178444)
+++ gcc/go/gofrontend/import.cc    (working copy)
@@ -836,7 +836,7 @@
 bool
 Stream_from_file::do_peek(size_t length, const char** bytes)
 {
-  if (this->data_.length() <= length)
+  if (this->data_.length() >= length)
     {
       *bytes = this->data_.data();
       return true;
@@ -854,7 +854,7 @@
       return false;
     }

-  if (lseek(this->fd_, - got, SEEK_CUR) != 0)
+  if (lseek(this->fd_, - got, SEEK_CUR) < 0)
     {
       if (!this->saw_error())
     error("lseek failed: %m");
@@ -876,7 +876,7 @@
 void
 Stream_from_file::do_advance(size_t skip)
 {
-  if (lseek(this->fd_, skip, SEEK_CUR) != 0)
+  if (lseek(this->fd_, skip, SEEK_CUR) < 0)
     {
       if (!this->saw_error())
     error("lseek failed: %m");

That bug should affect any other platform too,
if trying to use "naked" .gox (without object) ?


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (12 preceding siblings ...)
  2011-09-02 11:08 ` afb at users dot sourceforge.net
@ 2011-09-02 11:11 ` afb at users dot sourceforge.net
  2011-09-04 17:30 ` howarth at nitro dot med.uc.edu
                   ` (33 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2011-09-02 11:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #13 from Anders F Björklund <afb at users dot sourceforge.net> 2011-09-02 11:10:51 UTC ---
Created attachment 25177
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25177
import-export.diff

Just the import/export changes, i.e. outside "libgo" directory.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (13 preceding siblings ...)
  2011-09-02 11:11 ` afb at users dot sourceforge.net
@ 2011-09-04 17:30 ` howarth at nitro dot med.uc.edu
  2011-09-04 18:15 ` afb at users dot sourceforge.net
                   ` (32 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-09-04 17:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #14 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-09-04 17:29:37 UTC ---
(In reply to comment #13)
> Created attachment 25177 [details]
> import-export.diff
> 
> Just the import/export changes, i.e. outside "libgo" directory.

This change is darwin-centric. Peter O'Gorman suggests something along the
lines of...

>> just use a gnu make conditional, since gcc requires gnu make to build anyway, check if $OTOOL is != "" e.g. ifeq($(OTOOL),) ... use objcopy else .. use otool ..endif


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (14 preceding siblings ...)
  2011-09-04 17:30 ` howarth at nitro dot med.uc.edu
@ 2011-09-04 18:15 ` afb at users dot sourceforge.net
  2011-09-05 14:03 ` afb at users dot sourceforge.net
                   ` (31 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2011-09-04 18:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #15 from Anders F Björklund <afb at users dot sourceforge.net> 2011-09-04 18:14:48 UTC ---
The whole patch is Darwin-centric, in that it's only applied on Darwin.
You are right that it first needs to be conditionalized to go upstream.

afaik, $(OTOOL) would be something like "missing-otool" on e.g. Linux ?
(just as we now get $(OBJCOPY) set to "missing-objcopy" on Mac OS X...)


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (15 preceding siblings ...)
  2011-09-04 18:15 ` afb at users dot sourceforge.net
@ 2011-09-05 14:03 ` afb at users dot sourceforge.net
  2011-12-14  1:53 ` ian at airs dot com
                   ` (30 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2011-09-05 14:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

Anders F Björklund <afb at users dot sourceforge.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #25177|0                           |1
        is obsolete|                            |

--- Comment #16 from Anders F Björklund <afb at users dot sourceforge.net> 2011-09-05 14:01:36 UTC ---
Created attachment 25196
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25196
import-export.diff

Here's an updated portable version. Using otool "if LIBGO_IS_DARWIN".

Used a shell function instead of a shell script, for "gengox" tool...


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (16 preceding siblings ...)
  2011-09-05 14:03 ` afb at users dot sourceforge.net
@ 2011-12-14  1:53 ` ian at airs dot com
  2012-02-14 20:00 ` ian at airs dot com
                   ` (29 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at airs dot com @ 2011-12-14  1:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #17 from Ian Lance Taylor <ian at airs dot com> 2011-12-14 01:43:11 UTC ---
The most recent patch is against gcc 4.6, and mainline is different.

I have just moved the support for reading export data out of the Go frontend
proper.  The purpose of this move is to permit the control for where the data
lives to be entirely in gcc, including gcc/config/darwin.h.

I think that now the only thing which will need to change in the Go frontend
proper is using otool instead of objcopy in libgo/Makefile.am.

Can you set up a new patch against mainline?

Thanks.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (17 preceding siblings ...)
  2011-12-14  1:53 ` ian at airs dot com
@ 2012-02-14 20:00 ` ian at airs dot com
  2012-02-15 22:24 ` afb at users dot sourceforge.net
                   ` (28 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at airs dot com @ 2012-02-14 20:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED

--- Comment #18 from Ian Lance Taylor <ian at airs dot com> 2012-02-14 19:59:03 UTC ---
Somebody will have to work on this but I don't have the time.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (18 preceding siblings ...)
  2012-02-14 20:00 ` ian at airs dot com
@ 2012-02-15 22:24 ` afb at users dot sourceforge.net
  2012-02-15 22:30 ` afb at users dot sourceforge.net
                   ` (27 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2012-02-15 22:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #19 from Anders F Björklund <afb at users dot sourceforge.net> 2012-02-15 22:08:59 UTC ---
(In reply to comment #17)
> I think that now the only thing which will need to change in the Go frontend
> proper is using otool instead of objcopy in libgo/Makefile.am.

The otool was simple enough, but the other go_export issues still remain.
And there are some new issues with ucontext being deprecated on Mac OS X.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (19 preceding siblings ...)
  2012-02-15 22:24 ` afb at users dot sourceforge.net
@ 2012-02-15 22:30 ` afb at users dot sourceforge.net
  2012-02-15 22:32 ` afb at users dot sourceforge.net
                   ` (26 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2012-02-15 22:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #22 from Anders F Björklund <afb at users dot sourceforge.net> 2012-02-15 22:16:41 UTC ---
Created attachment 26670
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26670
gcc-ucontext.diff

ucontext is deprecated on Mac OS X 10.5-10.6, including ucontext.h gives error:

In file included from ../../../gcc/libgo/runtime/runtime.h:20:0,
                 from ../../../gcc/libgo/runtime/go-main.c:21:
/usr/include/ucontext.h:42:2: error: #error ucontext routines are deprecated,
and require _XOPEN_SOURCE to be defined

ucontext is missing altogether from Mac OS X 10.7, but there is no TLS either:

error: thread-local storage not supported for this target


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (20 preceding siblings ...)
  2012-02-15 22:30 ` afb at users dot sourceforge.net
@ 2012-02-15 22:32 ` afb at users dot sourceforge.net
  2012-02-15 22:48 ` afb at users dot sourceforge.net
                   ` (25 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2012-02-15 22:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #21 from Anders F Björklund <afb at users dot sourceforge.net> 2012-02-15 22:12:24 UTC ---
Created attachment 26669
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26669
gcc-go_export.diff

Need to give both segment and section for export on Darwin:

/var/folders/SU/SU8yve9tFP4OXneVoY+KsU+++TI/-Tmp-//ccWicBIX.s:3:Expected comma
after segment-name
/var/folders/SU/SU8yve9tFP4OXneVoY+KsU+++TI/-Tmp-//ccWicBIX.s:3:Rest of line
ignored. 1st junk character valued 32 ( ).
/var/folders/SU/SU8yve9tFP4OXneVoY+KsU+++TI/-Tmp-//ccWicBIX.s:3:Junk character
92 (\).
/var/folders/SU/SU8yve9tFP4OXneVoY+KsU+++TI/-Tmp-//ccWicBIX.s:3:Rest of line
ignored. 1st junk character valued 49 (1).


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (21 preceding siblings ...)
  2012-02-15 22:32 ` afb at users dot sourceforge.net
@ 2012-02-15 22:48 ` afb at users dot sourceforge.net
  2012-02-15 23:40 ` mrs at gcc dot gnu.org
                   ` (24 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2012-02-15 22:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #20 from Anders F Björklund <afb at users dot sourceforge.net> 2012-02-15 22:10:09 UTC ---
Created attachment 26668
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26668
updated patch for trunk


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (22 preceding siblings ...)
  2012-02-15 22:48 ` afb at users dot sourceforge.net
@ 2012-02-15 23:40 ` mrs at gcc dot gnu.org
  2012-02-16  3:57 ` howarth at nitro dot med.uc.edu
                   ` (23 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: mrs at gcc dot gnu.org @ 2012-02-15 23:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

mrs@gcc.gnu.org <mrs at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrs at gcc dot gnu.org

--- Comment #23 from mrs at gcc dot gnu.org <mrs at gcc dot gnu.org> 2012-02-15 22:41:37 UTC ---
I'm fine with the last patch, though, I think it needs Ian to approve.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (23 preceding siblings ...)
  2012-02-15 23:40 ` mrs at gcc dot gnu.org
@ 2012-02-16  3:57 ` howarth at nitro dot med.uc.edu
  2012-02-16 14:44 ` howarth at nitro dot med.uc.edu
                   ` (22 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-02-16  3:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #24 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-02-16 03:47:05 UTC ---
(In reply to comment #22)
> 
> ucontext is missing altogether from Mac OS X 10.7, but there is no TLS either:
> 
> error: thread-local storage not supported for this target

There is tis support within clang in Xcode 4.2 (see radar:10291355, "Xcode 4.2
miscompiles tls support in
MPFR 3.1.0" which was fixed in Xcode 4.2.1), however FSF gcc currently doesn't
generate the required assembly for tis support.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (24 preceding siblings ...)
  2012-02-16  3:57 ` howarth at nitro dot med.uc.edu
@ 2012-02-16 14:44 ` howarth at nitro dot med.uc.edu
  2012-02-16 15:53 ` ian at airs dot com
                   ` (21 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-02-16 14:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #25 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-02-16 14:22:33 UTC ---
(In reply to comment #23)
> I'm fine with the last patch, though, I think it needs Ian to approve.

Wouldn't it make more sense to file a joint PR with the OpenBSD folks in order
to have the use of ucontext purged from libgo (considering that neither BSD
should have it now and that feature has been deprecated from POSIX)?


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (25 preceding siblings ...)
  2012-02-16 14:44 ` howarth at nitro dot med.uc.edu
@ 2012-02-16 15:53 ` ian at airs dot com
  2012-02-16 16:31 ` howarth at nitro dot med.uc.edu
                   ` (20 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at airs dot com @ 2012-02-16 15:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #26 from Ian Lance Taylor <ian at airs dot com> 2012-02-16 15:48:18 UTC ---
I think it would be great if somebody would tell me something I can used
instead of makecontext/getcontext/setcontext.  Unless somebody can come up with
one, then I think the only alternative is to write our own processor-specific
versions and distribute them with libgo.

The functions were removed from POSIX not because there was any adequate
replacement, but because they suffer from some design deficiencies.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (26 preceding siblings ...)
  2012-02-16 15:53 ` ian at airs dot com
@ 2012-02-16 16:31 ` howarth at nitro dot med.uc.edu
  2012-02-16 16:54 ` ian at airs dot com
                   ` (19 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-02-16 16:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #27 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-02-16 16:22:02 UTC ---
(In reply to comment #26)
> I think it would be great if somebody would tell me something I can used
> instead of makecontext/getcontext/setcontext.  Unless somebody can come up with
> one, then I think the only alternative is to write our own processor-specific
> versions and distribute them with libgo.
> 
> The functions were removed from POSIX not because there was any adequate
> replacement, but because they suffer from some design deficiencies.

Would implementing "cooperative threading" with pthreads, perhaps with
conditional variables, as described in...

http://stackoverflow.com/questions/4298986/is-there-something-to-replace-the-ucontext-h-functions

be appropriate?


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (27 preceding siblings ...)
  2012-02-16 16:31 ` howarth at nitro dot med.uc.edu
@ 2012-02-16 16:54 ` ian at airs dot com
  2012-02-16 19:34 ` afb at users dot sourceforge.net
                   ` (18 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at airs dot com @ 2012-02-16 16:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #28 from Ian Lance Taylor <ian at airs dot com> 2012-02-16 16:50:13 UTC ---
Using pthreads will be much less efficient than the current code using
getcontext/setcontext.  Writing machine-specific replacement code would be a
much better idea than that.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (28 preceding siblings ...)
  2012-02-16 16:54 ` ian at airs dot com
@ 2012-02-16 19:34 ` afb at users dot sourceforge.net
  2012-02-16 19:36 ` afb at users dot sourceforge.net
                   ` (17 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2012-02-16 19:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #32 from Anders F Björklund <afb at users dot sourceforge.net> 2012-02-16 19:28:22 UTC ---
Then it's more about fixing library issues, like the macros used
for TIOCNOTTY/TIOCSCTTY or st_atime/st_mtime/st_ctime and sysctl.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (29 preceding siblings ...)
  2012-02-16 19:34 ` afb at users dot sourceforge.net
@ 2012-02-16 19:36 ` afb at users dot sourceforge.net
  2012-02-16 19:40 ` afb at users dot sourceforge.net
                   ` (16 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2012-02-16 19:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #31 from Anders F Björklund <afb at users dot sourceforge.net> 2012-02-16 19:22:52 UTC ---
Created attachment 26683
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26683
gcc-darwin_goc2c.patch


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (30 preceding siblings ...)
  2012-02-16 19:36 ` afb at users dot sourceforge.net
@ 2012-02-16 19:40 ` afb at users dot sourceforge.net
  2012-02-16 19:44 ` afb at users dot sourceforge.net
                   ` (15 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2012-02-16 19:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #30 from Anders F Björklund <afb at users dot sourceforge.net> 2012-02-16 19:22:25 UTC ---
Created attachment 26682
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26682
gcc-gox_import.diff


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (31 preceding siblings ...)
  2012-02-16 19:40 ` afb at users dot sourceforge.net
@ 2012-02-16 19:44 ` afb at users dot sourceforge.net
  2012-02-18 14:09 ` afb at users dot sourceforge.net
                   ` (14 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2012-02-16 19:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #29 from Anders F Björklund <afb at users dot sourceforge.net> 2012-02-16 19:21:45 UTC ---
It still needs to generate the extra underscore for Darwin,
and it still needs to fix the bug mentioned in Comment #12.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (32 preceding siblings ...)
  2012-02-16 19:44 ` afb at users dot sourceforge.net
@ 2012-02-18 14:09 ` afb at users dot sourceforge.net
  2012-02-18 14:17 ` afb at users dot sourceforge.net
                   ` (13 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2012-02-18 14:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #33 from Anders F Björklund <afb at users dot sourceforge.net> 2012-02-18 14:07:03 UTC ---
Created attachment 26699
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26699
gcc-darwin_libgo.patch


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (33 preceding siblings ...)
  2012-02-18 14:09 ` afb at users dot sourceforge.net
@ 2012-02-18 14:17 ` afb at users dot sourceforge.net
  2012-02-18 15:25 ` afb at users dot sourceforge.net
                   ` (12 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2012-02-18 14:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #34 from Anders F Björklund <afb at users dot sourceforge.net> 2012-02-18 14:08:26 UTC ---
There is the other big change needed, which is to prefix all the asm names
with USER_LABEL_PREFIX (_) so that they will actually link properly later.


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (34 preceding siblings ...)
  2012-02-18 14:17 ` afb at users dot sourceforge.net
@ 2012-02-18 15:25 ` afb at users dot sourceforge.net
  2013-01-24 18:14 ` ian at gcc dot gnu.org
                   ` (11 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: afb at users dot sourceforge.net @ 2012-02-18 15:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #35 from Anders F Björklund <afb at users dot sourceforge.net> 2012-02-18 14:15:28 UTC ---
At least it compiles again, after adding asm prefix and ptrace/sysctl...
Hacked it in for now, but needs a better patch for runtime and syscall.

Still fails to actually run, but I guess that is due to something else:
"panic: runtime error: invalid memory address or nil pointer dereference"


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (35 preceding siblings ...)
  2012-02-18 15:25 ` afb at users dot sourceforge.net
@ 2013-01-24 18:14 ` ian at gcc dot gnu.org
  2013-01-24 19:44 ` ian at gcc dot gnu.org
                   ` (10 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at gcc dot gnu.org @ 2013-01-24 18:14 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #36 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> 2013-01-24 18:12:41 UTC ---
Author: ian
Date: Thu Jan 24 18:12:23 2013
New Revision: 195436

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195436
Log:
    PR go/46986
libgo/Makefile, libgo/go/os/stat_atimespec.go: fix typos

Modified:
    trunk/libgo/Makefile.am
    trunk/libgo/Makefile.in
    trunk/libgo/go/os/stat_atimespec.go


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (36 preceding siblings ...)
  2013-01-24 18:14 ` ian at gcc dot gnu.org
@ 2013-01-24 19:44 ` ian at gcc dot gnu.org
  2013-02-05 22:38 ` ian at airs dot com
                   ` (9 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at gcc dot gnu.org @ 2013-01-24 19:44 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #37 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> 2013-01-24 19:44:31 UTC ---
Author: ian
Date: Thu Jan 24 19:44:23 2013
New Revision: 195438

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195438
Log:
    PR go/46986
all: prepend #__USER_LABEL_PREFIX__ to mangled Go symbols
For old-fashioned Darwin.

Modified:
    trunk/libgo/go/bytes/indexbyte.c
    trunk/libgo/go/log/syslog/syslog_c.c
    trunk/libgo/go/sync/atomic/atomic.c
    trunk/libgo/go/sync/cas.c
    trunk/libgo/go/syscall/errno.c
    trunk/libgo/go/syscall/signame.c
    trunk/libgo/go/syscall/wait.c
    trunk/libgo/runtime/chan.c
    trunk/libgo/runtime/cpuprof.c
    trunk/libgo/runtime/env_posix.c
    trunk/libgo/runtime/go-breakpoint.c
    trunk/libgo/runtime/go-caller.c
    trunk/libgo/runtime/go-callers.c
    trunk/libgo/runtime/go-cgo.c
    trunk/libgo/runtime/go-fieldtrack.c
    trunk/libgo/runtime/go-getgoroot.c
    trunk/libgo/runtime/go-now.c
    trunk/libgo/runtime/go-reflect-map.c
    trunk/libgo/runtime/go-setenv.c
    trunk/libgo/runtime/go-signal.c
    trunk/libgo/runtime/go-typestring.c
    trunk/libgo/runtime/go-unsafe-new.c
    trunk/libgo/runtime/go-unsafe-newarray.c
    trunk/libgo/runtime/go-unsafe-pointer.c
    trunk/libgo/runtime/goc2c.c
    trunk/libgo/runtime/lfstack.c
    trunk/libgo/runtime/malloc.goc
    trunk/libgo/runtime/malloc.h
    trunk/libgo/runtime/mgc0.c
    trunk/libgo/runtime/mprof.goc
    trunk/libgo/runtime/panic.c
    trunk/libgo/runtime/parfor.c
    trunk/libgo/runtime/proc.c
    trunk/libgo/runtime/runtime.c
    trunk/libgo/runtime/runtime.h


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (37 preceding siblings ...)
  2013-01-24 19:44 ` ian at gcc dot gnu.org
@ 2013-02-05 22:38 ` ian at airs dot com
  2021-07-24  5:09 ` egallager at gcc dot gnu.org
                   ` (8 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at airs dot com @ 2013-02-05 22:38 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #38 from Ian Lance Taylor <ian at airs dot com> 2013-02-05 22:37:42 UTC ---
*** Bug 55969 has been marked as a duplicate of this bug. ***


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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (38 preceding siblings ...)
  2013-02-05 22:38 ` ian at airs dot com
@ 2021-07-24  5:09 ` egallager at gcc dot gnu.org
  2021-07-24 23:40 ` ian at airs dot com
                   ` (7 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: egallager at gcc dot gnu.org @ 2021-07-24  5:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #41 from Eric Gallager <egallager at gcc dot gnu.org> ---
Would this package help at all? https://github.com/blacktop/go-macho

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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (39 preceding siblings ...)
  2021-07-24  5:09 ` egallager at gcc dot gnu.org
@ 2021-07-24 23:40 ` ian at airs dot com
  2022-10-30  7:14 ` vital.had at gmail dot com
                   ` (6 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at airs dot com @ 2021-07-24 23:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #42 from Ian Lance Taylor <ian at airs dot com> ---
No, the go-macho package is irrelevant here.

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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (40 preceding siblings ...)
  2021-07-24 23:40 ` ian at airs dot com
@ 2022-10-30  7:14 ` vital.had at gmail dot com
  2022-10-30 17:15 ` ian at airs dot com
                   ` (5 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: vital.had at gmail dot com @ 2022-10-30  7:14 UTC (permalink / raw)
  To: gcc-bugs

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

Sergey Fedorov <vital.had at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vital.had at gmail dot com

--- Comment #43 from Sergey Fedorov <vital.had at gmail dot com> ---
What is the current status of gccgo on Darwin?

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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (41 preceding siblings ...)
  2022-10-30  7:14 ` vital.had at gmail dot com
@ 2022-10-30 17:15 ` ian at airs dot com
  2022-10-30 17:19 ` iains at gcc dot gnu.org
                   ` (4 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at airs dot com @ 2022-10-30 17:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #44 from Ian Lance Taylor <ian at airs dot com> ---
gccgo still does not work on Darwin.

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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (42 preceding siblings ...)
  2022-10-30 17:15 ` ian at airs dot com
@ 2022-10-30 17:19 ` iains at gcc dot gnu.org
  2022-10-30 17:25 ` ian at airs dot com
                   ` (3 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: iains at gcc dot gnu.org @ 2022-10-30 17:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #45 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Ian Lance Taylor from comment #44)
> gccgo still does not work on Darwin.

is work needed on the runtime, or on code-gen (or both)?
If there was someone who had some spare time to work on it...

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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (43 preceding siblings ...)
  2022-10-30 17:19 ` iains at gcc dot gnu.org
@ 2022-10-30 17:25 ` ian at airs dot com
  2022-10-30 17:41 ` vital.had at gmail dot com
                   ` (2 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ian at airs dot com @ 2022-10-30 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #46 from Ian Lance Taylor <ian at airs dot com> ---
A small bit of work is needed on the codegen, to read and write the export
data.  And some work is required on the runtime, to clean it up to support
Darwin.  It has to be done by someone with access to a modern Darwin system.

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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (44 preceding siblings ...)
  2022-10-30 17:25 ` ian at airs dot com
@ 2022-10-30 17:41 ` vital.had at gmail dot com
  2022-10-30 18:14 ` iains at gcc dot gnu.org
  2023-10-08  5:33 ` vital.had at gmail dot com
  47 siblings, 0 replies; 49+ messages in thread
From: vital.had at gmail dot com @ 2022-10-30 17:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #47 from Sergey Fedorov <vital.had at gmail dot com> ---
(In reply to Ian Lance Taylor from comment #46)
> A small bit of work is needed on the codegen, to read and write the export
> data.  And some work is required on the runtime, to clean it up to support
> Darwin.  It has to be done by someone with access to a modern Darwin system.

I could do something on this, perhaps, provided it is not overly demanding in
terms of expertise. Or do those parts which are such :)

While I have more interest in Darwin PPC, since Go is broken there (ppc32
support exists in out-of-tree branch of Go 1.9, though not for Darwin, however
the only Go bootstrappable from C, 1.4, is x86-only), access to modern x86_64
Darwin is there.

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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (45 preceding siblings ...)
  2022-10-30 17:41 ` vital.had at gmail dot com
@ 2022-10-30 18:14 ` iains at gcc dot gnu.org
  2023-10-08  5:33 ` vital.had at gmail dot com
  47 siblings, 0 replies; 49+ messages in thread
From: iains at gcc dot gnu.org @ 2022-10-30 18:14 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|1                           |0
             Status|SUSPENDED                   |UNCONFIRMED

--- Comment #48 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Sergey Fedorov from comment #47)
> (In reply to Ian Lance Taylor from comment #46)
> > A small bit of work is needed on the codegen, to read and write the export
> > data.  And some work is required on the runtime, to clean it up to support
> > Darwin.  It has to be done by someone with access to a modern Darwin system.
> 
> I could do something on this, perhaps, provided it is not overly demanding
> in terms of expertise. Or do those parts which are such :)
> 
> While I have more interest in Darwin PPC, since Go is broken there (ppc32
> support exists in out-of-tree branch of Go 1.9, though not for Darwin,
> however the only Go bootstrappable from C, 1.4, is x86-only), access to
> modern x86_64 Darwin is there.

with care, most of the time, FE stuff tends to be quite neutral about the
eventual Darwin target (generic Mach-O constraints are similar between the
sub-targets***).  The runtime, of course, is likely to be more specific.   I'd
recommend starting on x86_64 since that's pretty stable, and then we can look
at i686 ... and when that works, ppc is likely to be quite easy.

Arm64 is still pretty experimental, and there are known TODOs for ABI
compliance, so I'd avoid that sub-platform initially (despite that it's the
most modern).

*** aarch64/arm64 Darwin has some much tighter constraints security-wise - in
particular stack-based trampolines are not allowed - but we have a draft of a
heap-based scheme in the devt. branch .. you'd just need to look at what has
been done for C, Fortran and Ada.

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

* [Bug go/46986] Go is not supported on Darwin
  2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
                   ` (46 preceding siblings ...)
  2022-10-30 18:14 ` iains at gcc dot gnu.org
@ 2023-10-08  5:33 ` vital.had at gmail dot com
  47 siblings, 0 replies; 49+ messages in thread
From: vital.had at gmail dot com @ 2023-10-08  5:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #49 from Sergey Fedorov <vital.had at gmail dot com> ---
If someone happens to have some WIP on this, more recent than 2012, please
share, if possible.

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

end of thread, other threads:[~2023-10-08  5:33 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-17  0:59 [Bug go/46986] New: Fails to build due to -Werror with --disable-werror manphiz at gmail dot com
2010-12-17  1:08 ` [Bug go/46986] Go is not supported on Darwin pinskia at gcc dot gnu.org
2011-01-05  5:37 ` ian at airs dot com
2011-02-26 23:42 ` comexk at gmail dot com
2011-02-27  0:24 ` comexk at gmail dot com
2011-04-21  0:19 ` ian at airs dot com
2011-04-28 16:47 ` rguenth at gcc dot gnu.org
2011-09-01 18:10 ` afb at users dot sourceforge.net
2011-09-01 18:11 ` afb at users dot sourceforge.net
2011-09-01 22:49 ` howarth at nitro dot med.uc.edu
2011-09-02  6:40 ` afb at users dot sourceforge.net
2011-09-02  8:46 ` afb at users dot sourceforge.net
2011-09-02  9:07 ` afb at users dot sourceforge.net
2011-09-02 11:08 ` afb at users dot sourceforge.net
2011-09-02 11:11 ` afb at users dot sourceforge.net
2011-09-04 17:30 ` howarth at nitro dot med.uc.edu
2011-09-04 18:15 ` afb at users dot sourceforge.net
2011-09-05 14:03 ` afb at users dot sourceforge.net
2011-12-14  1:53 ` ian at airs dot com
2012-02-14 20:00 ` ian at airs dot com
2012-02-15 22:24 ` afb at users dot sourceforge.net
2012-02-15 22:30 ` afb at users dot sourceforge.net
2012-02-15 22:32 ` afb at users dot sourceforge.net
2012-02-15 22:48 ` afb at users dot sourceforge.net
2012-02-15 23:40 ` mrs at gcc dot gnu.org
2012-02-16  3:57 ` howarth at nitro dot med.uc.edu
2012-02-16 14:44 ` howarth at nitro dot med.uc.edu
2012-02-16 15:53 ` ian at airs dot com
2012-02-16 16:31 ` howarth at nitro dot med.uc.edu
2012-02-16 16:54 ` ian at airs dot com
2012-02-16 19:34 ` afb at users dot sourceforge.net
2012-02-16 19:36 ` afb at users dot sourceforge.net
2012-02-16 19:40 ` afb at users dot sourceforge.net
2012-02-16 19:44 ` afb at users dot sourceforge.net
2012-02-18 14:09 ` afb at users dot sourceforge.net
2012-02-18 14:17 ` afb at users dot sourceforge.net
2012-02-18 15:25 ` afb at users dot sourceforge.net
2013-01-24 18:14 ` ian at gcc dot gnu.org
2013-01-24 19:44 ` ian at gcc dot gnu.org
2013-02-05 22:38 ` ian at airs dot com
2021-07-24  5:09 ` egallager at gcc dot gnu.org
2021-07-24 23:40 ` ian at airs dot com
2022-10-30  7:14 ` vital.had at gmail dot com
2022-10-30 17:15 ` ian at airs dot com
2022-10-30 17:19 ` iains at gcc dot gnu.org
2022-10-30 17:25 ` ian at airs dot com
2022-10-30 17:41 ` vital.had at gmail dot com
2022-10-30 18:14 ` iains at gcc dot gnu.org
2023-10-08  5:33 ` vital.had at gmail dot com

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).