public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
@ 2012-11-30 16:28 Jim Rice
  2012-11-30 22:38 ` Jim Rice
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Jim Rice @ 2012-11-30 16:28 UTC (permalink / raw)
  To: gcc-help

ld: fatal: file .libs/sjlj.o: section [12].eh_frame: section type is SHT_PROGBITS: expected SHT_AMD64_UNWIND

All of my Googling has lead me down the rabbit hole.
Something about binutils?
Am I stumbling in the right direction?
Figured I would ask the source...

Let me know what more info you would like to see if you can help me...

Sun X4100M2 - x86 AMD64 - Solaris 10 U10
Compiling with GCC 3.4.3
GNU ld (GNU Binutils)2.22

solaris-build# mkdir gcc-4.7.2_build
solaris-build# cd gcc-4.7.2_build
solaris-build# $PWD/../gcc-4.7.2/configure --prefix=/opt/gcc-4.7.2 --with-gnu-as --with-as=/usr/sfw/bin/gas \
               --enable-languages=c,c++ CC='gcc -m64'
solaris-build# make

Thanks!

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-11-30 16:28 Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame Jim Rice
@ 2012-11-30 22:38 ` Jim Rice
  2012-11-30 22:47   ` Jim Rice
  2012-12-01  1:13 ` Ian Lance Taylor
  2012-12-04 17:52 ` Jim Rice
  2 siblings, 1 reply; 16+ messages in thread
From: Jim Rice @ 2012-11-30 22:38 UTC (permalink / raw)
  To: gcc-help

Tidbits that I found that looked like they were related, but have not provided an answer ...

http://mail.opensolaris.org/pipermail/tools-compilers/2010-October/001194.html

http://fingolfin.org/illumos/webrev/3210/usr/src/cmd/sgs/libld/common/files.c.cdiff.html

Really, I cannot be the first to attempt to build GCC 4.7.2 on Solaris 10?

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-11-30 22:38 ` Jim Rice
@ 2012-11-30 22:47   ` Jim Rice
  0 siblings, 0 replies; 16+ messages in thread
From: Jim Rice @ 2012-11-30 22:47 UTC (permalink / raw)
  To: gcc-help

I even tried hand editing the code:

gcc-4.7.2/libitm/config/x86/sjlj.S

< .section .note.GNU-stack, "", @progbits
> .section .note.GNU-stack, "", @unwind

But no love.


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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-11-30 16:28 Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame Jim Rice
  2012-11-30 22:38 ` Jim Rice
@ 2012-12-01  1:13 ` Ian Lance Taylor
  2012-12-01  8:16   ` Marc Glisse
  2012-12-04 17:52 ` Jim Rice
  2 siblings, 1 reply; 16+ messages in thread
From: Ian Lance Taylor @ 2012-12-01  1:13 UTC (permalink / raw)
  To: Jim Rice; +Cc: gcc-help

On Fri, Nov 30, 2012 at 8:28 AM, Jim Rice <jmrice6640@yahoo.com> wrote:
> ld: fatal: file .libs/sjlj.o: section [12].eh_frame: section type is SHT_PROGBITS: expected SHT_AMD64_UNWIND

Sounds like you are using the GNU assembler with the Solaris linker,
or the Solaris assembler with the GNU linker.  Don't do that.  Use
both the Solaris assembler and linker, or both the GNU assembler and
linker.  Use the -v option with gcc to see precisely which assembler
and linker it is running.

Ian

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-12-01  1:13 ` Ian Lance Taylor
@ 2012-12-01  8:16   ` Marc Glisse
  2012-12-02  1:24     ` Dennis Clarke
  2012-12-03  2:08     ` Ian Lance Taylor
  0 siblings, 2 replies; 16+ messages in thread
From: Marc Glisse @ 2012-12-01  8:16 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Jim Rice, gcc-help

On Fri, 30 Nov 2012, Ian Lance Taylor wrote:

> Sounds like you are using the GNU assembler with the Solaris linker,
> or the Solaris assembler with the GNU linker.  Don't do that.

Ian,

that mix is what we recommend in our doc...
http://gcc.gnu.org/install/specific.html#ix86-x-solaris210

-- 
Marc Glisse

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-12-01  8:16   ` Marc Glisse
@ 2012-12-02  1:24     ` Dennis Clarke
  2012-12-03  2:08     ` Ian Lance Taylor
  1 sibling, 0 replies; 16+ messages in thread
