Commit Graph

12 Commits

Author SHA1 Message Date
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
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
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
03e904d5f1 fix relocation issues 2015-08-21 23:32:37 +02:00
Thomas Pöchtrager
3e46f6cc32 add 'osxcross-man' - man page tool 2015-06-21 14:07:19 +02:00
Thomas Pöchtrager
9033b6b847 wrapper:
* improve and colorize warning/error/debug/info messages
* add include path warnings for /usr/include and /usr/local/include
other changes:
* bump version to 0.10
2015-05-02 21:49:23 +02:00
Thomas Pöchtrager
c375631ff4 update copyright years 2015-02-08 10:27:26 +01:00
Thomas Pöchtrager
8c0ca406b9 add OSXCROSS_GCC_NO_STATIC_RUNTIME option + cleanup 2014-12-24 09:54:27 +01:00
Thomas Pöchtrager
a8fdaa3ab2 add pkg-config wrapper 2014-09-27 19:45:49 +02:00
Thomas Pöchtrager
a34ce76854 misc fixes 2014-09-27 10:07:15 +02:00
Thomas Pöchtrager
413c33a5e9 split the wrapper into multiple files + some generic wrapper cleanups 2014-09-13 15:32:42 +02:00