public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Re: egcs-1.1.1 cross: i586-lynxos-gas says "Alignment not a power of 2"
@ 1999-01-21  6:34 Oliver M. Kellogg
  0 siblings, 0 replies; 8+ messages in thread
From: Oliver M. Kellogg @ 1999-01-21  6:34 UTC (permalink / raw)
  To: law; +Cc: egcs-bugs

Jeffrey A Law <law@cygnus.com> wrote:

> There's a mismatch between the compiler and the assembler.
> 
> The compiler expects the assembler to interpret the alignment value as 2**N;
> the assembler is interpreting the alignment value as just N.  It is possible
> lynx systems in the past used to interpret the value as N and gas is trying
> to be compatible.  I don't really know.

Thanks. I found a symbol in gcc/auto-host.h, HAVE_GAS_BALIGN_AND_P2ALIGN 
which the configure had undefined. However, I verified that the AS of my 
LynxOS 2.5 target DOES support those statements. Apparently, the config 
is for an older LynxOS version where these were not yet supported (?)
After defining the HAVE_GAS_BALIGN_AND_P2ALIGN, I am no longer getting 
the "power of 2" error.

I am now a bit farther, but stumbling on libgcc1-test:

./xgcc -B./ -DCROSS_COMPILE -DIN_GCC    -g -I./include     -c ./libgcc1-test.c
./libgcc1-test.c:101: warning: conflicting types for built-in function `memcpy'
Testing libgcc1.  Ignore linker warning messages.
./xgcc -B./ -DCROSS_COMPILE -DIN_GCC    -g -I./include  libgcc1-test.o -o libgcc1-test \
  -nostartfiles -nostdlib `./xgcc -B./ --print-libgcc-file-name`
/var/kelloggs_extra_space/i586-lynxos2.5/bin/ld: warning: cannot find entry symbol _main; defaulting to 000000f8
libgcc1-test.o: In function `mainCRTStartup':
/var/kelloggs_extra_space/egcs-1.1.1/gcc/./libgcc1-test.c(.stab+0x14): undefined reference to `Ltext0'
/var/kelloggs_extra_space/egcs-1.1.1/gcc/./libgcc1-test.c(.stab+0x20): undefined reference to `Ltext0'
collect2: ld returned 1 exit status

Here is the beginning of libgcc1-test.s:

        .file   "libgcc1-test.c"
gcc2_compiled.:
__gnu_compiled_c:
.stabs "/var/kelloggs_extra_space/egcs-1.1.1/gcc/",100,0,0,Ltext0
.stabs "libgcc1-test.c",100,0,0,Ltext0
.text 
.Ltext0:
.stabs "int:t1=r1;0020000000000;0017777777777;",128,0,0,0
.stabs "char:t2=r2;0;127;",128,0,0,0

I can assemble this file without error on the actual LynxOS-2.5 target;
this must be a config problem (probably again LynxOS version related) with 
the i586-lynxos-gas cross assembler.

> "binutils-1.9.1"?  Typo maybe?  2.9.1 instead?

Right, thanks. binutils-2.9.1

-- Oliver



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

* Re: egcs-1.1.1 cross: i586-lynxos-gas says "Alignment not a power of 2"
  1999-01-22  4:17     ` Alexander Zhuckov
@ 1999-01-22 21:42       ` Jeffrey A Law
  0 siblings, 0 replies; 8+ messages in thread
From: Jeffrey A Law @ 1999-01-22 21:42 UTC (permalink / raw)
  To: Alexander Zhuckov; +Cc: egcs-bugs

  In message < 87n23b34su.fsf@ithilien.int.spb.ru >you write:
  > Well, I'm not a configure guru, but as far as I undestood for cross
  > builds configure searches for respective assembler as if one uses
  > one-tree dir sturcture. May be I just read docs (or configure script)
  > not very carefully.
Ah, yes, for a cross the rules are different.  Somehow the "cross" in the
subject line didn't register.

jeff


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

* Re: egcs-1.1.1 cross: i586-lynxos-gas says "Alignment not a power of 2"
  1999-01-21 23:07   ` Jeffrey A Law
@ 1999-01-22  4:17     ` Alexander Zhuckov
  1999-01-22 21:42       ` Jeffrey A Law
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Zhuckov @ 1999-01-22  4:17 UTC (permalink / raw)
  To: law; +Cc: egcs-bugs

Jeffrey A Law <law@cygnus.com> writes:

>   In message < 873e54ak7k.fsf@ithilien.int.spb.ru >you write:
>   > Just cp ..../i586-lynxos/bin{as,ld} ..../src/egcs-1.1.1-build/gcc
>   > At least, this worked for me.
>   > 
>   > If you look at gcc/configure, you'll see that it incorrectly
>   > chooses assembler. Look at line 5251 and below.
>   > 
>   > It seems to me that gcc/configure will works there correctly
>   > only for native build or for one-tree-build. Or one must
>   > have correct assembler in the current dir -- that is in
>   > gcc dir.
> The configure script searches a variety of places to try and find a suitable
> assembler.
> 
> It prefers the assembler in the current directory, but should fall back to
> whatever "as" shows up in your path.

Well, I'm not a configure guru, but as far as I undestood for cross
builds configure searches for respective assembler as if one uses
one-tree dir sturcture. May be I just read docs (or configure script)
not very carefully.

-- 
Alexander Zhuckov   zuav@int.spb.ru   2:5030/518.50


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

* Re: egcs-1.1.1 cross: i586-lynxos-gas says "Alignment not a power of 2"
  1999-01-21  4:38 ` Alexander Zhuckov
@ 1999-01-21 23:07   ` Jeffrey A Law
  1999-01-22  4:17     ` Alexander Zhuckov
  0 siblings, 1 reply; 8+ messages in thread
From: Jeffrey A Law @ 1999-01-21 23:07 UTC (permalink / raw)
  To: Alexander Zhuckov; +Cc: Oliver M. Kellogg, egcs-bugs

  In message < 873e54ak7k.fsf@ithilien.int.spb.ru >you write:
  > Just cp ..../i586-lynxos/bin{as,ld} ..../src/egcs-1.1.1-build/gcc
  > At least, this worked for me.
  > 
  > If you look at gcc/configure, you'll see that it incorrectly
  > chooses assembler. Look at line 5251 and below.
  > 
  > It seems to me that gcc/configure will works there correctly
  > only for native build or for one-tree-build. Or one must
  > have correct assembler in the current dir -- that is in
  > gcc dir.
The configure script searches a variety of places to try and find a suitable
assembler.

It prefers the assembler in the current directory, but should fall back to
whatever "as" shows up in your path.

jeff


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

* Re: egcs-1.1.1 cross: i586-lynxos-gas says "Alignment not a power of 2"
@ 1999-01-21  6:34 Oliver M. Kellogg
  0 siblings, 0 replies; 8+ messages in thread
From: Oliver M. Kellogg @ 1999-01-21  6:34 UTC (permalink / raw)
  To: law; +Cc: egcs-bugs

A moment ago, I wrote:

> I am now a bit farther, but stumbling on libgcc1-test [...]

As a quick shot, I removed the -g from the CFLAGS and now the 
libgcc1-test builds fine. However, on linking I get 

./xgcc -B./ -DCROSS_COMPILE -DIN_GCC     -I./include  libgcc1-test.o -o libgcc1-test \
  -nostartfiles -nostdlib `./xgcc -B./ --print-libgcc-file-name`
/var/kelloggs_extra_space/i586-lynxos2.5/bin/ld: unrecognized option `-P1000'
collect2: ld returned 1 exit status

I verified that the -P1000 option is also rejected by the 
LynxOS-2.5 target as. So I simply removed it from the 
*link: line in the specs file.

This actually takes me right to the normal end of the make.
Now, on to testing on the target (ugh.)

-- Oliver



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

* Re: egcs-1.1.1 cross: i586-lynxos-gas says "Alignment not a power of 2"
  1999-01-20  4:43 Oliver M. Kellogg
  1999-01-20 23:11 ` Jeffrey A Law
