This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, Darwin] Make the darwin port a little more friendly to X and Native X cases


I found myself building a lot of X's and native X's recently - linux - > darwin; i686-darwin -> ppc-darwin ; i686-darwin9 -> x86_64-darwin10.

Amongst other issues (primarily wrong auto-host.h decisions) there is an issue that the target headers (and some GCC code) make use of __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ which does not get set (IMHO) sensibly for CROSS_DIRECTORY_STRUCTURE.

In fact, as things stand, darwin-driver.c pretty much ignores any attempt to control the value for that case.

---

So I did the following;
when CROSS_DIRECTORY_STRUCTURE is set - we pick a default for the osx- version-min that is set by the target header.
we also allow the user to override this with MACOSX_DEPLOYMENT_TARGET.


Attached is a tidied version (which is currently bootstrapping as a check) of the one I have been using.

WDYT?
ok for trunk (after a re-check)?

gcc:

*config/darwin-driver.c (darwin_find_version_from_kernel): New routine cut from...
... (darwin_default_min_version): amended to provide defaults for the cross
directory case. (darwin_driver_init): call darwin_default_min_version unconditionally.
* config/darwin.h (DEF_MIN_OSX_VERSION): New.
* config/darwin9.h: Likewise.
* config/darwin10.h: Likewise.
* config/rs6000/darwin7.h: Likewise.



Attachment: 178631-cross-build.txt
Description: Text document



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]