64 bit Porting Problem !!!


 
Thread Tools Search this Thread
Operating Systems Linux SuSE 64 bit Porting Problem !!!
# 8  
Old 01-12-2009
I have gcc 4.1.1 installed. Maybe you have an older version. If so, this might not apply to you.

I am not familiar with the options you mentioned, but the v9 is definitely SPARC architecture specific. Using "-m64" will produce code for the 64-bit platform, which would be the default anyway. ints will be 32 bits, and pointers and longs will be 64-bits. You could use -mabi=32 will generate 32-bit code for your 64-bit platform. This might result in an inability to link against 64-bit libraries, but if you have 32-bit libraries also installed, it should work. You can do something similar with "-mlong32", which forces all longs and pointer types to 32 bits (but still uses the 64-bit abi so it could run on a 64 bit platform). It might be possible to combine -mlong-calls with this to ensure proper behavior with the linker, but that's just a WAG (wild ass guess).

I thought there was a way to tell the compiler to treat an "int" as 64-bits, but I cannot find an option for that in the manual. You can always use the preprocessor to try to change "int" into "long", but that might not work in some instances.

I found some links that might help:
http://gcc.fyxm.net/summit/2003/Port...2064%20bit.pdf

This link specifically says you must use gcc 4 and later, and mentions a few options pertinent to your task.
64-Bit Transition Guide: Compiling 64-Bit Code Using GCC
# 9  
Old 02-21-2009
Hi Guys...

Is there any solution for the prob I mentioned previously ?

Regards.
# 10  
Old 02-21-2009
Which problem do you still have?
# 11  
Old 02-22-2009
As I mentioned...I dont want long and pointers to be as 32 bit in 64 bit machine..I also dont want to generate 32 bit code by using -m32....I just want that on 64 bit machine if I am assigning long to int, it should give truncation warning which I am not getting even after using all switch option. If there is any option which make long as 32 bit but still keeps pointers as 64 bit, it could be worth noticing.

Thanks in advance.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Solaris 10 apache 64 bit libldap.so problem

Hello, I am fairly new to Solaris so please be gentle ;). I am trying to install apache 2.4.3 adapting a script one of my colleagues wrote for version 2.2.23. The problem lies in the fact that I am aiming at creating a 64bit package hence I've already amended the script to reflect that. I... (3 Replies)
Discussion started by: teotao
3 Replies

2. Red Hat

DB2 ODBC connectivity problem in RHEL5 32 bit

Hi, I installed Db2 9.7 on RHEL5 32bit . Instance Name is db2inst1 amd in that i created database as mydb. I exported env variables for classpath ,db2dir,db2instance LD_LIBRARY_PATH ,PATH ,ODBC, ODBCHOME ,ODBCINI My application needs ODBC connectivity and so I modified odbc.ini file . ... (0 Replies)
Discussion started by: roopalidalvi231
0 Replies

3. HP-UX

hpux-itanium 64 bit problem for libC

i am trying to build on hpux-itanium 64 bit platform. my application needs to link to 64 bit version of the library libCsup.so This library is present in /usr/lib/hpux64/libCsup.so I am specifying the location of this library as linker flags LDFLAGS := -Wl,-N -Wl,+s... (0 Replies)
Discussion started by: skyineyes
0 Replies

4. HP-UX

HP-Unix 64 bit Tape Drive creating problem

Hello All, I have HP Openview storage data protector version 5.5. When I am going to write my backup I have an error message saying "Connot Open Device /dev/rmt/0mn" Follownig is my output: # ls -l /dev/rmt/0mn crw-rw-rw- 2 bin bin 205 0x080140 Jan 17 16:41 /dev/rmt/0mn # uname -a... (2 Replies)
Discussion started by: hellozishan
2 Replies

5. HP-UX

Tru 64 bit on HP AlphaServer ES45 creating problem Help Needed !!!

Dear All, I am new on Tru 64 bit Unix platform. I have a database server "HP AlphaServer ES45" version p5.1 of Tru Ux 64 bit installed. I have 4 hard drives in this system (1,2,3,4). My 4th hard drive is damaged which contain Oracle database files including partitions on 4th drives... (2 Replies)
Discussion started by: hellozishan
2 Replies

6. Red Hat

No Error for 64-bit porting

I am just trying to get the warning while compiling for 64-bit on Linux >> uname -a Linux mms4.es.cpth.ie 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux =================================== Written test.c file which conatin : #include<stdio.h>... (1 Reply)
Discussion started by: amit_27
1 Replies

7. Solaris

Porting C++ 32-bit code on 64-bit Solaris

Hi, I am trying to convert 32-bit code to 64-bit. I have defined function int main() { int* l; size_t len1; fun(len1); return 0; } void fun(int* ptr) { cout<<"\nsizeof(ptr)"<<sizeof(ptr); } However while compiling getting error as : Error: Formal argument ptr... (2 Replies)
Discussion started by: amit_27
2 Replies

8. UNIX for Dummies Questions & Answers

A bit of a problem with a UNIX based server.

Alright. As the title states, I'm working with a UNIX based web server(Sun Fire v120). The problem I'm currently having is trying to properly configure it for hosting. If anyone could help me out, it would be great. Much thanks. -XTIZ3 (2 Replies)
Discussion started by: XTIZ3
2 Replies

9. AIX

porting an application on 64-bit AIX version 5

Hi all, I am facing problem in porting to 64 bit AIX especially with compiling options to compile and run under 64 bit kernel.Can any one put some light on the issue thanks in advance vishal (14 Replies)
Discussion started by: vishalzone2002
14 Replies
Login or Register to Ask a Question