Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006


Gcc the problems in solaris

I have a third party because the 1986-1991 Judge CC compiler is used solaris (Sun OS 5.8), while some applications using gcc 3.3.2 compiler, there's a problem : double alignment, gcc default is 8 bytes of double data alignment. CC and the four byte alignment.
My question is how to install gcc parameter to enable them to double to 4bytes way alignment.
Thank you

-no-align-double Not only support intel? In solaris on how no choice?
How would you deal with it?

-mno-unaligned-doubles
-munaligned-doubles
Assume that doubles have 8 byte alignment. This is the default.

With -munaligned-doubles, GCC assumes that doubles have 8 byte alignment only if they are contained in another type. or if they have an absolute address. Otherwise, it assumes they have 4 byte alignment. Specifying this option avoids some rare compatibility problems with code generated by other compilers. It is not the default because it results in a performance loss. especially for floating point code.

I do not know if this is not your needs.

-->
Thank you, I now need to know how to use this switch in solaris.

-->
In order not on the trip?

-->
Checked that no solaris on the gcc compiler switches.

-->
Your gcc version?
I was given that the latest 4.1.0.
There, just these two options?

Gcc 3.3.2
Can you confirm that the Sun OS 5.8 on these two options?

-->
These two options and OS versions, but of the gcc compiler for SPARC machines.
I have no manual gcc 3.3.2, it is impossible not to know there are two. But I should have guessed.
There can be used to test know, the test is it so difficult?
I do not understand the question you asked to know what think.
If not, I would explain to you not apply. Em05 : :

-->

I tested that at any time can always easy to prove, not total proved difficult. Besides these two switches Why not available in solaris is the root of the problem.
Q I understand now what? Some will simply say it is clear that the sun does not provide long gcc against double/long double/long 4 byte alignment, it would be desirable to talk about why.

-->
Then you prove what is the result?
Now, I did not see that I was given two options can be used or not used.
I was given two options from here today.
Http://gcc.gnu.org/onlinedocs/

I can only say that these two switches do not provide gcc 3.3.2. As for the versions, or simply impossible to provide, I do not have an answer to that.
Gnu you look at the document carefully, there are circumstances in the alignment of the sun, presents three solutions, but not the reality.

-->
Let me give detailed look at the address.

Check tomorrow to work out, do not

-->
Http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/SPARC-Options.html#SPARC-Options
This is the option supported by gcc 4.1.0 on SPARC machines.
There were the
-mno-unaligned-doubles
-munaligned-doubles
Describe what you mean is that these two options put double4 byte alignment requirement is achieved?
I had misunderstood it is a description?
You say I am a bit confused.

-->
Not understand? 4 gcc who simply try on the sun that told me no problem, can be used on it.
Who can or can not explain the reasons why.
Convenience sake.

-->
On, and it would not be a long time machines that way?
And you found communication difficult. Em15 : :

I have machines, but not all versions of the gcc test again.

In addition, the two switches you to solve the problem : For example :
Solaris own compiler CC as a function of the parameters of the double data type is 4 byte alignment, which is 8 byte alignment gcc (no-align-double may solve the problem).
Of course, there are other pairs, and malloc, I found the information (in other os no-align-double use of the recommendation, but do not support this thing in solaris.
What wisdom?

-->
Sorry, if not two, I have no proposals. : Oops :



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com