How do I disable all libaries (including runtime)?
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: How do I disable all libaries (including runtime)?
http://en.wikipedia.org/wiki/Dunning%E2 ... ger_effect
Get a dual boot with Linux or install Linux in VM if it takes so long on your Cygwin.
Again, that is THE solution for using GCC for OSDev, generally.
Get a dual boot with Linux or install Linux in VM if it takes so long on your Cygwin.
Again, that is THE solution for using GCC for OSDev, generally.
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
Re: How do I disable all libaries (including runtime)?
"Some questions are logically nonsensical because the querent thinks they know more than they do. A lot of these have the form ‘How do I use X to accomplish Y?’ There's nothing wrong with this, except that sometimes X is a chocolate-covered banana and Y is the integration of European currency systems."SoulofDeity wrote:I stated in my first post that I wasn't going to build a GCC cross compiler, and politely asked that people not even suggest it.
Put down the chocolate-covered banana and step away from the European currency systems.
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: How do I disable all libaries (including runtime)?
Let's also note that you appear to be using cygwin, which is evil. (Not being mean to it, it does wonderous things, but it has to be evil to achieve them)
If compiling on windows, you WILL need a cross-compiler (which, due to the way windows works, WILL take a while to compile). I'd also suggest using MinGW and msys instead of cygwin, as they don't do UNIX emulation (but do present a unix-like filesystem) and are hence more efficient.
If compiling on windows, you WILL need a cross-compiler (which, due to the way windows works, WILL take a while to compile). I'd also suggest using MinGW and msys instead of cygwin, as they don't do UNIX emulation (but do present a unix-like filesystem) and are hence more efficient.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: How do I disable all libaries (including runtime)?
Third party input with regards to build times: On my quad-core i7, Cygwin building a GCC cross compiler takes close to four hours. Same processor, Ubuntu in VirtualBox, about half an hour. Same on Ubuntu on bare metal. About fourty-five minutes on my Core 2 Quad server, which is also spending a chunk of processor time running a Source dedicated server.
OP, build a cross compiler in an environment that isn't a bunch of hacks on top of each other. Your problems will be solved. Thank us later.
OP, build a cross compiler in an environment that isn't a bunch of hacks on top of each other. Your problems will be solved. Thank us later.
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: How do I disable all libaries (including runtime)?
Same processor, MinGW/msys, about 35mins, I'd expect.
Cygwin is @$$ slow, but it has to be
Cygwin is @$$ slow, but it has to be
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: How do I disable all libaries (including runtime)?
Building a GCC cross-compiler and cross-Binutils with MinGW is faster but it isn't that fast, unfortunately. It took me about 1:30 on a Core i7. I'd also like to report that I was able to build kernels with both MinGW and a native Linux port, using -ffreestanding. I'm not sure the same is possible with Cygwin, though.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: How do I disable all libaries (including runtime)?
It's quite impressive that building cross compiler on windows would take so long.
I just rebuild a gcc 4.6.3 (core, g++) on my mac with:
1. making a 512MB ram drive (few seconds)
2. unzip them (few seconds)
3. configure (few seconds)
4. time make -j 12 all-gcc, the result is:
I just rebuild a gcc 4.6.3 (core, g++) on my mac with:
1. making a 512MB ram drive (few seconds)
2. unzip them (few seconds)
3. configure (few seconds)
4. time make -j 12 all-gcc, the result is:
Code: Select all
real 1m11.918s
user 7m50.714s
sys 0m59.167s
Re: How do I disable all libaries (including runtime)?
You've got 12 cpus!?
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/
http://github.com/Jezze/fudge/
- xenos
- Member
- Posts: 1118
- Joined: Thu Aug 11, 2005 11:00 pm
- Libera.chat IRC: xenos1984
- Location: Tartu, Estonia
- Contact:
Re: How do I disable all libaries (including runtime)?
Usually when there is a new GCC version out, I build a new set of cross compilers and it takes me about half a day on Ubuntu 12.04. That is, building gcc core and C++ for i686, x86_64, arm, mips and m68k. All I need to do is fire up my automated build script in the morning (or in the evening and have it run at night).
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: How do I disable all libaries (including runtime)?
One usually set make's -j to 1.5 * logical cores of machine.Jezze wrote:You've got 12 cpus!?
At least I do so, others may have other ways to determine amount of make workers, dunno.
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
-
- Member
- Posts: 193
- Joined: Wed Jan 11, 2012 6:10 pm
Re: How do I disable all libaries (including runtime)?
I wasn't saying building a cross-compiler is wrong, I was just asking for an alternative solution.Hobbes wrote:"Some questions are logically nonsensical because the querent thinks they know more than they do. A lot of these have the form ‘How do I use X to accomplish Y?’ There's nothing wrong with this, except that sometimes X is a chocolate-covered banana and Y is the integration of European currency systems."SoulofDeity wrote:I stated in my first post that I wasn't going to build a GCC cross compiler, and politely asked that people not even suggest it.
Put down the chocolate-covered banana and step away from the European currency systems.
I know I'm a **** a lot when it comes to programming, and it's not that I think I'm high and mighty or anything, I just get pissed off at how ridiculously hard people make things. Most libraries are extremely messy, inflated, hard to port, error prone (both during the build stage and at run time), slow, and overall complicated to use.
Take for example libpng. There's a ton of different instructions for reading the file through filters, having to read signatures, allocating and struct and info pointers, etc. Why make it so complicated? Just make a function "png_readImage(void *buffer, int width, int height, int line)". Or for example the truetype library, why all the unnecessary functions? Just open the file (parsing the glyph information) and give them a "renderGlyph" function.
I'm probably gonna get spammed by standard junkies and people just calling me stupid...but honestly think there needs to be a new standard for everything. That's why I got into OS development.
/rant over
Re: How do I disable all libaries (including runtime)?
I'm not commenting on the code quality of libpng, I appreciate their effort, after all it's free.SoulofDeity wrote:Take for example libpng. There's a ton of different instructions for reading the file through filters, having to read signatures, allocating and struct and info pointers, etc. Why make it so complicated? Just make a function "png_readImage(void *buffer, int width, int height, int line)".
My opinion is when deal with 3rd party libraries, always abstract(ie. warp) it with an interface and work with that interface for the rest of your project. The side-effect is that no matter how messy or complicate the libraries is, you only need to directly use it once.
Take libpng as an example, I have a general image reader class looks like this, which looks pretty standard and used by most programmers:
Code: Select all
class PREFIX_PNGFile : public PREFIX_ImageFile {
public:
virtual void close();
virtual int load ( const char* file );
};
when dealing with android, things are stored inside ZIP file (apk file). So the resource loader need to take care of the file source (being standard file or within zip file).
In that case, thanks for the libpng functions are flexible and I can handle it with calls to png_set_read_fn(png_ptr, zfp, png_zip_read); and modify the above C++ class interface.
-
- Member
- Posts: 193
- Joined: Wed Jan 11, 2012 6:10 pm
Re: How do I disable all libaries (including runtime)?
bluemoon wrote:I'm not commenting on the code quality of libpng, I appreciate their effort, after all it's free.SoulofDeity wrote:Take for example libpng. There's a ton of different instructions for reading the file through filters, having to read signatures, allocating and struct and info pointers, etc. Why make it so complicated? Just make a function "png_readImage(void *buffer, int width, int height, int line)".
My opinion is when deal with 3rd party libraries, always abstract(ie. warp) it with an interface and work with that interface for the rest of your project. The side-effect is that no matter how messy or complicate the libraries is, you only need to directly use it once.
Take libpng as an example, I have a general image reader class looks like this, which looks pretty standard and used by most programmers:But do a single png_readImage(void *buffer, int width, int height, int line), or a single interface fits everyone? No.Code: Select all
class PREFIX_PNGFile : public PREFIX_ImageFile { public: virtual void close(); virtual int load ( const char* file ); };
when dealing with android, things are stored inside ZIP file (apk file). So the resource loader need to take care of the file source (being standard file or within zip file).
In that case, thanks for the libpng functions are flexible and I can handle it with calls to png_set_read_fn(png_ptr, zfp, png_zip_read); and modify the above C++ class interface.
There's obviously more instructions that would have to be implemented such as reading from a buffer, reading png's in layers for progressive scanning, writing pngs to a file or buffer, etc. However, filters are unnecessary, having to allocate and free several structures is a hassle, and the use of jump buffers for error handling is very unsafe. (in fact, it's one of the features that caused the PSP to be exploited)
Re: How do I disable all libaries (including runtime)?
Why would you want an alternative if a cross compiler is obviously the best solution? It is quite easy to build and it gets rid of all the stuff that you find so annoying. Of course it takes time to build, but you only build it once, and you lost a lot more time finding an alternative solution already.SoulofDeity wrote:I wasn't saying building a cross-compiler is wrong, I was just asking for an alternative solution.
Last edited by qw on Mon Nov 26, 2012 4:34 am, edited 1 time in total.
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: How do I disable all libaries (including runtime)?
I think that's because he is some kind of hipster, who cannot use standard solutions by design.
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations