Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gccgo compilation fails because constructor priorities are not supported / -fplit-stack while compiling type.go not supported on darwin #329

Closed
gopherbot opened this issue Nov 24, 2009 · 3 comments

Comments

@gopherbot
Copy link

by f.guerrieri:

What steps will reproduce the problem?
1. After issue #324, update from svn, remove the dir
objdir/x86_64-apple-darwin10.0.0 and its contents (including dirs  .deps
and .libs)
2. make
3. wait a few minutes

What is the expected output? What do you see instead?
libtool: compile:  /Users/macbook/projects/objdir/./gcc/xgcc
-B/Users/macbook/projects/objdir/./gcc/
-B/usr/local/x86_64-apple-darwin10.0.0/bin/
-B/usr/local/x86_64-apple-darwin10.0.0/lib/ -isystem
/usr/local/x86_64-apple-darwin10.0.0/include -isystem
/usr/local/x86_64-apple-darwin10.0.0/sys-include -DHAVE_CONFIG_H -I.
-I../../../gccgo/libgo -I ../../../gccgo/libgo/runtime
-I../../../gccgo/libgo/../libffi/include -I../libffi/include
-fplan9-extensions -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -g -O2
-MT malloc.lo -MD -MP -MF .deps/malloc.Tpo -c
../../../gccgo/libgo/runtime/malloc.c  -fno-common -DPIC -o .libs/malloc.o
../../../gccgo/libgo/runtime/malloc.c:178:1: error: constructor priorities
are not supported
make[3]: *** [malloc.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libgo] Error 2
make: *** [all] Error 2


What is your $GOOS?  $GOARCH?
darwin, i386

Which revision are you using?  (hg identify)
~/projects/gccgo 546 $ svn update
U    libgcc/generic-morestack.c
U    libgcc/config/i386/morestack.S
U    gcc/config/i386/i386.c
U    libgo/config.h.in
U    libgo/configure
U    libgo/configure.ac
U    libgo/runtime/go-reflect-chan.c
Updated to revision 154520.


Please provide any additional information below.
~/projects/objdir 590 $ gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5646~6/src/configure --disable-checking
--enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
--build=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
--program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10
--target=i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5646)

I tried to "fix" the bug by removing the priority: that is
row 174-176 of my copy of malloc.c become

void
__attribute__ ((constructor)) /*(101)))*/
mallocinit(void)


but then I get the following error:
libtool: compile:  /Users/macbook/projects/objdir/./gcc/gccgo
-B/Users/macbook/projects/objdir/./gcc/ -O2 -g -c
../../../gccgo/libgo/go/runtime/extern.go
../../../gccgo/libgo/go/runtime/type.go 
go1: error: ‘-fsplit-stack’ currently only supported on GNU/Linux
make[3]: *** [runtime/libruntime.a] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libgo] Error 2
make: *** [all] Error 2
@rsc
Copy link
Contributor

rsc commented Nov 29, 2009

Comment 1:

Labels changed: added gccgo.

Owner changed to i...@golang.org.

Status changed to Accepted.

@ianlancetaylor
Copy link
Contributor

Comment 2:

Both of these problems should now be fixed in the gccgo sources at gcc.gnu.org.  Sorry 
for the long delay in addressing this.

Status changed to Fixed.

@gopherbot
Copy link
Author

Comment 3 by f.guerrieri:

Thanks for the fix :)

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants