compiling a compiler


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers compiling a compiler
# 8  
Old 11-03-2010
C/C++, that is if they use the same method, if not then C++
# 9  
Old 11-04-2010
Quote:
Now if I get an OS built on the Mach kernel to work how can I compile a compiler for it, because to me this is an impossible task to achieve.
The first thing you need when you get a new platform executive (kernel) running for a general purpose OS (assuming that is what you want) such as Solaris or HP-UX is a simple shell. Without a shell, there is not much you can do on the new platform. Once you have a simple shell running that can load and execute other binaries then you can port your compiler tool chain and core libraries onto the new platform in iterative steps. When your compiler tool chain is working and you have a reliable build environment, you port the remaining commands, utilities and libraries to the new platform.

You generally build such a shell on another platform using a cross-platform compiler and an instruction set simulator. For example, early porting work for IA64 platforms was done on 64-bit Windows NT workstations. Usually the chip vendor supplies the cross-compiler and instruction set simulator under NDA. In your case, the cross-platform compiler and instruction set simulator is unnecessary since you are not on a new hardware platform.

Unless you are going to completely reinvent the world, you should use one of the common programming models, i.e LP16, IPL32, LP64 etc. and execution formats, i.e. COFF, ELF, DWARF, etc. Makes porting much easier.
# 10  
Old 11-04-2010
oook but...how do i bootstrap a C++ compiler???
# 11  
Old 11-04-2010
Quote:
oook but...how do i bootstrap a C++ compiler???
That is too general and vague a question to give a specific response.

Which specific C++ compiler do you want to "bootstrap" onto what specific hardware platform under what specific programming model? What tools and utilities are currently available on the source and target platforms to assist with the "bootstrap"?

If you want a specific reply, please provide specific information. Otherwise you are only going to get vague non-specific replies. We are not mind readers.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Compiling libcdio-paranoia, gcc found - C compiler doesnt work

Heyas I'm currently trying to make a fresh build from scratch/source of FFMPEG. This said, it brings quite a tail with it, so the use of a script was very obvious. Anyway, i'm currently stuck at named package. Lets ignore the tarball/download line, as the error is after. Commands... (0 Replies)
Discussion started by: sea
0 Replies

2. UNIX for Dummies Questions & Answers

Compiling DigSig fails: Compiler/Makefile output

Hey, I'm trying to install DigSig ( disec.sourceforge.net ) on my CentOS5 distro. I was following all the steps in the readme but it didn't work. So here's the output: # ./digsig.init compile make: Entering directory `/usr/src/kernels/2.6.18-194.32.1.el5-i686' CC ... (2 Replies)
Discussion started by: disaster
2 Replies

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

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

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

6. UNIX for Advanced & Expert Users

re-compiling

I have a problem. How can I be sure that the binary currently in production is the binary originally produced by the compiler? I ask because recompiling the sources (ALL sources + stripping away the metadata: strip ...) does not give the same result. I am pretty sure that I wasn't hacked! ... (5 Replies)
Discussion started by: aViking
5 Replies

7. Programming

compiling

I am new to unix so please forgive ignorance. I am running openbsd-2.9 and need some help. All the software I run was added via the package system openbsd has. There have been times when I need an app. But it was not in the openbsd ports and or packages system. I usually just wait for it to show up... (1 Reply)
Discussion started by: Blunt_Killer
1 Replies

8. Programming

C compiling under C++ compiler

I want to compile a c-language source file ( *.c ) under C++ compiler in the UNIX workstation. Is that compatable? (2 Replies)
Discussion started by: nomen
2 Replies

9. Programming

C compiling

I recently loaded SuSE on my intel comp. I am presently taking a walk down memory lane from my days at UofT. I was fiddling round with cc and the gcc compilers. I wrote a basic basic basic program . I tried to compile it as I remember doing in Uni. The problem is that it can't find the header... (5 Replies)
Discussion started by: cantcatchme
5 Replies
Login or Register to Ask a Question