From: Dennis Clarke @ 2012-12-02  1:24 UTC (permalink / raw)
  To: gcc-help; +Cc: Ian Lance Taylor, Jim Rice


> On Fri, 30 Nov 2012, Ian Lance Taylor wrote:
> 
> > Sounds like you are using the GNU assembler with the Solaris linker,
> > or the Solaris assembler with the GNU linker.  Don't do that.
> 
> Ian,
> 
> that mix is what we recommend in our doc...
> http://gcc.gnu.org/install/specific.html#ix86-x-solaris210

However my testing on Solaris 8 shows excellent results with the Sun as and ld : 

see :

    4.7.2 : http://gcc.gnu.org/ml/gcc-testresults/2012-11/msg01980.html
    4.7.1 : http://gcc.gnu.org/ml/gcc-testresults/2012-06/msg02064.html

Results on Solaris 10 have been messy and really unhealthy regardless if I use the 
Sun assembler or binutils assembler and/or linker. I have tried all four combinations 
with no real success. 

The culprit may be in recent binutils as even RHEL6 can not build a valid binutils result
for binutils 2.23.1.

Dennis 

ps: I have seen success with Sol 8 and no success with Sol 10. This has been an ongoing
 battle for a month at least for me. 


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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-12-01  8:16   ` Marc Glisse
  2012-12-02  1:24     ` Dennis Clarke
@ 2012-12-03  2:08     ` Ian Lance Taylor
  2012-12-03 16:35       ` Jim Rice
  1 sibling, 1 reply; 16+ messages in thread
From: Ian Lance Taylor @ 2012-12-03  2:08 UTC (permalink / raw)
  To: gcc-help; +Cc: Jim Rice

On Sat, Dec 1, 2012 at 12:15 AM, Marc Glisse <marc.glisse@inria.fr> wrote:
> On Fri, 30 Nov 2012, Ian Lance Taylor wrote:
>
>> Sounds like you are using the GNU assembler with the Solaris linker,
>> or the Solaris assembler with the GNU linker.  Don't do that.
>
>
> Ian,
>
> that mix is what we recommend in our doc...
> http://gcc.gnu.org/install/specific.html#ix86-x-solaris210

Ah, sorry for being misleading.

I think I see the real problem now.  The OP is using GCC 3.4.3, which
does not have this patch:

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02353.html

That patch was added in GCC 4.0.  It changes GCC to use the
SHT_AMD64_UNWIND section type for the .eh_frame section on x86_64
Solaris.

I think the effect is that version of GCC before 4.0 do not properly
support Solaris 10.

