Citizendia
Your Ad Here

A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is run. A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another In Computing, an executable (file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a file that only contains In Computing, a platform describes some sort of Hardware architecture or Software framework (including Application frameworks, that allows Cross compiler tools are generally found in use to generate compiles for embedded system or multiple platforms. A programming tool or software development tool is a program or application that Software developers use to create debug maintain or otherwise An embedded system is a special-purpose Computer system designed to perform one or a few dedicated functions often with Real-time computing constraints It is a tool that one must use for a platform where it is inconvenient or impossible to compile on that platform, like microcontrollers that run with a minimal amount of memory for their own purpose. A microcontroller (also MCU or µC is a functional Computer system-on-a- chip. It has become more common to use this tool for paravirtualization where a system may have one or more platforms in use. In computing paravirtualization is a Virtualization technique that presents a software interface to Virtual machines that is similar but not identical to that of the

Contents

Uses of cross compilers

The fundamental use of a cross compiler is to separate the build environment from the target environment. This is useful in a number of situations:

Use of virtual machines (such as Java's JVM) resolves some of the reasons for which cross compilers were developed. In Computer science, a virtual machine (VM is a Software implementation of a machine (computer that executes programs like a real machine A Java Virtual Machine ( JVM) is a set of computer software programs and data structures which use a Virtual machine The virtual machine paradigm allows the same compiler output to be used across multiple target systems.

Typically the hardware architecture differs (e. In engineering hardware architecture refers to the the identification of a system's physical components and their interrelationships g. compiling a program destined for the MIPS architecture on an x86 computer) but cross-compilation is also applicable when only the operating system environment differs, as when compiling a FreeBSD program under Linux, or even just the system library, as when compiling programs with uClibc on a glibc host. MIPS (originally an acronym for Microprocessor without Interlocked Pipeline Stages) is a RISC microprocessor architecture developed by MIPS Technologies See also X86 assembly language The generic term x86 refers to the most commercially successful Instruction set architecture in the history of Personal An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination FreeBSD is a Unix-like free Operating system descended from AT&T UNIX via the Berkeley Software Distribution (BSD branch through Linux (commonly pronounced ˈlɪnəks In Computing, uClibc is a small C standard library intended for Embedded Linux systems The GNU C Library, commonly known as glibc, is the C standard library released by the GNU Project.

Canadian Cross

The Canadian Cross is a technique for building cross compilers for other machines. Given three machines A, B, and C, one uses machine A to build a cross compiler that runs on machine B to create executables for machine C. When using the Canadian Cross with GCC, there may be four compilers involved:

The end-result cross compiler (4) will not be able to run on your build machine A; instead you would use it on machine B to compile an application into executable code that would then be copied to machine C and executed on machine C.

For instance, NetBSD provides a POSIX Unix shell script named build. NetBSD is a freely redistributable Open source version of the Unix -derivative Berkeley Software Distribution (BSD Computer Operating POSIX (ˈpɒzɪks or "Portable Operating System Interface" is the collective name of a family of related standards specified by the IEEE to define A Unix shell, is a command line shell that provides the traditional User interface for the Unix Operating system and for Unix-like sh which will first build its own toolchain with the host's compiler; this, in turn, will be used to build the cross-compiler which will be used to build the whole system. In Software, a toolchain is the set of Computer programs ( tools) that are used to create a product (typically another computer program or system of programs

The term Canadian Cross came about because at the time that these issues were all being hashed out, Canada had three national political parties. [1]

GCC and cross compilation

GCC, a free software collection of compilers, can be set up to cross compile. The GNU Compiler Collection (usually shortened to GCC) is a set of Compilers produced for various Programming languages by the GNU Project Free software or software libre is Software that can be used studied and modified without restriction and which can be copied and redistributed in modified or unmodified It supports many platforms and languages. However, due to limited volunteer time and the huge amount of work it takes to maintain working cross compilers, in many releases some of the cross compilers are broken.

GCC requires that a compiled copy of binutils be available for each targeted platform. The GNU Binary Utilities, or binutils, is a collection of Programming tools for the manipulation of Object code in various Object file Especially important is the GNU Assembler. The GNU Assembler, commonly known as Gas, is the assembler used by the GNU Project. Therefore, binutils first has to be compiled correctly with the switch --target=some-target sent to the configure script. Configure scripts are an automated method of modifying Source code before compilation in order to produce code tailored to the system on which a binary Executable GCC also has to be configured with the same --target option. Configure scripts are an automated method of modifying Source code before compilation in order to produce code tailored to the system on which a binary Executable GCC can then be run normally provided that the tools, which binutils creates, are available in the path, which can be done using the following (on UNIX-like operating systems with bash):

PATH=/path/to/binutils/bin:$PATH; make

Cross compiling GCC requires that a portion of the target platform's C standard library be available on the host platform. The GNU Binary Utilities, or binutils, is a collection of Programming tools for the manipulation of Object code in various Object file A path is the general form of a file or directory name giving a file's name and its unique location in a File system. The C standard library (also known as libc) is a now-standardized collection of Header files and library routines used to implement common operations such At least the crt0, . crt0 (or crt0o gcrt0o mcrt0o is a set of execution startup routines (usually part of the C standard library) platform-dependent required in order to compile using the . . components of the library must be available. You may choose to compile the full C library, but that can be too large for many platforms. The alternative is to use newlib, which is a small C library containing only the most essential components required to compile C source code. Newlib is a C standard library implementation intended for use on Embedded systems. The C standard library (also known as libc) is a now-standardized collection of Header files and library routines used to implement common operations such tags please moot on the talk page first! --> In Computing, C is a general-purpose cross-platform block structured To configure GCC with newlib, use the switch --with-newlib.

The GNU autotools packages (i. The GNU build system, also known as the Autotools, is a suite of Programming tools produced by the GNU project. e. autoconf, automake, and libtool) use the notion of a build platform, a host platform, and a target platform. Autoconf is a tool for producing Shell scripts that automatically configure software Source code packages to adapt to many kinds of UNIX-like systems GNU Automake is a Programming tool that produces portable Makefiles for use by the make program used in compiling software GNU Libtool is a GNU Programming tool from the GNU build system used for creating portable software libraries. The build platform is where the code is actually compiled. The host platform is where the compiled code will execute. The target platform usually only applies to compilers. It represents what type of object code the package itself will produce (such as cross-compiling a cross-compiler); otherwise the target platform setting is irrelevant. For example, consider cross-compiling a video game that will run on a Dreamcast. The is Sega 's most recent Video game console and the successor to the Sega Saturn. The machine where the game is compiled is the build platform while the Dreamcast is the host platform.

Manx Aztec C cross compilers

Manx Software Systems, of Shrewsbury, New Jersey, produced C compilers beginning in the 1980s targeted at professional developers for a variety of platforms up to and including PC's and Mac's. See also Shrewsbury Township New Jersey Shrewsbury is a Borough in Monmouth County, New Jersey, United States. New Jersey ( is a state in the Mid-Atlantic and Northeastern regions of the United States. A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another Macintosh, commonly nicknamed Mac is a Brand name which covers several lines of Personal computers designed developed and marketed by Apple Inc

Manx's Aztec C programming language was available for a variety of older now-obsolete platforms including MS DOS, Apple II DOS 3.3 and ProDOS, Commodore 64, Macintosh 68XXX [2] and Amiga. Synopsis Aztec C is a C Compiler for a variety of older computing platforms including MS DOS, Apple II DOS 3 tags please moot on the talk page first! --> In Computing, C is a general-purpose cross-platform block structured MS-DOS (short for M icro' s' oft D isk O perating S ystem is an Operating system commercialized by Microsoft. Apple DOS refers to Operating systems for the Apple II series of microcomputers from 1979 through early 1983 ProDOS (the Professional Disk Operating System) became the most popular Operating system for the Apple II series of Macintosh, commonly nicknamed Mac is a Brand name which covers several lines of Personal computers designed developed and marketed by Apple Inc The Amiga is a family of Personal computers originally developed by Amiga Corporation.

From the 1980s and continuing throughout the 1990s until Manx Software Systems disappeared, the MS DOS version of Aztec C [3] was offered both as a native mode compiler or as a cross compiler for other platforms with different processors including the Commodore 64 [4] and Apple II[5]. Internet distributions still exist for Aztec C including their MS DOS based cross compilers. They are still in use today.

Manx's Aztec C86, their native mode 8086 MS DOS compiler, was also a cross compiler. The 8086 is a 16-bit Microprocessor chip designed by Intel and introduced on the market in 1978 which gave rise to the X86 architecture Although it did not compile code for a different processor like their Aztec C65 6502 cross compilers for the Commodore 64 and Apple II, it created binary executables for then-legacy operating systems for the 16 bit 8086 family of processors. The MOS Technology 6502 is an 8-bit Microprocessor that was designed by Chuck Peddle for MOS Technology in 1975

When the IBM PC was first introduced it was available with a choice of operating systems, CP/M 86 and PC DOS being two of them. CP/M (Control Program for Microcomputers is an Operating system originally created for Intel 8080 / 85 based Microcomputers by Gary Kildall IBM PC-DOS is a DOS operating system for the IBM Personal Computer, sold throughout the 1980s and 1990s Aztec C86 was provided with link libraries for generating code for both IBM PC operating systems. Throughout the 1980s later versions of Aztec C86 (3. xx, 4. xx and 5. xx) added support for MS DOS "transitory" versions 1 and 2 [6] and which were less robust than the "baseline" MS DOS version 3 and later which Aztec C86 targeted until its demise. MS-DOS (short for M icro' s' oft D isk O perating S ystem is an Operating system commercialized by Microsoft. MS-DOS (short for M icro' s' oft D isk O perating S ystem is an Operating system commercialized by Microsoft.

Finally, Aztec C86 provided C language developers with the ability to produce ROM-able "HEX" code which could then be transferred using a ROM Burner directly to an 8086 based processor. A ROM image, or simply ROM, is a computer file which contains a copy of the data from a Read-only memory chip often from a video game cartridge, a In Mathematics and Computer science, hexadecimal (also base -, hexa, or hex) is a Numeral system with a Paravirtualization may be more common today but the practice of creating low-level ROM code was more common per-capita during those years when device driver development was often done by application programmers for individual applications, and new devices amounted to a cottage industry. In computing paravirtualization is a Virtualization technique that presents a software interface to Virtual machines that is similar but not identical to that of the In computing a device driver or software driver is a Computer program allowing higher-level computer programs to interact with a Hardware device The putting-out system was a means of subcontracting work It was also known as the workshop system. It was not uncommon for application programmers to interface directly with hardware without support from the manufacturer. This practice was similar to Embedded Systems Development today. An embedded system is a special-purpose Computer system designed to perform one or a few dedicated functions often with Real-time computing constraints

Thomas Fenwick and James Goodnow II were the two principle developers of Aztec-C. Fenwick later became notable as the author of the Microsoft Windows CE Kernel or NK ("New Kernel") as it was then called. Microsoft Corporation is an American multinational Computer technology Corporation, which rose to dominate the Home computer Windows CE (also known officially as Windows Embedded Compact post version 6 In Computer science, the kernel is the central component of most computer Operating systems (OS [7]

Microsoft C cross compilers

Early History - 1980's

Microsoft C (MSC) has a long history[8] dating back to the 1980s. Microsoft Visual C++ (often abbreviated as MSVC) is a commercial Integrated development environment (IDE product engineered by Microsoft for the The first Microsoft C Compilers were made by the same company who made Lattice C and were rebranded by Microsoft as their own until MSC 4 which was the first version that Microsoft produced themselves. Lattice C (according to its author Lattice Incorporated) was the first C Compiler for MS-DOS on the IBM PC, in 1982 [9]

In 1987 many developers started switching to Microsoft C, and many more would follow throughout the development of Microsoft Windows to its present state. Products like Clipper and later Clarion emerged that offered easy database application development by using cross language techniques allowing part of their programs to be written in Microsoft C. Clipper is a computer Programming language that is used to create software programs that originally operated primarily under DOS. Clarion is a commercial 4GL, object-orientated Programming language and Integrated Development Environment from SoftVelocity used to program database

1987

C programs had long been linked with modules written in Assembly Language. See the terminology section below for information regarding inconsistent use of the terms assembly and assembler C itself was usually written in Assembly Language, and most C compilers (even current compilers) offer an Assembly Language pass (that can be "tweaked" for efficiency then linked to the rest of the program after assembling).

Compilers like Aztec-C converted everything to assembly language as a distinct pass and then assembled the code in a distinct pass, and were noted for their very efficient and small code, but by 1987 the optimizer built into Microsoft C was very good and only "mission critical" parts of a program were usually considered for rewriting. In fact C language programming had taken over as the "lowest-level" language, with programming becoming a multi-disciplinary growth industry and projects becoming larger with programmers writing user interfaces and database interfaces in higher-level languages, and a need had emerged that required cross language development that continues to this day.

By 1987 with the release of MSC 5. 1 Microsoft offered a cross language development environment for MS DOS. MS-DOS (short for M icro' s' oft D isk O perating S ystem is an Operating system commercialized by Microsoft. 16 bit binary object code written in Assembly Language (MASM) and Microsoft's other languages including Quick Basic, Pascal, and Fortran could be linked together into one program in a process they called "Mixed Language Programming" and now "InterLanguage Calling". See the terminology section below for information regarding inconsistent use of the terms assembly and assembler The Microsoft Macro Assembler (abbreviated MASM) is an x86 High-level assembler for DOS and Microsoft Windows. Microsoft QuickBASIC (also QB or incorrectly " QBasic " which is a different system is an Integrated Development Pascal is an influential imperative and procedural Programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small Fortran (previously FORTRAN) is a general-purpose, procedural, imperative Programming language that is especially suited to [10] If BASIC was used in this mix, the main program needed to be in BASIC to support the internal runtime that compiled BASIC required for garbage collection and its other managed operations that simulated a BASIC Interpreter like QBasic in MS DOS. In Computer programming, BASIC (an Acronym for Beginner's All-purpose Symbolic Instruction Code) is a family of High-level programming languages In Computer science, runtime or run time describes the operation of a Computer program, the duration of its execution from beginning to termination In Computer science, an interpreter normally means a Computer program that executes, i QBasic is an IDE and interpreter for a variant of the BASIC programming language which is based on QuickBasic.

The C code in particular needed to be written to pass its variables in "reverse order" on the stack and return its values on the stack rather than in a processor register. In Computer science, a call stack is a dynamic stack data structure which stores information about the active Subroutines of a Computer program There were other programming rules to make all the languages work together but this particular rule persisted through the cross language development that continued throughout Windows 16 and 32 bit versions and in the development of programs for OS 2 and which persists to this day. Microsoft Windows is a series of Software Operating systems and Graphical user interfaces produced by Microsoft. OS/2 is a computer Operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively It is known as the "Pascal Calling Convention" but is so common that it is taken for granted and the term is rarely used.

Another type of cross compilation that Microsoft C was used for during this time was in retail applications that require Handheld Devices like the Symbol Technologies PDT3100 (used to take inventory), which provided a link library targeted at an 8088 based Bar Code Scanner. Symbol Technologies is a manufacturer and worldwide supplier of mobile data capture and delivery equipment Inventory is a list for goods and Materials, or those goods and materials themselves held available in stock by a Business. The Intel 8088 is an Intel X86 Microprocessor based on the 8086, with 16- Bit registers and an 8-bit external Data bus A bar code (also barcode) is an optical Machine-readable representation of data Comparable to what is done today for that same market using Windows Mobile by companies like Motorola who bought Symbol, the application was built on the host computer then transferred to the Handheld Device (via a serial cable) where it was run. Windows Mobile is a compact Operating system combined with a suite of basic applications for Mobile devices based on the Microsoft Win32 Motorola Inc ( is an American, multinational Fortune 100, Telecommunications company based in Schaumburg Illinois. A serial cable is a Cable that can be used to transfer information between two devices using Serial communication, often using the RS-232 standard

Early 1990's

Throughout the 1990s and beginning with MSC 6 (their first ANSI C compliant compiler) Microsoft re-focused their C compilers on the emerging Windows Market, and also on OS 2 and in the development of GUI programs. ANSI C is the standard published by the American National Standards Institute (ANSI for the C programming language. OS/2 is a computer Operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively Mixed Language compatibility remained through MSC 6 on the MS DOS side, but the API for Microsoft Windows 3. 0 and 3. 1 was written in MSC 6. MSC 6 was also extended to provide support for 32 Bit assemblies and support for the emerging Windows for Workgroups (WFW) and Windows NT which would form the foundation for Windows XP. Windows 31x was a major release of Microsoft Windows. Several editions were released between 1992 and 1994 succeeding Windows 3 Windows NT is a family of Operating systems produced by Microsoft, the first version of which was released in July 1993 Windows XP is a family of 32-bit and 64-bit Operating systems produced by Microsoft for use on Personal computers including home and A programming practice called a Thunk was even introduced to allow cross assembly instruction passing between 16 and 32 bit programs that took advantage of runtime binding rather than the static binding that was favoured in Monolithic 16 bit MS DOS applications. The word thunk has at least three related meanings in computer science In Computer science, a library is a collection of Subroutines used to develop Software. In Programming languages name binding is the association of values with Identifiers An identifier bound to a value is said to reference A monolithic architecture is where processing data and the user interface all reside on the same system. Static binding is still favoured by some native code developers but does not generally provide the degree of re-use required by newer best practices like CMM. Reuse is using an item more than once This includes conventional reuse where the item is used again for the same function and new-life reuse where it is used for a new function The Capability Maturity Model (CMM is a process capability maturity model which aids in the definition and understanding of an organization's processes.

MS DOS support was still provided with the release of Microsoft's first C++ Compiler, MSC 7, which was backwardly compatible with the C programming language and MS DOS and supported both 16 bit and 32 bit code generation.

It is fair to say at this point that MSC took over where Aztec C86 left off. Synopsis Aztec C is a C Compiler for a variety of older computing platforms including MS DOS, Apple II DOS 3 Since the market share for C compilers had turned to cross compilers which took advantage of the latest and greatest Windows features, offered C and C++ in a single bundle and still supported MS DOS systems that were already a decade old, the smaller companies that produced compilers like Aztec C could no longer compete and either turned to niche markets like embedded systems or disappeared. An embedded system is a special-purpose Computer system designed to perform one or a few dedicated functions often with Real-time computing constraints

MS DOS and 16 bit code generation support continued until MSC 8. 00c which was bundled with Microsoft C++ and Microsoft Application Studio 1. 5, the forerunner of Microsoft Visual Studio which is the cross development environment that Microsoft provide today.

Late 1990's

MSC 12 was released with Microsoft Visual Studio 6 and no longer provided support for MS DOS 16 bit binaries instead providing support for 32 bit console applications, but provided support for WIN 95 and WIN 98 code generation as well as for WIN NT. Windows NT is a family of Operating systems produced by Microsoft, the first version of which was released in July 1993 Link libraries were available for other processors that ran Microsoft Windows; a practice that Microsoft continues to this day.

MSC 13 was released with Visual Studio 2003, and MSC 14 was released with Visual Studio 2005, both which will still produce code for older systems like Windows 95, but which will produce code for several target platforms including the Mobile Market and the ARM processor. Microsoft Visual Studio is the main Integrated Development Environment (IDE from Microsoft. Microsoft Visual Studio is the main Integrated Development Environment (IDE from Microsoft. The ARM architecture (previously the Advanced RISC Machine, and prior to that Acorn RISC Machine) is a 32-bit RISC processor architecture

DotNET and Beyond

In 2001 Microsoft had developed something called the Common Language Runtime (CLR) which formed the core for their DotNET (.NET) programming environment. The Common Language Runtime (CLR is the Virtual machine component of Microsoft's. This layer on the operating system which itself was by now in the GUI in Windows freely allowed the mixing of development languages but C itself was dropped from the higher level mix in favour of C++ and the new C# language which allows the "unsafe" keyword[11], both supporting the use of C. C# (pronounced C Sharp is a Multi-paradigm This practice is known by some as "Managed Code". While more efficient than runtimes like Java, it is at this point that the high level code produced by Microsoft can no longer really be considered to be cross compiled since the DotNET runtime and CLR are for most practical purposes required to get to the core routines for the processor and the devices on the target computer. The Common Language Runtime (CLR is the Virtual machine component of Microsoft's.

Despite the fact that only the command line C compiler in Visual Studio 2005 can be considered a cross compiler, other technologies have emerged that provide runtimes for other platforms including Linux, like Mono, and third party add-ons like Qt and its predecessors including XVT Design provide source code level cross development capability with other platforms, while still using Microsoft C to build the Windows versions. Linux (commonly pronounced ˈlɪnəks Mono is a project led by Novell (formerly by Ximian) to create an Ecma standard compliant. Qt (pronounced "cute" by its creators is a Cross-platform application development framework widely used for the development of GUI programs (in which XvT is also an abbreviation for the X-Wing vs TIE Fighter video game xvt is also an X Window System Terminal emulator created Other compilers like MinGW have also become popular in this area since they are more directly compatible with the Unixes that comprise the non-Windows side of software development allowing those developers to target all platforms using a familiar build environment. MinGW ( Minimalist GNU for Windows) formerly mingw32, is a native software port of the GNU Compiler Collection (GCC to Microsoft Windows

Since the operating system is integrated with the GUI in Windows unlike in Unix terms like "cross platform development environment" are more often correct in Windows than "cross compiler" when describing the IDE's that are used to compile programs. In Computing, an integrated development environment ( IDE) is a Software application that provides comprehensive facilities to Computer programmers In Unixes like Linux it is arguably more correct today to use the term "cross compiler" since native code is still, by some, commonly generated from a build machine to run on other processors and other distros. Linux (commonly pronounced ˈlɪnəks

However other Microsoft Development Environments for platforms like Windows Mobile not only offer cross compilers but also offer emulators and remote deployment environments that require very little configuration, unlike the cross compilers in days gone by or on other platforms. Windows Mobile is a compact Operating system combined with a suite of basic applications for Mobile devices based on the Microsoft Win32

See also

References

  1. ^ 4.9 Canadian Crosses. A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another MinGW ( Minimalist GNU for Windows) formerly mingw32, is a native software port of the GNU Compiler Collection (GCC to Microsoft Windows CrossGCC. Retrieved on 2007-10-11. Year 2007 ( MMVII) was a Common year starting on Monday of the Gregorian calendar in the 21st century. Events 1138 - A massive earthquake struck Aleppo, Syria. 1531 - Huldrych Zwingli is killed  “This is called a `Canadian Cross' because at the time a name was needed, Canada had three national parties. ”
  2. ^ Obsolete Macintosh Computers
  3. ^ Aztec C
  4. ^ Commodore 64
  5. ^ Apple II
  6. ^ MS DOS Timeline
  7. ^ Inside Windows CE (search for Fenwick)
  8. ^ Microsoft Language Utility Version History
  9. ^ History of PC based C-compilers
  10. ^ Which Basic Versions Can CALL C, FORTRAN, Pascal, MASM
  11. ^ Unsafe Programming In C#

External links

Dictionary

cross compiler

-noun

  1. (computing) A compiler that generates code for a platform other than the one it runs on.
© 2009 citizendia.org; parts available under the terms of GNU Free Documentation License, from http://en.wikipedia.org
Dapyx Software network: MP3 Explorer | Ebook Manager | Zenithic