This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 64 bit library doesn't build using makefile


Prasad Athawale wrote:

> gcc -fPIC -g -Wall -m64   -I../../include/internal -I. -I../../include
> -c -osample.o sample.c
> /tmp/ccqkJFT6.s: Assembler messages:
> /tmp/ccqkJFT6.s:28: Error: suffix or operands invalid for `push'
> /tmp/ccqkJFT6.s:30: Error: suffix or operands invalid for `movq'
> /tmp/ccqkJFT6.s:34: Error: `-8(%rbp)' is not a valid 32 bit base/index
> expression

As the error message indicates, these are from the assembler (as) which
is a separate program that is invoked by (but not a part of) gcc.  And
it appears that it's a version of gas that wasn't built with 64 bit
support.

> If I do each of the steps manually - with the exact same commands on
> the command line, the library gets built fine, and the file command
> indeed indicates it's a valid 64-bit library.

If you are indeed invoking the exact same commands as the Makefile but
getting different results, then it could be an environmental difference.
For example, perhaps PATH or some other variable is set differently in
the Makefile, resulting in a different/older version of the assembler
being called.

You could add -v to both the failing and the succeeding commands, and
you will explicitly see the invocation of the various sub-processes:
cc1, as, collect2, etc.  This should tell you if the same assembler is
being called in both cases, or if there is some other difference in 'as'
invocation between the failing and suceeding.

Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]