Ian

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-12-03  2:08     ` Ian Lance Taylor
@ 2012-12-03 16:35       ` Jim Rice
  2012-12-03 17:17         ` Dennis Clarke
  0 siblings, 1 reply; 16+ messages in thread
From: Jim Rice @ 2012-12-03 16:35 UTC (permalink / raw)
  To: gcc-help, Ian Lance Taylor


--- On Sun, 12/2/12, Ian Lance Taylor <iant@google.com> wrote:

> From: Ian Lance Taylor <iant@google.com>
> Subject: Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
> To: gcc-help@gcc.gnu.org
> Cc: "Jim Rice" <jmrice6640@yahoo.com>
> Date: Sunday, December 2, 2012, 6:07 PM
> On Sat, Dec 1, 2012 at 12:15 AM, Marc
> Glisse <marc.glisse@inria.fr>
> wrote:
> > On Fri, 30 Nov 2012, Ian Lance Taylor wrote:
> >
> >> Sounds like you are using the GNU assembler with
> the Solaris linker,
> >> or the Solaris assembler with the GNU linker. 
> Don't do that.
> >
> >
> > Ian,
> >
> > that mix is what we recommend in our doc...
> > http://gcc.gnu.org/install/specific.html#ix86-x-solaris210
> 
> Ah, sorry for being misleading.
> 
> I think I see the real problem now.  The OP is using
> GCC 3.4.3, which
> does not have this patch:
> 
> http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02353.html
> 
> That patch was added in GCC 4.0.  It changes GCC to use
> the
> SHT_AMD64_UNWIND section type for the .eh_frame section on
> x86_64
> Solaris.
> 
> I think the effect is that version of GCC before 4.0 do not
> properly
> support Solaris 10.
> 
> Ian
> 

Thanks for the clarification and the info.

What would you recommend as a course going forward?
I do not believe that our old version was built from source,
so I wouldn't know how to apply the patch.

Should I obtain GCC 4.x binaries, then try to build 4.7.2 from there?

Thanks again,

Jim

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-12-03 16:35       ` Jim Rice
@ 2012-12-03 17:17         ` Dennis Clarke
  0 siblings, 0 replies; 16+ messages in thread
From: Dennis Clarke @ 2012-12-03 17:17 UTC (permalink / raw)
  To: Jim Rice; +Cc: gcc-help, Ian Lance Taylor


> Thanks for the clarification and the info.
> 
> What would you recommend as a course going forward?
> I do not believe that our old version was built from source,
> so I wouldn't know how to apply the patch.
> 
> Should I obtain GCC 4.x binaries, then try to build 4.7.2 from there?
> 


You can easily install a well tested GCC 4.5.1 from here : 

    http://mirrors.med.harvard.edu/csw/unstable/

The packages there ( for 4.5.1 ) will install gcc here : 

node002-sparc-SunOS5.10 # /opt/csw/gcc4/bin/gcc -v 
Using built-in specs.
COLLECT_GCC=/opt/csw/gcc4/bin/gcc
COLLECT_LTO_WRAPPER=/opt/csw/gcc4/libexec/gcc/sparc-sun-solaris2.8/4.5.1/lto-wrapper
Target: sparc-sun-solaris2.8
Configured with: ../gcc-4.5.1/configure --host=sparc-sun-solaris2.8 --build=sparc-sun-solaris2.8 --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --with-cpu=v7 --enable-stage1-languages=c --enable-nls --enable-threads=posix --prefix=/opt/csw/gcc4 --with-local-prefix=/opt/csw --enable-shared --enable-multilib --with-pkgversion='Blastwave.org Inc. Mon Aug  9 07:10:45 GMT 2010' --with-bugurl=http://www.blastwave.org/support --enable-languages=c,c++,objc,fortran,ada --enable-bootstrap
Thread model: posix
gcc version 4.5.1 (Blastwave.org Inc. Mon Aug  9 07:10:45 GMT 2010) 
node002-sparc-SunOS5.10 # 

You can hand pick what you need from here : 

   http://mirrors.med.harvard.edu/csw/unstable/sparc/5.10/

A minimal list is : 

bash-4.1.7,REV=2010.05.26-SunOS5.8-sparc-CSW.pkg
binutils-2.20.1,REV=2010.08.25-SunOS5.8-sparc-CSW.pkg
common-1.8.0,REV=2010.05.01-SunOS5.8-sparc-CSW.pkg
gcc4-4.5.1,REV=2010.09.01-SunOS5.8-sparc-CSW.pkg
gcc4corert-4.5.1,REV=2010.09.01-SunOS5.8-sparc-CSW.pkg
gcc4g++rt-4.5.1,REV=2010.09.01-SunOS5.8-sparc-CSW.pkg
ggettext-0.17,REV=2010.03.08-SunOS5.8-sparc-CSW.pkg
gsed-4.2.1,REV=2009.07.01-SunOS5.8-sparc-CSW.pkg
isaexec-11.11,REV=2009.12.27-SunOS5.8-sparc-CSW.pkg
libiconv-1.13.1,REV=2009.07.01-SunOS5.8-sparc-CSW.pkg
mysql-5.5.28-solaris10-sparc-64bit.pkg
openssl_rt-0.9.8o,REV=2010.07.08-SunOS5.8-sparc-CSW.pkg
stl4-12.0,REV=2010.04.23-SunOS5.10-sparc-CSW.pkg
zlib-1.2.5,REV=2010.06.10-SunOS5.8-sparc-CSW.pkg


Test results on this GCC package were posted back in 2010 : 

    http://gcc.gnu.org/ml/gcc-testresults/2010-08/msg01024.html

You can use it to bootstrap forwards with. 

Dennis 

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
@ 2012-12-04 17:52 ` Jim Rice
  2012-12-05  1:08   ` Jim Rice
  2012-12-05 17:00   ` Dennis Clarke
  0 siblings, 2 replies; 16+ messages in thread
From: Jim Rice @ 2012-12-04 17:52 UTC (permalink / raw)
  To: Dennis Clarke; +Cc: gcc-help, Ian Lance Taylor


> You can easily install a well tested GCC 4.5.1 from here : 
> 
>     http://mirrors.med.harvard.edu/csw/unstable/

> You can hand pick what you need from here : 
> 
>    http://mirrors.med.harvard.edu/csw/unstable/sparc/5.10/
> 

