Sponsored Content
Full Discussion: Compiler - 32bit or 64bit?
Operating Systems Solaris Compiler - 32bit or 64bit? Post 302400063 by hergp on Tuesday 2nd of March 2010 06:27:21 AM
Old 03-02-2010
-m64 ist the gcc option for 64 bit. The corresponding option for the Sun Studio compiler is -xarch=v9.

Try:
Code:
/opt/SUNWspro/bin/cc -c -xarch=v9 foo.c -o /tmp/foo.o

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

32bit vs 64bit

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

64bit- or 32bit- processor

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. Solaris

CC 5.5 compiler flag to issue 64bit porting warnings on sparc-solaris

Hi, We are porting our application from 32bit to 64bit. We tried -xarch=v9, -xarc=v9a and -xport64=full options so that compiler to issue 64bit porting warnings. But we are not getting any porting warninings WE are using CC 5.5 compiler on sparc-solaris m/c. Please tell us some powerful... (0 Replies)
Discussion started by: shobhah
0 Replies

4. Linux

Linux 32bit or 64bit

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

5. Linux

Linux version v.s. 32bit/64bit

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

6. Programming

32bit to 64bit conversion.

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

7. Programming

How Can a Machine Reads a Compiler Since A Compiler is Written in Text! Not Binaries?

To make a programming language you need a compiler, so what was the first programming language and how was is created if you need the compiler first? The compiler itself is considered as a high language comparing to the machine! since the compiler is not created in 1's and 0's... Eventhough i... (12 Replies)
Discussion started by: f.ben.isaac
12 Replies

8. Solaris

32bit / 64bit issue with x86 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

9. Red Hat

Pthread problems, 32bit vs 64bit

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. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: bhushan123
2 Replies
as(1)								   User Commands							     as(1)

