I suggest you run through the GCC Cross-Compiler tutorial againThe OSDev wiki wrote:Error: junk at end of line, first unrecognized character is ','
This, in combination with lots of other assembly-level error messages (like, Warning: .type pseudo-op used outside of .def/.endef ignored, or Error: unknown pseudo-op: '.local') results when you did not correctly set the --prefix=$PREFIX during the binutils configure.
porting BASH, GCC, and glibc
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
- AndrewAPrice
- Member
- Posts: 2309
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
I do.. but unless you want to implement the exact same underlying system as me (in terms of event management, exactly the same system calls), my precompiled library would be of no use.GLneo wrote:well, now I'm having trouble compiling newlib, does any one have a precompiled binary that i could just link with my OS's "gluecode"?
thx!
EDIT: It's really not that hard to port. I assume your OS has console functions? Well, you can start out by creating a blank system configuration (see Getting Ready on the Porting Newlib wiki page). The modify write(). If file==cout then have a system call for outputting a set-length string to the screen. Simple! Then work through each system call one by one and implement them.
My OS is Perception.
-
- Member
- Posts: 37
- Joined: Sun Aug 05, 2007 4:23 pm
You can try to search this forum for "newlib" or "newlib port". There are posts with someone's patches for binutils, gcc and newlib. You can take those and start from there. I did, and at least it gave me a direction where to move. It took me like 2-3 weeks to build it. It actually took me less, but I wanted to build it as shared lib, so it gave me more troubles.
Anyway, this weekend i finally did managed to port the bash with some hacks and linking to my brand new newlib. I've added linux like syscall interface to my OS, and made newlib call the dummy handlers for them. I also added a "not implemented" syscall, and put into all functions in newlib, that I needed to add for bash to compile. All I can say, is that first calls that bash makes are "open" and "close" to check for "/dev/tty". Unfortunately later bash segfaults when it calls _malloc_r... Probably due to uninitialized library.
Good luck with porting newlib. With some persistence you can do it.
Anyway, this weekend i finally did managed to port the bash with some hacks and linking to my brand new newlib. I've added linux like syscall interface to my OS, and made newlib call the dummy handlers for them. I also added a "not implemented" syscall, and put into all functions in newlib, that I needed to add for bash to compile. All I can say, is that first calls that bash makes are "open" and "close" to check for "/dev/tty". Unfortunately later bash segfaults when it calls _malloc_r... Probably due to uninitialized library.
Good luck with porting newlib. With some persistence you can do it.