Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

build change to require a C++ compiler is a no go.

One of the reasons to install gcc on a machine is the absence of a descent C++ compiler. 20 years ago, the C compiler of Sun was completely broken and we were happy to have gcc.



In my experience, a modern version of gcc is extremely difficult to bootstrap on anything but a fairly modern platform (e.g., I was having a hell of a time getting it going on HP-UX 11.23 with a ~2006 compiler). That's not a criticism of gcc. I'm only suggesting that if your platform lacks a modern (read: C++03-compliant) C++ compiler, you were probably already out of luck trying to get 4.7 bootstrapped.


Hmm if you statically link everything gcc needs would cross-compiling from another computer not feasible?


Feasible? Yes. I've cross-compiled GCC a few times in the past year or so.

But it sure as hell isn't pleasant. ;)


It's not 20 years ago.

Nowadays pretty much everyone has access to a Windows or Linux PC, or an OS X Mac, and so has ready access to good compilers. The way you'd handle that Sun nowadays is to build a cross compiler for Sun on your Windows or Linux PC or your Mac, and then use that to build the compiler for your Sun.


The default compilers are nowhere near as bad, but even then, if you're not running a binary gcc, you're just asking for trouble.

It's pretty hard to find a platform for which you can't find a pre-compiled gcc. This was not always the case.


You could still use the older GCC?

Sun's CC -> Old GCC -> New GCC


Converting the stage 1 bootstrapping compiler to C++ is a bad idea IMO. There any many embedded platforms without a C++ compiler (except perhaps downrev gcc).


I wonder if you have tried building gcc recently?

While it doesn't require a C++ compiler, in the last few years it has required an increasing list of fairly modern libraries. I don't think requiring a C++ compiler will make things that much harder.


Why are you bootstrapping on an embedded platform?


so cross compilation is the only option for these embedded platforms?


Don't you generally cross compile on embedded platforms anyway?


If you don't cross-compile, I would say it's not an embedded platform.


So bootstrap the build with gcc 4.7.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: