Sponsored Content
Full Discussion: Compiler considerations
Top Forums Programming Compiler considerations Post 302367762 by Corona688 on Tuesday 3rd of November 2009 11:21:16 AM
Old 11-03-2009
If you're using i386, it's time to upgrade. Smilie The basic i686 architecture has taken over for at least a decade now, covering the vast majority of the 32-bit world of processors. A lot of distros don't support i386 any more because that architecture is missing some important fundamental instructions now depended on for things like IPC.

Your compiler can probably generate code for x86 processors and nothing else. Most compilers aren't configured to generate code for anything except their native platform.
 

5 More Discussions You Might Find Interesting

1. Programming

C compiler

I'm new to C but eager to get started. I purchasewd beginning C by Ivor Horton and realise that I need a C compiler. I looking for the most appropriate and economical way to obtain this, any suggestions would be greatly appreciated. (5 Replies)
Discussion started by: ferret
5 Replies

2. UNIX for Dummies Questions & Answers

xl C/C++ compiler to GCC compiler

Hi, we are converting from IBM-AIX(xl c/c++ compiler) to Linux(GCC complier). As a part of this i need to change the CFLAGS. The xl c/c++ complier CFLAGS is CFLAGS := $(CDEBUG) $(PROJECT_INCLUDE_DIRS) $(COBJECT_MODE) -qcpluscmt -qmakedep -qcheck=all \ -qalign=bit_packed $(LINT_FLAGS)... (0 Replies)
Discussion started by: pbattu1
0 Replies

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

4. AIX

XL C/C++ Compiler

Hello, I am trying to use the IBM XL C/C++ Compiler on my AIX server. I have uised smit to install it and it appears to have been successful. When I however type XlC it tells me that I am still using my old compiler which is VisualAge C++ Professional / C for AIX Compiler, Version 5. How can I... (3 Replies)
Discussion started by: dkranes
3 Replies

5. UNIX for Dummies Questions & Answers

cc compiler and gcc compiler

hi, can we install gcc compiler in unix based OS(sun solar,IBM AIX,HP,etc) and also can we install sun cc compiler in AIX environment and vice versa. and more ..is linux support cc compiler regards Ajay (3 Replies)
Discussion started by: ajaysahoo
3 Replies
2C(1)							      General Commands Manual							     2C(1)

NAME
2c, 6c, 8c, kc, vc, xc - C compilers SYNOPSIS
2c [ option ... ] [ file ... ] 6c [ option ... ] [ file ... ] 8c [ option ... ] [ file ... ] kc [ option ... ] [ file ... ] vc [ option ... ] [ file ... ] xc [ option ... ] [ file ... ] DESCRIPTION
2c, 6c, 8c, kc, vc, and xc compile the named C files into MC68020, i960, i386, SPARC, MIPS, and ATT3210 object files. The compilers handle most preprocessing directives themselves; a complete preprocessor is available in cpp(1), which must be run separately. Let the first letter of the compiler name be O= 2, 6, 8, k, v, or x. The output object files end in .O. The letter is also the prefix of related programs: Oa is the assembler, Ol is the loader. Associated with each compiler is a string objtype= 68020, 960, 386, sparc, mips, or 3210. Plan 9 conventionally sets the $objtype environment variable to the objtype string appropriate to the current machine's type. Plan 9 also conventionally has /objtype directories, which contain among other things: include, for machine-dependent include files; lib, for public object code libraries; bin, for public programs; and mkfile, for preconditioning mk(1). The compiler options are: -o obj Place output in file obj (allowed only if there is just one input file). Default is to take the last element of the input file name, strip any trailing .c, and append .O. -w Print warning messages about unused variables, etc. -B Accept functions without a new-style ANSI C function prototype. By default, the compilers reject functions used without a defined prototype, although ANSI C permits them. -Dname=def -Dname Define the name to the preprocessor, as if by If no definition is given, the name is defined as -Idir An file whose name does not begin with slash or is enclosed in double quotes is always sought first in the directory of the file argument. If this fails, or the name is enclosed in <>, it is then sought in directories named in -I options, then in /sys/include, and finally in /$objtype/include. -N Suppress automatic registerization and optimization. -S Print an assembly language version of the object code on standard output as well as generating the .O file. -a Instead of compiling, print on standard output acid functions (see acid(1)) for examining structures declared in the source files. -aa Like -a except suppress information about structures declared in included header files. The compilers support several extensions to ANSI C: - A structure or union may contain unnamed substructures and subunions. The fields of the substructures or subunions can then be used as if they were members of the parent structure or union (the resolution of a name conflict is unspecified). When a pointer to the outer structure or union is used in a context that is only legal for the unnamed substructure, the compiler promotes the type and adjusts the pointer value to point at the substructure. If the unnamed structure or union is of a type with a tag name specified by a typedef statement, the unnamed structure or union can be explicitly referenced by <struct variable>.<tagname>. - A structure value can be formed with an expression such as (struct S){v1, v2, v3} where the list elements are values for the fields of struct S. - Array initializers can specify the indices of the array in square brackets, as int a[] = { [3] 1, [10] 5 }; which initializes the third and tenth elements of the eleven-element array a. - Structure initializers can specify the structure element by using the name following a period, as int struct { int x; int y; } s = { .y 1, .x 5 }; which initializes elements y and then x of the structure s. - A global variable can be dedicated to a register by declaring it extern register in all modules and libraries. - A #pragma of the form #pragma lib "libbio.a" records that the program needs to be loaded with file /$objtype/lib/libbio.a; such lines, typically placed in library header files, obviate the -l option of the loaders. To help identify files in non-standard directories, within the file names in the #pragmas the string $M represents the name of the architecture (e.g., mips) and $O represents its identifying character (e.g., v). - The C++ comment (// to end of line) is accepted as well as the normal convention of /* */. - The compilers accept long long variables as a 64-bit type. The standard header typedefs this to vlong. The vlong runtime is slow. EXAMPLE
For the 68020, produce a program prog from C files main.c and sub.c: 2c -w main.c sub.c 2l -o prog main.2 sub.2 FILES
/sys/include system area for machine-independent #include directives. /$objtype/include system area for machine-dependent #include directives. SOURCE
/sys/src/cmd/cc machine-independent part /sys/src/cmd/2c, etc. machine-dependent part SEE ALSO
2a(1), 2l(1), cpp(1), mk(1), nm(1), pcc(1), db(1), acid(1), Rob Pike, ``How to Use the Plan 9 C Compiler'' BUGS
The i960 compiler has been used only to program one I/O controller and is certainly buggy. The preprocessor only handles and For a full ANSI preprocessor, use cpp(1) on the files first. 2C(1)
All times are GMT -4. The time now is 11:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy