02-16-2011
maintain 32bit and 64bit C code
Hi,
I have a C code which builds and works fine on 32bit linux machine.
Now i want to convert that code to build and run on 64 bit linux machine. I dont want to maintain two separate sources for 32 and 64 bit build. Same source should get build on 32 as well as 64 bit machine (when a corresponding build option is specified).
Please guide me how i can achieve this?
-Bhushan
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Whats the difference between 32bit and 64bit OS's or applications. I understand it a little but its just not clicking the way the teacher explained to me
thanks, any info would be much appreciated (1 Reply)
Discussion started by: eloquent99
1 Replies
2. UNIX for Dummies Questions & Answers
when using the command :
cat /proc/cpuinfo I get some basic info back on the cpu..
but it doesn't tell me if I am using a 64 or 32 bit processor ..
a) is this the right command to find this ?
b) if it is not what is ? and how do I get that information..
thanx moxxx68 (2 Replies)
Discussion started by: moxxx68
2 Replies
3. Linux
Hi,
I want to know what is command to know which will tell wheather linux is 32 or 64 bit (5 Replies)
Discussion started by: manoj.solaris
5 Replies
4. Linux
Where can I get a list that maps the each Linux version to corresponding 32/64 bits model?
e.g.
OS -> Model (ILP32, LP64, ...)
RHLE3 -> ?
RHLE4 -> ?
RHLE5 -> ?
...
It would be better if there is such a list that contains most of current UNIX OS versions.
... (1 Reply)
Discussion started by: princelinux
1 Replies
5. Programming
Is there an 'easy' way to convert 32Bit code to 64Bit code. I have this benchmark i need to run on different machines and it would be nice if i could run it on the 64 bit machines ass wel.
The output when compiling(1) and running(2) are the following:
(1)
linux:/home/user1/subbench/heapsort #... (7 Replies)
Discussion started by: demuynckr
7 Replies
6. Programming
I'm trying to use the GDB debugger and DDD to debug 64bit code. It seems that the AIX toolkit gdb version 6.0 works with 64bit code. But the ddd tool when running gdb gives the following errors :
Starting program: <my binary> <my params>
warning: "": not in executable format: There is an input... (2 Replies)
Discussion started by: bean66
2 Replies
7. Solaris
i have solaris 10 x86 64bit installed on my pc (dell 3100). i then decided to move my hard drive to another pc (dell 4600). I noticed that each time i boot up, the OS show as 32 bit (instead of 64bit) and i can't even get past this stage to the login page.
when i moved it back to dell 3100 it... (13 Replies)
Discussion started by: seyiisq
13 Replies
8. Solaris
Not really a Unix question as such :o, but what advantages or disadvantages are there between using 32bit or 64bit applications on a T5220 running Solaris 10? What about mixing them e.g. 64 bit app using 32 bit libraries or vice versa? (1 Reply)
Discussion started by: JerryHone
1 Replies
9. Red Hat
I have an application which builds and executes without error on a 32bit implementation of Linux. When I transferred the code to a new project on a 64bit implementation, the code will build without error, but the pthread functions, such as pthread_attr_setschedparam() return an 'Invalid Argument'... (3 Replies)
Discussion started by: jpelletier116
3 Replies
10. Solaris
Hi Gurus,
I need to check whether the compiler installed in my system supports 64bit compilation.
Server - Sun fire v490
OS - Solaris 5.9
Processor - Sparcv9 (64bit)
Install Directory - /opt/SUNWSpro
Compiler Model - Sun Forte C Compiler.
My development team is claiming that there... (20 Replies)
Discussion started by: Hari_Ganesh
20 Replies
LEARN ABOUT CENTOS
config.guess
CONFIG.GUESS(1) User Commands CONFIG.GUESS(1)
NAME
config.guess - guess the build system triplet
SYNOPSIS
config.guess [OPTION]
DESCRIPTION
The GNU build system distinguishes three types of machines, the `build' machine on which the compilers are run, the `host' machine on which
the package being built will run, and, exclusively when you build a compiler, assembler etc., the `target' machine, for which the compiler
being built will produce code.
This script will guess the type of the `build' machine.
Output the configuration name of the system `config.guess' is run on.
Operation modes:
-h, --help
print this help, then exit
-t, --time-stamp
print date of last modification, then exit
-v, --version
print version number, then exit
ENVIRONMENT VARIABLES
config.guess might need to compile and run C code, hence it needs a compiler for the `build' machine: use the environment variable
`CC_FOR_BUILD' to specify the compiler for the build machine. If `CC_FOR_BUILD' is not specified, `CC' will be used. Be sure to specify
`CC_FOR_BUILD' is `CC' is a cross-compiler to the `host' machine.
CC_FOR_BUILD a native C compiler, defaults to `cc'
CC a native C compiler, the previous variable is preferred
REPORTING BUGS
Report bugs and patches to <config-patches@gnu.org>.
Originally written by Per Bothner.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
autoconf(1), automake(1), autoreconf(1), autoupdate(1), autoheader(1), autoscan(1), config.guess(1), config.sub(1), ifnames(1), libtool(1).
GNU Autoconf 2.69 August 2017 CONFIG.GUESS(1)