-align problems

-align problems

hi,

i experience some problems with the -align option
on IA32 with icc 7.1.

i have to make an apache2 module using lib's from my project (compiled with -align), which won't work because for example the request struct from the apache API differs for my module which is icc compiled.

altough i specified structure packing explicitly with #pragma pack for each structure, the memory layout of the struct's is differs depending on the presence of the -align switch.
the doc's on -align are sparse.

what does -align do exaclty?
how can i ensure proper layout for structure regardless of the laign switch?
anyone ever compiled a apache module sucessfully with icc?

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

From Intel Compiler v7.1 documentation:
Under Contents - libs - default libs -

The Linux* system libraries and the compiler libraries are not built with the -align option. Therefore, if you compile with the -align option and make a call to a compiler distributed or system library, and have long long, double, or long double types in your interface, you will get the wrong answer due to the difference in alignment. Any code built with -align cannot make calls to libraries that use these types in their interfaces unless they are built with -align (in which case they will not work without -align).

cp

Leave a Comment

Please sign in to add a comment. Not a member? Join today