Replacing xcode with macports software

廉价感情. 提交于 2019-12-04 21:32:56

If you really mean "everything in Xcode", it's not possible. However, if you're just talking about the command-line tools (which is more likely) it may be possible, but it sounds like a terrible idea. If you're not writing Mac or iOS applications, the Xcode application itself may not be of interest to you.

Clarifying what you're actually hoping to accomplish with the minimal set of tools you plan to end up with would help us provide a better answer. The fact that you mention arm-bintools leads me to guess you may be hoping to develop iOS apps — and I'll echo the warnings from the comments that you'd be asking for pain and not gaining anything appreciable. I understand wanting to reduce disk usage, but shelling out for a larger hard drive will be much less expensive than the extra time you'd spend just trying to do what Xcode does. (Not just the setup cost, but loss of productivity in daily usage.)

BTW, one reason that the gcc version in Xcode may lag behind the one in MacPorts is because Apple is extremely invested in replacing gcc with clang-llvm, which you'll find is vastly faster and under more active development.


Edit in response to OP:

Given the clarification that the intent is to only develop scientific computing code, there's another option. You still want to install Xcode to get all the command-line tools, but you may be able to get rid of Xcode and the other GUI apps you don't care to use.

When running the Xcode installer, pause on the Installation Type screen — check "UNIX Development" and uncheck everything else you can. This will install components into /System/Library and /usr. (You can see the full list of files by selecting File > Show Files within the installer and expanding the UNIX Development sub-package.) The Essentials package (which is a required install) will install into a location of your choosing (default is /Developer) which can be deleted after the install completes. The extra Mac-related stuff installed in /System/Library is small enough (an order of magnitutde smaller than the Essentials package) that I'd recommend just leaving /System alone altogether.

This should leave you with the Xcode-provided artifacts in /usr/bin, /usr/lib, /usr/include, /usr/share/man, etc. and allow you to build whatever custom tools you need. I recommend building them into /usr/local/* to keep them from conflicting with existing tools. Good luck!

You can't do this as macports needs Xcode.

There are some macports that use a macports gcc - but most use Apple tools.

One issue you may be running into is that OSX doesn't use ELF binaries, so elf-bintools is probably not helping much...

Another way would be to use Gentoo prefix as the port system. This tries to use only code from itself so you end up using less Apple code which seems to be what you want/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!