@ 1999-01-21  4:38 ` Alexander Zhuckov
  1999-01-21 23:07   ` Jeffrey A Law
  1 sibling, 1 reply; 8+ messages in thread
From: Alexander Zhuckov @ 1999-01-21  4:38 UTC (permalink / raw)
  To: Oliver M. Kellogg; +Cc: egcs-bugs

Just cp ..../i586-lynxos/bin{as,ld} ..../src/egcs-1.1.1-build/gcc
At least, this worked for me.

If you look at gcc/configure, you'll see that it incorrectly
chooses assembler. Look at line 5251 and below.

It seems to me that gcc/configure will works there correctly
only for native build or for one-tree-build. Or one must
have correct assembler in the current dir -- that is in
gcc dir.

"Oliver M. Kellogg" <Oliver.Kellogg@vs.dasa.de> writes:

> binutils-1.9.1 configured with --target=i586-lynxos
> egcs-1.1.1  configured with --target=i586-lynxos
> 
> During the building of egcs, I get:
> 
> rm -f tmplibgcc2.a
> for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2
> _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatdixf
> _fixunsxfsi _fixtfdi _fixunstfdi _floatditf __gcc_bcmp _varargs __dummy _eprintf _bb _shtab _clear_cache _trampoline __main _exit
> _ctors _pure; \
> do \
>   echo ${name}; \
>   /var/egcs-1.1.1/gcc/xgcc -B/var/egcs-1.1.1/gcc/ -O2  -DCROSS_COMPILE -DIN_GCC    -O -I./include   -g1  -DIN_LIBGCC2
> -D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I./config -c -DL${name} \
>       ./libgcc2.c -o ${name}.o; \
>   if [ $? -eq 0 ] ; then true; else exit 1; fi; \
>   i586-lynxos-ar rc tmplibgcc2.a ${name}.o; \
>   rm -f ${name}.o; \
> done
> _muldi3
> _divdi3
> _moddi3
> _udivdi3
> _umoddi3
> _negdi2
> _lshrdi3
> _ashldi3
> _ashrdi3
> _ffsdi2
> _udiv_w_sdiv
> _udivmoddi4
> _cmpdi2
> _ucmpdi2
> _floatdidf
> /tmp/ccKiIov5.s: Assembler messages:
> /tmp/ccKiIov5.s:68: Error: Alignment not a power of 2
> make[1]: *** [libgcc2.a] Error 1
> make[1]: Leaving directory `/var/kelloggs_extra_space/egcs-1.1.1/gcc'
> 
> I looked into this and the culprit seems to be a
> 
> 	.align 3
> 
> in the code generated for the _floatdidf function. Or could it be 
> that i586-lynxos-gas is wrong, and should really be accepting 
> this .align directive?
> 
> Thanks for any help,
> 
> Oliver M. Kellogg
> --
> DaimlerChrysler Aerospace
> Sensor Systems, Dept. VE3SW5
> D-89070 Ulm, Germany
> phone:  (+49) 731 392-7138
> fax:    (+49) 731 392-4255
> e-mail: Oliver.Kellogg@vs.dasa.de
> 

-- 
Alexander Zhuckov   zuav@int.spb.ru   2:5030/518.50


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

* Re: egcs-1.1.1 cross: i586-lynxos-gas says "Alignment not a power of 2"
  1999-01-20  4:43 Oliver M. Kellogg
@ 1999-01-20 23:11 ` Jeffrey A Law
  1999-01-21  4:38 ` Alexander Zhuckov
  1 sibling, 0 replies; 8+ messages in thread
From: Jeffrey A Law @ 1999-01-20 23:11 UTC (permalink / raw)
  To: Oliver M. Kellogg; +Cc: egcs-bugs

  In message < 9901201239.AA01734@gatekeeper.vs.dasa.de >you write:
  > binutils-1.9.1 configured with --target=i586-lynxos
  > egcs-1.1.1  configured with --target=i586-lynxos
[ ... ]
  > /tmp/ccKiIov5.s: Assembler messages:
  > /tmp/ccKiIov5.s:68: Error: Alignment not a power of 2
  > make[1]: *** [libgcc2.a] Error 1
  > make[1]: Leaving directory `/var/kelloggs_extra_space/egcs-1.1.1/gcc'
  > 
  > I looked into this and the culprit seems to be a
  > 
  > 	.align 3
  > 
  > in the code generated for the _floatdidf function. Or could it be 
  > that i586-lynxos-gas is wrong, and should really be accepting 
  > this .align directive?
There's a mismatch between the compiler and the assembler.

The compiler expects the assembler to interpret the alignment value as 2**N;
the assembler is interpreting the alignment value as just N.  It is possible
lynx systems in the past used to interpret the value as N and gas is trying
to be compatible.  I don't really know.


"binutils-1.9.1"?  Typo maybe?  2.9.1 instead?

jeff


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

* egcs-1.1.1 cross: i586-lynxos-gas says "Alignment not a power of 2"
@ 1999-01-20  4:43 Oliver M. Kellogg
  1999-01-20 23:11 ` Jeffrey A Law
  1999-01-21  4:38 ` Alexander Zhuckov
  0 siblings, 2 replies; 8+ messages in thread
From: Oliver M. Kellogg @ 1999-01-20  4:43 UTC (permalink / raw)
  To: egcs-bugs

binutils-1.9.1 configured with --target=i586-lynxos
egcs-1.1.1  configured with --target=i586-lynxos

During the building of egcs, I get:

rm -f tmplibgcc2.a
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2
_ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatdixf
_fixunsxfsi _fixtfdi _fixunstfdi _floatditf __gcc_bcmp _varargs __dummy _eprintf _bb _shtab _clear_cache _trampoline __main _exit
_ctors _pure; \
do \
  echo ${name}; \
  /var/egcs-1.1.1/gcc/xgcc -B/var/egcs-1.1.1/gcc/ -O2  -DCROSS_COMPILE -DIN_GCC    -O -I./include   -g1  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I./config -c -DL${name} \
      ./libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  i586-lynxos-ar rc tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_muldi3
_divdi3
_moddi3
_udivdi3
_umoddi3
_negdi2
_lshrdi3
_ashldi3
_ashrdi3
_ffsdi2
_udiv_w_sdiv
_udivmoddi4
_cmpdi2
_ucmpdi2
_floatdidf
/tmp/ccKiIov5.s: Assembler messages:
/tmp/ccKiIov5.s:68: Error: Alignment not a power of 2
make[1]: *** [libgcc2.a] Error 1
make[1]: Leaving directory `/var/kelloggs_extra_space/egcs-1.1.1/gcc'

I looked into this and the culprit seems to be a

	.align 3

in the code generated for the _floatdidf function. Or could it be 
that i586-lynxos-gas is wrong, and should really be accepting 
this .align directive?

Thanks for any help,

Oliver M. Kellogg
--
DaimlerChrysler Aerospace
Sensor Systems, Dept. VE3SW5
D-89070 Ulm, Germany
phone:  (+49) 731 392-7138
fax:    (+49) 731 392-4255
e-mail: Oliver.Kellogg@vs.dasa.de



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

end of thread, other threads:[~1999-01-22 21:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-21  6:34 egcs-1.1.1 cross: i586-lynxos-gas says "Alignment not a power of 2" Oliver M. Kellogg
  -- strict thread matches above, loose matches on Subject: below --
1999-01-21  6:34 Oliver M. Kellogg
1999-01-20  4:43 Oliver M. Kellogg
1999-01-20 23:11 ` Jeffrey A Law
1999-01-21  4:38 ` Alexander Zhuckov
1999-01-21 23:07   ` Jeffrey A Law
1999-01-22  4:17     ` Alexander Zhuckov
1999-01-22 21:42       ` Jeffrey A Law

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