mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
Clang 3.8 adjustments
... and while I am already there also update the copyright years
This commit is contained in:
parent
2bbed19dfa
commit
f51b758db4
@ -56,8 +56,9 @@ case $CLANG_VERSION in
|
||||
3.5*) BRANCH=release_35 ;;
|
||||
3.6*) BRANCH=release_36 ;;
|
||||
3.7*) BRANCH=release_37 ;;
|
||||
3.8*) BRANCH=master ;;
|
||||
* ) echo "Unsupported Clang version, must be >= 3.2 and <= 3.8" 1>&2; exit 1;
|
||||
3.8*) BRANCH=release_38 ;;
|
||||
3.9*) BRANCH=master ;;
|
||||
* ) echo "Unsupported Clang version, must be >= 3.2 and <= 3.9" 1>&2; exit 1;
|
||||
esac
|
||||
|
||||
pushd $OSXCROSS_BUILD_DIR &>/dev/null
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
@ -183,6 +183,16 @@ bool runprog(Target &target, const char *, const char *progname, char **cargs) {
|
||||
(*prog)(args.size() - 1, args.data(), target);
|
||||
}
|
||||
|
||||
bool colordiagnostics(Target &target, const char *opt, const char *, char **) {
|
||||
target.colordiagnostics = !strcmp(opt, "-fcolor-diagnostics");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool liblto(Target &target, const char *opt, const char *, char **) {
|
||||
target.wliblto = !strcmp(opt, "-Wliblto");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool checkincludepath(Target &, const char *opt, const char *path, char **) {
|
||||
#ifndef __APPLE__
|
||||
constexpr const char *DangerousIncludePaths[] = { "/usr/include",
|
||||
@ -247,6 +257,10 @@ constexpr struct Opt {
|
||||
{"-x", language, true, true},
|
||||
{"-foc-use-gcc-libstdc++", usegcclibstdcxx},
|
||||
{"-foc-run-prog", runprog, true, false, "="}, // for internal use only
|
||||
{"-fcolor-diagnostics", colordiagnostics, false, true},
|
||||
{"-fno-color-diagnostics", colordiagnostics, false, true},
|
||||
{"-Wliblto", liblto, false, true},
|
||||
{"-Wno-liblto", liblto, false, true},
|
||||
{"-isystem", checkincludepath, true, true},
|
||||
{"-icxx-isystem", checkincludepath, true, true},
|
||||
{"-cxx-isystem", checkincludepath, true, true},
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
@ -43,7 +43,8 @@ namespace target {
|
||||
Target::Target()
|
||||
: vendor(getDefaultVendor()), SDK(getenv("OSXCROSS_SDKROOT")),
|
||||
arch(Arch::x86_64), target(getDefaultTarget()), stdlib(StdLib::unset),
|
||||
usegcclibs(), compiler(getDefaultCompilerIdentifier()),
|
||||
usegcclibs(), colordiagnostics(-1), wliblto(-1),
|
||||
compiler(getDefaultCompilerIdentifier()),
|
||||
compilername(getDefaultCompilerName()), language() {
|
||||
if (!getExecutablePath(execpath, sizeof(execpath)))
|
||||
abort();
|
||||
@ -785,6 +786,24 @@ bool Target::setup() {
|
||||
}
|
||||
}
|
||||
|
||||
if (clangversion >= ClangVersion(3, 8)) {
|
||||
//
|
||||
// Silence:
|
||||
// warning: libLTO.dylib relative to clang installed dir not found;
|
||||
// using 'ld' default search path instead
|
||||
//
|
||||
// '-flto' will of course work nevertheless, it's just a buggy
|
||||
// cross-compilation warning.
|
||||
//
|
||||
if (wliblto == -1)
|
||||
fargs.push_back("-Wno-liblto");
|
||||
//
|
||||
// Get back color diagnostics.
|
||||
//
|
||||
if (colordiagnostics == -1)
|
||||
fargs.push_back("-fcolor-diagnostics");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
} // namespace target
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
@ -138,6 +138,8 @@ struct Target {
|
||||
ClangVersion clangversion;
|
||||
GCCVersion gccversion;
|
||||
bool usegcclibs;
|
||||
int colordiagnostics;
|
||||
int wliblto;
|
||||
Compiler compiler;
|
||||
std::string compilerpath; // /usr/bin/clang | [...]/target/bin/*-gcc
|
||||
std::string compilername; // clang | gcc
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***********************************************************************
|
||||
* OSXCross Compiler Wrapper *
|
||||
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
||||
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
||||
* t.poechtrager@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
|
Loading…
Reference in New Issue
Block a user