OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Changes To Compiler On 64bit System?, Assembler errors
vanstrien
post Jun 27 2005, 09:10 AM
Post #1





Group: Members
Posts: 58
Joined: 22-August 03
From: Houston / London
Member No.: 374



I'm having a problem compiling on my box. I think I have found the source of my problem, but have got no idea about a solution.

I'm running FC3 on an amd 64bit cpu. I installed the cross compilation rpms, the same as I did on my old 32bit cpu. When I try to compile anything for x86 I get errors during assembly, such as:

"{standard input}: 35: Error: suffix or operands invalid for 'push'"

If I do a cross compilation to ARM everything works just fine. Therefore my suspicion is that the problem is due to the change in my chipset, but I have no idea what kind of compiler options to change, or if I need to install updated binaries of some kind.

Any ideas?
Go to the top of the page
 
+Quote Post
melee
post Jun 27 2005, 11:15 PM
Post #2





Group: Members
Posts: 69
Joined: 17-March 05
Member No.: 6,651



QUOTE(vanstrien @ Jun 27 2005, 06:10 PM)
I'm running FC3 on an amd 64bit cpu.  I installed the cross compilation rpms, the same as I did on my old 32bit cpu.  When I try to compile anything for x86 I get errors during assembly, such as:

"{standard input}: 35: Error: suffix or operands invalid for 'push'"

*

Hi,

I run an AMD 64bit processor with the Qtopia and Embedix development packages and don't have a problem with them.
I also compile from source a lot for linux and that works fine.

What I don't do however is run a 64bit version of Linux. I tried an earlier build of MDK 10 for AMD64 but didn't find it noticeably faster and had some problems with it.
A lot of the libraries were optimised for 64 bit and I think gcc was 64 bit.

So, if you are running a 64 bit optimised OS, I would look at that first.

I now run the standard 32 bit MDK 10.2 and can recommend that.
(with a modified 2.6.10 kernel to get around the problems with Zaurus USB i/O breaking in the 2.6.11 and 2.6.12 kernels - but thats another long story! )

regards

Melee
Go to the top of the page
 
+Quote Post
vanstrien
post Jun 28 2005, 12:43 PM
Post #3





Group: Members
Posts: 58
Joined: 22-August 03
From: Houston / London
Member No.: 374



Melee,

Yes, the fact that I am running a 64 bit OS is my problem, although that is what I alluded to in my first post. Running a 64bit version of fedora means that all compilers, programs, libraries, etc make use of 64 bit code, with the exception of any programs I've installed that use 32 bit compatibility libs - this lets me run 32 bit code too or run programs installed from 32 bit rpms. (I have a bunch of libraries where I have installed 32bit and 64 bit versions, and the OS takes care of knowing which one it wants for a particular app)

The main issue is that all my memory pointers, for example, use 64 bit addresses. The cascade effect on any code I'm compiling is that it is looking for 64 bit object code.

This is where I'm getting a little confused. When I installed the compiler for the Z it is expecting to create for a 32 bit target. Now that I have a 64 bit target I was hoping that I could install some kind of compatibility lib to make it work, but I'm not even sure if that is even the solution.

And I don't want to install a 32 bit OS because that was the whole point of buying a 64 bit box. I've got a good stable system right now except when using the compiler needed for the Z. I might instead install a virtual machine or something and go that route.

Michael
Go to the top of the page
 
+Quote Post
melee
post Jun 29 2005, 08:21 AM
Post #4





Group: Members
Posts: 69
Joined: 17-March 05
Member No.: 6,651



QUOTE(vanstrien @ Jun 28 2005, 09:43 PM)
I don't want to install a 32 bit OS because that was the whole point of buying a 64 bit box.  I've got a good stable system right now except when using the compiler needed for the Z.  I might instead install a virtual machine or something and go that route.
*


Hi Michael,

As I see it you have several options, but the first one has to be trying to compile with gcc forced to compile 32 bit for x86

A quick look through man gcc shows 2 particular switches relevant to AMD processors.

The first is -march=i386 which notifies machine architecture as i386 and builds code which will run on that.

The second (which should be implied by the first, but no harm in making sure) is specific to AMD and is -m32, which forces the compiler to set int, long and pointers to 32 bit that will run on i386 architecture.
It looks like gcc will default to -m64t if it detects 64 bit processor.

I don't have anything set up to test this, so dont know if all the FC3 libraries are backwardly compatible with 32 bit instruction set, once gcc is compiling 32 bit.

The other option of course is to replicate why your ARM compilation works.
It uses a different compiler and specifies it.

You could do this by putting gcc 32 bit and relevant libs into a dir next to Qtopia and Embedix, write an script to set the environment to the relevant paths and write a modified tmake.conf to generate the appropriate Makefile.

This might be the most involved, but long term possibly the best solution.
I'll be interested to hear how you get on

regards

Melee
Go to the top of the page
 
+Quote Post
vanstrien
post Jul 3 2005, 06:11 PM
Post #5





Group: Members
Posts: 58
Joined: 22-August 03
From: Houston / London
Member No.: 374



Thanks for your advice Melee, but unfortunately that doesn't work. I think I would need to recompile gcc296 to work on 64bit or to find a library that would allow for the 32bit compiling to work correctly.

I setup an FC4 virtual image and that is working just fine. Not as nice as compiling in my normal environment but perhaps I'll want to move it to another server some day...

Michael
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd November 2014 - 08:38 PM