public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: want a,m,s,w,x when building gcc-3.1
       [not found] ` <20020427203129.I32482@sunsite.ms.mff.cuni.cz>
@ 2002-04-28  0:54   ` Ralf Corsepius
  2002-04-29 17:48     ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Ralf Corsepius @ 2002-04-28  0:54 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Binutils List, GCC List, Joel Sherrill

Am Sam, 2002-04-27 um 20.31 schrieb Jakub Jelinek:
> On Sat, Apr 27, 2002 at 09:17:51AM +0200, Ralf Corsepius wrote:
> > Hi,
> > 
> > When cross-building gcc-3.1/CVS for i386-rtems (elf) with vanilla
> > binutils-2.12, I am receiving hundreds of warnings similar to this:
> > 
> > /tmp/ccCDyO9T.s:2104: Warning: Unrecognized .section attribute: want
> > a,m,s,w,x
> > 
> > Any ideas what might be causing this?
> 
> This looks like you've configured gcc against binutils-2.12, but are using
> some older binutils to assemble/link.
Not really, but you seem to be right, indeed, xgcc seems be picking up
the wrong "as".

Some more details (Sorry, this has become lengthy):

Host: i686-linux, gcc-2.95.3 (SuSE), binutils-2.11.90.0.31
Target-sources: gcc-3-1-branch, newlib-cvs, binutils-2.12

1. Building binutils-2.12, installing to /opt/rtems
configure --target=i386-rtems --prefix=/opt/rtems
make; make install

2. Building gcc-3.1 with newlib copied into gcc's source-tree 

export PATH=/opt/rtems/bin:$PATH

2.1 Using the same prefix for gcc as for binutils

configure --target=i386-rtems --with-gnu-as --with-gnu-ld \
--with-newlib --with-threads=rtems '--enable-languages=c,c++' \
--prefix=/opt/rtems

No problem, everything builds.

2.2 Using a different prefix for gcc than for binutils

../gcc-3.1-branch/configure --target=i386-rtems \
--with-gnu-as --with-gnu-ld \
--with-newlib --with-threads=rtems \
'--enable-languages=c,c++' \
--prefix=/opt/test

make
... want a,m,s,w,x

3. Building for --target=sparc-rtems

3.1 Using the same prefix for gcc as for binutils.
No problems, building finishes correctly.

3.2 Using a different prefix for gcc as for binutils:
../gcc-3.1-branch/configure --target=sparc-rtems \
--with-gnu-as --with-gnu-ld \
--with-newlib --with-threads=rtems \
'--enable-languages=c,c++' \
--prefix=/opt/test
make
..
 /users/rtems/src/packages/BUILD/test/gcc/xgcc
-B/users/rtems/src/packages/BUILD/test/gcc/ -nostdinc
-B/users/rtems/src/packages/BUILD/test/sparc-rtems/newlib/ -isystem
/users/rtems/src/packages/BUILD/test/sparc-rtems/newlib/targ-include
-isystem
/users/rtems/src/packages/BUILD/gcc-3.1-branch/newlib/libc/include
-B/usr/local/sparc-rtems/bin/ -B/usr/local/sparc-rtems/lib/ -isystem
/usr/local/sparc-rtems/include -c -o crti.o -x assembler
../../gcc-3.1-branch/gcc/config/sparc/sol2-ci.asm
../../gcc-3.1-branch/gcc/config/sparc/sol2-ci.asm: Assembler messages:
../../gcc-3.1-branch/gcc/config/sparc/sol2-ci.asm:1: Warning: rest of
line ignored; first ignored character is `!'
../../gcc-3.1-branch/gcc/config/sparc/sol2-ci.asm:3: Warning: rest of
line ignored; first ignored character is `!'
...

=> The host's assembler seems to be picked up.

4. More tries for i386-rtems, playing with --with-[as|ld] and
[AS|LD]_FOR_TARGET

../gcc-3.1-branch/configure --target=i386-rtems \
--with-gnu-as --with-ld=/opt/rtems/i386-rtems/bin/as \
--with-gnu-ld --with-ld=/opt/rtems/i386-rtems/bin/ld \
--with-threads=rtems '--enable-languages=c,c++' \
--with-newlib --prefix=/opt/test
make
... want a,m,s,w,x

../gcc-3.1-branch/configure --target=i386-rtems \
--with-gnu-as --with-ld=/opt/rtems/bin/i386-rtems-as \
--with-gnu-ld --with-ld=/opt/rtems/bin/i386-rtems-ld \
--with-threads=rtems '--enable-languages=c,c++' \
--with-newlib --prefix=/opt/test
make
... want a,m,s,w,x

LD_FOR_TARGET=/opt/rtems/bin/i386-rtems-ld \
AS_FOR_TARGET=/opt/rtems/bin/i386-rtems-as \
../gcc-3.1-branch/configure --target=i386-rtems --with-gnu-as
--with-ld=/opt/rtems/i386-rtems/bin/as --with-gnu-ld
--with-ld=/opt/rtems/i386-rtems/bin/ld --with-threads=rtems
'--enable-languages=c,c++' --with-newlib --prefix=/opt/test
make
... want a,m,s,w,x

LD_FOR_TARGET=/opt/rtems/bin/i386-rtems-ld \
AS_FOR_TARGET=/opt/rtems/bin/i386-rtems-as \
../gcc-3.1-branch/configure --target=i386-rtems --with-gnu-as
--with-gnu-ld --with-threads=rtems '--enable-languages=c,c++'
--with-newlib --prefix=/opt/test
make
... want a,m,s,w,x

Nothing seems to work out as desired :(

Unless I am missing something, this indicates that
* gcc-3.1-cross-compilers can not be installed to a different prefix
than binutils,
* gcc-3.1's configuration probably is broken wrt. binutils-detection for
cross-compilers.

Anyway, IMHO, silently picking up the native "as" for building
cross-target-libs, as gcc-3.1 currently seems to be doing, is not "the
right thing to do", IMHO.

Ralf

PS.: Sorry for cross-posting to the gcc list, but I now think this topic
might be more appropriate there.


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

* Re: want a,m,s,w,x when building gcc-3.1
  2002-04-28  0:54   ` want a,m,s,w,x when building gcc-3.1 Ralf Corsepius
@ 2002-04-29 17:48     ` Richard Henderson
  2002-04-29 23:25       ` Parallel cross-compiler installs [Was: want a,m,s,w,x when building gcc-3.1] Ralf Corsepius
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2002-04-29 17:48 UTC (permalink / raw)
  To: Ralf Corsepius; +Cc: Jakub Jelinek, Binutils List, GCC List, Joel Sherrill

On Sun, Apr 28, 2002 at 08:25:59AM +0200, Ralf Corsepius wrote:
> 3.1 Using the same prefix for gcc as for binutils.
> No problems, building finishes correctly.

This is correct.

> 3.2 Using a different prefix for gcc as for binutils:

This isn't.  What you are trying to do is at odds with 
how gcc-as-a-cross-compiler expects to work.

I.e. working as designed and not a bug per-se.


r~

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

* Parallel cross-compiler installs [Was: want a,m,s,w,x when building gcc-3.1]
  2002-04-29 17:48     ` Richard Henderson
@ 2002-04-29 23:25       ` Ralf Corsepius
  2002-04-30 10:27         ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Ralf Corsepius @ 2002-04-29 23:25 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Jakub Jelinek, GCC List, Joel Sherrill

Am Die, 2002-04-30 um 02.25 schrieb Richard Henderson:
> On Sun, Apr 28, 2002 at 08:25:59AM +0200, Ralf Corsepius wrote:
> > 3.1 Using the same prefix for gcc as for binutils.
> > No problems, building finishes correctly.
> 
> This is correct.
> 
> > 3.2 Using a different prefix for gcc as for binutils:
> 
> This isn't.  What you are trying to do is at odds with 
> how gcc-as-a-cross-compiler expects to work.
> 
> I.e. working as designed and not a bug per-se.
Hmm, I haven't been aware about this restriction. 

Esp. it was a surprise to me having to notice AS_FOR_TARGET,
LD_FOR_TARGET and --with-as, --with-as to be non-functional for
cross-compilers.

Anyway, this raises another question: 
How to deal with c++-headers for parallel installs of cross-toolchains
for different combinations of targets and versions of libstdc++/gcc.

Example: parallel installs (using the same prefix) of
sparc-rtems/gcc-3.0.4
i386-rtems/gcc-3.1

AFAIU, this would require to install the c++ headers do custom locations
to prevent different gcc's c++/libstdc++ headers from getting mixed.

Using different prefixes would probably work, but would hardly be wanted
by RTEMS, so using --with-gxx-include-dir seems to be an option.

Which setting for --with-gxx-include-dir would be recommended?
--with-gxx-include-dir=$(prefix)/include/g++31-v3
--with-gxx-include-dir=$(exec_prefix)/include

Ralf





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

* Re: Parallel cross-compiler installs [Was: want a,m,s,w,x when building gcc-3.1]
  2002-04-29 23:25       ` Parallel cross-compiler installs [Was: want a,m,s,w,x when building gcc-3.1] Ralf Corsepius
@ 2002-04-30 10:27         ` Richard Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2002-04-30 10:27 UTC (permalink / raw)
  To: Ralf Corsepius; +Cc: Jakub Jelinek, GCC List, Joel Sherrill

On Tue, Apr 30, 2002 at 08:19:04AM +0200, Ralf Corsepius wrote:
> How to deal with c++-headers for parallel installs of cross-toolchains
> for different combinations of targets and versions of libstdc++/gcc.

--with-version-specific-headers, I think.


r~

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

end of thread, other threads:[~2002-04-30 17:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1019891869.31177.1900.camel@mccallum>
     [not found] ` <20020427203129.I32482@sunsite.ms.mff.cuni.cz>
2002-04-28  0:54   ` want a,m,s,w,x when building gcc-3.1 Ralf Corsepius
2002-04-29 17:48     ` Richard Henderson
2002-04-29 23:25       ` Parallel cross-compiler installs [Was: want a,m,s,w,x when building gcc-3.1] Ralf Corsepius
2002-04-30 10:27         ` Richard Henderson

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