Technical gcc / assembler question.

Jerry Feldman gaf-mNDKBlG2WHs at public.gmane.org
Thu Jul 12 11:20:42 EDT 2007


On Thu, 12 Jul 2007 10:23:04 -0400
Matthew Gillen <me-5yx05kfkO/aqeI1yJSURBw at public.gmane.org> wrote:

> Jerry Feldman wrote:
> > On Wed, 11 Jul 2007 17:24:16 -0400
> > Jarod Wilson <jarod-ajLrJawYSntWk0Htik3J/w at public.gmane.org> wrote:
> >=20
> >> On Wednesday 11 July 2007 16:45:47 Jerry Feldman wrote:
> >>> For reasons beyond my control, I have some code I need to compile that
> >>> must use gcc 3.3.3. Corporate a version of GCC they keep on an export=
ed
> >>> system that contains all of GCC. The system I'm running on is RHEL 4.0
> >>> x86_64 (EM64T Woodcrest) with GCC 4.3 installed.
> >>> In any case here is the sanitized line:
> >>> g++ -V 3.3.3
> >>> -B<proper prefix.>
> >>> -B<proper prefix>
> >>> -I<prefix>/3.3.3/include
> >>> -I<prefix>/include
> >>> -I<prefix>/gcc-3.3.3/linux-i386-2.3/include/c++
> >>> -I<prefix>/gcc-3.3.3/linux-i386-2.3/include/c++/i686-pc-linux-gnu
> >>> -g -Wall -D__NO_MATH_INLINES -D__NO_STRING_INLINES -D__error_t_defined
> >>> -fpic -fno-exceptions -I.
> >>> -I<product>/include -fexceptions -c DefineEnums.C
> >>> Changing -c to -S, and assembling the .s file, the error I get is:
> >>> DefineEnums.s: Assembler messages:
> >>> DefineEnums.s:136: Error: suffix or operands invalid for `push'
> >>> DefineEnums.s:140: Error: suffix or operands invalid for `push'
> >>> DefineEnums.s:145: Internal error, aborting
> >>> at ../../gas/config/tc-i386.c line 3500 in output_imm
> >>> (I get the identical error that references the temp file for the
> >>> assembler pass, but the temp file code is deleted).
> >>>
> >>> .LFB3253:
> >>> 	.loc 95 90 0
> >>> 	pushl	%ebp   Line 136
> >>> .LCFI0:
> >>> 	movl	%esp, %ebp
> >>> .LCFI1:
> >>> 	pushl	%ebx   Line 140
> >>> .LCFI2:
> >>> 	subl	$4, %esp
> >>> .LCFI3:
> >>> 	call	__i686.get_pc_thunk.bx
> >>> 	addl	$_GLOBAL_OFFSET_TABLE_, %ebx   Line 145
> >>>
> >>> I have tried a few options, such as -m32.
> >> Have you tried prefixing the gcc call with 'setarch i386' ? I know thi=
s is=20
> >> required to build i686 kernels on x86_64 that actually work, could be =
you=20
> >> need it too.
> >=20
> > Unfortunately setarch does not make any difference.=20
> > Additionally, I compiled a simple hello.C
> > #include <iostream>
> > int main()
> > {
> > 	std::cout << "Hello, world!\n";
> > 	return 0;
> > }
> >=20
> > With the same result.
>=20
> What if you set your PATH to have the gcc-3.3.3 install (with 'as' et al)
> first, then run (no need for the -V 3.3.3).  It looks like somehow it's u=
sing
> the wrong version of some subprogram...

The reason for the -V 3.3.3 is that the makefile is constructed that
way. Note that I copied the script up to a system in Toronto.=20
Here is the uname for the system in Boston:
Linux boslc03 2.6.9-34.ELlargesmp #1 SMP Fri Feb 24
17:06:55 EST 2006 x86_64 x86_64 x86_64 GNU/Linux

Linux torlcm01 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:56:28 EST 2006
x86_64 x86_64 x86_64 GNU/Linux

Both systems are running RHEL 4.0 Update 3 (UNPATCHED).=20
Additionally, an identical system here in Boston that has the same
error.=20

It may be possible that the gcc 3.3.3 directory was not copied
correctly.=20




--=20
Jerry Feldman <gaf-mNDKBlG2WHs at public.gmane.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9





More information about the Discuss mailing list