> You can use it to bootstrap forwards with. 
> 
> Dennis 
> 

Thanks Dennis!

The following is a list of the parts I collected and installed ...

bash-4.1.7,REV=2010.05.26-SunOS5.8-i386-CSW.pkg.gz
binutils-2.20.1,REV=2010.08.25-SunOS5.10-i386-CSW.pkg.gz
common-1.8.0,REV=2010.05.01-SunOS5.8-i386-CSW.pkg.gz
dejagnu-1.5.tar.gz
expect5.45.tar.gz
gcc4-4.5.1,REV=2010.09.01-SunOS5.10-i386-CSW.pkg.gz
gcc4corert-4.5.1,REV=2010.09.01-SunOS5.10-i386-CSW.pkg.gz
gcc4g++rt-4.5.1,REV=2010.09.01-SunOS5.10-i386-CSW.pkg.gz
ggettext-0.17,REV=2010.03.08-SunOS5.8-i386-CSW.pkg.gz
gsed-4.2.1,REV=2009.07.01-SunOS5.8-i386-CSW.pkg.gz
isaexec-11.11,REV=2009.12.27-SunOS5.8-i386-CSW.pkg.gz
libiconv-1.13.1,REV=2009.07.01-SunOS5.8-i386-CSW.pkg.gz
pkgutil-1.8.0,REV=2010.03.08_rev=bw-SunOS5.8-i386-CSW.pkg.gz
stl4-12.0,REV=2010.04.23-SunOS5.10-i386-CSW.pkg.gz
tcl8.5.13-src.tar.gz
zlib-1.2.5,REV=2010.06.10-SunOS5.8-i386-CSW.pkg.gz

gcc 4.7.2 compiled on Solaris 10 and is being run through the testsuite now ...

Thanks again, Dennis, Ian, Marc.  Exactly the kind of help I wanted and needed, but did not expect.




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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-12-04 17:52 ` Jim Rice
@ 2012-12-05  1:08   ` Jim Rice
  2012-12-05 17:00   ` Dennis Clarke
  1 sibling, 0 replies; 16+ messages in thread
From: Jim Rice @ 2012-12-05  1:08 UTC (permalink / raw)
  To: Dennis Clarke; +Cc: gcc-help, Ian Lance Taylor


> gcc 4.7.2 compiled on Solaris 10 and is being run through
> the testsuite now ...

Just as a followup, the testsuite ran for 8 hours, then finally ended abruptly with this:

Making all in testsuite
make[7]: Entering directory `/rpool/export/home/jim/MySQL/gcc-4.7.2_build/x86_64-pc-solaris2.10/32/libitm/testsuite'
make[7]: Nothing to be done for `all'.
make[7]: Leaving directory `/rpool/export/home/jim/MySQL/gcc-4.7.2_build/x86_64-pc-solaris2.10/32/libitm/testsuite'
make[7]: Entering directory `/rpool/export/home/jim/MySQL/gcc-4.7.2_build/x86_64-pc-solaris2.10/32/libitm'
true  DO=all multi-do # make
make[7]: Leaving directory `/rpool/export/home/jim/MySQL/gcc-4.7.2_build/x86_64-pc-solaris2.10/32/libitm'
make[6]: Leaving directory `/rpool/export/home/jim/MySQL/gcc-4.7.2_build/x86_64-pc-solaris2.10/32/libitm'
make[5]: Leaving directory `/rpool/export/home/jim/MySQL/gcc-4.7.2_build/x86_64-pc-solaris2.10/32/libitm'
make[4]: Leaving directory `/rpool/export/home/jim/MySQL/gcc-4.7.2_build/x86_64-pc-solaris2.10/libitm'
make[3]: Leaving directory `/rpool/export/home/jim/MySQL/gcc-4.7.2_build/x86_64-pc-solaris2.10/libitm'
make[2]: Leaving directory `/rpool/export/home/jim/MySQL/gcc-4.7.2_build/x86_64-pc-solaris2.10/libitm'
make[1]: Leaving directory `/rpool/export/home/jim/MySQL/gcc-4.7.2_build'
make: *** [do-check] Error 2
make: Target `check' not remade because of errors.

solaris-build# pwd
/rpool/export/home/jim/MySQL/gcc-4.7.2_build

solaris-build# find . -name \*.sum -ls
458894 3589 -rw-r--r--   1 root     root      3566968 Dec  4 14:08 ./gcc/testsuite/g++/g++.sum
458881 6023 -rw-r--r--   1 root     root      6118732 Dec  4 12:41 ./gcc/testsuite/gcc/gcc.sum
460958  643 -rw-r--r--   1 root     root       614675 Dec  4 16:54 ./x86_64-pc-solaris2.10/libstdc++-v3/testsuite/libstdc++.sum
463601    3 -rw-r--r--   1 root     root         1817 Dec  4 17:01 ./x86_64-pc-solaris2.10/libitm/testsuite/libitm.sum
462968   78 -rw-r--r--   1 root     root        79283 Dec  4 17:01 ./x86_64-pc-solaris2.10/libgomp/testsuite/libgomp.sum
solaris-build# 

10 MBytes of summary?  I'll read them tomorrow ...

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-12-04 17:52 ` Jim Rice
  2012-12-05  1:08   ` Jim Rice
@ 2012-12-05 17:00   ` Dennis Clarke
  2012-12-05 17:36     ` Jim Rice
  2012-12-05 18:30     ` Holmes.Sherlock
  1 sibling, 2 replies; 16+ messages in thread
From: Dennis Clarke @ 2012-12-05 17:00 UTC (permalink / raw)
  To: Jim Rice; +Cc: gcc-help, Ian Lance Taylor



> gcc 4.7.2 compiled on Solaris 10 and is being run through the 
> testsuite now ...

Please please post a testsuite result when you get a chance. I would 
love to see at least one good result from someone, other than me,  on
Sol 10 Sparc.

> Thanks again, Dennis, Ian, Marc.  Exactly the kind of help I wanted 
> and needed, but did not expect.

glad those old SVR4 GCC 4.5.1 packages I built still do the trick. 

Dennis 

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-12-05 17:00   ` Dennis Clarke
@ 2012-12-05 17:36     ` Jim Rice
  2012-12-05 18:30     ` Holmes.Sherlock
  1 sibling, 0 replies; 16+ messages in thread
From: Jim Rice @ 2012-12-05 17:36 UTC (permalink / raw)
  To: Dennis Clarke; +Cc: gcc-help, Ian Lance Taylor



--- On Wed, 12/5/12, Dennis Clarke <dclarke@blastwave.org> wrote:

> From: Dennis Clarke <dclarke@blastwave.org>
> Subject: Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
> To: "Jim Rice" <jmrice6640@yahoo.com>
> Cc: gcc-help@gcc.gnu.org, "Ian Lance Taylor" <iant@google.com>
> Date: Wednesday, December 5, 2012, 8:59 AM
> 
> 
> > gcc 4.7.2 compiled on Solaris 10 and is being run
> through the 
> > testsuite now ...
> 
> Please please post a testsuite result when you get a chance.
> I would 
> love to see at least one good result from someone, other
> than me,  on
> Sol 10 Sparc.
> 
> > Thanks again, Dennis, Ian, Marc.  Exactly the kind
> of help I wanted 
> > and needed, but did not expect.
> 
> glad those old SVR4 GCC 4.5.1 packages I built still do the
> trick. 
> 
> Dennis 
> 

Sure thing.  What goes into the "your_commentary.txt" file?

;-)

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-12-05 17:00   ` Dennis Clarke
  2012-12-05 17:36     ` Jim Rice
@ 2012-12-05 18:30     ` Holmes.Sherlock
  2012-12-05 20:03       ` Jim Rice
  1 sibling, 1 reply; 16+ messages in thread
From: Holmes.Sherlock @ 2012-12-05 18:30 UTC (permalink / raw)
  To: gcc-help

Dennis Clarke-2 wrote
> Please please post a testsuite result when you get a chance. I would 
> love to see at least one good result from someone, other than me,  on
> Sol 10 Sparc.

Did you use that gcc 4.5.1 with Sun's ld and gas or some other combination?




--
View this message in context: http://gcc.1065356.n5.nabble.com/Building-GCC-4-7-2-on-Solaris-10-x86-AMD64-Getting-linker-error-involving-eh-frame-tp893484p894950.html
Sent from the gcc - Help mailing list archive at Nabble.com.

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-12-05 18:30     ` Holmes.Sherlock
@ 2012-12-05 20:03       ` Jim Rice
  2012-12-16  0:35         ` Holmes.Sherlock
  0 siblings, 1 reply; 16+ messages in thread
From: Jim Rice @ 2012-12-05 20:03 UTC (permalink / raw)
  To: gcc-help, Holmes.Sherlock


> From: Holmes.Sherlock <its.dipanjan.das@gmail.com>

> Did you use that gcc 4.5.1 with Sun's ld and gas or some
> other combination?


I believe the combination was this:

solaris-build# $PWD/../gcc-4.7.2/configure --prefix=/opt/gcc-4.7.2 --with-gnu-as --with-as=/opt/csw/bin/gas \
               --enable-languages=c,c++ CC='gcc -m64'


sol-build# /opt/csw/gcc4/bin/gcc --version
gcc (Blastwave.org Inc. Mon Aug 23 11:16:32 GMT 2010) 4.5.1
Copyright (C) 2010 Free Software Foundation, Inc.

sol-build# /opt/csw/bin/gas --version
GNU assembler (GNU Binutils) 2.20.1.20100303
Copyright 2009 Free Software Foundation, Inc.

sol-build# /usr/ccs/bin/ld --version
ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.1509

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

* Re: Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame
  2012-12-05 20:03       ` Jim Rice
@ 2012-12-16  0:35         ` Holmes.Sherlock
  0 siblings, 0 replies; 16+ messages in thread
From: Holmes.Sherlock @ 2012-12-16  0:35 UTC (permalink / raw)
  To: gcc-help

Jim Rice wrote
> solaris-build# $PWD/../gcc-4.7.2/configure --prefix=/opt/gcc-4.7.2
> --with-gnu-as --with-as=/opt/csw/bin/gas \
>                --enable-languages=c,c++ CC='gcc -m64'

./configure -h lists out the following:


> `configure' configures this package to adapt to many kinds of systems.
> 
> Usage: ../gcc-4.7.2/configure [OPTION]... [VAR=VALUE]...
> 
> To assign environment variables (e.g., CC, CFLAGS...), specify them as
> VAR=VALUE.  See below for descriptions of some of the useful variables.
> 
> Defaults for the options are specified in brackets.
> 
> Configuration:
>   -h, --help              display this help and exit
>       --help=short        display options specific to this package
>       --help=recursive    display the short help of all the included
> packages
>   -V, --version           display version information and exit
>   -q, --quiet, --silent   do not print `checking...' messages
>       --cache-file=FILE   cache test results in FILE [disabled]
>   -C, --config-cache      alias for `--cache-file=config.cache'
>   -n, --no-create         do not create output files
>       --srcdir=DIR        find the sources in DIR [configure dir or `..']
> 
> Installation directories:
>   --prefix=PREFIX         install architecture-independent files in PREFIX
>                           [/usr/local]
>   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
>                           [PREFIX]
> 
> By default, `make install' will install all the files in
> `/usr/local/bin', `/usr/local/lib' etc.  You can specify
> an installation prefix other than `/usr/local' using `--prefix',
> for instance `--prefix=$HOME'.
> 
> For better control, use the options below.
> 
> Fine tuning of the installation directories:
>   --bindir=DIR            user executables [EPREFIX/bin]
>   --sbindir=DIR           system admin executables [EPREFIX/sbin]
>   --libexecdir=DIR        program executables [EPREFIX/libexec]
>   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
>   --sharedstatedir=DIR    modifiable architecture-independent data
> [PREFIX/com]
>   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
>   --libdir=DIR            object code libraries [EPREFIX/lib]
>   --includedir=DIR        C header files [PREFIX/include]
>   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
>   --datarootdir=DIR       read-only arch.-independent data root
> [PREFIX/share]
>   --datadir=DIR           read-only architecture-independent data
> [DATAROOTDIR]
>   --infodir=DIR           info documentation [DATAROOTDIR/info]
>   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
>   --mandir=DIR            man documentation [DATAROOTDIR/man]
>   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
>   --htmldir=DIR           html documentation [DOCDIR]
>   --dvidir=DIR            dvi documentation [DOCDIR]
>   --pdfdir=DIR            pdf documentation [DOCDIR]
>   --psdir=DIR             ps documentation [DOCDIR]
> 
> Program names:
>   --program-prefix=PREFIX            prepend PREFIX to installed program
> names
>   --program-suffix=SUFFIX            append SUFFIX to installed program
> names
>   --program-transform-name=PROGRAM   run sed PROGRAM on installed program
> names
> 
> System types:
>   --build=BUILD     configure for building on BUILD [guessed]
>   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
>   --target=TARGET   configure for building compilers for TARGET [HOST]
> 
> Optional Features:
>   --disable-option-checking  ignore unrecognized --enable/--with options
>   --disable-FEATURE       do not include FEATURE (same as
> --enable-FEATURE=no)
>   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
>   --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
>   --enable-ld[=ARG]       build ld [ARG={default,yes,no}]
>   --disable-libquadmath   do not build libquadmath directory
>   --disable-libquadmath-support
>                           disable libquadmath support for Fortran
>   --enable-libada         build libada directory
>   --enable-libssp         build libssp directory
>   --enable-static-libjava[=ARG]
>                           build static libjava [default=no]
>   --enable-bootstrap      enable bootstrapping [yes if native build]
>   --enable-build-with-cxx build with C++ compiler instead of C compiler
>   --enable-build-poststage1-with-cxx
>                           build stages 2 and 3 with C++, not C
>   --disable-ppl-version-check
>                           disable check for PPL version
>   --enable-cloog-backend[=BACKEND]
>                           set the CLooG BACKEND used to either isl, ppl or
>                           ppl-legacy (default)
>   --disable-cloog-version-check
>                           disable check for CLooG version
>   --enable-lto            enable link time optimization support
>   --enable-stage1-languages[=all]
>                           choose additional languages to build during
> stage1.
>                           Mostly useful for compiler development
>   --enable-objc-gc        enable use of Boehm's garbage collector with the
> GNU
>                           Objective-C runtime
>   --enable-serial-[{host,target,build}-]configure
>                           force sequential configuration of sub-packages
> for
>                           the host, target or build machine, or all
>                           sub-packages
>   --enable-maintainer-mode
>                           enable make rules and dependencies not useful
> (and
>                           sometimes confusing) to the casual installer
>   --enable-stage1-checking[=all]
>                           choose additional checking for stage1 of the
>                           compiler
>   --enable-werror         enable -Werror in bootstrap stage2 and later
> 
> Optional Packages:
>   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
>   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
>   --with-build-libsubdir=DIR  Directory where to find libraries for build
> system
>   --with-mpc=PATH         specify prefix directory for installed MPC
> package.
>                           Equivalent to --with-mpc-include=PATH/include
> plus
>                           --with-mpc-lib=PATH/lib
>   --with-mpc-include=PATH specify directory for installed MPC include
> files
>   --with-mpc-lib=PATH     specify directory for the installed MPC library
>   --with-mpfr-dir=PATH    this option has been REMOVED
>   --with-mpfr=PATH        specify prefix directory for installed MPFR
> package.
>                           Equivalent to --with-mpfr-include=PATH/include
> plus
>                           --with-mpfr-lib=PATH/lib
>   --with-mpfr-include=PATH
>                           specify directory for installed MPFR include
> files
>   --with-mpfr-lib=PATH    specify directory for the installed MPFR library
>   --with-gmp-dir=PATH     this option has been REMOVED
>   --with-gmp=PATH         specify prefix directory for the installed GMP
>                           package. Equivalent to
>                           --with-gmp-include=PATH/include plus
>                           --with-gmp-lib=PATH/lib
>   --with-gmp-include=PATH specify directory for installed GMP include
> files
>   --with-gmp-lib=PATH     specify directory for the installed GMP library
>   --with-host-libstdcxx=L use linker arguments L to link with libstdc++
> when
>                           linking with PPL
>   --with-stage1-ldflags=FLAGS
>                           linker flags for stage1
>   --with-stage1-libs=LIBS libraries for stage1
>   --with-boot-libs=LIBS   libraries for stage2 and later
>   --with-boot-ldflags=FLAGS
>                           linker flags for stage2 and later
>   --with-ppl=PATH         specify prefix directory for the installed PPL
>                           package. Equivalent to
>                           --with-ppl-include=PATH/include plus
>                           --with-ppl-lib=PATH/lib
>   --with-ppl-include=PATH specify directory for installed PPL include
> files
>   --with-ppl-lib=PATH     specify directory for the installed PPL library
>   --with-cloog=PATH       Specify prefix directory for the installed
> CLooG-PPL
>                           package. Equivalent to
>                           --with-cloog-include=PATH/include plus
>                           --with-cloog-lib=PATH/lib
>   --with-cloog-include=PATH
>                           Specify directory for installed CLooG include
> files
>   --with-cloog-lib=PATH   Specify the directory for the installed CLooG
>                           library
>   --with-build-sysroot=SYSROOT
>                           use sysroot as the system root during the build
>   --with-debug-prefix-map='A=B C=D ...'
>                           map A to B, C to D ... in debug information
>   --with-build-config='NAME NAME2...'
>                           use config/NAME.mk build configuration
>   --with-build-time-tools=PATH
>                           use given path to find target tools during the
> build
> 
> Some influential environment variables:
>   CC          C compiler command
>   CFLAGS      C compiler flags
>   LDFLAGS     linker flags, e.g. -L
> <lib dir>
>  if you have libraries in a
>               nonstandard directory 
> <lib dir>
>   LIBS        libraries to pass to the linker, e.g. -l
> <library>
>   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I
> <include dir>
>  if
>               you have headers in a nonstandard directory 
> <include dir>
>   CXX         C++ compiler command
>   CXXFLAGS    C++ compiler flags
>   build_configargs
>               additional configure arguments for build directories
>   host_configargs
>               additional configure arguments for host directories
>   target_configargs
>               additional configure arguments for target directories
>   AR          AR for the host
>   AS          AS for the host
>   DLLTOOL     DLLTOOL for the host
>   LD          LD for the host
>   LIPO        LIPO for the host
>   NM          NM for the host
>   RANLIB      RANLIB for the host
>   STRIP       STRIP for the host
>   WINDRES     WINDRES for the host
>   WINDMC      WINDMC for the host
>   OBJCOPY     OBJCOPY for the host
>   OBJDUMP     OBJDUMP for the host
>   READELF     READELF for the host
>   CC_FOR_TARGET
>               CC for the target
>   CXX_FOR_TARGET
>               CXX for the target
>   GCC_FOR_TARGET
>               GCC for the target
>   GCJ_FOR_TARGET
>               GCJ for the target
>   GFORTRAN_FOR_TARGET
>               GFORTRAN for the target
>   GOC_FOR_TARGET
>               GOC for the target
>   AR_FOR_TARGET
>               AR for the target
>   AS_FOR_TARGET
>               AS for the target
>   DLLTOOL_FOR_TARGET
>               DLLTOOL for the target
>   LD_FOR_TARGET
>               LD for the target
>   LIPO_FOR_TARGET
>               LIPO for the target
>   NM_FOR_TARGET
>               NM for the target
>   OBJDUMP_FOR_TARGET
>               OBJDUMP for the target
>   RANLIB_FOR_TARGET
>               RANLIB for the target
>   READELF_FOR_TARGET
>               READELF for the target
>   STRIP_FOR_TARGET
>               STRIP for the target
>   WINDRES_FOR_TARGET
>               WINDRES for the target
>   WINDMC_FOR_TARGET
>               WINDMC for the target
> 
> Use these variables to override the choices made by `configure' or to help
> it to find libraries and programs with nonstandard names/locations.
> 
> Report bugs to the package provider.

But here I can't find neither *--with-gnu-as* nor *--with-as* switches.
However I have been able to compile gcc 4.7.2 on Solaris 10. The success
story is here: 
http://gcc.1065356.n5.nabble.com/Installing-gcc-4-7-2-on-Solaris-10-SPARC-platform-tp894903p897964.html
<http://gcc.1065356.n5.nabble.com/Installing-gcc-4-7-2-on-Solaris-10-SPARC-platform-tp894903p897964.html>  



--
View this message in context: http://gcc.1065356.n5.nabble.com/Building-GCC-4-7-2-on-Solaris-10-x86-AMD64-Getting-linker-error-involving-eh-frame-tp893484p897965.html
Sent from the gcc - Help mailing list archive at Nabble.com.

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

end of thread, other threads:[~2012-12-16  0:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-30 16:28 Building GCC 4.7.2 on Solaris 10 x86 AMD64 - Getting linker error involving eh_frame Jim Rice
2012-11-30 22:38 ` Jim Rice
2012-11-30 22:47   ` Jim Rice
2012-12-01  1:13 ` Ian Lance Taylor
2012-12-01  8:16   ` Marc Glisse
2012-12-02  1:24     ` Dennis Clarke
2012-12-03  2:08     ` Ian Lance Taylor
2012-12-03 16:35       ` Jim Rice
2012-12-03 17:17         ` Dennis Clarke
2012-12-04 17:52 ` Jim Rice
2012-12-05  1:08   ` Jim Rice
2012-12-05 17:00   ` Dennis Clarke
2012-12-05 17:36     ` Jim Rice
2012-12-05 18:30     ` Holmes.Sherlock
2012-12-05 20:03       ` Jim Rice
2012-12-16  0:35         ` Holmes.Sherlock

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