Commit Graph

93 Commits

Author SHA1 Message Date
Thomas Pöchtrager
1c23b94bad Support latest Xcode 2021-06-09 08:43:47 +02:00
Thomas Pöchtrager
4ec572e392 Add 'OSXCROSS_ENABLE_WERROR_IMPLICIT_FUNCTION_DECLARATION' env variable to emulate Xcode 12's behavior 2021-03-20 15:05:51 +01:00
Thomas Pöchtrager
4287300a5c Add support for 11.x SDKs (#251) 2020-12-25 09:30:44 +01:00
Thomas Pöchtrager
9d7f6c2461 More Android/Termux adjustments 2020-10-14 09:24:50 +02:00
Thomas Pöchtrager
2733413b68 Fix '-mmacosx-version-min=' for Clang 10.0.x. 2020-09-04 12:51:13 +02:00
Thomas Pöchtrager
29500b2093 Fix 'oa64e-clang' architecture (arm64 -> arm64e) 2020-09-03 08:55:00 +02:00
Thomas Pöchtrager
586bde6769 Clang 11 is actually able to parse '-mmacosx-version-min=11.x' 2020-08-27 13:53:23 +02:00
Thomas Pöchtrager
956a2ea676 * Add aarch64-* symlinks for arm64-*. Automake doesn't recognize arm64.
* Some cleanup
2020-08-20 18:46:13 +02:00
Thomas Pöchtrager
536dc13153 * Update README
* Update ChangeLog
* Mac OS X -> macOS
2020-08-17 19:19:47 +02:00
Thomas Pöchtrager
5489149683 More work on ARM target 2020-08-16 19:26:58 +02:00
Thomas Pöchtrager
261de10511 Support ARM target 2020-08-15 20:07:54 +02:00
Alexey Brodkin
1900351515 Fix building on CentOS 7.x
With C++14 the following error happens on CentOS 7.x:
==================================
$ clang++ -std=c++1y -Wall -Wextra -pedantic -Wno-missing-field-initializers \
          -I. -O2 -DOSXCROSS_VERSION="\"1.2\"" -DOSXCROSS_TARGET="\"darwin14\"" \
          -DOSXCROSS_OSX_VERSION_MIN="\"10.6\"" -DOSXCROSS_LINKER_VERSION="\"530\"" \
          -DOSXCROSS_LIBLTO_PATH="\"/usr/lib64/llvm\"" \
          -DOSXCROSS_BUILD_DIR="\"/osxcross/build\""  -isystem quirks/include \
          -c -o target.o target.cpp
In file included from target.cpp:24:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/ios_base.h:41:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/locale_classes.h:40:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/string:52:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/basic_string.h:2815:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/ext/string_conversions.h:43:
/usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/cstdio:120:11: error: no member named 'gets' in the global namespace
  using ::gets;
        ~~^
1 error generated.
==================================

That's a known issue with older C++ headers, see https://bugs.llvm.org/show_bug.cgi?id=30277

With C++11 we then get another problem:
==================================
$ clang++ -std=c++0x -Wall -Wextra -pedantic -Wno-missing-field-initializers \
          -I. -O2 -DOSXCROSS_VERSION="\"1.2\"" -DOSXCROSS_TARGET="\"darwin14\"" \
          -DOSXCROSS_OSX_VERSION_MIN="\"10.6\"" -DOSXCROSS_LINKER_VERSION="\"530\"" \
          -DOSXCROSS_LIBLTO_PATH="\"/usr/lib64/llvm\"" \
          -DOSXCROSS_BUILD_DIR="\"/osxcross/build\""  -isystem quirks/include \
          -c -o programs/osxcross-conf.o programs/osxcross-conf.cpp

programs/osxcross-conf.cpp:50:49: error: 'auto' not allowed in lambda parameter
  static auto print = [](const char *var, const auto &val) {
                                                ^~~~
programs/osxcross-conf.cpp:50:55: warning: unused parameter 'val' [-Wunused-parameter]
  static auto print = [](const char *var, const auto &val) {
                                                      ^
programs/osxcross-conf.cpp:54:3: error: no matching function for call to object of type '<lambda at programs/osxcross-conf.cpp:50:23>'
  print("VERSION", getOSXCrossVersion());
==================================

That last issue requires a move from a lambda to more ugly
template solution. But in the end we get all built!
2020-07-12 16:36:52 +03:00
Thomas Pöchtrager
42afa17368 xcrun: Update tool list 2020-03-25 19:34:55 +01:00
Thomas Pöchtrager
6ebffaacb6 Add back patch levevl to 'xcodebuild -version' 2020-03-25 19:34:09 +01:00
Thomas Pöchtrager
748108aec4 * Bump Version to 1.2
* Drop support for <= 10.5 SDKs (use osxcross-1.1 branch instead)
* Adjustments for ld64 512.4
2020-03-22 13:04:53 +01:00
Thomas Pöchtrager
21241087bd Update cctools to 949.0.1 and ld64 to 512.4 2020-03-20 16:29:20 +01:00
Thomas Pöchtrager
6edf1ca936 * Add xcodebuild stub tool. Only '-version' is supported.
* build_compiler_rt.sh: Change git repository. The llvm.org one is no longer synced.
* build_compiler_rt.sh: Add check for os/lock.h.
* xcrun: "Support" -show-sdk-platform-path.
* sw_vers: Output 0CFFFF for Build Version.
2020-03-10 16:49:39 +01:00
Thomas Pöchtrager
952985fee3 wrapper: Get rid of __builtin_readcyclecounter()
Crashes on some ARM machines
2020-03-04 18:21:28 +01:00
Thomas Pöchtrager
98149255fe wrapper:
* Add missing symlink
* Don't build with -g if OCDEBUG=1 isn't given
2019-11-04 20:32:05 +01:00
Thomas Pöchtrager
2f504fe4ba * Update cctools to 927.0.2 and ld64 to 450.3
* Added back support for OpenBSD
* Some cleanup and various fixes
2019-11-02 13:26:21 +01:00
Thomas Pöchtrager
379f7648c3 Make TARGET_DIR configurable (#108, #137, #201) 2019-10-23 16:06:00 +02:00
Erik Johansson
cf5aa6c5f1 Use TARGET_DIR instead of hardcoding ../target
To make the build work when TARGET_DIR has been changed in tools.sh.
2019-10-23 10:56:08 +02:00
Thomas Pöchtrager
0713de13d6 Fix for #200 2019-10-22 12:42:16 +02:00
Thomas Pöchtrager
5819953299 Wrapper: Only create a dsymutil symlink if dsymutil is not in PATH 2019-10-20 20:15:16 +02:00
Thomas Pöchtrager
16efae8992 Fixes for #187 2019-06-24 13:02:34 +02:00
Thomas Pöchtrager
24d48e7689 Wrapper: Fix 'x86_64h' target 2019-06-02 12:04:34 +02:00
Thomas Pöchtrager
68bdbd9452 New:
* Added support for TAPIv3 stubs (including "zippering" target)
* Added support for MacOSX SDKs up to 10.14
* Added new SDK packaging script for SDKs that end with ".xip" (tools/gen_sdk_package_pbzx.sh <xcode.xip>) (tested up to Xcode 10.2.1)
* Updated cctools to 921 and ld64 to 409.12

Fixed:
* Implemented fix for https://github.com/tpoechtrager/osxcross/issues/171
* Implemented fix for https://github.com/tpoechtrager/osxcross/issues/178
* Implemented fix for https://github.com/tpoechtrager/osxcross/issues/182

Changed:
* cctools, ld64, apple-libtapi and xar are now "git clone"'d and no longer come with OSXCross.

Removed:
* Support for Cygwin and *BSD (besides FreeBSD)
* Support for building OSXCross with GCC
2019-06-01 19:57:44 +02:00
Thomas Pöchtrager
fe68e8b457 Fix for #135 2017-10-24 21:59:53 +02:00
Pedro Navarro
5ea5ea0e46 Revert "Check if the arguments have spaces in them and add back the quotes argv"
This reverts commit cb8e8a4579.
2017-05-30 13:53:15 -07:00
Pedro Navarro
cb8e8a4579 Check if the arguments have spaces in them and add back the quotes argv
parsing removes. This fixes issues with the MT flag among others.
-MT "stubdata.d stubdata.o stubdata.ao"
2017-05-18 12:59:20 -07:00
Pedro Navarro
1ef9def644 Add -foc-intrinsic-path to let the use specify a custom location for
clang's intrinsic headers. This path is relative to clang's binary dir
(which can be set with -foc-compiler-path)
2017-05-17 14:24:45 -07:00
Pedro Navarro
773af0e75c Added the command line switch -foc-compiler-path to allow for setting
the compiler's path without having to look at PATH environment variable
2017-05-09 15:19:47 -07:00
Mateusz Juda
ffdde7f49b Syntax error
Fix error: line 96: [: missing `]'
2016-11-10 10:04:39 +01:00
Thomas Pöchtrager
98a7b55070 Cygwin: Avoid symlinks and append .exe to executables (#91) 2016-10-29 19:26:05 +02:00
Thomas Pöchtrager
233b1d8860 Various Cygwin fixes (#87, #88) 2016-09-22 18:58:45 +02:00
Thomas Pöchtrager
ec95acda33 Wrapper: Remove unneeded '-fcolor-diagnostics'
There is something wrong with the pre-built binaries from llvm.org.
Colored warnings still work properly when building Clang/LLVM from source.
2016-03-29 20:20:11 +02:00
Thomas Pöchtrager
e3e3cfb83e Misc pkg-config adjustments (closes #69) 2016-03-29 20:16:54 +02:00
Thomas Pöchtrager
f51b758db4 Clang 3.8 adjustments
... and while I am already there also update the copyright years
2016-02-27 09:40:10 +01:00
Thomas Pöchtrager
a845375e02 Wrapper: Remove '-march=native' to hopefully fix #54 2015-11-02 19:12:46 +01:00
Thomas Pöchtrager
0ba6a543dd Misc wrapper changes:
* Cleanup
* xcrun: Add bitcode_strip to known Xcode tools
2015-10-28 21:15:54 +01:00
Thomas Pöchtrager
989c7f3b5f Improve '-stdlib=libc++' error message when a too old SDK is used (closes #52)
This just required to move some code around.
The appropriate error message was already there.

Before:

osxcross: error: targeted OS X version must be <= 10.6.0 (SDK)

After:

osxcross: error: libc++ requires Mac OS X SDK 10.7 (or later)
2015-10-28 20:32:10 +01:00
Thomas Pöchtrager
68cca0de16 Wrapper: Avoid some string operations 2015-10-28 20:24:52 +01:00
Thomas Pöchtrager
6aa6f7941b Implement #41 (wrapper part) 2015-10-04 21:12:01 +02:00
Thomas Pöchtrager
24753b8178 Cleanup: Remove the native Windows bits.
There will be no *native* Windows port of OSXCross anyway.
This does not affect Cygwin.
2015-10-04 18:02:07 +02:00
Thomas Pöchtrager
118d72e594 Implement workarounds for vanilla llvm-dsymutil compatibility 2015-09-24 21:10:34 +02:00
Thomas Pöchtrager
08414886fb Add llvm-dsymutil build script + re-add 7e9f85
This finally makes proper debugging possible
2015-08-31 21:02:38 +02:00
Thomas Pöchtrager
749d0b14c9 Do not create x86_64h '-gstdc++' symlinks
There is no x86_64h slice in GCC's libstdc++.
2015-08-29 13:23:52 +02:00
Thomas Pöchtrager
8d6d9e9444 Fix GCH/PCH test case 2015-08-29 12:56:40 +02:00
Thomas Pöchtrager
bae2a4ad82 Better PCH/GCH detection 2015-08-23 22:45:53 +02:00
Thomas Pöchtrager
5afdf2b471 Wrapper changes:
* Support for generating fat object files with gcc and '-foc-use-gcc-libstdc++'
  has been removed.

  This feature was not 100% correctly implemented; using multiple source files
  did not work, i.e.: 'o32-g++ -m32 -m64 a.cpp b.cpp' would have failed;
  And I refuse to implement that, instead I am removing all source file handling
  from the wrapper with this commit for simplicity.

  This feature should be implemented in the gcc driver instead.

  This does NOT affect clang's fat object file support, which is implemented in
  clang's darwin driver.

* '-oc-use-gcc-lib' has been renamed to '-foc-use-gcc-libstdc++'.

* Added support for '-stdc++' and '-gstdc++' compiler "shortcuts"

  o32-clang++ --> uses libstdc++ for <= 10.8 and libc++ for >= 10.9

  o32-clang++-libc++ --> uses the SDK's libc++
  o32-clang++-stdc++ --> uses the SDK's libstdc++
  o32-clang++-gstdc++ --> uses gcc's (build_gcc.sh) libstdc++

* Entirely rewrote the command line parser; the previous one wasn't very
  readable.

* Minor Readme Updates

* Added unit tests

* Removed OSXCROSS_C_STANDARD / OSXCROSS_CXX_STANDARD support

  I am no longer parsing -std=, so this feature has to be dropped.
  Setting the language standard via an env variable isn't a good idea anyway.

* Removed unneeded stuff

Other Changes:

* Version bump to 0.11
2015-08-22 23:15:27 +02:00