NAME
as - assembler SYNOPSIS
SPARC as [-b] [-i] [-K {pic,PIC}] [-L] [-m] [-n] [-o outfile] [-P] [-Dname] [-Dname=def] [-Ipath] [-Uname]... [-q] [-Qy | n] [-s] [-S [a | b | c | l | A | B | C | L]] [-T] [-V] [-xarch=v7 | -xarch=v8 | -xarch=v8a | -xarch=v8plus | -xarch=v8plusa | -xarch=v8plusb | -xarch=v8plusd | -xarch=v8plusv | -xarch=v9 | -xarch=v9a | -xarch=v9b | -xarch=v9d | -xarch=v9v] [-xF] [-Y dirname] filename... x86 as [-b] [-i] [-K PIC] [-L] [-m] [-n] [-o outfile] [-P] [-Dname] [-Dname=def] [-Ipath] [-Uname]... [-Qy | n] [-s] [-S [a | b | c | l | A | B | C | L]] [-T] [-V] [-xarch=generic64 | -xarch=amd64] [-Y dirname] [-xmodel= [ SMALL | KERNEL ]] filename... DESCRIPTION
The as command creates object files from assembly language source files. OPTIONS
Common Options The following flags are common to both SPARC and x86. They can be specified in any order: -b Generates extra symbol table information. -i Ignore line number information from preprocessor. -K pic | PIC Generates position-independent code. -L Saves all symbols, including temporary labels that are normally discarded to save space, in the ELF symbol table. -m Runs the m4(1) macro processor on the input to the assembler. -n Suppresses all the warnings while assembling. -o outfile Puts the output of the assembly in outfile. By default, the output file name is formed by removing the .s suffix, if there is one, from the input file name and appending a .o suffix. -P Runs cpp(1), the C preprocessor, on the files being assembled. The preprocessor is run separately on each input file, not on their concatenation. The preprocessor output is passed to the assembler. -Dname When the -P option is in effect, these options are passed to the cpp(1) preprocessor without interpretation by the -Dname=def as command; otherwise, they are ignored. -Ipath When the -P option is in effect, this option is passed to the cpp(1) preprocessor without interpretation by the as command; otherwise, it is ignored. -Uname When the -P option is in effect, this option is passed to the cpp(1) preprocessor without interpretation by the as command; otherwise, it is ignored. -Qy | n If y is specified, this option produces the assembler version information in the comment section of the output object file. If n is specified, the information is suppressed. -s Places all stabs in the .stabs section. By default, stabs are placed in stabs.excl sections, which are stripped out by the static linker, ld(1), during final execution. When the -s option is used, stabs remain in the final exe- cutable because .stab sections are not stripped by the static linker. -S[a|b|c|l|A|B|C|L] Produces a disassembly of the emitted code to the standard output. Adding each of the following characters to the -S option produces: a disassembling with address b disassembling with ".bof" c disassembling with comments l disassembling with line numbers Capital letters turn the switch off for the corresponding option. -T This is a migration option for 4.x assembly files to be assembled on 5.x systems. With this option, the symbol names in 4.x assembly files are interpreted as 5.x symbol names. -V Writes the version number of the assembler being run on the standard error output. -xF Allows function reordering by the Performance Analyzer. If you compile with the -xF option, and then run the Perfor- mance Analyzer, you can generate a map file that shows an optimized order for the functions. The subsequent link to build the executable file can be directed to use that map file by using the linker -M mapfile option. It places each function from the executable file into a separate section. -Y dirname Specify directory m4 and/or cm4def. Options for SPARC only -q Performs a quick assembly. When the -q option is used, many error checks are not performed. This option disables many error checks. Use of this option to assemble handwritten assembly language is not recommended. -xarch=v7 This option instructs the assembler to accept instructions defined in the SPARC version 7 (V7) architecture. The result- ing object code is in ELF format. -xarch=v8 This option instructs the assembler to accept instructions defined in the SPARC-V8 architecture, less the quad-precision floating-point instructions. The resulting object code is in ELF format. -xarch=v8a This option instructs the assembler to accept instructions defined in the SPARC-V8 architecture, less the quad-precision floating-point instructions and less the fsmuld instruction. The resulting object code is in ELF format. This is the default choice of the -xarch=options. -xarch=v8plus This option instructs the assembler to accept instructions defined in the SPARC-V9 architecture, less the quad-precision floating-point instructions. The resulting object code is in ELF format. It does not execute on a Solaris V8 system (a machine with a V8 processor). It executes on a Solaris V8+ system. This combination is a SPARC 64-bit processor and a 32-bit OS. -xarch=v8plusa This option instructs the assembler to accept instructions defined in the SPARC-V9 architecture, less the quad-precision floating-point instructions, plus the instructions in the Visual Instruction Set (VIS). The resulting object code is in V8+ ELF format. It does not execute on a Solaris V8 system (a machine with a V8 processor). It executes on a Solaris V8+ system -xarch=v8plusb This option enables the assembler to accept instructions defined in the SPARC-V9 architecture, plus the instructions in the Visual Instruction Set (VIS), with UltraSPARC-III extensions. The resulting object code is in V8+ ELF32 format. -xarch=v8plusd This option enables the assembler to accept instructions DEFIned in UltraSPARC Architecture 2009. The resulting object code is in V8+ ELF32 format. -xarch=v8plusv This option enables the assembler to accept instructions defined in UltraSPARC Architecture 2005, including the exten- sions dealing with the sun4v virtual machine model. The resulting object code is in V8+ ELF32 format. -xarch=v9 This option limits the instruction set to the SPARC-V9 architecture. The resulting .o object files are in 64-bit ELF for- mat and can only be linked with other object files in the same format. The resulting executable can only be run on a 64-bit SPARC processor running 64-bit Solaris with the 64-bit kernel. -xarch=v9a This option limits the instruction set to the SPARC-V9 architecture, adding the Visual Instruction Set (VIS) and exten- sions specific to UltraSPARC processors. The resulting .o object files are in 64-bit ELF format and can only be linked with other object files in the same format. The resulting executable can only be run on a 64-bit SPARC processor running 64-bit Solaris with the 64-bit kernel. -xarch=v9b This option enables the assembler to accept instructions defined in the SPARC-V9 architecture, plus the Visual Instruc- tion Set (VIS), with UltraSPARC-III extensions. The resulting .o object files are in ELF64 format and can only be linked with other V9 object files in the same format. The resulting executable can only be run on a 64-bit processor running a 64-bit Solaris operating environment with the 64-bit kernel. -xarch=v9d This option enables the assembler to accept instructions defined in UltraSPARC Architecture 2009. The resulting object code is in ELF64 format. -xarch=v9v This option enables the assembler to accept instructions defined in UltraSPARC Architecture 2005, including the exten- sions dealing with the sun4v virtual machine model. The resulting object code is in ELF64 format. Options for x86 Only -xarch>=generic64 Limits the instruction set to AMD64. The resulting object code is in 64-bit ELF format. -xarch=amd64 Limits the instruction set to AMD64. The resulting object code is in 64-bit ELF format. -xmodel=[SMALL | KERNEL] For AMD64 only, generate R_X86_64_32S relocatable type for static data access under KERNEL. Otherwise, generate R_X86_64_32 under SMALL. SMALL is the default. OPERANDS
The following operand is supported: filename Assembly language source file ENVIRONMENT VARIABLES
TMPDIR The as command normally creates temporary files in the directory /tmp. Another directory can be specified by setting the environ- ment variable TMPDIR to the chosen directory. (If TMPDIR is not a valid directory, then as uses /tmp). FILES
By default, as creates its temporary files in /tmp. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsprot | +-----------------------------+-----------------------------+ SEE ALSO
cc(1B), cpp(1),ld(1), m4(1), nm(1), strip(1), tmpnam(3C), a.out(4), attributes(5) dbx and analyzer manual pages available with Sun Studio documentation. NOTES
If the -m option, which invokes the m4(1) macro processor, is used, keywords for m4 cannot be used as symbols (variables, functions, labels) in the input file, since m4 cannot determine which keywords are assembler symbols and which keywords are real m4 macros. Whenever possible, access the assembler through a compilation system interface program such as cc(1B). All undefined symbols are treated as global. SunOS 5.11 17 Mar 2008 as(1)
All times are GMT -4. The time now is 11:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy