Thanks to all who helped. Next is an attempt on GCC and then I guess I will drop this porting business for sometime and concentrate on my Os.
porting of binutils is over. porting of gcc is about to begin
Porting Binutils: On the way to self hosting
Re: Porting Binutils: On the way to self hosting
Even the smallest person could change the course of the future - Lord Of The Rings.
In the end all that matters is what you have done - Alexander.
Even after a decade oh god those still gives me the shivers.
In the end all that matters is what you have done - Alexander.
Even after a decade oh god those still gives me the shivers.
Re: Porting Binutils: On the way to self hosting
Virtually all Linux distributions employ customized / patched versions of common tools like binutils / GCC. One of the reasons (for me, at least) to use a cross-compiler even under Linux - I don't want to end up having relied on something distro-specific and being caught unaware by some system update. (The sources for the Cygwin binutils / GCC, for example, don't even compile when following our tutorial.)HardCoder wrote:The output is different from ld "-v" on my ubuntu
GNU ld (GNU Binutils for Ubuntu) 2.21.0.20110327
Congratulations on going self-hosted. I believe it's the most important step in the history of any hobbyist OS - being capable to compile itself.
Some commercial operating systems weren't...
Every good solution is obvious once you've found it.
Re: Porting Binutils: On the way to self hosting
@Solar
Thanks man.
And finally I got my wish. SUCCESSFULLY PORTED GCC.
For anyone who wishes to port GCC, you must have to implement these functions apart from newlib essentials and binutils-essentials(see earlier post)
And also have to modify the newlib <sys/dirent.h>
I feel very self-hosted.
Thanks man.
And finally I got my wish. SUCCESSFULLY PORTED GCC.
For anyone who wishes to port GCC, you must have to implement these functions apart from newlib essentials and binutils-essentials(see earlier post)
Code: Select all
mkdir
pipe
dup2
alarm
execvp
closedir
opendir
readdir
chdir
execv
Code: Select all
/* <dirent.h> includes <sys/dirent.h>, which is this file. On a
system which supports <dirent.h>, this file is overridden by
dirent.h in the libc/sys/.../sys directory. On a system which does
not support <dirent.h>, we will get this file which uses #error to force
an error. */
// as per unix dirstreams.h
struct __dirstream {
int fd;
};
typedef struct __dirstream DIR;
struct dirent {
ino_t d_ino ;// file serial number
char d_name[512];// name of entry
};
#ifdef __cplusplus
extern "C" {
#endif
int closedir(DIR *);
DIR *opendir(const char *);
struct dirent *readdir(DIR *);
int readdir_r(DIR *, struct dirent *, struct dirent **);
void rewinddir(DIR *);
void seekdir(DIR *, long int);
long int telldir(DIR *);
#ifdef __cplusplus
}
#endif
I feel very self-hosted.
Even the smallest person could change the course of the future - Lord Of The Rings.
In the end all that matters is what you have done - Alexander.
Even after a decade oh god those still gives me the shivers.
In the end all that matters is what you have done - Alexander.
Even after a decade oh god those still gives me the shivers.
Re: Porting Binutils: On the way to self hosting
That is cool, well done. I hope to be there by the middle of next year.
Next step is to run configure and make in your shell and build binutils, gcc and newlib natively.
Next step is to run configure and make in your shell and build binutils, gcc and newlib natively.
If a trainstation is where trains stop, what is a workstation ?
Re: Porting Binutils: On the way to self hosting
Thanks.gerryg400 wrote:That is cool, well done
Not anytime soon though.gerryg400 wrote: Next step is to run configure and make in your shell and build binutils, gcc and newlib natively.
Even the smallest person could change the course of the future - Lord Of The Rings.
In the end all that matters is what you have done - Alexander.
Even after a decade oh god those still gives me the shivers.
In the end all that matters is what you have done - Alexander.
Even after a decade oh god those still gives me the shivers.