osxcross/wrapper
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
..
programs Fix building on CentOS 7.x 2020-07-12 16:36:52 +03:00
quirks/include/sys add a workaround for a glibc 2.20 bug 2014-09-11 00:58:44 +02:00
unittests Improve '-stdlib=libc++' error message when a too old SDK is used (closes #52) 2015-10-28 20:32:10 +01:00
build_wrapper.sh * Add xcodebuild stub tool. Only '-version' is supported. 2020-03-10 16:49:39 +01:00
compat.h new compiler wrapper written in C++ 2014-04-06 22:27:59 +02:00
main.cpp Revert "Check if the arguments have spaces in them and add back the quotes argv" 2017-05-30 13:53:15 -07:00
Makefile Fix building on CentOS 7.x 2020-07-12 16:36:52 +03:00
progs.h * Add xcodebuild stub tool. Only '-version' is supported. 2020-03-10 16:49:39 +01:00
target.cpp * Bump Version to 1.2 2020-03-22 13:04:53 +01:00
target.h Add -foc-intrinsic-path to let the use specify a custom location for 2017-05-17 14:24:45 -07:00
tools.cpp Fixes for #187 2019-06-24 13:02:34 +02:00
tools.h Fixes for #187 2019-06-24 13:02:34 +02:00
wrapper.project Add llvm-dsymutil build script + re-add 7e9f85 2015-08-31 21:02:38 +02:00
wrapper.workspace Various Cygwin fixes (#87, #88) 2016-09-22 18:58:45 +02:00