Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIll not build on 10.7.3 #39

Open
GoogleCodeExporter opened this issue Mar 13, 2015 · 1 comment
Open

WIll not build on 10.7.3 #39

GoogleCodeExporter opened this issue Mar 13, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. download current SVN
2. copied installed vmlinuz... and initrd... files from /boot on configured 
Ubuntu 12.04 partition into build folder, named files vmlinuz and initrd.gz
3. Had to alter makefile as such:

else
  CC  := /usr/bin/gcc-4.0

became:

else
  CC  := /usr/bin/gcc


4. run make

What is the expected output? What do you see instead?

I expect to get a custom mach_kernel file, instead I see:

bash-3.2# sudo make
/usr/bin/gcc -c -arch i386 -static -nostdlib -DASSEMBLER -o start.o -c start.s
/usr/bin/gcc -c -arch i386 -static -nostdlib -o vsprintf.o -c vsprintf.c
/usr/bin/gcc -c -arch i386 -static -nostdlib -o console.o -c console.c
/usr/bin/gcc -c -arch i386 -static -nostdlib -o utils.o -c utils.c
/usr/bin/gcc -c -arch i386 -static -nostdlib -o elilo_code.o -c elilo_code.c
/usr/bin/gcc -c -arch i386 -static -nostdlib -o darwin_code.o -c darwin_code.c
/usr/bin/gcc -c -arch i386 -static -nostdlib -o linux_code.o -c linux_code.c
/usr/bin/gcc -c -arch i386 -static -nostdlib -o boot_loader.o -c boot_loader.c
/usr/bin/ld -classic_linker -arch i386 -o mach_kernel start.o vsprintf.o 
console.o utils.o elilo_code.o darwin_code.o linux_code.o boot_loader.o 
vmlinuz.obj initrd.obj \
    -static \
    -force_cpusubtype_ALL \
    -e __start \
    -segalign 0x1000 \
    -segaddr __TEXT 0x2000000 \
    -sectalign __TEXT __text 0x1000 \
    -sectalign __DATA __common 0x1000 \
    -sectalign __DATA __bss 0x1000 \
    -sectcreate __PRELINK __text /dev/null \
    -sectcreate __PRELINK __symtab /dev/null \
    -sectcreate __PRELINK __info /dev/null
ld: warning: using ld_classic
/usr/bin/ld_classic: Undefined symbols:
___stack_chk_fail
___stack_chk_guard
___bzero


What version of the product are you using? On what operating system?
Using latest SVN checkout on Mac OS X 10.7.3, 10.7.4

Please provide any additional information below.


Original issue reported on code.google.com by zjdrinkw...@gmail.com on 24 Jul 2012 at 6:09

@GoogleCodeExporter
Copy link
Author

Faced the same problem in 10.8. Guess it is due to lack of support for previous 
OS X versions (ATV is based on 10.4?) in latest Xcode.
I managed to build kernel in linux using this cross-compiler: 
http://biolpc22.york.ac.uk/pub/linux-mac-cross/ 

You have to put it into /opt and add include to gcc in Makefile:
  INC := /opt/mac/lib/gcc/i686-apple-darwin8/4.0.1/include
...
$(CC) -c -arch $(ARCH) -I$(INC) -static -nostdlib -o $@ -c $<

Original comment by dmi...@brigadirov.com on 14 Aug 2012 at 12:37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant