summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2015-02-04 17:33:20 +0000
committerFabian Groffen <grobian@gentoo.org>2015-02-04 17:33:20 +0000
commita52478a0f05ec454b679858ee11b3b75e8d7452b (patch)
tree4a12158523468d061e2ca92eff5f04e01232e672 /sys-devel/binutils-apple
parentAdd x11-misc/xkeyboard-config to dependencies, bug #538000. Remove old. (diff)
downloadgentoo-2-a52478a0f05ec454b679858ee11b3b75e8d7452b.tar.gz
gentoo-2-a52478a0f05ec454b679858ee11b3b75e8d7452b.tar.bz2
gentoo-2-a52478a0f05ec454b679858ee11b3b75e8d7452b.zip
Add patch to silence when LTO is in use by Michael Weiser, bug #538604
(Portage version: 2.2.14-prefix/cvs/SunOS i386, signed Manifest commit with key 0x5F75F607C5C74E89)
Diffstat (limited to 'sys-devel/binutils-apple')
-rw-r--r--sys-devel/binutils-apple/ChangeLog6
-rw-r--r--sys-devel/binutils-apple/binutils-apple-6.1.ebuild9
-rw-r--r--sys-devel/binutils-apple/files/ld64-241.9-lto-noremarks.patch107
3 files changed, 117 insertions, 5 deletions
diff --git a/sys-devel/binutils-apple/ChangeLog b/sys-devel/binutils-apple/ChangeLog
index d82222780fca..67d081350d14 100644
--- a/sys-devel/binutils-apple/ChangeLog
+++ b/sys-devel/binutils-apple/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-devel/binutils-apple
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-apple/ChangeLog,v 1.40 2015/02/04 02:55:23 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-apple/ChangeLog,v 1.41 2015/02/04 17:33:20 grobian Exp $
+
+ 04 Feb 2015; Fabian Groffen <grobian@gentoo.org>
+ +files/ld64-241.9-lto-noremarks.patch, binutils-apple-6.1.ebuild:
+ Add patch to silence when LTO is in use by Michael Weiser, bug #538604
04 Feb 2015; Patrick Lauer <patrick@gentoo.org> binutils-apple-4.2-r1.ebuild,
binutils-apple-4.3-r1.ebuild:
diff --git a/sys-devel/binutils-apple/binutils-apple-6.1.ebuild b/sys-devel/binutils-apple/binutils-apple-6.1.ebuild
index e29259999308..03dc1a91d4b9 100644
--- a/sys-devel/binutils-apple/binutils-apple-6.1.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-6.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-apple/binutils-apple-6.1.ebuild,v 1.2 2015/01/31 02:33:23 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-apple/binutils-apple-6.1.ebuild,v 1.3 2015/02/04 17:33:20 grobian Exp $
EAPI="3"
@@ -73,6 +73,7 @@ src_prepare() {
epatch "${FILESDIR}"/ld64-241.9-register-names.patch
epatch "${FILESDIR}"/ld64-241.9-get-comm-align.patch
epatch "${FILESDIR}"/ld64-241.9-cc_md5.patch
+ epatch "${FILESDIR}"/ld64-241.9-lto-noremarks.patch
# We used to use our own copy of lto.h, which doesn't require llvm
# build-env. Current versions of llvm provide
@@ -99,7 +100,7 @@ src_prepare() {
# mimic OS X Leopard-style Availability.h macros for libunwind.h on
# older systems
- [[ ${CHOST#*-darwin} -le 8 ]] && \
+ [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] && \
echo "#define __OSX_AVAILABLE_STARTING(x,y) " > include/Availability.h
local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
@@ -198,11 +199,11 @@ src_configure() {
append-cppflags -DNDEBUG
# Block API and thus snapshots supported on >= 10.6
- [ ${CHOST#*-darwin} -ge 10 ] && \
+ [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -ge 10 ]] && \
append-cppflags -DSUPPORT_SNAPSHOTS
CCTOOLS_OFLAG=
- if [ ${CHOST#*-darwin} -le 8 ] ; then
+ if [[ ${CHOST} == *darwin* && ${CHOST#*-darwin} -le 8 ]] ; then
# cctools expect to use UNIX03 struct member names.
# This is default on > 10.4. Activate it on <= 10.4 by defining
# __DARWIN_UNIX03 explicitly.
diff --git a/sys-devel/binutils-apple/files/ld64-241.9-lto-noremarks.patch b/sys-devel/binutils-apple/files/ld64-241.9-lto-noremarks.patch
new file mode 100644
index 000000000000..d4667ab63b8c
--- /dev/null
+++ b/sys-devel/binutils-apple/files/ld64-241.9-lto-noremarks.patch
@@ -0,0 +1,107 @@
+Shut up ld64 by default when using LTO.
+
+diff -ru ld64-241.9.orig/src/ld/Options.cpp ld64-241.9/src/ld/Options.cpp
+--- ld64-241.9.orig/src/ld/Options.cpp 2015-02-02 22:14:29.000000000 +0100
++++ ld64-241.9/src/ld/Options.cpp 2015-02-02 22:15:41.000000000 +0100
+@@ -183,6 +183,9 @@
+ fDebugInfoStripping(kDebugInfoMinimal), fTraceOutputFile(NULL),
+ fMacVersionMin(ld::macVersionUnset), fIOSVersionMin(ld::iOSVersionUnset),
+ fSaveTempFiles(false),
++#ifdef LTO
++ fVerboseLTORemarks(false),
++#endif
+ #ifdef SUPPORT_SNAPSHOTS
+ fSnapshotRequested(false),
+ #endif
+@@ -3138,6 +3141,11 @@
+ else if ( strcmp(arg, "-ignore_optimization_hints") == 0 ) {
+ fIgnoreOptimizationHints = true;
+ }
++#ifdef LTO
++ else if ( strcmp(arg, "-verbose_lto_remarks") == 0 ) {
++ fVerboseLTORemarks = true;
++ }
++#endif
+ else if ( strcmp(arg, "-no_dtrace_dof") == 0 ) {
+ fGenerateDtraceDOF = false;
+ }
+Only in ld64-241.9/src/ld: Options.cpp~
+diff -ru ld64-241.9.orig/src/ld/Options.h ld64-241.9/src/ld/Options.h
+--- ld64-241.9.orig/src/ld/Options.h 2015-02-02 22:14:29.000000000 +0100
++++ ld64-241.9/src/ld/Options.h 2015-02-02 22:16:36.000000000 +0100
+@@ -381,6 +381,9 @@
+ bool forceWeakNonWildCard(const char* symbolName) const;
+ bool forceNotWeakNonWildcard(const char* symbolName) const;
+ bool forceCoalesce(const char* symbolName) const;
++#ifdef LTO
++ bool verboseLTORemarks() const { return fVerboseLTORemarks; }
++#endif
+ #ifdef SUPPORT_SNAPSHOTS
+ Snapshot& snapshot() const { return fLinkSnapshot; }
+ #endif
+@@ -681,6 +684,9 @@
+ std::vector<SymbolsMove> fSymbolsMovesCode;
+ std::vector<SymbolsMove> fSymbolsMovesZeroFill;
+ bool fSaveTempFiles;
++#ifdef LTO
++ bool fVerboseLTORemarks;
++#endif
+ #ifdef SUPPORT_SNAPSHOTS
+ mutable Snapshot fLinkSnapshot;
+ bool fSnapshotRequested;
+Only in ld64-241.9/src/ld: Options.h~
+diff -ru ld64-241.9.orig/src/ld/Resolver.cpp ld64-241.9/src/ld/Resolver.cpp
+--- ld64-241.9.orig/src/ld/Resolver.cpp 2015-02-02 22:14:29.000000000 +0100
++++ ld64-241.9/src/ld/Resolver.cpp 2015-02-02 22:17:16.000000000 +0100
+@@ -1559,6 +1559,7 @@
+ optOpt.mcpu = _options.mcpuLTO();
+ optOpt.llvmOptions = &_options.llvmOptions();
+ optOpt.initialUndefines = &_options.initialUndefines();
++ optOpt.verboseLTORemarks = _options.verboseLTORemarks();
+
+ std::vector<const ld::Atom*> newAtoms;
+ std::vector<const char*> additionalUndefines;
+Only in ld64-241.9/src/ld: Resolver.cpp~
+diff -ru ld64-241.9.orig/src/ld/parsers/lto_file.cpp ld64-241.9/src/ld/parsers/lto_file.cpp
+--- ld64-241.9.orig/src/ld/parsers/lto_file.cpp 2015-02-02 22:14:29.000000000 +0100
++++ ld64-241.9/src/ld/parsers/lto_file.cpp 2015-02-02 22:18:27.000000000 +0100
+@@ -489,13 +489,17 @@
+
+
+ #if LTO_API_VERSION >= 7
+-void Parser::ltoDiagnosticHandler(lto_codegen_diagnostic_severity_t severity, const char* message, void*)
++void Parser::ltoDiagnosticHandler(lto_codegen_diagnostic_severity_t severity, const char* message, void* data)
+ {
+ switch ( severity ) {
+ #if LTO_API_VERSION >= 10
+ case LTO_DS_REMARK:
++ {
++ const OptimizeOptions* options = (const OptimizeOptions*)data;
++ if (options->verboseLTORemarks)
+ fprintf(stderr, "ld: LTO remark: %s\n", message);
+ break;
++ }
+ #endif
+ case LTO_DS_NOTE:
+ case LTO_DS_WARNING:
+@@ -530,7 +533,7 @@
+ // create optimizer and add each Reader
+ lto_code_gen_t generator = ::lto_codegen_create();
+ #if LTO_API_VERSION >= 7
+- lto_codegen_set_diagnostic_handler(generator, ltoDiagnosticHandler, NULL);
++ lto_codegen_set_diagnostic_handler(generator, ltoDiagnosticHandler, (void*)&options);
+ #endif
+
+ // <rdar://problem/12379604> The order that files are merged must match command line order
+Only in ld64-241.9/src/ld/parsers: lto_file.cpp~
+diff -ru ld64-241.9.orig/src/ld/parsers/lto_file.h ld64-241.9/src/ld/parsers/lto_file.h
+--- ld64-241.9.orig/src/ld/parsers/lto_file.h 2015-02-02 22:14:29.000000000 +0100
++++ ld64-241.9/src/ld/parsers/lto_file.h 2015-02-02 22:18:57.000000000 +0100
+@@ -61,6 +61,7 @@
+ const char* mcpu;
+ const std::vector<const char*>* llvmOptions;
+ const std::vector<const char*>* initialUndefines;
++ bool verboseLTORemarks;
+ };
+
+ extern bool optimize( const std::vector<const ld::Atom*>& allAtoms,