Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

MacOSX Support #105

Closed
wants to merge 0 commits into from
Closed

MacOSX Support #105

wants to merge 0 commits into from

Conversation

kangaroo
Copy link

@kangaroo kangaroo commented Feb 6, 2015

Alright, total brain dump pull request. I had some time and made mac work. Simple CLR programs run, more complicated stuff does not yet.

A few notable things:

  • binary commit of config.h sucks, but its there on linux too, and all your configure.in dependencies are missing
  • fixup precode is currently causing unaligned calls on OS X, haven't bothered looking into it yet
  • some of the assembly refactoring is ugly, not sure what direction you want to go on for the future
  • I nuked with abandon the old silverlight .bundle stuff
  • release build doesn't work on mac yet
  • linux builds work for me on ubuntu, haven't tested windows (buildbot be kind to me I hope)
  • your cmake files seem to be auto generated for linux, but you don't have the generation script, thus the 1000+ file change

I'm not sure how much time I'll have to do serious refactoring if required, but lets discuss. It might be preferable to squash this? In the worst case this is a kick off point for others who want to do bring-up.

@kangaroo
Copy link
Author

kangaroo commented Feb 6, 2015

Seems the CI linux fails on your builder. Any chance of getting a VERBOSE=1 build to figure out why?

@kangaroo
Copy link
Author

kangaroo commented Feb 6, 2015

Windows build is fixed. Your linux build can't seem to find ar based on one of my changes. I'm on 64-bit trusty. Can you please let me know what you're buildbot is verifying against?

@borgdylan
Copy link

Is enabling the build on 32 bit linux possible?

@sergiy-k
Copy link

sergiy-k commented Feb 6, 2015

@kangaroo This is awesome! Thank you so much for doing it! I’ll start reviewing it in the morning.

Regarding conig.h: the plan is to be able to generate it automatically. The one that we currently have in the source tree is a temporary thing that I created in almost automated way with some manual adjustments. :) I do have configure.in but it needs a number of fixes before I can check it in.

Once again, thank you for your contribution!

@sergiy-k
Copy link

sergiy-k commented Feb 6, 2015

@kangaroo ... and, by the way, about our lab verification. We are using Ubuntu 14.04 with llvm 3.5 and cmake 2.8.12 installed. Currently this is the only configuration that we are testing and supporting. Thank you.

endif(CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
endif(CLR_CMAKE_PLATFORM_LINUX)
if(CLR_CMAKE_PLATFORM_DARWIN)
add_definitions(-D_XOPEN_SOURCE)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think here also should be a message like detected darwin.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in 716ae46

@jkotas
Copy link
Member

jkotas commented Feb 6, 2015

Could you please submit the change in the 1000+ autogenerated test CMakeFiles as separate PR, so that the rest is easier to deal with.

@kangaroo
Copy link
Author

kangaroo commented Feb 6, 2015

@sergiy-k Hrmm.. my linux VM is the same, so I'm not sure why the link is failing to find ar.

@kangaroo
Copy link
Author

kangaroo commented Feb 6, 2015

@jkotas cherry-picked that out into #112

@kangaroo
Copy link
Author

kangaroo commented Feb 6, 2015

Linux build issue was a typo in the gen-buildsys-clang.sh. Running a test build now, and should be committing it shortly.

OS=`uname`

if [ $OS = "Linux" ]; then
NPROCS=`grep -c ^processor /proc/cpuinfo`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this has been already address in a slightly different way in #100

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge it back once thats merged to master.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#100 was merged to master. Could you please also squash the commits?

@kangaroo
Copy link
Author

kangaroo commented Feb 7, 2015

Grrr.. my rebase discarded my changes somehow. Going to need to redo that.

@kangaroo kangaroo mentioned this pull request Feb 7, 2015
@sergiy-k
Copy link

sergiy-k commented Feb 7, 2015

@kangaroo You mean you lost everything? I'm so sorry to hear that... :(

@kangaroo
Copy link
Author

kangaroo commented Feb 7, 2015

@sergiy-k no, I have a local copy branch, I just had to redo the rebase again. GitHub is horribly confused, but the PR is @ #117 now

@sergiy-k
Copy link

sergiy-k commented Feb 7, 2015

@kangaroo You scared me. Now I'm again in good mood. :)

@kangaroo
Copy link
Author

kangaroo commented Feb 7, 2015

@sergiy-k Always make a backup before messing around with rebasing and force pushing :)

@cnblogs-dudu
Copy link

Great! It works!

git clone -b osx --single-branch https://github.com/kangaroo/coreclr.git
./build.sh                                             

@kangaroo
Copy link
Author

kangaroo commented Feb 7, 2015

@cnblogs-dudu I can upload a corlib you can use when I get back from dinner of you like. Building it is a little onerous right now

@kangaroo
Copy link
Author

kangaroo commented Feb 7, 2015

Sample corlib available at:

https://www.dropbox.com/s/zvl5tsj6peh12km/mscorlib.dll?dl=0

@cnblogs-dudu
Copy link

@kangaroo
Thanks! Get it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants