[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/

2024-04-06 Thread Fabian Groffen
commit: 1e8c1aa5752b38209bb521578377cd2025773e62
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Apr  6 14:34:38 2024 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Apr  6 14:34:38 2024 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=1e8c1aa5

sys-devel/binutils-config: fix -rpath and -L  handling

A thinko broke skipping of arguments consisting of two entries,
resulting in very weird command lines.  Not noticed on Darwin because
for some odd reason.

Signed-off-by: Fabian Groffen  gentoo.org>

 ...1-r11.ebuild => binutils-config-5.1-r12.ebuild} |  0
 sys-devel/binutils-config/files/ldwrapper.c| 22 +++---
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r11.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r12.ebuild
similarity index 100%
rename from sys-devel/binutils-config/binutils-config-5.1-r11.ebuild
rename to sys-devel/binutils-config/binutils-config-5.1-r12.ebuild

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 22fbf9aba8..1aa96537d0 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -530,7 +530,7 @@ main(int argc, char *argv[])
char *path;
int pth;
char duplicate;
-   int before = j - 1;
+   int nexti = i;
 
/* arguments can be in many ways here:
 * -L
@@ -541,10 +541,11 @@ main(int argc, char *argv[])
while (*path != '\0' && isspace(*path))
path++;
if (*path == '\0') {
+   nexti++;
/* no more arguments?!? skip */
-   if (i + 1 >= argc)
+   if (nexti >= argc)
continue;
-   path = argv[i + 1];
+   path = argv[nexti];
while (*path != '\0' && isspace(*path))
path++;
}
@@ -570,7 +571,8 @@ main(int argc, char *argv[])
}
}
if (duplicate) {
-   j = before;
+   i = nexti;
+   j--;
continue;
}
/* record path */
@@ -584,7 +586,8 @@ main(int argc, char *argv[])
}
}
if (duplicate) {
-   j = before;
+   i = nexti;
+   j--;
continue;
}
/* record path */
@@ -597,8 +600,12 @@ main(int argc, char *argv[])
char *path;
int pth;
char duplicate;
+   int nexti = i + 1;
 
-   path = argv[i + 1];
+   /* no more arguments?!? skip */
+   if (nexti >= argc)
+   continue;
+   path = argv[nexti];
while (*path != '\0' && isspace(*path))
path++;
/* not absolute (or empty)?!? skip */
@@ -617,7 +624,8 @@ main(int argc, char *argv[])
}
}
if (duplicate) {
-   j -= 2;
+   j--;
+   i = nexti;
continue;
}
/* record path */



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/, sys-devel/binutils-config/files/

2024-04-04 Thread Fabian Groffen
commit: e3536efbe87342ead017157e0cc359dead73d9dd
Author: Fabian Groffen  gentoo  org>
AuthorDate: Thu Apr  4 20:27:06 2024 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Thu Apr  4 20:29:39 2024 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e3536efb

sys-devel/binutils-config: remove duplicate -L and -rpath entries

Ever since CLT15.3 duplicate -L or -rpath entries result in warnings.
These warnings, albeit just ugly, make that some packages croak or
worse: abort, claiming the linker is broken (such as Ruby).  This is
nonsense, but cater for this by removing any duplicate paths, and not
adding any paths that are already added.

Signed-off-by: Fabian Groffen  gentoo.org>

 ...1-r10.ebuild => binutils-config-5.1-r11.ebuild} |   0
 sys-devel/binutils-config/files/ldwrapper.c| 198 -
 2 files changed, 150 insertions(+), 48 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r10.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r11.ebuild
similarity index 100%
rename from sys-devel/binutils-config/binutils-config-5.1-r10.ebuild
rename to sys-devel/binutils-config/binutils-config-5.1-r11.ebuild

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index c799b4cdd9..22fbf9aba8 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -197,7 +197,10 @@ int
 main(int argc, char *argv[])
 {
int newargc = 0;
+   int rpathcnt = 0;
char **newargv = NULL;
+   char **rpaths = NULL;
+   char **lpaths = NULL;
char *wrapper = argv[0];
char *wrapperctarget = NULL;
char verbose = getenv("BINUTILS_CONFIG_VERBOSE") != NULL;
@@ -214,7 +217,6 @@ main(int argc, char *argv[])
size_t len;
int i;
int j;
-   int k;
DIR *dirp;
struct dirent *dp;
 
@@ -287,10 +289,12 @@ main(int argc, char *argv[])
/* walk over the arguments to see if there's anything interesting
 * for us and calculate the final number of arguments */
for (i = 1; i < argc; i++) {
-   /* -L: account space for the matching -R */
if (argv[i][0] == '-') {
+   /* -L: account space for the matching -R */
if (argv[i][1] == 'L')
newargc++;
+   if (argv[i][1] == 'R' || strcmp(argv[i], "-rpath") == 0)
+   rpathcnt++;
if (argv[i][1] == 'v' || argv[i][1] == 'V')
verbose = 1;
if ((strcmp(argv[i], "-macosx_version_min") == 0 ||
@@ -316,8 +320,6 @@ main(int argc, char *argv[])
darwin_dt_ver += (int)strtol(p + 1, , 10);
}
 
-   /* Note: Code below assumes that newargc is the count of -L arguments. 
*/
-
/* If a package being cross-compiled injects standard directories, it's
 * non-cross-compilable on any platform, prefix or no prefix. So no
 * need to add PREFIX- or CTARGET-aware libdirs. */
@@ -341,13 +343,15 @@ main(int argc, char *argv[])
 * -rpath and the path itself */
newargc *= 2;
 
-   /* and we will be adding two for the each of
-* the two system paths as well */
-   newargc += 4;
+   /* PREFIX rpaths */
+   newargc += 2 * 2;
}
 
-   /* add the 2 prefix paths (-L) and -search_paths_first 
*/
-   newargc += 2 + 1;
+   /* PREFIX paths */
+   newargc += 3;
+
+   /* add -search_paths_first */
+   newargc += 1;
 
/* add -syslibroot  -platform_version macos  
0.0 */
newargc += 6;
@@ -357,6 +361,27 @@ main(int argc, char *argv[])
}
}
 
+   /* Note: Code below assumes that newargc is the count of -L arguments. 
*/
+
+   /* allocate space for -L lookups/uniqueifying */
+   lpaths = malloc(sizeof(lpaths[0]) * (newargc + 1));
+   if (lpaths == NULL) {
+   fprintf(stderr, "%s: failed to allocate memory for new 
arguments\n",
+   wrapper);
+   exit(1);
+   }
+   lpaths[0] = NULL;
+
+   if (!is_darwin || darwin_use_rpath) {
+   rpaths = malloc(sizeof(rpaths[0]) * (rpathcnt + 1));
+   if (rpaths == NULL) {
+   fprintf(stderr, "%s: failed to allocate memory for new 
arguments\n",
+   wrapper);
+   exit(1);
+   }
+   rpaths[0] = NULL;
+   }
+
/* account the 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/, sys-devel/binutils-config/files/

2024-03-08 Thread Fabian Groffen
commit: 81985363c3e3d01321ab75291d7c8274dcab
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri Mar  8 16:03:27 2024 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri Mar  8 21:13:17 2024 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=81985363

sys-devel/binutils-config: revbump for CLT 15.3 ld fix

Possibly this problem existed longer before, but it's a bit shady when
what ld is used.

Signed-off-by: Fabian Groffen  gentoo.org>

 ...utils-config-5.1-r9.ebuild => binutils-config-5.1-r10.ebuild} | 0
 sys-devel/binutils-config/files/ldwrapper.c  | 9 ++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r9.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r10.ebuild
similarity index 100%
rename from sys-devel/binutils-config/binutils-config-5.1-r9.ebuild
rename to sys-devel/binutils-config/binutils-config-5.1-r10.ebuild

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 00d4a69f73..c799b4cdd9 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -405,8 +405,9 @@ main(int argc, char *argv[])
 * 14.2:   820.1
 * 14.3.1: 857.1
 * 15.0:   907   1022.1  Sanoma 23, platform_version iso 
sdk_version
+* 15.31053.12   called ld
 * all to be found from the PROJECT:ld64-650.9 or
-* PROJECT:dyld-1022.1 bit from the first line
+* PROJECT:dyld-1022.1 or PROJECT:ld-1053.12 bit from the first 
line
 * NOTE: e.g. my Sanoma mac with CommandLineTools has 650.9
 *   which is not a version from any Developer Tools ?!?
 * Currently we need to distinguish XCode 15 according to
@@ -423,11 +424,13 @@ main(int argc, char *argv[])
long  comp;
if (fgets(target, sizeof(target), ld64out) != 0 &&
((proj = strstr(target, "PROJECT:ld64-")) != 
NULL ||
-(proj = strstr(target, "PROJECT:dyld-")) != 
NULL))
+(proj = strstr(target, "PROJECT:dyld-")) != 
NULL ||
+(proj = strstr(target, "PROJECT:ld-")) != 
NULL))
{
/* we don't distinguish between ld64 and dyld 
here, for
 * now it seems the numbers line up for our 
logic */
-   proj += sizeof("PROJECT:ld64-") - 1;
+   proj += sizeof("PROJECT:ld") - 1;
+   proj += *proj == '-' ? 1 : 3;
comp  = strtol(proj, , 10);
/* we currently have no need to parse 
fractions, the
 * major version is significant enough, so just 
stop */



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/

2024-01-21 Thread Fabian Groffen
commit: 70384d5c6846998d8cb6bcc2ddfcf0830c13c6fa
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sun Jan 21 09:45:17 2024 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sun Jan 21 09:45:17 2024 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=70384d5c

sys-devel/binutils-config: more macOS linker tweaks

This time tested with native linkers on platforms which are seen during
stage2 bootstraps:

Darwin 23 with dyld-1022.1
Darwin 17 with ld64-409.12
Darwin  9 with ld64-85.2.1

Signed-off-by: Fabian Groffen  gentoo.org>

 ...5.1-r8.ebuild => binutils-config-5.1-r9.ebuild} |  0
 sys-devel/binutils-config/files/ldwrapper.c| 27 +-
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r8.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r9.ebuild
similarity index 100%
rename from sys-devel/binutils-config/binutils-config-5.1-r8.ebuild
rename to sys-devel/binutils-config/binutils-config-5.1-r9.ebuild

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index c9fe7e4bb3..00d4a69f73 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -392,18 +392,28 @@ main(int argc, char *argv[])
 
/* call the linker to figure out what options we can use :(
 * some Developer Tools ld64 versions:
-* 12.0:   609  Big Sur, requirement for sdk_version
+* Xcode   ld64   dyld
+* 3.1.1:  85.2.1Leopard 10.5, sdk_version unknown,
+* need macosx_version_min
+* 8.2.1:  274.2 xtools-2.2.4, sdk_version plus
+* macosx_version_min
+* 10.0:   409.12High Sierra 10.13 like above
+* 12.0:   609   Big Sur 11, sdk_version only
 * 13.0:   711
 * 13.3.1: 762
 * 14.0:   819.6
 * 14.2:   820.1
 * 14.3.1: 857.1
-* 15.0:   907  Sanoma, platform_version argument
-* all to be found from the PROJECT:ld64-650.9 bit from 1st line
+* 15.0:   907   1022.1  Sanoma 23, platform_version iso 
sdk_version
+* all to be found from the PROJECT:ld64-650.9 or
+* PROJECT:dyld-1022.1 bit from the first line
 * NOTE: e.g. my Sanoma mac with CommandLineTools has 650.9
 *   which is not a version from any Developer Tools ?!?
 * Currently we need to distinguish XCode 15 according to
 * bug #910277, so we look for 907 and old targets before 12 */
+#define LD64_3_18500
+#define LD64_8_2   27400
+#define LD64_10_0  40900
 #define LD64_12_0  60900
 #define LD64_15_0  90700
snprintf(target, sizeof(target), "%s -v 2>&1", ld);
@@ -412,8 +422,11 @@ main(int argc, char *argv[])
char *proj;
long  comp;
if (fgets(target, sizeof(target), ld64out) != 0 &&
-   (proj = strstr(target, "PROJECT:ld64-")) != 
NULL)
+   ((proj = strstr(target, "PROJECT:ld64-")) != 
NULL ||
+(proj = strstr(target, "PROJECT:dyld-")) != 
NULL))
{
+   /* we don't distinguish between ld64 and dyld 
here, for
+* now it seems the numbers line up for our 
logic */
proj += sizeof("PROJECT:ld64-") - 1;
comp  = strtol(proj, , 10);
/* we currently have no need to parse 
fractions, the
@@ -446,10 +459,12 @@ main(int argc, char *argv[])
newargv[j++] = "macos";
newargv[j++] = darwin_dt;
newargv[j++] = "0.0";
-   } else if (ld64ver >= LD64_12_0) {
+   } else if (ld64ver >= LD64_8_2) {
newargv[j++] = "-sdk_version";
newargv[j++] = darwin_dt;
-   } else {
+   }
+
+   if (ld64ver < LD64_12_0) {
newargv[j++] = "-macosx_version_min";
newargv[j++] = darwin_dt;
}



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/, sys-devel/binutils-config/files/

2024-01-20 Thread Fabian Groffen
commit: eed086f02edce039c035459b92ac606175e8f888
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Jan 20 20:04:47 2024 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Jan 20 20:04:47 2024 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=eed086f0

sys-devel/binutils-config: determine linker behaviour dynamically on Darwin

Whether or not we need to use a syslibroot, platform version or whatnot
depends on the platform and linker being in use.  Since the linker version can
differ from the macOS version, don't assume they are the same.

On Darwin, call the linker to establish its version prior to
constructing the final linker call arguments.  This is unfortunate, but
the only way it can somewhat reliably work with multiple linker versions
(as available from binutils-config) updating targets, and different
macOS versions.

Tested on:
Darwin  9, PPC, xtools-2.2.4 ld64-274.2
Darwin 17, X64, xtools-2.2.4 ld64-274.2
Darwin 23, X64, xtools-2.2.4 ld64-274.2
Darwin 23, M1,  native-5 ld64-650.9

Signed-off-by: Fabian Groffen  gentoo.org>

 ...5.1-r7.ebuild => binutils-config-5.1-r8.ebuild} |  9 +-
 sys-devel/binutils-config/files/ldwrapper.c| 97 +++---
 2 files changed, 68 insertions(+), 38 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r7.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r8.ebuild
similarity index 86%
rename from sys-devel/binutils-config/binutils-config-5.1-r7.ebuild
rename to sys-devel/binutils-config/binutils-config-5.1-r8.ebuild
index a26ff944b0..38f82d40b5 100644
--- a/sys-devel/binutils-config/binutils-config-5.1-r7.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5.1-r8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -39,12 +39,8 @@ src_configure() {
 src_compile() {
use prefix-guest || return
local extraargs=( )
-   if [[ ${CHOST} == *-darwin* && ${CHOST##*-darwin} -ge 20 ]] ; then
-   # macOS Big Sur has an empty /usr/lib, so the linker really has
-   # to look into the SDK, for which it needs to be told where it
-   # is (symlinked right into our EPREFIX root as MacOSX.sdk)
+   if [[ ${CHOST} == *-darwin* ]] ; then
extraargs+=(
-   -DDARWIN_LD_SYSLIBROOT=1

-DDARWIN_LD_DEFAULT_TARGET='"'${MACOSX_DEPLOYMENT_TARGET}'"'
)
fi
@@ -52,6 +48,7 @@ src_compile() {
$(tc-getCC)
${CPPFLAGS}
${CFLAGS}
+   -Wall
-o ldwrapper ${PN}-ldwrapper-${WRAPPER_REV}.c
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index df29b04c96..c9fe7e4bb3 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2023 Gentoo Authors
+ * Copyright 1999-2024 Gentoo Authors
  * Distributed under the terms of the GNU General Public License v2
  * Authors: Fabian Groffen 
  *  Michael Haubenwallner 
@@ -18,7 +18,7 @@
 
 /**
  * ldwrapper: Prefix helper to inject -L and -R flags to the invocation
- * of ld.
+ * of ld, and many more necessary linker flags/tweaks.
  *
  * On Darwin it adds -search_paths_first to make sure the given paths are
  * searched before the default search path, and sets -syslibroot
@@ -50,7 +50,6 @@ find_real_ld(char **ld, size_t ldlen, const char verbose, 
const char is_cross,
FILE *f = NULL;
char *ldoverride;
char *path;
-   char *ret;
struct stat lde;
char config[ESIZ];
size_t len;
@@ -203,12 +202,11 @@ main(int argc, char *argv[])
char *wrapperctarget = NULL;
char verbose = getenv("BINUTILS_CONFIG_VERBOSE") != NULL;
char *builddir = getenv("PORTAGE_BUILDDIR");
-   char ldbuf[ESIZ];
+   char ldbuf[ESIZ * 2];
char *ld = ldbuf;
char ctarget[128];
char *darwin_dt = getenv("MACOSX_DEPLOYMENT_TARGET");
int darwin_dt_ver = 0;
-   int darwin_ld_trg_ver = 0;
char is_cross = 0;
char is_darwin = 0;
char darwin_use_rpath = 1;
@@ -223,9 +221,6 @@ main(int argc, char *argv[])
 #ifdef DARWIN_LD_DEFAULT_TARGET
if (darwin_dt == NULL)
darwin_dt = DARWIN_LD_DEFAULT_TARGET;
-   darwin_ld_trg_ver = (int)strtol(DARWIN_LD_DEFAULT_TARGET, , 10) * 100;
-   if (*p == '.')
-   darwin_ld_trg_ver += (int)strtol(p + 1, , 10);
 #endif
 
/* two ways to determine CTARGET from argv[0]:
@@ -327,8 +322,6 @@ main(int argc, char *argv[])
 * non-cross-compilable on any platform, prefix or no prefix. So no
 * need to add PREFIX- or CTARGET-aware 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2024-01-13 Thread Fabian Groffen
commit: fbcb941fc6fe8c31ceb219dc56127e62906ae520
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Jan 13 14:22:50 2024 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Jan 13 14:22:50 2024 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=fbcb941f

sys-devel/binutils-config: make ld arguments depending on OS release

This is somewhat shady, because we'd need the target ld's version, but
it's better to use the current platform version rather than the
requested platform version since the latter has nothing to do with which
linker is being used.

Not bumping the version, since existing installs don't have this issue,
and only new installs on Sanoma suffer from this, which never managed to
succeed, so basically don't exist yet.

Bug: https://bugs.gentoo.org/916291
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils-config/files/ldwrapper.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index a1639ca5aa..df29b04c96 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -208,6 +208,7 @@ main(int argc, char *argv[])
char ctarget[128];
char *darwin_dt = getenv("MACOSX_DEPLOYMENT_TARGET");
int darwin_dt_ver = 0;
+   int darwin_ld_trg_ver = 0;
char is_cross = 0;
char is_darwin = 0;
char darwin_use_rpath = 1;
@@ -222,6 +223,9 @@ main(int argc, char *argv[])
 #ifdef DARWIN_LD_DEFAULT_TARGET
if (darwin_dt == NULL)
darwin_dt = DARWIN_LD_DEFAULT_TARGET;
+   darwin_ld_trg_ver = (int)strtol(DARWIN_LD_DEFAULT_TARGET, , 10) * 100;
+   if (*p == '.')
+   darwin_ld_trg_ver += (int)strtol(p + 1, , 10);
 #endif
 
/* two ways to determine CTARGET from argv[0]:
@@ -403,7 +407,7 @@ main(int argc, char *argv[])
 #ifdef DARWIN_LD_SYSLIBROOT
/* bug #910277: transform into platform_version arg for newer
 * targets */
-   if (darwin_dt_ver >= 1200) {
+   if (darwin_ld_trg_ver >= 1200) {
newargv[j++] = "-platform_version";
newargv[j++] = "macos";
newargv[j++] = darwin_dt;



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/, sys-devel/binutils-config/files/

2023-12-16 Thread Fabian Groffen
commit: 55996b02c62a3f77b97ad2d3e0a0bb5a4604263f
Author: Ryan Qian  bitbili  net>
AuthorDate: Sat Dec 16 08:18:10 2023 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Dec 16 08:18:10 2023 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=55996b02

sys-devel/binutils-config-5.1-r7: fix argument suppression logic for macOS

Signed-off-by: Fabian Groffen  gentoo.org>

 .../{binutils-config-5.1-r6.ebuild => binutils-config-5.1-r7.ebuild}  | 0
 sys-devel/binutils-config/files/ldwrapper.c   | 4 +++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r6.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r7.ebuild
similarity index 100%
rename from sys-devel/binutils-config/binutils-config-5.1-r6.ebuild
rename to sys-devel/binutils-config/binutils-config-5.1-r7.ebuild

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 16932af5d6..a1639ca5aa 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2021 Gentoo Authors
+ * Copyright 1999-2023 Gentoo Authors
  * Distributed under the terms of the GNU General Public License v2
  * Authors: Fabian Groffen 
  *  Michael Haubenwallner 
@@ -430,6 +430,7 @@ main(int argc, char *argv[])
{
i++;
j--;
+   k -= 2;
continue;
}
if (strcmp(argv[i], "-platform_version") == 0 &&
@@ -437,6 +438,7 @@ main(int argc, char *argv[])
{
i += 3;
j--;
+   k -= 4;
continue;
}
}



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2023-09-26 Thread Fabian Groffen
commit: 753907f35f78864cf66a7bc084b32eb56b31684d
Author: Fabian Groffen  gentoo  org>
AuthorDate: Tue Sep 26 19:30:33 2023 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Tue Sep 26 19:35:52 2023 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=753907f3

sys-apps/binutils-config: fix ldwrapper for CLT 15

Because -platform_version is actually supported since a while, and we
don't really support older versions (except Darwin 17 and 9 which use
way different versions), just switch to using platform_version when the
target is macos 12 or up.

Closes: https://bugs.gentoo.org/910277
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils-config/files/ldwrapper.c | 60 -
 1 file changed, 50 insertions(+), 10 deletions(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 1b5fa19ad3..16932af5d6 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -207,6 +207,7 @@ main(int argc, char *argv[])
char *ld = ldbuf;
char ctarget[128];
char *darwin_dt = getenv("MACOSX_DEPLOYMENT_TARGET");
+   int darwin_dt_ver = 0;
char is_cross = 0;
char is_darwin = 0;
char darwin_use_rpath = 1;
@@ -293,8 +294,12 @@ main(int argc, char *argv[])
newargc++;
if (argv[i][1] == 'v' || argv[i][1] == 'V')
verbose = 1;
-   if (strcmp(argv[i], "-macosx_version_min") == 0 && i < 
argc - 1)
+   if ((strcmp(argv[i], "-macosx_version_min") == 0 ||
+strcmp(argv[i], "-macos_version_min") == 0) && 
i < argc - 1)
darwin_dt = argv[i + 1];
+   if (strcmp(argv[i], "-platform_version") == 0 &&
+   i < argc - 3 && strcmp(argv[i + 1], "macos") == 
0)
+   darwin_dt = argv[i + 2];
/* ld64 will refuse to accept -rpath if any of the
 * following options are given */
if (strcmp(argv[i], "-static") == 0 ||
@@ -306,6 +311,12 @@ main(int argc, char *argv[])
}
}
 
+   if (is_darwin && darwin_dt != NULL) {
+   darwin_dt_ver = (int)strtol(darwin_dt, , 10) * 100;
+   if (*p == '.')
+   darwin_dt_ver += (int)strtol(p + 1, , 10);
+   }
+
/* Note: Code below assumes that newargc is the count of -L arguments. 
*/
 
/* If a package being cross-compiled injects standard directories, it's
@@ -325,10 +336,7 @@ main(int argc, char *argv[])
 * parsing at dots. darwin_dt != NULL isn't
 * just for safety: ld64 also refuses -rpath
 * when not given a deployment target at all */
-   darwin_use_rpath = darwin_dt != NULL &&
-   (atoi(darwin_dt) > 10 ||
-(strncmp(darwin_dt, "10.", 3) == 0 &&
- atoi(darwin_dt + 3) >= 5));
+   darwin_use_rpath = darwin_dt_ver >= 1005;
}
 
if (darwin_use_rpath) {
@@ -345,8 +353,8 @@ main(int argc, char *argv[])
newargc += 2 + 1;
 
 #ifdef DARWIN_LD_SYSLIBROOT
-   /* add -syslibroot  -sdk_version  */
-   newargc += 4;
+   /* add -syslibroot  -platform_version macos  
0.0 */
+   newargc += 6;
 #endif
} else {
/* add the 4 paths we want (-L + -R) */
@@ -393,8 +401,17 @@ main(int argc, char *argv[])
 * version here, for the sdk link can be versionless when set to
 * CommandLineTools */
 #ifdef DARWIN_LD_SYSLIBROOT
-   newargv[j++] = "-sdk_version";
-   newargv[j++] = darwin_dt;
+   /* bug #910277: transform into platform_version arg for newer
+* targets */
+   if (darwin_dt_ver >= 1200) {
+   newargv[j++] = "-platform_version";
+   newargv[j++] = "macos";
+   newargv[j++] = darwin_dt;
+   newargv[j++] = "0.0";
+   } else {
+   newargv[j++] = "-sdk_version";
+   newargv[j++] = darwin_dt;
+   }
newargv[j++] = "-syslibroot";
newargv[j++] = EPREFIX "/MacOSX.sdk";
 #endif
@@ -405,6 +422,26 @@ main(int argc, char *argv[])
/* position k right after the original arguments */
k = j - 1 + argc;
for (i = 1; i < argc; i++, j++) {
+#ifdef DARWIN_LD_SYSLIBROOT
+   

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/

2023-09-26 Thread Fabian Groffen
commit: 39ebcce123b877180ea3d389fb9c8bb6ce977f4f
Author: Fabian Groffen  gentoo  org>
AuthorDate: Tue Sep 26 19:37:33 2023 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Tue Sep 26 19:37:33 2023 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=39ebcce1

sys-devel/binutils-config: revbump for CLT 15

Closes: https://bugs.gentoo.org/910277
Signed-off-by: Fabian Groffen  gentoo.org>

 .../{binutils-config-5.1-r5.ebuild => binutils-config-5.1-r6.ebuild} | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r5.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r6.ebuild
similarity index 97%
rename from sys-devel/binutils-config/binutils-config-5.1-r5.ebuild
rename to sys-devel/binutils-config/binutils-config-5.1-r6.ebuild
index 2637ec2804..a26ff944b0 100644
--- a/sys-devel/binutils-config/binutils-config-5.1-r5.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5.1-r6.ebuild
@@ -7,7 +7,6 @@ inherit eutils prefix
 
 DESCRIPTION="Utility to change the binutils version being used"
 HOMEPAGE="https://www.gentoo.org/;
-GIT_REV="edc0d44f70c27daebcc080ac5d08e8e191bccd95"
 WRAPPER_REV="${PV%%.*}.3.4"
 
#SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV}
 -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
 



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/, sys-devel/binutils/files/

2023-08-30 Thread Fabian Groffen
commit: 64b018b8728e2fc39ff4496f3d80da3e2a6a76f0
Author: Fabian Groffen  gentoo  org>
AuthorDate: Wed Aug 30 08:53:18 2023 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Wed Aug 30 08:53:18 2023 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=64b018b8

sys-devel/binutils-2.40-r8: pull in EAPI=8 ebuild from gx86

Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils/Manifest|   7 +-
 sys-devel/binutils/binutils-2.34-r1.ebuild | 445 --
 sys-devel/binutils/binutils-2.39-r2.ebuild | 498 
 sys-devel/binutils/binutils-2.39-r4.ebuild | 499 -
 ...tils-2.40-r2.ebuild => binutils-2.40-r8.ebuild} |  20 +-
 .../files/binutils-2.24-cygwin-nointl.patch|  26 --
 .../files/binutils-2.29.1-nogoldtest.patch |  27 --
 .../binutils/files/binutils-2.33-gcc-10.patch  |  39 --
 .../binutils/files/binutils-2.34-riscv-SEGV.patch  |  40 --
 ...inutils-2.39-protected-visibility-solaris.patch |  64 ---
 .../binutils/files/binutils-configure-LANG.patch   |  65 +++
 11 files changed, 80 insertions(+), 1650 deletions(-)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 83ad995e9e..b6c1313f33 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,7 +1,2 @@
-DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 
0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a
 SHA512 
e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
-DIST binutils-2.34.tar.xz 21637796 BLAKE2B 
07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d
 SHA512 
2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
-DIST binutils-2.39-patches-4.tar.xz 62880 BLAKE2B 
5cc335769d9c88417583ce059c61d0d7655f3ab9ac69647e6e2f65bd3a9dd143fe34c50bb68ab81d4226ddd0e4ef405d7102f67375a672eedc3d01b92b8ef497
 SHA512 
ef81350979af64cf35800b39982c84657a5c01362c01d221164a43d8f0dd80276c9f052c55d24516fad457e6671a58d467d71b5edd6c1f53fddbdb31172a21ee
-DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 
2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7
 SHA512 
4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
-DIST binutils-2.39.tar.xz 25167756 BLAKE2B 
ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f
 SHA512 
68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
-DIST binutils-2.40-patches-2.tar.xz 183760 BLAKE2B 
447f1c40ac8212b1e91f6f2137f87958c3f4e2366b11b9979d9d09d52e9fcde9a9d74f0c1871616157e001f505849fceb2097a512f434b9c848885e367a07c35
 SHA512 
30efbfcbd2d936c74d9480e4f2f4b8dcd30abcd0f1b22d21d20558002fdb8c90bd2fe97e3f27c2905714dcfd1297cac2646ede1e2c3d9fbf159f93c8cf01a290
+DIST binutils-2.40-patches-7.tar.xz 299188 BLAKE2B 
170cd2432e0458889b240c3603461d0b4bfa62d5314634b101a629db455d87235ac14ad44c63920b713d5235fa8b73902960df1019153873ef06a33aa7050b4b
 SHA512 
a60da163caee68fe1fa355385d404e8998ebed0e390d50e0713e95334733a8b4e37bc63d522817284c027953e43848dbc98042461a47131fb53bc69203b4ee87
 DIST binutils-2.40.tar.xz 25241484 BLAKE2B 
8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2
 SHA512 
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925

diff --git a/sys-devel/binutils/binutils-2.34-r1.ebuild 
b/sys-devel/binutils/binutils-2.34-r1.ebuild
deleted file mode 100644
index 48fc6daf6d..00
--- a/sys-devel/binutils/binutils-2.34-r1.ebuild
+++ /dev/null
@@ -1,445 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/;
-LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
-REQUIRED_USE="default-gold? ( gold )"
-
-# Variables that can be set here:
-# PATCH_VER  - the patchset version
-#  Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#- Default: PV
-# PATCH_DEV  - Use download URI 
https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#  for the patchsets
-
-PATCH_VER=4
-PATCH_DEV=dilfridge
-
-case ${PV} in
-   

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/, sys-devel/binutils/files/

2023-02-28 Thread Sam James
commit: f4bae8f7128a0a7977d4cf765f21301a2275f32e
Author: Sam James  gentoo  org>
AuthorDate: Wed Mar  1 00:51:07 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Mar  1 00:51:07 2023 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f4bae8f7

sys-devel/binutils: add 2.40(-r2)

Bug: https://bugs.gentoo.org/895240
Bug: https://bugs.gentoo.org/892549
Signed-off-by: Sam James  gentoo.org>

 sys-devel/binutils/Manifest|   2 +
 sys-devel/binutils/binutils-2.40-r2.ebuild | 509 +
 .../files/binutils-2.40-linker-search-path.patch   |  74 +++
 3 files changed, 585 insertions(+)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 3969b00779..83ad995e9e 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -3,3 +3,5 @@ DIST binutils-2.34.tar.xz 21637796 BLAKE2B 
07dd23916a7d27f71c3f160c8c16abe2bd4fc
 DIST binutils-2.39-patches-4.tar.xz 62880 BLAKE2B 
5cc335769d9c88417583ce059c61d0d7655f3ab9ac69647e6e2f65bd3a9dd143fe34c50bb68ab81d4226ddd0e4ef405d7102f67375a672eedc3d01b92b8ef497
 SHA512 
ef81350979af64cf35800b39982c84657a5c01362c01d221164a43d8f0dd80276c9f052c55d24516fad457e6671a58d467d71b5edd6c1f53fddbdb31172a21ee
 DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 
2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7
 SHA512 
4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B 
ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f
 SHA512 
68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
+DIST binutils-2.40-patches-2.tar.xz 183760 BLAKE2B 
447f1c40ac8212b1e91f6f2137f87958c3f4e2366b11b9979d9d09d52e9fcde9a9d74f0c1871616157e001f505849fceb2097a512f434b9c848885e367a07c35
 SHA512 
30efbfcbd2d936c74d9480e4f2f4b8dcd30abcd0f1b22d21d20558002fdb8c90bd2fe97e3f27c2905714dcfd1297cac2646ede1e2c3d9fbf159f93c8cf01a290
+DIST binutils-2.40.tar.xz 25241484 BLAKE2B 
8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2
 SHA512 
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925

diff --git a/sys-devel/binutils/binutils-2.40-r2.ebuild 
b/sys-devel/binutils/binutils-2.40-r2.ebuild
new file mode 100644
index 00..fc19343327
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.40-r2.ebuild
@@ -0,0 +1,509 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/;
+
+LICENSE="GPL-3+"
+IUSE="cet doc gold gprofng multitarget +nls pgo +plugins static-libs test 
vanilla zstd"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER  - the patchset version
+#  Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#- Default: PV
+# PATCH_DEV  - Use download URI 
https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#  for the patchsets
+
+PATCH_VER=2
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == * ]]; then
+   inherit git-r3
+   SLOT=${PV}
+else
+   PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+   PATCH_DEV=${PATCH_DEV:-dilfridge}
+   SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz 
https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz 
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz;
+   [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+   
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz;
+   SLOT=$(ver_cut 1-2)
+   KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+   if [[ ${CATEGORY} == cross-* ]] ; then
+   export CTARGET=${CATEGORY#cross-}
+   fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+   >=sys-devel/binutils-config-3
+   sys-libs/zlib
+   zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+   doc? ( sys-apps/texinfo )
+   test? (
+   dev-util/dejagnu
+   sys-devel/bc
+   )
+   nls? ( sys-devel/gettext )
+   zstd? ( virtual/pkgconfig )
+   sys-devel/flex
+   app-alternatives/yacc
+"
+

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/

2023-01-05 Thread Sam James
commit: e19b37379dc7017cd0d7f0793fbbae2c674ff16e
Author: Sam James  gentoo  org>
AuthorDate: Thu Jan  5 10:56:09 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Jan  5 10:56:09 2023 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e19b3737

sys-devel/binutils: use app-alternatives/yacc

Signed-off-by: Sam James  gentoo.org>

 sys-devel/binutils/binutils-2.34-r1.ebuild | 2 +-
 sys-devel/binutils/binutils-2.39-r2.ebuild | 2 +-
 sys-devel/binutils/binutils-2.39-r4.ebuild | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys-devel/binutils/binutils-2.34-r1.ebuild 
b/sys-devel/binutils/binutils-2.34-r1.ebuild
index 2dd1d18118..e753578810 100644
--- a/sys-devel/binutils/binutils-2.34-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.34-r1.ebuild
@@ -79,7 +79,7 @@ BDEPEND="
test? ( dev-util/dejagnu )
nls? ( sys-devel/gettext )
sys-devel/flex
-   virtual/yacc
+   app-alternatives/yacc
 "
 
 RESTRICT="!test? ( test )"

diff --git a/sys-devel/binutils/binutils-2.39-r2.ebuild 
b/sys-devel/binutils/binutils-2.39-r2.ebuild
index 41f01bb583..7e118e3485 100644
--- a/sys-devel/binutils/binutils-2.39-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.39-r2.ebuild
@@ -63,7 +63,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
-   virtual/yacc
+   app-alternatives/yacc
 "
 
 RESTRICT="!test? ( test )"

diff --git a/sys-devel/binutils/binutils-2.39-r4.ebuild 
b/sys-devel/binutils/binutils-2.39-r4.ebuild
index 8f34b15b0e..5d73b5c780 100644
--- a/sys-devel/binutils/binutils-2.39-r4.ebuild
+++ b/sys-devel/binutils/binutils-2.39-r4.ebuild
@@ -63,7 +63,7 @@ BDEPEND="
)
nls? ( sys-devel/gettext )
sys-devel/flex
-   virtual/yacc
+   app-alternatives/yacc
 "
 
 RESTRICT="!test? ( test )"



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/, sys-devel/binutils/files/

2022-10-25 Thread Fabian Groffen
commit: 158166f0cb0a9bcbbbe08606e37b9320e89f5942
Author: Fabian Groffen  gentoo  org>
AuthorDate: Tue Oct 25 06:50:11 2022 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Tue Oct 25 06:50:11 2022 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=158166f0

sys-devel/binutils-2.39-r4: add patch for Solaris from upstream

Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils/binutils-2.39-r4.ebuild |  1 +
 ...inutils-2.39-protected-visibility-solaris.patch | 64 ++
 2 files changed, 65 insertions(+)

diff --git a/sys-devel/binutils/binutils-2.39-r4.ebuild 
b/sys-devel/binutils/binutils-2.39-r4.ebuild
index 0254ffdfb7..8f34b15b0e 100644
--- a/sys-devel/binutils/binutils-2.39-r4.ebuild
+++ b/sys-devel/binutils/binutils-2.39-r4.ebuild
@@ -70,6 +70,7 @@ RESTRICT="!test? ( test )"
 
 PATCHES=(
"${FILESDIR}"/${PN}-2.22-solaris-anonymous-version-script-fix.patch
+   "${FILESDIR}"/${PN}-2.39-protected-visibility-solaris.patch
 )
 
 MY_BUILDDIR=${WORKDIR}/build

diff --git 
a/sys-devel/binutils/files/binutils-2.39-protected-visibility-solaris.patch 
b/sys-devel/binutils/files/binutils-2.39-protected-visibility-solaris.patch
new file mode 100644
index 00..2e83e74b8d
--- /dev/null
+++ b/sys-devel/binutils/files/binutils-2.39-protected-visibility-solaris.patch
@@ -0,0 +1,64 @@
+From 2c43d202aefb2b6f202a44bbb8a0baf251aae845 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" 
+Date: Mon, 22 Aug 2022 10:26:17 -0700
+Subject: [PATCH] x86: Ignore protected visibility in shared libraries on
+ Solaris
+
+On x86, the PLT entry in executable may be used as function address for
+functions in shared libraries.  If functions are protected, the function
+address used in executable can be different from the function address
+used in shared library.  This will lead to incorrect run-time behavior
+if function pointer equality is needed.  By default, x86 linker issues
+an error in this case.
+
+On Solaris, linker issued an error for
+
+struct tm *tb = (kind == CPP_time_kind::FIXED ? gmtime : localtime) ();
+
+where gmtime is a protected function in libc.so.  Use gmtime's PLT entry
+in executable as function address is safe since function pointer equality
+isn't needed.  Ignore protected visibility in shared libraries on Solaris
+to disable linker error.  If function pointer equality is needed, linker
+will silently generate executable with incorrect run-time behavior on
+Solaris.
+
+   PR ld/29512
+   * elf32-i386.c (elf_i386_scan_relocs): Ignore protected
+   visibility in shared libraries on Solaris.
+   * elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.
+---
+ bfd/elf32-i386.c   | 3 ++-
+ bfd/elf64-x86-64.c | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
+index 52b1db44546..9717e2c5ed6 100644
+--- a/bfd/elf32-i386.c
 b/bfd/elf32-i386.c
+@@ -1808,7 +1808,8 @@ elf_i386_scan_relocs (bfd *abfd,
+ || (sec->flags & (SEC_CODE | SEC_READONLY)) != 0)
+   h->plt.refcount = 1;
+ 
+-if (h->pointer_equality_needed
++if (htab->elf.target_os != is_solaris
++&& h->pointer_equality_needed
+ && h->type == STT_FUNC
+ && eh->def_protected
+ && !SYMBOL_DEFINED_NON_SHARED_P (h)
+diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
+index 62a9a22317a..f3b54400013 100644
+--- a/bfd/elf64-x86-64.c
 b/bfd/elf64-x86-64.c
+@@ -2251,7 +2251,8 @@ elf_x86_64_scan_relocs (bfd *abfd, struct bfd_link_info 
*info,
+ || (sec->flags & (SEC_CODE | SEC_READONLY)) != 0)
+   h->plt.refcount = 1;
+ 
+-if (h->pointer_equality_needed
++if (htab->elf.target_os != is_solaris
++&& h->pointer_equality_needed
+ && h->type == STT_FUNC
+ && eh->def_protected
+ && !SYMBOL_DEFINED_NON_SHARED_P (h)
+-- 
+2.31.1
+



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/

2022-10-24 Thread Fabian Groffen
commit: ff9951182f8ad7f741651d44bcdbfc8c3f8662c5
Author: Fabian Groffen  gentoo  org>
AuthorDate: Mon Oct 24 18:45:20 2022 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Mon Oct 24 18:45:20 2022 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ff995118

sys-devel/binutils-2.39-r4: sync from gx86

Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils/Manifest|   2 +-
 sys-devel/binutils/binutils-2.39-r4.ebuild | 498 +
 2 files changed, 499 insertions(+), 1 deletion(-)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index eba64a25c1..3969b00779 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,5 +1,5 @@
-DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B 
e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5
 SHA512 
d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
 DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 
0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a
 SHA512 
e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 
07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d
 SHA512 
2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
 DIST binutils-2.39-patches-4.tar.xz 62880 BLAKE2B 
5cc335769d9c88417583ce059c61d0d7655f3ab9ac69647e6e2f65bd3a9dd143fe34c50bb68ab81d4226ddd0e4ef405d7102f67375a672eedc3d01b92b8ef497
 SHA512 
ef81350979af64cf35800b39982c84657a5c01362c01d221164a43d8f0dd80276c9f052c55d24516fad457e6671a58d467d71b5edd6c1f53fddbdb31172a21ee
+DIST binutils-2.39-patches-5.tar.xz 82924 BLAKE2B 
2cf75f661989f22270d6afe5f3c543814eb6a331be4493016fa2871e1f10a84a123c1c51e77a19b35e46680b9fe77390cb1532ca40d470a6041fa768fed3ccd7
 SHA512 
4b5811b4822b3a06f590fc7d082dc0ddf18a6058ac23887254e2ee9bd63c7f06f1636e446152115c7e0b01a6c5298a0d9df6904bd1582e66504ccde80dd1ecbd
 DIST binutils-2.39.tar.xz 25167756 BLAKE2B 
ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f
 SHA512 
68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3

diff --git a/sys-devel/binutils/binutils-2.39-r4.ebuild 
b/sys-devel/binutils/binutils-2.39-r4.ebuild
new file mode 100644
index 00..0254ffdfb7
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.39-r4.ebuild
@@ -0,0 +1,498 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/;
+
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins 
static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER  - the patchset version
+#  Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#- Default: PV
+# PATCH_DEV  - Use download URI 
https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#  for the patchsets
+
+PATCH_VER=5
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == * ]]; then
+   inherit git-r3
+   SLOT=${PV}
+else
+   PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+   PATCH_DEV=${PATCH_DEV:-dilfridge}
+   SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz 
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz;
+   [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+   
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz;
+   SLOT=$(ver_cut 1-2)
+   KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+   if [[ ${CATEGORY} == cross-* ]] ; then
+   export CTARGET=${CATEGORY#cross-}
+   fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+   >=sys-devel/binutils-config-3
+   sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+   doc? ( sys-apps/texinfo )
+   test? (
+   dev-util/dejagnu
+   sys-devel/bc
+   )
+   nls? ( sys-devel/gettext )
+   sys-devel/flex
+   

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/

2022-09-12 Thread Fabian Groffen
commit: 067591a87843b997107dd4d48b72d1ddd37e4909
Author: Fabian Groffen  gentoo  org>
AuthorDate: Mon Sep 12 17:51:54 2022 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Mon Sep 12 17:51:54 2022 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=067591a8

sys-devel/binutils: sync 2.39-r2 from gx86

Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils/Manifest|   2 +
 ...ls-2.29.1-r1.ebuild => binutils-2.39-r2.ebuild} | 301 -
 2 files changed, 182 insertions(+), 121 deletions(-)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 300ae6a9f4..eba64a25c1 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,3 +1,5 @@
 DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B 
e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5
 SHA512 
d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
 DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 
0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a
 SHA512 
e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 
07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d
 SHA512 
2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
+DIST binutils-2.39-patches-4.tar.xz 62880 BLAKE2B 
5cc335769d9c88417583ce059c61d0d7655f3ab9ac69647e6e2f65bd3a9dd143fe34c50bb68ab81d4226ddd0e4ef405d7102f67375a672eedc3d01b92b8ef497
 SHA512 
ef81350979af64cf35800b39982c84657a5c01362c01d221164a43d8f0dd80276c9f052c55d24516fad457e6671a58d467d71b5edd6c1f53fddbdb31172a21ee
+DIST binutils-2.39.tar.xz 25167756 BLAKE2B 
ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f
 SHA512 
68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3

diff --git a/sys-devel/binutils/binutils-2.29.1-r1.ebuild 
b/sys-devel/binutils/binutils-2.39-r2.ebuild
similarity index 61%
rename from sys-devel/binutils/binutils-2.29.1-r1.ebuild
rename to sys-devel/binutils/binutils-2.39-r2.ebuild
index 435264c817..41f01bb583 100644
--- a/sys-devel/binutils/binutils-2.29.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.39-r2.ebuild
@@ -1,52 +1,40 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-# NOTE: currently latest version on Solaris that works
+EAPI=7
 
-EAPI=6
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
 
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/;
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
-
-PATCHVER="3"
-ELF2FLT_VER=""
 
-case ${PV} in
-   )
-   EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git;
-   inherit git-r3
-   S=${WORKDIR}/binutils
-   EGIT_CHECKOUT_DIR=${S}
-   SLOT=${PV}
-   ;;
-   *.)
-   EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git;
-   inherit git-r3
-   S=${WORKDIR}/binutils
-   EGIT_CHECKOUT_DIR=${S}
-   EGIT_BRANCH=$(get_version_component_range 1-2)
-   EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
-   SLOT=$(get_version_component_range 1-2)
-   ;;
-   *)
-   SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-   SLOT=$(get_version_component_range 1-2)
-   KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
-   ;;
-esac
-
-#
-# The Gentoo patchset
-#
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-sam}
-
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
-   
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz;
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins 
static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here  (ignored for live ebuilds)
+# PATCH_VER  - the patchset version
+#  Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#- Default: PV
+# PATCH_DEV  - Use download URI 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/, sys-apps/sed/, sys-apps/portage/, sys-libs/newlib/, ...

2022-08-02 Thread Sam James
commit: 573a270b4c7934e8c0fd6a74a9a036f930f3a025
Author: Sam James  gentoo  org>
AuthorDate: Tue Aug  2 22:10:02 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Aug  2 22:10:02 2022 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=573a270b

*/*: [QA] fix DTD HTTP->HTTPS

Signed-off-by: Sam James  gentoo.org>

 sys-apps/debianutils/metadata.xml  | 2 +-
 sys-apps/help2man/metadata.xml | 2 +-
 sys-apps/portage/metadata.xml  | 2 +-
 sys-apps/sed/metadata.xml  | 2 +-
 sys-devel/binutils-config/metadata.xml | 2 +-
 sys-devel/binutils/metadata.xml| 2 +-
 sys-devel/gcc-config/metadata.xml  | 2 +-
 sys-libs/newlib/metadata.xml   | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/sys-apps/debianutils/metadata.xml 
b/sys-apps/debianutils/metadata.xml
index 1c1ee347ef..7fed7781d0 100644
--- a/sys-apps/debianutils/metadata.xml
+++ b/sys-apps/debianutils/metadata.xml
@@ -1,5 +1,5 @@
 
-http://www.gentoo.org/dtd/metadata.dtd;>
+https://www.gentoo.org/dtd/metadata.dtd;>
 

base-sys...@gentoo.org

diff --git a/sys-apps/help2man/metadata.xml b/sys-apps/help2man/metadata.xml
index 56c1244130..73dda144f9 100644
--- a/sys-apps/help2man/metadata.xml
+++ b/sys-apps/help2man/metadata.xml
@@ -1,5 +1,5 @@
 
-http://www.gentoo.org/dtd/metadata.dtd;>
+https://www.gentoo.org/dtd/metadata.dtd;>
 
 
base-sys...@gentoo.org

diff --git a/sys-apps/portage/metadata.xml b/sys-apps/portage/metadata.xml
index 062dafe624..58ed367a28 100644
--- a/sys-apps/portage/metadata.xml
+++ b/sys-apps/portage/metadata.xml
@@ -1,5 +1,5 @@
 
-http://www.gentoo.org/dtd/metadata.dtd;>
+https://www.gentoo.org/dtd/metadata.dtd;>
 
   
 mailto:dev-port...@gentoo.org

diff --git a/sys-apps/sed/metadata.xml b/sys-apps/sed/metadata.xml
index 504b6a5e46..6cda0d5e1c 100644
--- a/sys-apps/sed/metadata.xml
+++ b/sys-apps/sed/metadata.xml
@@ -1,5 +1,5 @@
 
-http://www.gentoo.org/dtd/metadata.dtd;>
+https://www.gentoo.org/dtd/metadata.dtd;>
 
 
base-sys...@gentoo.org

diff --git a/sys-devel/binutils-config/metadata.xml 
b/sys-devel/binutils-config/metadata.xml
index b1f742a890..0045c862c1 100644
--- a/sys-devel/binutils-config/metadata.xml
+++ b/sys-devel/binutils-config/metadata.xml
@@ -1,5 +1,5 @@
 
-http://www.gentoo.org/dtd/metadata.dtd;>
+https://www.gentoo.org/dtd/metadata.dtd;>
 
 
pre...@gentoo.org

diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml
index 66f4f23df4..b30ecf23d2 100644
--- a/sys-devel/binutils/metadata.xml
+++ b/sys-devel/binutils/metadata.xml
@@ -1,5 +1,5 @@
 
-http://www.gentoo.org/dtd/metadata.dtd;>
+https://www.gentoo.org/dtd/metadata.dtd;>
 

toolch...@gentoo.org

diff --git a/sys-devel/gcc-config/metadata.xml 
b/sys-devel/gcc-config/metadata.xml
index e396f37559..5a1e1dee65 100644
--- a/sys-devel/gcc-config/metadata.xml
+++ b/sys-devel/gcc-config/metadata.xml
@@ -1,5 +1,5 @@
 
-http://www.gentoo.org/dtd/metadata.dtd;>
+https://www.gentoo.org/dtd/metadata.dtd;>
 
 
toolch...@gentoo.org

diff --git a/sys-libs/newlib/metadata.xml b/sys-libs/newlib/metadata.xml
index 5025963793..3002cfebe8 100644
--- a/sys-libs/newlib/metadata.xml
+++ b/sys-libs/newlib/metadata.xml
@@ -1,5 +1,5 @@
 
-http://www.gentoo.org/dtd/metadata.dtd;>
+https://www.gentoo.org/dtd/metadata.dtd;>
 
 
 lu_z...@gentoo.org



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/

2021-10-13 Thread Sam James
commit: e48a36111d30f831e0f5480a8b9a1b230f412758
Author: Sam James  gentoo  org>
AuthorDate: Wed Oct 13 06:46:14 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Oct 13 06:46:40 2021 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e48a3611

sys-devel/binutils: cleanup Manifest

Signed-off-by: Sam James  gentoo.org>

 sys-devel/binutils/Manifest | 8 
 1 file changed, 8 deletions(-)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 6c24a4a8ab..300ae6a9f4 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,11 +1,3 @@
-AUX binutils-2.22-solaris-anonymous-version-script-fix.patch 957 BLAKE2B 
ce83950cff5e22ea458479d54f0423f1b546c7192a50251f16ef3ebd9bf305147b7e55a9753b916db1e5880182e6165d806bc03dec42c9a930633b8625dc605a
 SHA512 
8028ed6e93661a27c89ffd48022758af9cc968e8fb5b4e8027787a2c2c0978261f53aaaefd54eb032c437947496f4a48ef1b3c01c1529933af8876038938c492
-AUX binutils-2.24-cygwin-nointl.patch 1067 BLAKE2B 
f5459c75991dd4c66c17d2165563eefb81b162798ff66d07f904ae355765ba52a52fc6d3d1f3a697659081f13952836393f50d42354d9917c797263a662f1ad7
 SHA512 
8e5bc67dfb5c408299043fffa015978b066cae2cd634608cb72115ff1b26b60a2cae035e31b292ae7637be918742d5745f1654e2a0db4b8e5c68e0154312d3c9
-AUX binutils-2.29.1-nogoldtest.patch 730 BLAKE2B 
f4f5926511866e58566abc224d2bae1336eb2cbfb63ae6d2a8a3b1f455f24d31fe0ecaee616eb6075712b8d90c40495a639c413c7229c9dfa741a5d284ff2911
 SHA512 
dd94d947fd25a770990ebc711fba6f680c90677e726f7cdc5435dd121f57e28e3a19343805e514045513bb011094f3a1fe2c4178d1be73e5d38a24abcc2b88e5
-AUX binutils-2.33-gcc-10.patch 815 BLAKE2B 
84cf88e34afea70ea3728e2a78f0ba004e24934f57ff53d42694c3fe6f1afd6fb091b70ca114ff539ae6274699f0e3584decbf1355d1d1cd720bb4aca31bcb33
 SHA512 
8c0cd37738d2d172aadf1df875d028538d9edca35b681d7faa7dc3ab64e2c214d9c33862795a51c0cba9a61aaea9c5bbf5f9f9fb4a01762aa266f32c97eaafbd
-AUX binutils-2.34-riscv-SEGV.patch 1297 BLAKE2B 
d21c99711f658e56a09705c25bda467ed1e2ee8ef1270ac276913da3dfc3457655f65f2ca09ee102ff9eb51d6f70c69bf1b4d4fd791beee7cf2ebc3e51735474
 SHA512 
4ba8c41c5051a16ff96512cf18a538dd780302923ee31b30ca586753bfe9e8a0fd8852adf3b5e0d92355ebfec0d8205c73e561a6778b2ccc156e83677492eefb
 DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B 
e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5
 SHA512 
d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
 DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 
0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a
 SHA512 
e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 
07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d
 SHA512 
2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
-EBUILD binutils-2.29.1-r1.ebuild 12443 BLAKE2B 
09480b3ccd675612244fc5a26d5de6024ad861e86c40e43ce71cf811cc16da7a4712950400c1ea999f7993a8b3486f404ee0c1cbe7d490882c30191c480937f8
 SHA512 
f6d5dd3e73c8d385052791f685d6b7de5c0a83d5320753a12d60cd7443a1d2add3038fce980cd1f362ed6078faf5eecbc6d7da321b05010f9e1c1732bea58bf0
-EBUILD binutils-2.34-r1.ebuild 12555 BLAKE2B 
789330edfc401ec1ad7146efa82dd623a78c78b81d09083bf9a353806eb7d981cb468f4bb2ec2be527974b47774da72dac1a70f4822fb8068b9faef882cd404b
 SHA512 
d44cb143ace7fd292b857c280ee28c7d36d62a3155da38cc8fd54b2fde3577bea222da379f107a9f24ca75512fe2e0c4d8fa194112f12f8746fe9f3169ad97fb
-MISC metadata.xml 650 BLAKE2B 
5f0547bb9a41a09f28afc7feb1d6f2da32205924d860a88f64a7970a5e24749b961531c023a8647720e119ffbf2bdcab9384f10726a3371a8ec750b808233eaf
 SHA512 
9057a779adcdf1da85c7e26fdd134303e4fe53ba015dda84761f5e4894833ba50f1411c1e96102319479fb1becf6c02e23984737b3660a7c24101d0cf0d404b2



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/

2021-10-12 Thread Sam James
commit: 40c41500b3d9676a21265f264a59c2fa2ab9b30d
Author: Sam James  gentoo  org>
AuthorDate: Wed Oct 13 04:05:20 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Oct 13 04:05:53 2021 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=40c41500

sys-devel/binutils: update devspace location

slyfox has retired but I've got the distfiles
mirrored in my devspace.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Sam James  gentoo.org>

 sys-devel/binutils/Manifest  | 8 
 sys-devel/binutils/binutils-2.29.1-r1.ebuild | 4 ++--
 sys-devel/binutils/binutils-2.34-r1.ebuild   | 4 ++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 300ae6a9f4..6c24a4a8ab 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,3 +1,11 @@
+AUX binutils-2.22-solaris-anonymous-version-script-fix.patch 957 BLAKE2B 
ce83950cff5e22ea458479d54f0423f1b546c7192a50251f16ef3ebd9bf305147b7e55a9753b916db1e5880182e6165d806bc03dec42c9a930633b8625dc605a
 SHA512 
8028ed6e93661a27c89ffd48022758af9cc968e8fb5b4e8027787a2c2c0978261f53aaaefd54eb032c437947496f4a48ef1b3c01c1529933af8876038938c492
+AUX binutils-2.24-cygwin-nointl.patch 1067 BLAKE2B 
f5459c75991dd4c66c17d2165563eefb81b162798ff66d07f904ae355765ba52a52fc6d3d1f3a697659081f13952836393f50d42354d9917c797263a662f1ad7
 SHA512 
8e5bc67dfb5c408299043fffa015978b066cae2cd634608cb72115ff1b26b60a2cae035e31b292ae7637be918742d5745f1654e2a0db4b8e5c68e0154312d3c9
+AUX binutils-2.29.1-nogoldtest.patch 730 BLAKE2B 
f4f5926511866e58566abc224d2bae1336eb2cbfb63ae6d2a8a3b1f455f24d31fe0ecaee616eb6075712b8d90c40495a639c413c7229c9dfa741a5d284ff2911
 SHA512 
dd94d947fd25a770990ebc711fba6f680c90677e726f7cdc5435dd121f57e28e3a19343805e514045513bb011094f3a1fe2c4178d1be73e5d38a24abcc2b88e5
+AUX binutils-2.33-gcc-10.patch 815 BLAKE2B 
84cf88e34afea70ea3728e2a78f0ba004e24934f57ff53d42694c3fe6f1afd6fb091b70ca114ff539ae6274699f0e3584decbf1355d1d1cd720bb4aca31bcb33
 SHA512 
8c0cd37738d2d172aadf1df875d028538d9edca35b681d7faa7dc3ab64e2c214d9c33862795a51c0cba9a61aaea9c5bbf5f9f9fb4a01762aa266f32c97eaafbd
+AUX binutils-2.34-riscv-SEGV.patch 1297 BLAKE2B 
d21c99711f658e56a09705c25bda467ed1e2ee8ef1270ac276913da3dfc3457655f65f2ca09ee102ff9eb51d6f70c69bf1b4d4fd791beee7cf2ebc3e51735474
 SHA512 
4ba8c41c5051a16ff96512cf18a538dd780302923ee31b30ca586753bfe9e8a0fd8852adf3b5e0d92355ebfec0d8205c73e561a6778b2ccc156e83677492eefb
 DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B 
e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5
 SHA512 
d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
 DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 
0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a
 SHA512 
e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 
07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d
 SHA512 
2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
+EBUILD binutils-2.29.1-r1.ebuild 12443 BLAKE2B 
09480b3ccd675612244fc5a26d5de6024ad861e86c40e43ce71cf811cc16da7a4712950400c1ea999f7993a8b3486f404ee0c1cbe7d490882c30191c480937f8
 SHA512 
f6d5dd3e73c8d385052791f685d6b7de5c0a83d5320753a12d60cd7443a1d2add3038fce980cd1f362ed6078faf5eecbc6d7da321b05010f9e1c1732bea58bf0
+EBUILD binutils-2.34-r1.ebuild 12555 BLAKE2B 
789330edfc401ec1ad7146efa82dd623a78c78b81d09083bf9a353806eb7d981cb468f4bb2ec2be527974b47774da72dac1a70f4822fb8068b9faef882cd404b
 SHA512 
d44cb143ace7fd292b857c280ee28c7d36d62a3155da38cc8fd54b2fde3577bea222da379f107a9f24ca75512fe2e0c4d8fa194112f12f8746fe9f3169ad97fb
+MISC metadata.xml 650 BLAKE2B 
5f0547bb9a41a09f28afc7feb1d6f2da32205924d860a88f64a7970a5e24749b961531c023a8647720e119ffbf2bdcab9384f10726a3371a8ec750b808233eaf
 SHA512 
9057a779adcdf1da85c7e26fdd134303e4fe53ba015dda84761f5e4894833ba50f1411c1e96102319479fb1becf6c02e23984737b3660a7c24101d0cf0d404b2

diff --git a/sys-devel/binutils/binutils-2.29.1-r1.ebuild 
b/sys-devel/binutils/binutils-2.29.1-r1.ebuild
index 2822dd7f5c..435264c817 100644
--- a/sys-devel/binutils/binutils-2.29.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.29.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # NOTE: currently latest version on Solaris that works
@@ -43,7 +43,7 @@ esac
 # The Gentoo patchset
 #
 PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
-PATCH_DEV=${PATCH_DEV:-slyfox}

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/, sys-devel/binutils-config/files/

2021-01-13 Thread Fabian Groffen
commit: 14e6d6149b2e104b5446052340d20d6880ca50a5
Author: Fabian Groffen  gentoo  org>
AuthorDate: Wed Jan 13 19:40:56 2021 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Wed Jan 13 19:40:56 2021 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=14e6d614

sys-devel/binutils-config-5.1-r4: revbump for BigSur sdk_version fix

Package-Manager: Portage-3.0.12.0.2-prefix, Repoman-3.0.2
Signed-off-by: Fabian Groffen  gentoo.org>

 ...5.1-r3.ebuild => binutils-config-5.1-r4.ebuild} |  5 -
 sys-devel/binutils-config/files/ldwrapper.c| 24 ++
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r4.ebuild
similarity index 95%
rename from sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
rename to sys-devel/binutils-config/binutils-config-5.1-r4.ebuild
index 02468e2b1a..36bc85a317 100644
--- a/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5.1-r4.ebuild
@@ -44,7 +44,10 @@ src_compile() {
# macOS Big Sur has an empty /usr/lib, so the linker really has
# to look into the SDK, for which it needs to be told where it
# is (symlinked right into our EPREFIX root as MacOSX.sdk)
-   extraargs+=( -DDARWIN_LD_SYSLIBROOT=1 )
+   extraargs+=(
+   -DDARWIN_LD_SYSLIBROOT=1
+   
-DDARWIN_LD_DEFAULT_TARGET='"'${MACOSX_DEPLOYMENT_TARGET}'"'
+   )
fi
local args=(
$(tc-getCC)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 7410afd334..6bcb2a5e72 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2019 Gentoo Foundation
+ * Copyright 1999-2021 Gentoo Authors
  * Distributed under the terms of the GNU General Public License v2
  * Authors: Fabian Groffen 
  *  Michael Haubenwallner 
@@ -218,6 +218,11 @@ main(int argc, char *argv[])
DIR *dirp;
struct dirent *dp;
 
+#ifdef DARWIN_LD_DEFAULT_TARGET
+   if (darwin_dt == NULL)
+   darwin_dt = DARWIN_LD_DEFAULT_TARGET;
+#endif
+
/* two ways to determine CTARGET from argv[0]:
 * 1. called as -ld (manually)
 * 2. called as EPREFIX/usr/libexec/gcc//ld (by gcc's collect2)
@@ -340,8 +345,8 @@ main(int argc, char *argv[])
newargc += 2 + 1;
 
 #ifdef DARWIN_LD_SYSLIBROOT
-   /* add -syslibroot  */
-   newargc += 2;
+   /* add -syslibroot  -sdk_version  */
+   newargc += 4;
 #endif
} else {
/* add the 4 paths we want (-L + -R) */
@@ -378,11 +383,22 @@ main(int argc, char *argv[])
newargv[j++] = ld;
 
if (!is_cross && is_darwin) {
-   /* inject this first to make the intention clear */
+   char target[ESIZ];
+   ssize_t trglen;
+
+   /* ld64 will try to infer sdk version when -syslibroot is used
+* from the path given, unfortunately this searches for the
+* first numbers it finds, which means anything random in
+* EPREFIX, causing errors.  Explicitly set the deployment
+* version here, for the sdk link can be versionless when set to
+* CommandLineTools */
 #ifdef DARWIN_LD_SYSLIBROOT
+   newargv[j++] = "-sdk_version";
+   newargv[j++] = darwin_dt;
newargv[j++] = "-syslibroot";
newargv[j++] = EPREFIX "/MacOSX.sdk";
 #endif
+   /* inject this first to make the intention clear */
newargv[j++] = "-search_paths_first";
}
 



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/

2021-01-06 Thread Fabian Groffen
commit: 5d9b8ace6f631715ffea7107b6bd280419f0eb43
Author: Fabian Groffen  gentoo  org>
AuthorDate: Wed Jan  6 11:59:59 2021 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Wed Jan  6 11:59:59 2021 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=5d9b8ace

sys-devel/binutils-config: drop x86-macos

Package-Manager: Portage-3.0.12.0.2-prefix, Repoman-3.0.2
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils-config/binutils-config-5.1-r3.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
index 975a5f1230..02468e2b1a 100644
--- a/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -13,7 +13,7 @@ WRAPPER_REV="${PV%%.*}.3.4"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE=""
 
 # We also RDEPEND on sys-apps/findutils which is in base @system



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/

2020-12-27 Thread Fabian Groffen
commit: ad42be3bf92609a3eea443f7444c31e274b506ac
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sun Dec 27 11:10:07 2020 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sun Dec 27 11:10:07 2020 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ad42be3b

sys-devel/binutils: drop ~m68k-mint

Package-Manager: Portage-3.0.12-prefix, Repoman-3.0.2
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils/binutils-2.29.1-r1.ebuild | 6 +-
 sys-devel/binutils/binutils-2.34-r1.ebuild   | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/sys-devel/binutils/binutils-2.29.1-r1.ebuild 
b/sys-devel/binutils/binutils-2.29.1-r1.ebuild
index 733976fc38..2822dd7f5c 100644
--- a/sys-devel/binutils/binutils-2.29.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.29.1-r1.ebuild
@@ -35,7 +35,7 @@ case ${PV} in
*)
SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
SLOT=$(get_version_component_range 1-2)
-   KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+   KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
;;
 esac
 
@@ -88,10 +88,6 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.24-cygwin-nointl.patch
 )
 
-pkg_setup() {
-   [[ ${CHOST} == *-mint* ]] && die "mint patches require rebasing to 
${P}" # 609274
-}
-
 src_unpack() {
case ${PV} in
*)

diff --git a/sys-devel/binutils/binutils-2.34-r1.ebuild 
b/sys-devel/binutils/binutils-2.34-r1.ebuild
index 39573b3f47..8c7d134cad 100644
--- a/sys-devel/binutils/binutils-2.34-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.34-r1.ebuild
@@ -42,7 +42,7 @@ case ${PV} in
*)
SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
SLOT=$(ver_cut 1-2)
-   KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+   KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
;;
 esac
 



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/

2020-12-27 Thread Fabian Groffen
commit: 83b0137e17550c1d2c17e5e26048c32aa1b9c8b7
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sun Dec 27 11:11:08 2020 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sun Dec 27 11:11:08 2020 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=83b0137e

sys-devel/binutils-config: drop ~m68k-mint

Package-Manager: Portage-3.0.12-prefix, Repoman-3.0.2
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils-config/binutils-config-5.1-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
index dc28f6c5a4..975a5f1230 100644
--- a/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
@@ -13,7 +13,7 @@ WRAPPER_REV="${PV%%.*}.3.4"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE=""
 
 # We also RDEPEND on sys-apps/findutils which is in base @system



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/

2020-12-22 Thread Fabian Groffen
commit: 48b366594ab49dd0be7a6807561f31e82d0d82d0
Author: Fabian Groffen  gentoo  org>
AuthorDate: Tue Dec 22 21:17:02 2020 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Tue Dec 22 21:17:02 2020 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=48b36659

sys-devel/binutils-config: drop ~ppc-aix

Bug: https://bugs.gentoo.org/760057
Package-Manager: Portage-3.0.12-prefix, Repoman-3.0.2
Signed-off-by: Fabian Groffen  gentoo.org>

 .../binutils-config/binutils-config-5.1-r3.ebuild  |  2 +-
 sys-devel/binutils-config/files/ldwrapper.c| 23 --
 2 files changed, 1 insertion(+), 24 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
index fd26184271..dc28f6c5a4 100644
--- a/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
@@ -13,7 +13,7 @@ WRAPPER_REV="${PV%%.*}.3.4"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE=""
 
 # We also RDEPEND on sys-apps/findutils which is in base @system

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 3ff5a0bc3e..7410afd334 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -210,7 +210,6 @@ main(int argc, char *argv[])
char is_cross = 0;
char is_darwin = 0;
char darwin_use_rpath = 1;
-   char is_aix = 0;
char *p;
size_t len;
int i;
@@ -269,7 +268,6 @@ main(int argc, char *argv[])
snprintf(ctarget, sizeof(ctarget), "%s", CHOST);
 
is_darwin = strstr(ctarget, "-darwin") != NULL;
-   is_aix = strstr(ctarget, "-aix") != NULL;
 
/* cannonicanise wrapper step2: strip CTARGET from wrapper */
len = strlen(ctarget);
@@ -349,11 +347,6 @@ main(int argc, char *argv[])
/* add the 4 paths we want (-L + -R) */
newargc += 8;
}
-
-   if (is_aix) {
-   /* AIX ld accepts -R only with -bsvr4 */
-   newargc++; /* -bsvr4 */
-   }
}
 
/* account the original arguments */
@@ -396,19 +389,6 @@ main(int argc, char *argv[])
/* position k right after the original arguments */
k = j - 1 + argc;
for (i = 1; i < argc; i++, j++) {
-   if (is_aix) {
-   /* AIX ld has this problem:
-*   $ /usr/ccs/bin/ld -bsvr4 -bE:xx.exp -bnoentry xx.o
-*   ld: 0706-005 Cannot find or open file: l
-*   ld:open(): No such file or directory
-* Simplest workaround is to put -bsvr4 last.
-*/
-   if (strcmp(argv[i], "-bsvr4") == 0) {
-   --j; --k;
-   continue;
-   }
-   }
-
newargv[j] = argv[i];
 
if (is_cross || (is_darwin && !darwin_use_rpath))
@@ -484,9 +464,6 @@ main(int argc, char *argv[])
newargv[k++] = "-L" EPREFIX "/lib";
newargv[k++] = "-R" EPREFIX "/lib";
}
-
-   if (is_aix)
-   newargv[k++] = "-bsvr4"; /* last one, see above */
}
newargv[k] = NULL;
 



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2020-11-27 Thread Fabian Groffen
commit: 40f8991efebfd3ddfe46336f0f3019904dcaece7
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri Nov 27 13:56:56 2020 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri Nov 27 13:56:56 2020 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=40f8991e

sys-devel/binutils-config-5.1-r3: fix embarrasing syntax error

Package-Manager: Portage-3.0.8-prefix, Repoman-3.0.2
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils-config/files/ldwrapper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 75575f31f6..3ff5a0bc3e 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -388,7 +388,7 @@ main(int argc, char *argv[])
/* inject this first to make the intention clear */
 #ifdef DARWIN_LD_SYSLIBROOT
newargv[j++] = "-syslibroot";
-   newargv[j++] = EPREFIX "/MacOSX.sdk"
+   newargv[j++] = EPREFIX "/MacOSX.sdk";
 #endif
newargv[j++] = "-search_paths_first";
}



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2020-11-27 Thread Fabian Groffen
commit: acc649995abf68f60667fd91dce2c47704f4130f
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri Nov 27 13:12:17 2020 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri Nov 27 13:38:56 2020 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=acc64999

sys-devel/binutils-config: drop libmissing support

libmissing is masked and soon to be removed, it never really worked in
the way it was hoped it could

Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils-config/files/ldwrapper.c | 25 -
 1 file changed, 25 deletions(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 07dc6ebf2a..216747da5c 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -210,7 +210,6 @@ main(int argc, char *argv[])
char is_darwin = 0;
char darwin_use_rpath = 1;
char is_aix = 0;
-   char has_missing = getenv("BINUTILS_CONFIG_DISABLE_MISSING") == NULL;
char *p;
size_t len;
int i;
@@ -349,14 +348,6 @@ main(int argc, char *argv[])
/* AIX ld accepts -R only with -bsvr4 */
newargc++; /* -bsvr4 */
}
-
-   /* BINUTILS_CONFIG_DISABLE_MISSING overrides this such that we
-* can disable this behaviour */
-   if (has_missing && stat(EPREFIX "/usr/lib/libmissing.a", ) 
== 0) {
-   newargc++; /* -lmissing */
-   } else {
-   has_missing = 0;
-   }
}
 
/* account the original arguments */
@@ -408,20 +399,6 @@ main(int argc, char *argv[])
}
}
 
-   if (!is_cross && is_darwin && has_missing) {
-   if (argv[i][0] == '-' && argv[i][1] == 'l' &&
-   (strcmp([i][2], "System") == 0 ||
-strcmp([i][2], "SystemStubs") == 
0))
-   {
-   /* inject -lmissing before -lSystem or 
-lSystemStubs */
-   memmove([j + 1], [j],
-   sizeof(newargv[j]) * (k - j));
-   newargv[j++] = "-lmissing";
-   k++;
-   has_missing = 0;  /* avoid duplicate insertion 
*/
-   }
-   }
-
newargv[j] = argv[i];
 
if (is_cross || (is_darwin && !darwin_use_rpath))
@@ -498,8 +475,6 @@ main(int argc, char *argv[])
newargv[k++] = "-R" EPREFIX "/lib";
}
 
-   if (has_missing)
-   newargv[k++] = "-lmissing";
if (is_aix)
newargv[k++] = "-bsvr4"; /* last one, see above */
}



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/

2020-11-27 Thread Fabian Groffen
commit: 4b52e188057a6b59d3e48983f351bf44ae080081
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri Nov 27 13:29:28 2020 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri Nov 27 13:38:59 2020 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=4b52e188

sys-devel/binutils-config-5.1-r3: revbump for libsysroot support

Big Sur (11.0) needs libsysroot support from the linker, so allow
activating it.

Package-Manager: Portage-3.0.8-prefix, Repoman-3.0.2
Signed-off-by: Fabian Groffen  gentoo.org>

 ...-config-5.1-r2.ebuild => binutils-config-5.1-r3.ebuild} | 10 +-
 sys-devel/binutils-config/files/ldwrapper.c| 14 --
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r2.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
similarity index 84%
rename from sys-devel/binutils-config/binutils-config-5.1-r2.ebuild
rename to sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
index d104bf4fb7..fd26184271 100644
--- a/sys-devel/binutils-config/binutils-config-5.1-r2.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5.1-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -39,6 +39,13 @@ src_configure() {
 
 src_compile() {
use prefix-guest || return
+   local extraargs=( )
+   if [[ ${CHOST} == *-darwin* && ${CHOST##*-darwin} -ge 20 ]] ; then
+   # macOS Big Sur has an empty /usr/lib, so the linker really has
+   # to look into the SDK, for which it needs to be told where it
+   # is (symlinked right into our EPREFIX root as MacOSX.sdk)
+   extraargs+=( -DDARWIN_LD_SYSLIBROOT=1 )
+   fi
local args=(
$(tc-getCC)
${CPPFLAGS}
@@ -46,6 +53,7 @@ src_compile() {
-o ldwrapper ${PN}-ldwrapper-${WRAPPER_REV}.c
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"
+   "${extraargs[@]}"
${LDFLAGS}
)
echo ${args[*]}

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 216747da5c..75575f31f6 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -20,8 +20,9 @@
  * ldwrapper: Prefix helper to inject -L and -R flags to the invocation
  * of ld.
  *
- * On Darwin it adds -search_path_first to make sure the given paths are
- * searched before the default search path.
+ * On Darwin it adds -search_paths_first to make sure the given paths are
+ * searched before the default search path, and sets -syslibroot
+ * starting from Big Sur 11.0.
  * On AIX it ensures -bsvr4 is the last argument.
  * The wrapper will inject -L entries for:
  *   - EPREFIX/usr/CHOST/lib/gcc (when gcc)
@@ -339,6 +340,11 @@ main(int argc, char *argv[])
 
/* add the 2 prefix paths (-L) and -search_paths_first 
*/
newargc += 2 + 1;
+
+#ifdef DARWIN_LD_SYSLIBROOT
+   /* add -syslibroot  */
+   newargc += 2;
+#endif
} else {
/* add the 4 paths we want (-L + -R) */
newargc += 8;
@@ -380,6 +386,10 @@ main(int argc, char *argv[])
 
if (!is_cross && is_darwin) {
/* inject this first to make the intention clear */
+#ifdef DARWIN_LD_SYSLIBROOT
+   newargv[j++] = "-syslibroot";
+   newargv[j++] = EPREFIX "/MacOSX.sdk"
+#endif
newargv[j++] = "-search_paths_first";
}
 



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2020-06-13 Thread Fabian Groffen
commit: 09b9a029c60fdc9d7e75c22761507204609e38c8
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Jun 13 10:58:21 2020 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Jun 13 10:58:21 2020 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=09b9a029

sys-devel/binutils: cleanup

Package-Manager: Portage-2.3.84-prefix, Repoman-2.3.22
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils/Manifest|4 -
 sys-devel/binutils/binutils-2.31.1-r1.ebuild   |  449 
 sys-devel/binutils/binutils-2.32-r1.ebuild |  449 
 .../binutils/files/binutils-2.19.50.0.1-mint.patch |   66 -
 sys-devel/binutils/files/binutils-2.22-mint.patch  | 2656 
 5 files changed, 3624 deletions(-)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 580aa90e18..300ae6a9f4 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,7 +1,3 @@
 DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B 
e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5
 SHA512 
d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
-DIST binutils-2.31.1-patches-3.tar.xz 12640 BLAKE2B 
3444b219dd02ad513e6c36214d649a8a74638382103c88ec8de76a579be0ee13f8d1450e3b8d82dfddad55f2f851b32aee910a99230c7d8673f8426fc79a4cd9
 SHA512 
67b23c17518305561d190a15cba4a1af18a0a3cf1d7e62583ac7667d2fa40e7c7ec024cc981009d5d1caf1939633ab55fc0a198b69af02dc7841be43ff1acd13
-DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 
6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051
 SHA512 
0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
-DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 
8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9
 SHA512 
55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f
-DIST binutils-2.32.tar.xz 20774880 BLAKE2B 
d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6
 SHA512 
d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a
 DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 
0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a
 SHA512 
e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 
07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d
 SHA512 
2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd

diff --git a/sys-devel/binutils/binutils-2.31.1-r1.ebuild 
b/sys-devel/binutils/binutils-2.31.1-r1.ebuild
deleted file mode 100644
index ae9497d18b..00
--- a/sys-devel/binutils/binutils-2.31.1-r1.ebuild
+++ /dev/null
@@ -1,449 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator
-
-DESCRIPTION="Tools necessary to build programs"
-HOMEPAGE="https://sourceware.org/binutils/;
-LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
-
-# Variables that can be set here:
-# PATCH_VER  - the patchset version
-#  Default: empty, no patching
-# PATCH_BINUTILS_VER - the binutils version in the patchset name
-#- Default: PV
-# PATCH_DEV  - Use download URI 
https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
-#  for the patchsets
-#  Default: dilfridge :)
-
-PATCH_VER=3
-
-case ${PV} in
-   )
-   EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git;
-   inherit git-r3
-   S=${WORKDIR}/binutils
-   EGIT_CHECKOUT_DIR=${S}
-   SLOT=${PV}
-   ;;
-   *.)
-   EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git;
-   inherit git-r3
-   S=${WORKDIR}/binutils
-   EGIT_CHECKOUT_DIR=${S}
-   EGIT_BRANCH=$(get_version_component_range 1-2)
-   EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
-   SLOT=$(get_version_component_range 1-2)
-   ;;
-   *)
-   SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
-   

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2020-06-13 Thread Fabian Groffen
commit: 2fa66bdaa2039024261dff2afbfc3b76aa179c80
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Jun 13 10:53:26 2020 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Jun 13 10:53:26 2020 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=2fa66bda

sys-devel/binutils-2.34-r1: sync with gx86, fixed for Solaris

Package-Manager: Portage-2.3.84-prefix, Repoman-2.3.22
RepoMan-Options: --force
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils/Manifest|   2 +
 sys-devel/binutils/binutils-2.34-r1.ebuild | 445 +
 .../binutils/files/binutils-2.33-gcc-10.patch  |  39 ++
 .../binutils/files/binutils-2.34-riscv-SEGV.patch  |  40 ++
 4 files changed, 526 insertions(+)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 997200674d..580aa90e18 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -3,3 +3,5 @@ DIST binutils-2.31.1-patches-3.tar.xz 12640 BLAKE2B 
3444b219dd02ad513e6c36214d64
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 
6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051
 SHA512 
0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
 DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 
8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9
 SHA512 
55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f
 DIST binutils-2.32.tar.xz 20774880 BLAKE2B 
d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6
 SHA512 
d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a
+DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 
0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a
 SHA512 
e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
+DIST binutils-2.34.tar.xz 21637796 BLAKE2B 
07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d
 SHA512 
2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd

diff --git a/sys-devel/binutils/binutils-2.34-r1.ebuild 
b/sys-devel/binutils/binutils-2.34-r1.ebuild
new file mode 100644
index 00..39573b3f47
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.34-r1.ebuild
@@ -0,0 +1,445 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/;
+LICENSE="GPL-3+"
+IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER  - the patchset version
+#  Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#- Default: PV
+# PATCH_DEV  - Use download URI 
https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#  for the patchsets
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+case ${PV} in
+   )
+   EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git;
+   inherit git-r3
+   S=${WORKDIR}/binutils
+   EGIT_CHECKOUT_DIR=${S}
+   SLOT=${PV}
+   ;;
+   *.)
+   EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git;
+   inherit git-r3
+   S=${WORKDIR}/binutils
+   EGIT_CHECKOUT_DIR=${S}
+   EGIT_BRANCH=$(ver_cut 1-2)
+   EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+   SLOT=$(ver_cut 1-2)
+   ;;
+   *)
+   SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+   SLOT=$(ver_cut 1-2)
+   KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+   ;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+   
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz;
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+   if [[ 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/

2020-03-13 Thread Fabian Groffen
commit: cc05839872855cb94a610301445798a82ea2fdbc
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri Mar 13 08:45:31 2020 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri Mar 13 08:45:31 2020 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=cc058398

sys-devel/binutils: cleanup and avoid toolchain-binutils usage

Package-Manager: Portage-2.3.84-prefix, Repoman-2.3.20
RepoMan-Options: --force
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils/Manifest  |   7 +-
 sys-devel/binutils/binutils-2.27.ebuild  |  30 --
 sys-devel/binutils/binutils-2.28.1.ebuild|  31 --
 sys-devel/binutils/binutils-2.29.1-r1.ebuild | 424 ++-
 4 files changed, 419 insertions(+), 73 deletions(-)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index f0b01a4653..997200674d 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -1,9 +1,4 @@
-DIST binutils-2.27-patches-1.0.tar.xz 8852 BLAKE2B 
6cc15efef1fce0e287bd3d467053451f8d1f5a645d0588c872ea6b055f3479a507273f9374a8ce30131e8ff0437cab9e3eac2959682393d4685041265f3f10fc
 SHA512 
489b5fff87886682d8e98eafa2f082e6dcf811d2a693b6c41d76bd1ac50815a6e7d26fb7c9e3811c2d8e0e1dc307557e6ffe46d1d0f7caeb581060cf14bda899
-DIST binutils-2.27.tar.bz2 26099568 BLAKE2B 
e9433b4dc28b0aeaa31d21fc039459e73c47050bb79dc0cf3f00e384604c37c0c1704ac6cba79c6b15edcbfd13f17b8013efeaca422d5b0e5a7f60c202fc5d18
 SHA512 
cf276f84935312361a2ca077e04d0b469d23a3aed979d8ba5d92ea590904ffb2c2e7ed12cc842822bfc402836be86f479660cef3791aa62f3753d8a1a6f564cb
-DIST binutils-2.28.1-patches-1.0.tar.xz 19772 BLAKE2B 
146b393b49ba868c7c064c58275ba1af3b7cbc7e97cc55b03c80d8b391955c40dd4e81ac4eeabcdfb53e41ea334a377d86300e037f8ccb810555a48dfa9da878
 SHA512 
c2c7d22e1013e79040c4dcb4d70649e78a070976ba3a4bc2ceb4805827b9d93eea1805c85db4fcb6b31be5218c3d7b42a4990437a7c01dc01fd7e9dedb606828
-DIST binutils-2.28.1.tar.bz2 28120394 BLAKE2B 
3a0ed2bcf0c859638546b7460d9e6f0a55518402ff0c65c90ce462a318f5ae6690961616d188ce6cf0271c9f2fb8b7902782d32cf0e711068c53d3d06956d89e
 SHA512 
5ec5212497b0fa8324f6a0884c284cb71c01942bbd39356d1ae745a5c9d97274c10f9d9c723f4bef6f0217662dfcd0c36e4e955a7599b11217658dc7b97553eb
-DIST binutils-2.29.1-patches-3.tar.xz 20904 BLAKE2B 
5549cb2412123e4ad3a13935762cc0dca46215950dbf38a149caf4c6416da382a0fd7ecffe97b10bce4dfdcef5edc2673d49bb21e9d37be37e33b454a8c2bc1a
 SHA512 
ba54efaf9e9f668d2922972acd2cdf5c3e6f174cfcc73d29953ab4ba6e157ce0cb500c583568a4e3b92c9d30c394a327f29b51292acc66f8d3f20f5eae2a
-DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 
83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878
 SHA512 
4063d3426922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
+DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B 
e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5
 SHA512 
d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
 DIST binutils-2.31.1-patches-3.tar.xz 12640 BLAKE2B 
3444b219dd02ad513e6c36214d649a8a74638382103c88ec8de76a579be0ee13f8d1450e3b8d82dfddad55f2f851b32aee910a99230c7d8673f8426fc79a4cd9
 SHA512 
67b23c17518305561d190a15cba4a1af18a0a3cf1d7e62583ac7667d2fa40e7c7ec024cc981009d5d1caf1939633ab55fc0a198b69af02dc7841be43ff1acd13
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 
6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051
 SHA512 
0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
 DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 
8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9
 SHA512 
55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f

diff --git a/sys-devel/binutils/binutils-2.27.ebuild 
b/sys-devel/binutils/binutils-2.27.ebuild
deleted file mode 100644
index 3aa9270a38..00
--- a/sys-devel/binutils/binutils-2.27.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PATCHVER="1.0"
-ELF2FLT_VER=""
-inherit toolchain-binutils
-
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-PATCHES=(
-#  "${FILESDIR}"/${PN}-2.22-mint.patch
-#  "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
-   "${FILESDIR}"/${PN}-2.24-cygwin-nointl.patch
-)
-pkg_setup() {
-   [[ ${CHOST} == *-mint* ]] && die "mint patches require rebasing to 
${P}" # 609274
-}
-
-src_compile() {
-   if has 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/

2019-10-13 Thread Fabian Groffen
commit: f1ad58d7b8db30325c5aa9bc89c130e26fbea594
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sun Oct 13 18:11:54 2019 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sun Oct 13 18:11:54 2019 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f1ad58d7

sys-devel/binutils-config: experimental support for libmissing

Package-Manager: Portage-2.3.68-prefix, Repoman-2.3.17
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils-config/Manifest |  1 -
 ...5.1-r1.ebuild => binutils-config-5.1-r2.ebuild} |  5 ++-
 sys-devel/binutils-config/files/ldwrapper.c| 51 +-
 3 files changed, 42 insertions(+), 15 deletions(-)

diff --git a/sys-devel/binutils-config/Manifest 
b/sys-devel/binutils-config/Manifest
deleted file mode 100644
index a28d45bba6..00
--- a/sys-devel/binutils-config/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST binutils-config-ldwrapper-5.3.4.c 13467 BLAKE2B 
132c497c59c1315c4d9e85c842fa5636aac5d96aa2db69e1f677c31cd8a509653589c178058285c4e2e72d5095734f6849969f9ff99edfe1794c69733b60047c
 SHA512 
cd4f33e37b2cd9e66d2e80aec28bec56e3d5383f15018b20c1afccd00e74d5f8ac2c6c2d8dde0de4be36aeec1237e2cc9b07326bceb24b2ca819e54c65ae6478

diff --git a/sys-devel/binutils-config/binutils-config-5.1-r1.ebuild 
b/sys-devel/binutils-config/binutils-config-5.1-r2.ebuild
similarity index 86%
rename from sys-devel/binutils-config/binutils-config-5.1-r1.ebuild
rename to sys-devel/binutils-config/binutils-config-5.1-r2.ebuild
index 5cae4a9223..d104bf4fb7 100644
--- a/sys-devel/binutils-config/binutils-config-5.1-r1.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5.1-r2.ebuild
@@ -9,7 +9,7 @@ DESCRIPTION="Utility to change the binutils version being used"
 HOMEPAGE="https://www.gentoo.org/;
 GIT_REV="edc0d44f70c27daebcc080ac5d08e8e191bccd95"
 WRAPPER_REV="${PV%%.*}.3.4"
-SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV}
 -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
+#SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV}
 -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -25,6 +25,7 @@ S=${WORKDIR}
 # NOTE: the ld wrapper is only enabled on rpath versions of prefix.
 src_prepare() {
cp "${FILESDIR}"/${PN}-${PV} ./${PN} || die
+   cp "${FILESDIR}"/ldwrapper.c ./${PN}-ldwrapper-${WRAPPER_REV}.c || die
if use prefix-guest; then
epatch "${FILESDIR}/${PN}-5-ldwrapper.patch"
fi
@@ -42,7 +43,7 @@ src_compile() {
$(tc-getCC)
${CPPFLAGS}
${CFLAGS}
-   -o ldwrapper "${DISTDIR}"/${PN}-ldwrapper-${WRAPPER_REV}.c
+   -o ldwrapper ${PN}-ldwrapper-${WRAPPER_REV}.c
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"
${LDFLAGS}

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 3ff52acc60..07dc6ebf2a 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2017 Gentoo Foundation
+ * Copyright 1999-2019 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
  * Authors: Fabian Groffen 
  *  Michael Haubenwallner 
@@ -58,13 +58,13 @@ find_real_ld(char **ld, size_t ldlen, const char verbose, 
const char is_cross,
ldoverride = getenv("BINUTILS_CONFIG_LD");
if (ldoverride != NULL && *ldoverride != '\0') {
if (verbose)
-   fprintf(stdout, "%s: using BINUTILS_CONFIG_LD=%s "
+   fprintf(stderr, "%s: using BINUTILS_CONFIG_LD=%s "
"from environment\n", wrapper, 
ldoverride);
snprintf(*ld, ldlen, "%s", ldoverride);
return 0;
}
if (verbose)
-   fprintf(stdout, "%s: BINUTILS_CONFIG_LD not found in 
environment\n",
+   fprintf(stderr, "%s: BINUTILS_CONFIG_LD not found in 
environment\n",
wrapper);
 
/* Find ld in PATH, allowing easy PATH overrides.
@@ -94,14 +94,14 @@ find_real_ld(char **ld, size_t ldlen, const char verbose, 
const char is_cross,
/* glue it together */
snprintf(*ld, ldlen, "%.*s/%s", (int)(q - p), p, 
wrapper);
if (verbose)
-   fprintf(stdout, "%s: trying from PATH: %s\n",
+   fprintf(stderr, "%s: trying from PATH: %s\n",
wrapper, *ld);
if (stat(*ld, ) == 0)
return 0;
}
}
if (verbose)
-   fprintf(stdout, "%s: linker not found in PATH\n", wrapper);
+   

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/, sys-devel/binutils-config/files/

2019-05-30 Thread Fabian Groffen
commit: 82c2c71837628069aeb9484d295d304b3387d91c
Author: Fabian Groffen  gentoo  org>
AuthorDate: Thu May 30 09:13:34 2019 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Thu May 30 09:13:34 2019 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=82c2c718

sys-devel/binutils-config: sync (remove interrevisions)

Package-Manager: Portage-2.3.62-prefix, Repoman-2.3.13
Signed-off-by: Fabian Groffen  gentoo.org>

 .../binutils-config/binutils-config-5-r03.5.ebuild |  77 
 ...-r03.4.ebuild => binutils-config-5.1-r1.ebuild} |   6 +-
 .../binutils-config/files/binutils-config-5.1  | 486 +
 3 files changed, 489 insertions(+), 80 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5-r03.5.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r03.5.ebuild
deleted file mode 100644
index a00860e6b2..00
--- a/sys-devel/binutils-config/binutils-config-5-r03.5.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit eutils prefix
-
-DESCRIPTION="Utility to change the binutils version being used"
-HOMEPAGE="https://www.gentoo.org/;
-GIT_REV="edc0d44f70c27daebcc080ac5d08e8e191bccd95"
-WRAPPER_REV="${PV}.3.4"
-SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV}
 -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE=""
-
-# We also RDEPEND on sys-apps/findutils which is in base @system
-RDEPEND="sys-apps/gentoo-functions
-   !https://www.gentoo.org/;
 GIT_REV="edc0d44f70c27daebcc080ac5d08e8e191bccd95"
-WRAPPER_REV="${PV}.3.4"
+WRAPPER_REV="${PV%%.*}.3.4"
 
SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV}
 -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
 
 LICENSE="GPL-2"

diff --git a/sys-devel/binutils-config/files/binutils-config-5.1 
b/sys-devel/binutils-config/files/binutils-config-5.1
new file mode 100644
index 00..f55d529c93
--- /dev/null
+++ b/sys-devel/binutils-config/files/binutils-config-5.1
@@ -0,0 +1,486 @@
+#!/bin/bash
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Format of /etc/env.d/binutils/:
+#  config-TARGET:  CURRENT=version for TARGET
+#  TARGET-VER: has a TARGET and VER variable
+
+EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
+if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then
+   EPREFIX=""
+fi
+
+: ${ROOT:=/}
+[[ ${ROOT} != */ ]] && ROOT="${ROOT}/"
+[[ ${ROOT} != /* ]] && ROOT="${PWD%/}/${ROOT}"
+
+EROOT="${ROOT%/}${EPREFIX}/"
+
+cd "${EPREFIX}/"
+
+trap ":" INT QUIT TSTP
+
+argv0=${0##*/}
+FUNCTIONS_SH="${EPREFIX}/lib/gentoo/functions.sh"
+source ${FUNCTIONS_SH} || {
+   echo "${argv0}: Could not source ${FUNCTIONS_SH}!" 1>&2
+   exit 1
+}
+esyslog() { :; }
+die() { eerror "${argv0}: $*"; exit 1; }
+umask 022
+
+usage() {
+cat << USAGE_END
+Usage: ${HILITE}binutils-config${NORMAL} ${GOOD}[options]${NORMAL} 
${BRACKET}[binutils profile]${NORMAL}
+
+${HILITE}General Options:${NORMAL}
+  ${GOOD}-c, --get-current-profile${NORMAL}  Print current profile
+  ${GOOD}-l, --list-profiles${NORMAL}Print a list of available profiles
+  ${GOOD}-u, --uninstall${NORMAL}Remove all signs of specified 
target
+  ${GOOD}-d, --debug${NORMAL}Execute with debug output
+
+${HILITE}General Cruft:${NORMAL}
+  ${GOOD}--linker${NORMAL}   Switch to specified linker (if 
supported)
+
+Profile names are of the form:  ${BRACKET}-${NORMAL}
+For example:
${BRACKET}i686-pc-linux-gnu-2.15.92.0.2${NORMAL}
+
+For more info, please see ${HILITE}binutils-config${NORMAL}(8).
+USAGE_END
+
+   exit ${1:-1}
+}
+
+mv_if_diff() {
+   if cmp -s "$1" "$2" ; then
+   rm -f "$1"
+   else
+   mv -f "$1" "$2"
+   fi
+}
+atomic_ln() {
+   local target=$1 linkdir=$2 linkname=$3 linktmp linkfull
+   linktmp="${linkdir}/.binutils-config.tmp.${linkname}"
+   linkfull="${linkdir}/${linkname}"
+   if [[ -d ${linkfull} ]] ; then
+   # if linking to a dir, we need a little magic to
+   # make it atomic since `mv -T` is not portable
+   rm -rf "${linktmp}"
+   mkdir -p "${linktmp}"
+   ln -sf "${target}" "${linktmp}/${linkname}"
+   mv "${linktmp}/${linkname}" "${linktmp}/../"
+   rmdir "${linktmp}"
+   else
+   # `ln` will expand into unlink();symlink(); which
+   # is not atomic for a small amount of time, but
+   # `mv` is a single rename() call
+   ln -sf "${target}" "${linktmp}"
+   mv 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/

2019-05-02 Thread Michael Haubenwallner
commit: 8259df57a50a6e2122f50dc3d0918c14288e7ff0
Author: Michael Haubenwallner  gentoo  org>
AuthorDate: Thu May  2 10:55:20 2019 +
Commit: Michael Haubenwallner  gentoo  org>
CommitDate: Thu May  2 11:09:19 2019 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=8259df57

sys-devel/binutils: sync

gold+cxx are p.use.masked in profile now except for linux,
not sure if plugins are linux only as well.

Package-Manager: Portage-2.3.62-prefix, Repoman-2.3.12
RepoMan-Options: --force
Signed-off-by: Michael Haubenwallner  gentoo.org>

 sys-devel/binutils/Manifest|   2 +
 sys-devel/binutils/binutils-2.32-r1.ebuild | 449 +
 sys-devel/binutils/metadata.xml|  23 +-
 3 files changed, 464 insertions(+), 10 deletions(-)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 8e9fc88f0c..f0b01a4653 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -6,3 +6,5 @@ DIST binutils-2.29.1-patches-3.tar.xz 20904 BLAKE2B 
5549cb2412123e4ad3a13935762c
 DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 
83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878
 SHA512 
4063d3426922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
 DIST binutils-2.31.1-patches-3.tar.xz 12640 BLAKE2B 
3444b219dd02ad513e6c36214d649a8a74638382103c88ec8de76a579be0ee13f8d1450e3b8d82dfddad55f2f851b32aee910a99230c7d8673f8426fc79a4cd9
 SHA512 
67b23c17518305561d190a15cba4a1af18a0a3cf1d7e62583ac7667d2fa40e7c7ec024cc981009d5d1caf1939633ab55fc0a198b69af02dc7841be43ff1acd13
 DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 
6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051
 SHA512 
0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
+DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 
8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9
 SHA512 
55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f
+DIST binutils-2.32.tar.xz 20774880 BLAKE2B 
d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6
 SHA512 
d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a

diff --git a/sys-devel/binutils/binutils-2.32-r1.ebuild 
b/sys-devel/binutils/binutils-2.32-r1.ebuild
new file mode 100644
index 00..9ec2e77afe
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.32-r1.ebuild
@@ -0,0 +1,449 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/;
+LICENSE="GPL-3+"
+# USE="+cxx" is a transitional flag until llvm migrates to new flags:
+#bug #677888
+IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test"
+REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )"
+
+# Variables that can be set here:
+# PATCH_VER  - the patchset version
+#  Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#- Default: PV
+# PATCH_DEV  - Use download URI 
https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#  for the patchsets
+#  Default: dilfridge :)
+
+PATCH_VER=2
+PATCH_DEV=dilfridge
+
+case ${PV} in
+   )
+   EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git;
+   inherit git-r3
+   S=${WORKDIR}/binutils
+   EGIT_CHECKOUT_DIR=${S}
+   SLOT=${PV}
+   ;;
+   *.)
+   EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git;
+   inherit git-r3
+   S=${WORKDIR}/binutils
+   EGIT_CHECKOUT_DIR=${S}
+   EGIT_BRANCH=$(get_version_component_range 1-2)
+   EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+   SLOT=$(get_version_component_range 1-2)
+   ;;
+   *)
+   SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+   SLOT=$(get_version_component_range 1-2)
+   KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+   ;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/

2018-10-04 Thread Michael Haubenwallner
commit: 743a6c48a754a71890bfb723cd394ccbe2eb1f1c
Author: Michael Haubenwallner  gentoo  org>
AuthorDate: Thu Oct  4 11:45:34 2018 +
Commit: Michael Haubenwallner  gentoo  org>
CommitDate: Thu Oct  4 11:45:34 2018 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=743a6c48

sys-devel/binutils: sync

Package-Manager: Portage-2.3.40.3-prefix, Repoman-2.3.9
RepoMan-Options: --force

 sys-devel/binutils/Manifest  |   2 +
 sys-devel/binutils/binutils-2.31.1-r1.ebuild | 449 +++
 2 files changed, 451 insertions(+)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index f5bc42ca16..8e9fc88f0c 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -4,3 +4,5 @@ DIST binutils-2.28.1-patches-1.0.tar.xz 19772 BLAKE2B 
146b393b49ba868c7c064c5827
 DIST binutils-2.28.1.tar.bz2 28120394 BLAKE2B 
3a0ed2bcf0c859638546b7460d9e6f0a55518402ff0c65c90ce462a318f5ae6690961616d188ce6cf0271c9f2fb8b7902782d32cf0e711068c53d3d06956d89e
 SHA512 
5ec5212497b0fa8324f6a0884c284cb71c01942bbd39356d1ae745a5c9d97274c10f9d9c723f4bef6f0217662dfcd0c36e4e955a7599b11217658dc7b97553eb
 DIST binutils-2.29.1-patches-3.tar.xz 20904 BLAKE2B 
5549cb2412123e4ad3a13935762cc0dca46215950dbf38a149caf4c6416da382a0fd7ecffe97b10bce4dfdcef5edc2673d49bb21e9d37be37e33b454a8c2bc1a
 SHA512 
ba54efaf9e9f668d2922972acd2cdf5c3e6f174cfcc73d29953ab4ba6e157ce0cb500c583568a4e3b92c9d30c394a327f29b51292acc66f8d3f20f5eae2a
 DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 
83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878
 SHA512 
4063d3426922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
+DIST binutils-2.31.1-patches-3.tar.xz 12640 BLAKE2B 
3444b219dd02ad513e6c36214d649a8a74638382103c88ec8de76a579be0ee13f8d1450e3b8d82dfddad55f2f851b32aee910a99230c7d8673f8426fc79a4cd9
 SHA512 
67b23c17518305561d190a15cba4a1af18a0a3cf1d7e62583ac7667d2fa40e7c7ec024cc981009d5d1caf1939633ab55fc0a198b69af02dc7841be43ff1acd13
+DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 
6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051
 SHA512 
0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30

diff --git a/sys-devel/binutils/binutils-2.31.1-r1.ebuild 
b/sys-devel/binutils/binutils-2.31.1-r1.ebuild
new file mode 100644
index 00..ae9497d18b
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.31.1-r1.ebuild
@@ -0,0 +1,449 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/;
+LICENSE="GPL-3+"
+IUSE="+cxx doc multitarget +nls static-libs test"
+
+# Variables that can be set here:
+# PATCH_VER  - the patchset version
+#  Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+#- Default: PV
+# PATCH_DEV  - Use download URI 
https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+#  for the patchsets
+#  Default: dilfridge :)
+
+PATCH_VER=3
+
+case ${PV} in
+   )
+   EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git;
+   inherit git-r3
+   S=${WORKDIR}/binutils
+   EGIT_CHECKOUT_DIR=${S}
+   SLOT=${PV}
+   ;;
+   *.)
+   EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git;
+   inherit git-r3
+   S=${WORKDIR}/binutils
+   EGIT_CHECKOUT_DIR=${S}
+   EGIT_BRANCH=$(get_version_component_range 1-2)
+   EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
+   SLOT=$(get_version_component_range 1-2)
+   ;;
+   *)
+   SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
+   SLOT=$(get_version_component_range 1-2)
+   KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+   ;;
+esac
+
+#
+# The Gentoo patchset
+#
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-slyfox}
+
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+   
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz;
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+   if [[ ${CATEGORY} == cross-* ]] ; then
+   export CTARGET=${CATEGORY#cross-}
+   fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/

2018-04-07 Thread Fabian Groffen
commit: e3db9ab7035d02c9e902615b8745b86cd2360638
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Apr  7 19:43:06 2018 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Apr  7 19:43:06 2018 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e3db9ab7

sys-devel/binutils-config: stop breaking our gcc installs

Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6

 sys-devel/binutils-config/Manifest |  2 -
 .../binutils-config/binutils-config-5-r03.1.ebuild | 78 --
 ...r03.2.ebuild => binutils-config-5-r03.5.ebuild} |  9 +--
 sys-devel/binutils-config/files/binutils-config-5  |  7 +-
 4 files changed, 10 insertions(+), 86 deletions(-)

diff --git a/sys-devel/binutils-config/Manifest 
b/sys-devel/binutils-config/Manifest
index 290abb8cfc..a28d45bba6 100644
--- a/sys-devel/binutils-config/Manifest
+++ b/sys-devel/binutils-config/Manifest
@@ -1,3 +1 @@
-DIST binutils-config-ldwrapper-5.3.1.c 8342 BLAKE2B 
18658a8188acfcd7494981bd60f53590f5610c7ffd9173f223da740c09acd9ed40aaf911faa6f9a517e5e8779cbaaea9d4398679b7a3037655a7994d9c319345
 SHA512 
af21c1b9bb465990e8490641023403ec27e31bd69f94fc86572392285a540ddc25d59fd8f682c0cb2d2a84c5e33fea08bd0ec2cb52861147075ccfd5e18067b0
-DIST binutils-config-ldwrapper-5.3.2.c 11791 BLAKE2B 
7284c1f201b581b87a3dccfd9c572e0e03fa81af1c72fcd4edce15c53c04329316aa20a1135f7b728e35b3551ebb418eacc599da6a4803924dfddf7fbccaf1be
 SHA512 
5e0917d50ba1cb0daee71bdd225809579bfc0a129c7bed234346f17a21aec6a0cddde35d5bc598924e840c45d6f9e738fd09f969904ca5df6041d38e5e0f0c2e
 DIST binutils-config-ldwrapper-5.3.4.c 13467 BLAKE2B 
132c497c59c1315c4d9e85c842fa5636aac5d96aa2db69e1f677c31cd8a509653589c178058285c4e2e72d5095734f6849969f9ff99edfe1794c69733b60047c
 SHA512 
cd4f33e37b2cd9e66d2e80aec28bec56e3d5383f15018b20c1afccd00e74d5f8ac2c6c2d8dde0de4be36aeec1237e2cc9b07326bceb24b2ca819e54c65ae6478

diff --git a/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
deleted file mode 100644
index c42663d6d1..00
--- a/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils prefix
-
-DESCRIPTION="Utility to change the binutils version being used"
-HOMEPAGE="https://www.gentoo.org/;
-GIT_REV="d469b099b5e8aed45ff2edf78f91822b805440d3"
-WRAPPER_REV="${PV}.3.1"
-SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV}
 -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE=""
-
-# We also RDEPEND on sys-apps/findutils which is in base @system
-RDEPEND="sys-apps/gentoo-functions
-   !https://www.gentoo.org/;
-GIT_REV="e30f557eb73bff37366a44ebbbf4efdc0c616c58"
-WRAPPER_REV="${PV}.3.2"
+GIT_REV="edc0d44f70c27daebcc080ac5d08e8e191bccd95"
+WRAPPER_REV="${PV}.3.4"
 
SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV}
 -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
 
 LICENSE="GPL-2"
@@ -29,6 +29,7 @@ src_prepare() {
epatch "${FILESDIR}/${PN}-5-ldwrapper.patch"
fi
eprefixify ${PN}
+   eapply_user
 }
 
 src_configure() {

diff --git a/sys-devel/binutils-config/files/binutils-config-5 
b/sys-devel/binutils-config/files/binutils-config-5
index e6c5fac002..46eb2b21c4 100755
--- a/sys-devel/binutils-config/files/binutils-config-5
+++ b/sys-devel/binutils-config/files/binutils-config-5
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # Format of /etc/env.d/binutils/:
@@ -159,7 +159,10 @@ switch_profile() {
mkdir -p "${dstlib}"
rm -rf "${ROOT}/${BINPATH_LINKS}"/ldscripts
atomic_ln "${LIBPATH}/ldscripts" "${dstlib}" "ldscripts"
-   find -L "${dstlib}" -xtype l -name 'lib*' -exec rm -f {} +
+   # PREFIX LOCAL: we have gcc under dstlib here, and wiping symlinks
+   # is a very bad idea there, or our symlinked sonames disappear!
+   find -L "${dstlib}"/ldscripts -xtype l -name 'lib*' -exec rm -f {} +
+   # END PREFIX LOCAL
 
#
# Clean out old generated include symlinks



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/

2018-01-31 Thread Fabian Groffen
commit: 72d338d62675e24de16b010444ed2b493a5db4af
Author: Fabian Groffen  gentoo  org>
AuthorDate: Wed Jan 31 09:58:24 2018 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Wed Jan 31 09:58:24 2018 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=72d338d6

sys-devel/binutils-config: interrevbump to fix rpath injection issue

Thanks to inversed logic we no longer included rpaths for -L arguments
given on the command line.

Closes: https://bugs.gentoo.org/642040
Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6

 sys-devel/binutils-config/Manifest  | 2 +-
 ...inutils-config-5-r03.3.ebuild => binutils-config-5-r03.4.ebuild} | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys-devel/binutils-config/Manifest 
b/sys-devel/binutils-config/Manifest
index 06ed4c2363..290abb8cfc 100644
--- a/sys-devel/binutils-config/Manifest
+++ b/sys-devel/binutils-config/Manifest
@@ -1,3 +1,3 @@
 DIST binutils-config-ldwrapper-5.3.1.c 8342 BLAKE2B 
18658a8188acfcd7494981bd60f53590f5610c7ffd9173f223da740c09acd9ed40aaf911faa6f9a517e5e8779cbaaea9d4398679b7a3037655a7994d9c319345
 SHA512 
af21c1b9bb465990e8490641023403ec27e31bd69f94fc86572392285a540ddc25d59fd8f682c0cb2d2a84c5e33fea08bd0ec2cb52861147075ccfd5e18067b0
 DIST binutils-config-ldwrapper-5.3.2.c 11791 BLAKE2B 
7284c1f201b581b87a3dccfd9c572e0e03fa81af1c72fcd4edce15c53c04329316aa20a1135f7b728e35b3551ebb418eacc599da6a4803924dfddf7fbccaf1be
 SHA512 
5e0917d50ba1cb0daee71bdd225809579bfc0a129c7bed234346f17a21aec6a0cddde35d5bc598924e840c45d6f9e738fd09f969904ca5df6041d38e5e0f0c2e
-DIST binutils-config-ldwrapper-5.3.3.c 13467 BLAKE2B 
4ae75c9eb91264d4c300c88419ae3470ae0271473fd1d2267d9b2aa5907423dd646e9feac1e1f215b1a4fa29f59a2e7d02d27118d6e2a7202bc9916a982a21bb
 SHA512 
44892b4e00db432025e3bab08284f2bac5993a554f056fe66d4f85e9020d894e57c7080e41507435e8a4337d48268362045644fa9e7eed2d81c8004c92e6f1c5
+DIST binutils-config-ldwrapper-5.3.4.c 13467 BLAKE2B 
132c497c59c1315c4d9e85c842fa5636aac5d96aa2db69e1f677c31cd8a509653589c178058285c4e2e72d5095734f6849969f9ff99edfe1794c69733b60047c
 SHA512 
cd4f33e37b2cd9e66d2e80aec28bec56e3d5383f15018b20c1afccd00e74d5f8ac2c6c2d8dde0de4be36aeec1237e2cc9b07326bceb24b2ca819e54c65ae6478

diff --git a/sys-devel/binutils-config/binutils-config-5-r03.3.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r03.4.ebuild
similarity index 94%
rename from sys-devel/binutils-config/binutils-config-5-r03.3.ebuild
rename to sys-devel/binutils-config/binutils-config-5-r03.4.ebuild
index 3e79943a7f..a00860e6b2 100644
--- a/sys-devel/binutils-config/binutils-config-5-r03.3.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r03.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -7,8 +7,8 @@ inherit eutils prefix
 
 DESCRIPTION="Utility to change the binutils version being used"
 HOMEPAGE="https://www.gentoo.org/;
-GIT_REV="b93602ba2a0f76a9a85cb36a1740a4522e45ce36"
-WRAPPER_REV="${PV}.3.3"
+GIT_REV="edc0d44f70c27daebcc080ac5d08e8e191bccd95"
+WRAPPER_REV="${PV}.3.4"
 
SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV}
 -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
 
 LICENSE="GPL-2"



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2018-01-31 Thread Fabian Groffen
commit: edc0d44f70c27daebcc080ac5d08e8e191bccd95
Author: Fabian Groffen  gentoo  org>
AuthorDate: Wed Jan 31 09:49:10 2018 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Wed Jan 31 09:50:06 2018 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=edc0d44f

sys-devel/binutils-config: fix inversed logic

Obviously we should skip turning -L into -R if the path points inside
PORTAGE_BUILDDIR, not the other way around.

Thanks to this, bugs like #642040 surfaced.

Bug: https://bugs.gentoo.org/642040

 sys-devel/binutils-config/files/ldwrapper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 1ed11ce42d..3ff52acc60 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -428,7 +428,7 @@ main(int argc, char *argv[])
continue;
 
/* does it refer to the build directory? skip */
-   if (builddir != NULL && strncmp(builddir, path, len) != 
0)
+   if (builddir != NULL && strncmp(builddir, path, len) == 
0)
continue;
 
if (is_darwin) {



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/

2017-12-29 Thread Fabian Groffen
commit: 5512e7b13a99aed764a069dc1ad7aa3059203b8d
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri Dec 29 15:01:38 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri Dec 29 15:01:38 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=5512e7b1

sys-devel/binutils-config: revbump to enable -rpath on Darwin

Closes: https://bugs.gentoo.org/642616
Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6

 sys-devel/binutils-config/Manifest   | 1 +
 sys-devel/binutils-config/binutils-config-5-r03.1.ebuild | 2 +-
 sys-devel/binutils-config/binutils-config-5-r03.2.ebuild | 2 +-
 ...tils-config-5-r03.2.ebuild => binutils-config-5-r03.3.ebuild} | 9 +
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/sys-devel/binutils-config/Manifest 
b/sys-devel/binutils-config/Manifest
index 335242f446..06ed4c2363 100644
--- a/sys-devel/binutils-config/Manifest
+++ b/sys-devel/binutils-config/Manifest
@@ -1,2 +1,3 @@
 DIST binutils-config-ldwrapper-5.3.1.c 8342 BLAKE2B 
18658a8188acfcd7494981bd60f53590f5610c7ffd9173f223da740c09acd9ed40aaf911faa6f9a517e5e8779cbaaea9d4398679b7a3037655a7994d9c319345
 SHA512 
af21c1b9bb465990e8490641023403ec27e31bd69f94fc86572392285a540ddc25d59fd8f682c0cb2d2a84c5e33fea08bd0ec2cb52861147075ccfd5e18067b0
 DIST binutils-config-ldwrapper-5.3.2.c 11791 BLAKE2B 
7284c1f201b581b87a3dccfd9c572e0e03fa81af1c72fcd4edce15c53c04329316aa20a1135f7b728e35b3551ebb418eacc599da6a4803924dfddf7fbccaf1be
 SHA512 
5e0917d50ba1cb0daee71bdd225809579bfc0a129c7bed234346f17a21aec6a0cddde35d5bc598924e840c45d6f9e738fd09f969904ca5df6041d38e5e0f0c2e
+DIST binutils-config-ldwrapper-5.3.3.c 13467 BLAKE2B 
4ae75c9eb91264d4c300c88419ae3470ae0271473fd1d2267d9b2aa5907423dd646e9feac1e1f215b1a4fa29f59a2e7d02d27118d6e2a7202bc9916a982a21bb
 SHA512 
44892b4e00db432025e3bab08284f2bac5993a554f056fe66d4f85e9020d894e57c7080e41507435e8a4337d48268362045644fa9e7eed2d81c8004c92e6f1c5

diff --git a/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
index 142a1e62ee..c42663d6d1 100644
--- a/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
@@ -41,7 +41,7 @@ src_compile() {
$(tc-getCC)
${CPPFLAGS}
${CFLAGS}
-   -o ldwrapper "${S}"/${PN}-ldwrapper-${WRAPPER_REV}.c
+   -o ldwrapper "${DISTDIR}"/${PN}-ldwrapper-${WRAPPER_REV}.c
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"
$([[ ${CHOST} == *-darwin* ]] && echo -DTARGET_DARWIN)

diff --git a/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
index 7aaa0d9ed7..f6ea065833 100644
--- a/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
@@ -41,7 +41,7 @@ src_compile() {
$(tc-getCC)
${CPPFLAGS}
${CFLAGS}
-   -o ldwrapper "${S}"/${PN}-ldwrapper-${WRAPPER_REV}.c
+   -o ldwrapper "${DISTDIR}"/${PN}-ldwrapper-${WRAPPER_REV}.c
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"
${LDFLAGS}

diff --git a/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r03.3.ebuild
similarity index 92%
copy from sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
copy to sys-devel/binutils-config/binutils-config-5-r03.3.ebuild
index 7aaa0d9ed7..3e79943a7f 100644
--- a/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r03.3.ebuild
@@ -1,14 +1,14 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="5"
+EAPI="6"
 
 inherit eutils prefix
 
 DESCRIPTION="Utility to change the binutils version being used"
 HOMEPAGE="https://www.gentoo.org/;
-GIT_REV="e30f557eb73bff37366a44ebbbf4efdc0c616c58"
-WRAPPER_REV="${PV}.3.2"
+GIT_REV="b93602ba2a0f76a9a85cb36a1740a4522e45ce36"
+WRAPPER_REV="${PV}.3.3"
 
SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV}
 -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
 
 LICENSE="GPL-2"
@@ -29,6 +29,7 @@ src_prepare() {
epatch "${FILESDIR}/${PN}-5-ldwrapper.patch"
fi
eprefixify ${PN}
+   eapply_user
 }
 
 src_configure() {
@@ -41,7 +42,7 @@ src_compile() {
$(tc-getCC)
${CPPFLAGS}
${CFLAGS}
-   -o ldwrapper "${S}"/${PN}-ldwrapper-${WRAPPER_REV}.c
+   -o ldwrapper "${DISTDIR}"/${PN}-ldwrapper-${WRAPPER_REV}.c
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"
${LDFLAGS}



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2017-12-29 Thread Fabian Groffen
commit: b93602ba2a0f76a9a85cb36a1740a4522e45ce36
Author: Michael Weiser  gmx  de>
AuthorDate: Wed Dec 27 21:36:35 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri Dec 29 14:54:50 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=b93602ba

sys-devel/binutils-config: Use -rpath on Darwin

Extend ldwrapper to inject -rpath options into the linker command line
on darwin as well. Only do so if ld64 would not refuse to accept them.
This can happen if the output type doesn't support it (static, kext,
...) or the deployment target is unspecified or did not support -rpath
yet (< 10.5). The latter is not usually a problem since portage
(MACOSX_DEPLOYMENT_TARGET) and clang (-macosx_version_min) always set
the deployment target explicitly.

Signed-off-by: Michael Weiser  gmx.de>
Signed-off-by: Fabian Groffen  gentoo.org>

 sys-devel/binutils-config/files/ldwrapper.c | 79 -
 1 file changed, 67 insertions(+), 12 deletions(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index a8f140be27..1ed11ce42d 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -205,8 +205,10 @@ main(int argc, char *argv[])
char ldbuf[ESIZ];
char *ld = ldbuf;
char ctarget[128];
+   char *darwin_dt = getenv("MACOSX_DEPLOYMENT_TARGET");
char is_cross = 0;
char is_darwin = 0;
+   char darwin_use_rpath = 1;
char is_aix = 0;
char *p;
size_t len;
@@ -287,18 +289,52 @@ main(int argc, char *argv[])
newargc++;
if (argv[i][1] == 'v' || argv[i][1] == 'V')
verbose = 1;
+   if (strcmp(argv[i], "-macosx_version_min") == 0 && i < 
argc - 1)
+   darwin_dt = argv[i + 1];
+   /* ld64 will refuse to accept -rpath if any of the
+* following options are given */
+   if (strcmp(argv[i], "-static") == 0 ||
+   strcmp(argv[i], "-dylinker") == 0 ||
+   strcmp(argv[i], "-preload") == 0 ||
+   strcmp(argv[i], "-r") == 0 ||
+   strcmp(argv[i], "-kext") == 0)
+   darwin_use_rpath = 0;
}
}
-   /* account the original arguments */
-   newargc += argc;
-   /* we always add a sentinel */
-   newargc++;
+
+   /* Note: Code below assumes that newargc is the count of -L arguments. 
*/
 
/* If a package being cross-compiled injects standard directories, it's
 * non-cross-compilable on any platform, prefix or no prefix. So no
 * need to add PREFIX- or CTARGET-aware libdirs. */
if (!is_cross) {
if (is_darwin) {
+   /* check deployment target if nothing prevents us from
+* using -rpath as of yet
+* # ld64 -rpath foo
+* ld: -rpath can only be used when targeting Mac OS X
+* 10.5 or later */
+   if (darwin_use_rpath) {
+   /* version format is x.y.z. atoi will stop
+* parsing at dots. darwin_dt != NULL isn't
+* just for safety: ld64 also refuses -rpath
+* when not given a deployment target at all */
+   darwin_use_rpath = darwin_dt != NULL &&
+   (atoi(darwin_dt) > 10 ||
+(strncmp(darwin_dt, "10.", 3) == 0 &&
+ atoi(darwin_dt + 3) >= 5));
+   }
+
+   if (darwin_use_rpath) {
+   /* We need two additional arguments for each:
+* -rpath and the path itself */
+   newargc *= 2;
+
+   /* and we will be adding two for the each of
+* the two system paths as well */
+   newargc += 4;
+   }
+
/* add the 2 prefix paths (-L) and -search_paths_first 
*/
newargc += 2 + 1;
} else {
@@ -312,6 +348,11 @@ main(int argc, char *argv[])
}
}
 
+   /* account the original arguments */
+   newargc += argc;
+   /* we always add a sentinel */
+   newargc++;
+
/* let's first try to find the real ld */
if (find_real_ld(, sizeof(ldbuf), verbose, is_cross,
wrapper, ctarget) != 0)
@@ -358,7 +399,7 @@ main(int argc, 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/

2017-12-29 Thread Fabian Groffen
commit: 1db6aa933a906cbaa7e81f1c486154d4d1fff3b9
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri Dec 29 14:54:23 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri Dec 29 14:54:23 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=1db6aa93

sys-devel/binutils-config: fix version of source code

Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6

 sys-devel/binutils-config/Manifest   | 1 +
 sys-devel/binutils-config/binutils-config-5-r03.2.ebuild | 6 --
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils-config/Manifest 
b/sys-devel/binutils-config/Manifest
index 03c89e40d2..335242f446 100644
--- a/sys-devel/binutils-config/Manifest
+++ b/sys-devel/binutils-config/Manifest
@@ -1 +1,2 @@
 DIST binutils-config-ldwrapper-5.3.1.c 8342 BLAKE2B 
18658a8188acfcd7494981bd60f53590f5610c7ffd9173f223da740c09acd9ed40aaf911faa6f9a517e5e8779cbaaea9d4398679b7a3037655a7994d9c319345
 SHA512 
af21c1b9bb465990e8490641023403ec27e31bd69f94fc86572392285a540ddc25d59fd8f682c0cb2d2a84c5e33fea08bd0ec2cb52861147075ccfd5e18067b0
+DIST binutils-config-ldwrapper-5.3.2.c 11791 BLAKE2B 
7284c1f201b581b87a3dccfd9c572e0e03fa81af1c72fcd4edce15c53c04329316aa20a1135f7b728e35b3551ebb418eacc599da6a4803924dfddf7fbccaf1be
 SHA512 
5e0917d50ba1cb0daee71bdd225809579bfc0a129c7bed234346f17a21aec6a0cddde35d5bc598924e840c45d6f9e738fd09f969904ca5df6041d38e5e0f0c2e

diff --git a/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
index 942065aee5..7aaa0d9ed7 100644
--- a/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
@@ -7,7 +7,9 @@ inherit eutils prefix
 
 DESCRIPTION="Utility to change the binutils version being used"
 HOMEPAGE="https://www.gentoo.org/;
-SRC_URI=""
+GIT_REV="e30f557eb73bff37366a44ebbbf4efdc0c616c58"
+WRAPPER_REV="${PV}.3.2"
+SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV}
 -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -39,7 +41,7 @@ src_compile() {
$(tc-getCC)
${CPPFLAGS}
${CFLAGS}
-   -o ldwrapper "${FILESDIR}"/ldwrapper.c
+   -o ldwrapper "${S}"/${PN}-ldwrapper-${WRAPPER_REV}.c
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"
${LDFLAGS}



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2017-12-27 Thread Fabian Groffen
commit: e30f557eb73bff37366a44ebbbf4efdc0c616c58
Author: Fabian Groffen  gentoo  org>
AuthorDate: Wed Dec 27 09:04:46 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Wed Dec 27 09:04:46 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e30f557e

sys-devel/binutils-config: fix path unraveling, thanks Michael Weiser, bug 
#583202

Bug: https://bugs.gentoo.org/583202
Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6

 sys-devel/binutils-config/files/ldwrapper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index f1d5bef7d4..a8f140be27 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -228,7 +228,7 @@ main(int argc, char *argv[])
 
/* see to case 2 first */
*p = '\0';
-   if ((q = strrchr(p - 1, '/')) != NULL) {
+   if ((q = strrchr(wrapper, '/')) != NULL) {
/* q points to "/" now */
len = strlen("/gcc");
if (q - len > wrapper && strncmp(q - len, "/gcc", len) 
== 0)



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2017-12-25 Thread Fabian Groffen
commit: 554171c6a3d43f87ac771e45be2b5136b18fd2af
Author: Michael Weiser  weiser  dinsnail  net>
AuthorDate: Sun Dec 24 14:40:33 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sun Dec 24 14:40:33 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=554171c6

sys-devel/binutils-config: add cross-support to ldwrapper

I've extended ldwrapper:
- to detect a cross-ld at runtime from the argv[0] it was called with,
- always call ld with the full path in argv[0] so it can find its
ldscript directory relative to that
- incidentally fix a bug where finding ld via binutils-config could
never have worked since previous tries to find it via PATH had reduced
PATH to its first component where binutils-config would not usually be

 sys-devel/binutils-config/files/ldwrapper.c | 392 +++-
 1 file changed, 274 insertions(+), 118 deletions(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 80831a7142..81b78adf20 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -13,6 +13,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 /**
  * ldwrapper: Prefix helper to inject -L and -R flags to the invocation
@@ -38,9 +40,20 @@
 # error CHOST must be defined!
 #endif
 
+static inline int is_cross(const char *ctarget) {
+   return strcmp(ctarget, CHOST);
+}
+
+static inline int is_darwin(const char *ctarget) {
+   return (strstr(ctarget, "-darwin") != NULL);
+}
 
-static inline void
-find_real_ld(char **ld, char verbose, char *wrapper)
+static inline int is_aix(const char *ctarget) {
+   return (strstr(ctarget, "-aix") != NULL);
+}
+
+static inline char *
+find_real_ld(const char verbose, const char *wrapper, const char *ctarget)
 {
FILE *f = NULL;
char *ldoveride;
@@ -48,9 +61,9 @@ find_real_ld(char **ld, char verbose, char *wrapper)
 #define ESIZ 1024  /* POSIX_MAX_PATH */
char *ret;
struct stat lde;
-
-   /* we may not succeed finding the linker */
-   *ld = NULL;
+   char *config;
+   const char *config_prefix;
+   size_t configlen;
 
/* respect the override in environment */
ldoveride = getenv("BINUTILS_CONFIG_LD");
@@ -58,92 +71,164 @@ find_real_ld(char **ld, char verbose, char *wrapper)
if (verbose)
fprintf(stdout, "%s: using BINUTILS_CONFIG_LD=%s "
"from environment\n", wrapper, 
ldoveride);
-   *ld = ldoveride;
-   return;
+   return ldoveride;
}
if (verbose)
fprintf(stdout, "%s: BINUTILS_CONFIG_LD not found in 
environment\n",
wrapper);
-   
+
ret = malloc(sizeof(char) * ESIZ);
-   if (ret == NULL)
-   return;
-
-   /* find ld in PATH, allowing easy PATH overrides */
-   path = getenv("PATH");
-   while (path > (char*)1 && *path != '\0') {
-   char *q = strchr(path, ':');
-   if (q)
-   *q = '\0';
-   if (strstr(path, "/" CHOST "/binutils-bin/") != NULL) {
-   snprintf(ret, ESIZ, "%s/%s", path, wrapper);
-   if (stat(ret, ) == 0)
-   *ld = ret;
+   if (ret == NULL) {
+   fprintf(stderr, "%s: out of memory allocating string for path 
to ld\n",
+   wrapper);
+   exit(1);
+   }
+
+   /* find ld in PATH, allowing easy PATH overrides. strdup it because
+* modifying it would otherwise corrupt the actual PATH environment
+* variable which we might need to be intact later on to call
+* binutils-config via popen. */
+   path = strdup(getenv("PATH"));
+   if (path != NULL && *path != '\0') {
+   char *p;
+   char *q;
+   char *match;
+   const char *match_anchor = "/binutils-bin/";
+   size_t matchlen = 1 + strlen(ctarget) +
+   strlen(match_anchor) + 1;
+
+   match = malloc(sizeof(char) * matchlen);
+   if (match == NULL) {
+   fprintf(stderr, "%s: out of memory allocating "
+   "buffer for path matching\n",
+   wrapper);
+   exit(1);
+   }
+
+   /* construct /CTARGET/binutils-bin/ for matchin against PATH */
+   snprintf(match, matchlen, "/%s%s", ctarget, match_anchor);
+
+   for (p = path; (q = strchr(p, ':')) != NULL; p = q + 1) {
+   if (q)
+   *q = '\0';
+   if (strstr(p, match) != NULL) {
+   snprintf(ret, ESIZ, "%s/%s", p, wrapper);
+   

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/, sys-devel/binutils-config/files/

2017-12-25 Thread Fabian Groffen
commit: 548521db9b370ac42d6497a4bdcc9fe73ce25019
Author: Fabian Groffen  gentoo  org>
AuthorDate: Mon Dec 25 19:47:01 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Mon Dec 25 19:47:01 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=548521db

sys-devel/binutils-config: rework cross-support

This is on top of previous commit which is Michael Weiser's work from
bug #583202.  This rework avoids some mallocs, and tries to optimise the
path needed for a run.

Closes: https://bugs.gentoo.org/583202
Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6

 sys-devel/binutils-config/Manifest |   1 +
 .../binutils-config/binutils-config-5-r03.1.ebuild |   8 +-
 ...r03.1.ebuild => binutils-config-5-r03.2.ebuild} |   6 +-
 sys-devel/binutils-config/files/ldwrapper.c| 334 +
 4 files changed, 156 insertions(+), 193 deletions(-)

diff --git a/sys-devel/binutils-config/Manifest 
b/sys-devel/binutils-config/Manifest
new file mode 100644
index 00..03c89e40d2
--- /dev/null
+++ b/sys-devel/binutils-config/Manifest
@@ -0,0 +1 @@
+DIST binutils-config-ldwrapper-5.3.1.c 8342 BLAKE2B 
18658a8188acfcd7494981bd60f53590f5610c7ffd9173f223da740c09acd9ed40aaf911faa6f9a517e5e8779cbaaea9d4398679b7a3037655a7994d9c319345
 SHA512 
af21c1b9bb465990e8490641023403ec27e31bd69f94fc86572392285a540ddc25d59fd8f682c0cb2d2a84c5e33fea08bd0ec2cb52861147075ccfd5e18067b0

diff --git a/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
index dc74595d72..142a1e62ee 100644
--- a/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
@@ -7,7 +7,9 @@ inherit eutils prefix
 
 DESCRIPTION="Utility to change the binutils version being used"
 HOMEPAGE="https://www.gentoo.org/;
-SRC_URI=""
+GIT_REV="d469b099b5e8aed45ff2edf78f91822b805440d3"
+WRAPPER_REV="${PV}.3.1"
+SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV}
 -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -27,8 +29,6 @@ src_prepare() {
epatch "${FILESDIR}/${PN}-5-ldwrapper.patch"
fi
eprefixify ${PN}
-
-   cp "${FILESDIR}"/ldwrapper.c . || die
 }
 
 src_configure() {
@@ -41,7 +41,7 @@ src_compile() {
$(tc-getCC)
${CPPFLAGS}
${CFLAGS}
-   -o ldwrapper ldwrapper.c
+   -o ldwrapper "${S}"/${PN}-ldwrapper-${WRAPPER_REV}.c
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"
$([[ ${CHOST} == *-darwin* ]] && echo -DTARGET_DARWIN)

diff --git a/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
similarity index 90%
copy from sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
copy to sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
index dc74595d72..942065aee5 100644
--- a/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
@@ -27,8 +27,6 @@ src_prepare() {
epatch "${FILESDIR}/${PN}-5-ldwrapper.patch"
fi
eprefixify ${PN}
-
-   cp "${FILESDIR}"/ldwrapper.c . || die
 }
 
 src_configure() {
@@ -41,11 +39,9 @@ src_compile() {
$(tc-getCC)
${CPPFLAGS}
${CFLAGS}
-   -o ldwrapper ldwrapper.c
+   -o ldwrapper "${FILESDIR}"/ldwrapper.c
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"
-   $([[ ${CHOST} == *-darwin* ]] && echo -DTARGET_DARWIN)
-   $([[ ${CHOST} == *-aix* ]] && echo -DTARGET_AIX)
${LDFLAGS}
)
echo ${args[*]}

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 81b78adf20..bf9f00728b 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -12,9 +12,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
-#include 
-#include 
+#include 
 
 /**
  * ldwrapper: Prefix helper to inject -L and -R flags to the invocation
@@ -40,89 +40,65 @@
 # error CHOST must be defined!
 #endif
 
-static inline int is_cross(const char *ctarget) {
-   return strcmp(ctarget, CHOST);
-}
-
-static inline int is_darwin(const char *ctarget) {
-   return (strstr(ctarget, "-darwin") != NULL);
-}
-
-static inline int is_aix(const char *ctarget) {
-   return (strstr(ctarget, "-aix") != NULL);
-}
+#define ESIZ 1024  /* POSIX_MAX_PATH */
 
-static inline char *
-find_real_ld(const char verbose, const char *wrapper, const char *ctarget)
+static inline char
+find_real_ld(char **ld, size_t ldlen, const char verbose, const char is_cross,
+   const char *wrapper, const char *ctarget)
 {
FILE *f = 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2017-11-29 Thread Fabian Groffen
commit: d469b099b5e8aed45ff2edf78f91822b805440d3
Author: Fabian Groffen  gentoo  org>
AuthorDate: Wed Nov 29 15:17:47 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Wed Nov 29 15:17:47 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=d469b099

sys-devel/binutils-config: fix returned buffer from find_real_ld, bug #639172

Package-Manager: Portage-2.3.13-prefix, Repoman-2.3.4

 sys-devel/binutils-config/files/ldwrapper.c | 35 -
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 88f93a8602..80831a7142 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -45,8 +45,8 @@ find_real_ld(char **ld, char verbose, char *wrapper)
FILE *f = NULL;
char *ldoveride;
char *path;
-#define ESIZ 1024
-   char e[ESIZ];
+#define ESIZ 1024  /* POSIX_MAX_PATH */
+   char *ret;
struct stat lde;
 
/* we may not succeed finding the linker */
@@ -65,6 +65,10 @@ find_real_ld(char **ld, char verbose, char *wrapper)
fprintf(stdout, "%s: BINUTILS_CONFIG_LD not found in 
environment\n",
wrapper);

+   ret = malloc(sizeof(char) * ESIZ);
+   if (ret == NULL)
+   return;
+
/* find ld in PATH, allowing easy PATH overrides */
path = getenv("PATH");
while (path > (char*)1 && *path != '\0') {
@@ -72,9 +76,9 @@ find_real_ld(char **ld, char verbose, char *wrapper)
if (q)
*q = '\0';
if (strstr(path, "/" CHOST "/binutils-bin/") != NULL) {
-   snprintf(e, ESIZ, "%s/%s", path, wrapper);
-   if (stat(e, ) == 0)
-   *ld = e;
+   snprintf(ret, ESIZ, "%s/%s", path, wrapper);
+   if (stat(ret, ) == 0)
+   *ld = ret;
}
if (q)
*q = ':'; /* restore PATH value */
@@ -88,7 +92,7 @@ find_real_ld(char **ld, char verbose, char *wrapper)
/* parse EPREFIX/etc/env.d/binutils/config-CHOST to get CURRENT, then
 * consider $EPREFIX/usr/CHOST/binutils-bin/CURRENT where we should
 * be able to find ld */
-   e[0] = '\0';
+   ret[0] = '\0';
if ((f = fopen(EPREFIX "/etc/env.d/binutils/config-" CHOST, "r")) != 
NULL) {
char p[ESIZ];
while (fgets(p, ESIZ, f) != NULL) {
@@ -99,25 +103,25 @@ find_real_ld(char **ld, char verbose, char *wrapper)
for (q--; isspace(*q); q--)
*q = '\0';
;
-   snprintf(e, ESIZ, EPREFIX "/usr/" CHOST 
"/binutils-bin/%s/%s",
+   snprintf(ret, ESIZ, EPREFIX "/usr/" CHOST 
"/binutils-bin/%s/%s",
p + strlen("CURRENT="), 
wrapper);
break;
}
}
fclose(f);
-   if (stat(e, ) == 0) {
-   *ld = e;
+   if (stat(ret, ) == 0) {
+   *ld = ret;
return;
}
}
if (verbose)
fprintf(stdout, "%s: linker not found via " EPREFIX
"/etc/env.d/binutils/config-" CHOST " 
(ld=%s)\n",
-   wrapper, e);
+   wrapper, ret);

/* last try, call binutils-config to tell us what the linker is
 * supposed to be */
-   e[0] = '\0';
+   ret[0] = '\0';
if ((f = popen("binutils-config -c", "r")) != NULL) {
char p[ESIZ];
char *q;
@@ -125,20 +129,21 @@ find_real_ld(char **ld, char verbose, char *wrapper)
q = p;
if (strncmp(q, CHOST "-", strlen(CHOST "-")) == 0)
q += strlen(CHOST "-");
-   snprintf(e, ESIZ, EPREFIX "/usr/" CHOST 
"/binutils-bin/%s/%s",
+   snprintf(ret, ESIZ, EPREFIX "/usr/" CHOST 
"/binutils-bin/%s/%s",
q, wrapper);
} else {
*p = '\0';
}
fclose(f);
-   if (*p && stat(e, ) == 0) {
-   *ld = e;
+   if (*p && stat(ret, ) == 0) {
+   *ld = ret;
return;
}
}
if (verbose)
fprintf(stdout, "%s: linker not found via binutils-config -c 
(ld=%s)\n",
-   wrapper, e);
+   wrapper, 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/

2017-11-29 Thread Fabian Groffen
commit: 008436ec1f0eb3050170d394829ccf4fd003285d
Author: Fabian Groffen  gentoo  org>
AuthorDate: Wed Nov 29 14:35:03 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Wed Nov 29 14:35:03 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=008436ec

sys-devel/binutils-config: interrevbump for bug #639172

Package-Manager: Portage-2.3.13-prefix, Repoman-2.3.4

 .../{binutils-config-5-r3.ebuild => binutils-config-5-r03.1.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-config/binutils-config-5-r3.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
similarity index 97%
rename from sys-devel/binutils-config/binutils-config-5-r3.ebuild
rename to sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
index 5d03556928..dc74595d72 100644
--- a/sys-devel/binutils-config/binutils-config-5-r3.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
@@ -53,7 +53,7 @@ src_compile() {
 }
 
 src_install() {
-   newbin "${FILESDIR}"/${PN}-${PV} ${PN}
+   dobin ${PN}
use prefix && eprefixify "${ED}"/usr/bin/${PN}
sed -i "s:@PV@:${PVR}:g" "${ED}"/usr/bin/${PN} || die
doman "${FILESDIR}"/${PN}.8



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2017-11-25 Thread Fabian Groffen
commit: e24576aae416fbe8c86b4bd528ba86dd79c5a062
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Nov 25 15:40:49 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Nov 25 15:40:49 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e24576aa

sys-devel/binutils-config: avoid malloc for fixed-size bugger

Package-Manager: Portage-2.3.13-prefix, Repoman-2.3.4

 sys-devel/binutils-config/files/ldwrapper.c | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index c971ef4d9d..fda6e9b603 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -1,7 +1,8 @@
 /*
- * Copyright 1999-2013 Gentoo Foundation
+ * Copyright 1999-2017 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
  * Authors: Fabian Groffen 
+ *  Michael Haubenwallner 
  */
 
 #include 
@@ -19,6 +20,7 @@
  *
  * On Darwin it adds -search_path_first to make sure the given paths are
  * searched before the default search path.
+ * On AIX it ensures -bsvr4 is the last argument.
  * The wrapper will inject -L entries for:
  *   - EPREFIX/usr/CHOST/lib/gcc (when gcc)
  *   - EPREFIX/usr/CHOST/lib (when binutils)
@@ -44,7 +46,7 @@ find_real_ld(char **ld, char verbose, char *wrapper)
char *ldoveride;
char *path;
 #define ESIZ 1024
-   char *e;
+   char e[ESIZ];
struct stat lde;
 
/* we may not succeed finding the linker */
@@ -63,12 +65,6 @@ find_real_ld(char **ld, char verbose, char *wrapper)
fprintf(stdout, "%s: BINUTILS_CONFIG_LD not found in 
environment\n",
wrapper);

-   if ((e = malloc(sizeof(char) * ESIZ)) == NULL) {
-   fprintf(stderr, "%s: out of memory allocating string for path 
to ld\n",
-   wrapper);
-   exit(1);
-   }
-
/* find ld in PATH, allowing easy PATH overrides */
path = getenv("PATH");
while (path > (char*)1 && *path != '\0') {
@@ -92,7 +88,7 @@ find_real_ld(char **ld, char verbose, char *wrapper)
/* parse EPREFIX/etc/env.d/binutils/config-CHOST to get CURRENT, then
 * consider $EPREFIX/usr/CHOST/binutils-bin/CURRENT where we should
 * be able to find ld */
-   *e = '\0';
+   e[0] = '\0';
if ((f = fopen(EPREFIX "/etc/env.d/binutils/config-" CHOST, "r")) != 
NULL) {
char p[ESIZ];
while (fgets(p, ESIZ, f) != NULL) {
@@ -121,7 +117,7 @@ find_real_ld(char **ld, char verbose, char *wrapper)

/* last try, call binutils-config to tell us what the linker is
 * supposed to be */
-   *e = '\0';
+   e[0] = '\0';
if ((f = popen("binutils-config -c", "r")) != NULL) {
char p[ESIZ];
char *q;



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/, sys-devel/binutils-config/files/

2017-11-25 Thread Fabian Groffen
commit: a4196f18f658bc8e244b906344e0fdcdb5160277
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Nov 25 18:33:29 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Nov 25 18:33:29 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=a4196f18

sys-devel/binutils-config: sync

Package-Manager: Portage-2.3.13-prefix, Repoman-2.3.4

 ...-5-r02.1.ebuild => binutils-config-5-r3.ebuild} | 17 -
 sys-devel/binutils-config/files/binutils-config-5  | 41 +-
 sys-devel/binutils-config/files/binutils-config.8  | 14 +++-
 sys-devel/binutils-config/files/ldwrapper.c|  6 ++--
 4 files changed, 31 insertions(+), 47 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5-r02.1.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r3.ebuild
similarity index 87%
rename from sys-devel/binutils-config/binutils-config-5-r02.1.ebuild
rename to sys-devel/binutils-config/binutils-config-5-r3.ebuild
index 07c6b494dc..5d03556928 100644
--- a/sys-devel/binutils-config/binutils-config-5-r02.1.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r3.ebuild
@@ -1,16 +1,18 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI="5"
 
 inherit eutils prefix
 
 DESCRIPTION="Utility to change the binutils version being used"
 HOMEPAGE="https://www.gentoo.org/;
+SRC_URI=""
 
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
 
 # We also RDEPEND on sys-apps/findutils which is in base @system
 RDEPEND="sys-apps/gentoo-functions
@@ -43,6 +45,7 @@ src_compile() {
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"
$([[ ${CHOST} == *-darwin* ]] && echo -DTARGET_DARWIN)
+   $([[ ${CHOST} == *-aix* ]] && echo -DTARGET_AIX)
${LDFLAGS}
)
echo ${args[*]}
@@ -50,7 +53,9 @@ src_compile() {
 }
 
 src_install() {
-   newbin "${S}"/${PN} ${PN}
+   newbin "${FILESDIR}"/${PN}-${PV} ${PN}
+   use prefix && eprefixify "${ED}"/usr/bin/${PN}
+   sed -i "s:@PV@:${PVR}:g" "${ED}"/usr/bin/${PN} || die
doman "${FILESDIR}"/${PN}.8
 
dodir /usr/$(get_libdir)/misc/binutils-config
@@ -71,11 +76,3 @@ pkg_preinst() {
fi
fi
 }
-
-pkg_postinst() {
-   # refresh all links and the wrapper
-   if [[ ${ROOT%/} == "" ]] ; then
-   [[ -f ${EROOT}/etc/env.d/binutils/config-${CHOST} ]] \
-   && binutils-config $(binutils-config 
--get-current-profile)
-   fi
-}

diff --git a/sys-devel/binutils-config/files/binutils-config-5 
b/sys-devel/binutils-config/files/binutils-config-5
index 3052a8593d..e6c5fac002 100755
--- a/sys-devel/binutils-config/files/binutils-config-5
+++ b/sys-devel/binutils-config/files/binutils-config-5
@@ -1,15 +1,15 @@
 #!/bin/bash
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 # Format of /etc/env.d/binutils/:
 #  config-TARGET:  CURRENT=version for TARGET
 #  TARGET-VER: has a TARGET and VER variable
 
-: ${EPREFIX:="@GENTOO_PORTAGE_EPREFIX@"}
-[[ ${EPREFIX} = */ ]] && EPREFIX="${EPREFIX%/}"
-[[ -n ${EPREFIX} && ${EPREFIX} != /* ]] && EPREFIX="${PWD%/}/${EPREFIX}"
+EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
+if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then
+   EPREFIX=""
+fi
 
 : ${ROOT:=/}
 [[ ${ROOT} != */ ]] && ROOT="${ROOT}/"
@@ -22,7 +22,7 @@ cd "${EPREFIX}/"
 trap ":" INT QUIT TSTP
 
 argv0=${0##*/}
-FUNCTIONS_SH="@GENTOO_PORTAGE_EPREFIX@/lib/gentoo/functions.sh"
+FUNCTIONS_SH="${EPREFIX}/lib/gentoo/functions.sh"
 source ${FUNCTIONS_SH} || {
echo "${argv0}: Could not source ${FUNCTIONS_SH}!" 1>&2
exit 1
@@ -103,7 +103,7 @@ setup_env() {
# Newer paths: /usr/${HOST}/${TARGET}/...
# Older paths: /usr/${TARGET}/...
#
-   if [[ -d 
${ROOT}${EPREFIX}/usr/${HOST}/${TARGET}/binutils-bin/${VER} ]] ; then
+   if [[ -d "${EROOT}"/usr/${HOST}/${TARGET}/binutils-bin/${VER} 
]] ; then

BINPATH="${EPREFIX}"/usr/${HOST}/${TARGET}/binutils-bin/${VER}
BINPATH_LINKS="${EPREFIX}"/usr/libexec/gcc/${TARGET}
fi
@@ -145,26 +145,21 @@ switch_profile() {
cd "${ROOT}/${LIBPATH}" || exit 1
if [[ ${TARGET} == ${HOST} ]] ; then
dstlib=${EROOT}/usr/${HOST}/lib
+   elif [[ -d ${EROOT}/usr/${TARGET}/lib ]] ; then
+   # true for at least avr and msp targets
+   dstlib=${EROOT}/usr/${TARGET}/lib
else
dstlib=${EROOT}/usr/${HOST}/${TARGET}/lib
fi
# When upgrading, we need to clean up ldscripts and libs.
  

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/

2017-11-25 Thread Fabian Groffen
commit: f1c2d739d6990e43502251afd7dcb6854abf8ce9
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Nov 25 15:49:08 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Nov 25 15:49:08 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f1c2d739

sys-devel/binutils-config: cleanup

Package-Manager: Portage-2.3.13-prefix, Repoman-2.3.4

 sys-devel/binutils-config/Manifest |   1 -
 .../binutils-config/binutils-config-3-r03.1.ebuild |  46 --
 .../binutils-config/binutils-config-4-r01.1.ebuild |  59 ---
 .../binutils-config/binutils-config-4-r1.ebuild|  58 ---
 sys-devel/binutils-config/files/binutils-config-3  | 534 -
 sys-devel/binutils-config/files/binutils-config-4  | 475 --
 .../files/binutils-config-4-aix-ld-svr4.patch  |  89 
 .../files/binutils-config-4-ldwrapper.patch|  32 --
 .../binutils-config-4-no-macosx-version-min.patch  |  16 -
 sys-devel/binutils-config/metadata.xml |   7 +-
 10 files changed, 4 insertions(+), 1313 deletions(-)

diff --git a/sys-devel/binutils-config/Manifest 
b/sys-devel/binutils-config/Manifest
deleted file mode 100644
index fc2e289920..00
--- a/sys-devel/binutils-config/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST toolchain-prefix-wrapper-0.3.1723.tar.xz 95352 SHA256 
fdb4c2a82ddcee8330ea6274db02b78ddc921670f3184028f7bbc83b5054ea29 SHA512 
308933057c0888bca929aedebae7b3a54cb355a31de2568ef59871d541440267c14815556b5d40e7049fc1e3d297a239dd247393248ff6413c7a8e189357ca27
 WHIRLPOOL 
f04684e4c1717d2d2e5e3c1a86b3c68807047c83e35625bc3e99c1bc547c16b2e208a13a1e8bce5143ac2edc07b275439d0a61663ebab4e1437ea5d68d7a3db6

diff --git a/sys-devel/binutils-config/binutils-config-3-r03.1.ebuild 
b/sys-devel/binutils-config/binutils-config-3-r03.1.ebuild
deleted file mode 100644
index 69677ed667..00
--- a/sys-devel/binutils-config/binutils-config-3-r03.1.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: 
/var/cvsroot/gentoo-x86/sys-devel/binutils-config/binutils-config-3-r3.ebuild,v 
1.9 2012/07/29 18:36:13 armin76 Exp $
-
-EAPI=3
-
-inherit eutils toolchain-funcs prefix
-
-DESCRIPTION="Utility to change the binutils version being used - prefix 
version"
-HOMEPAGE="http://www.gentoo.org/;
-W_VER="0.3.1723"
-SRC_URI="http://dev.gentoo.org/~grobian/distfiles/toolchain-prefix-wrapper-${W_VER}.tar.xz;
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="sunld"
-
-RDEPEND="userland_GNU? ( !http://www.gentoo.org/;
-W_VER="0.3.1723"
-SRC_URI="http://dev.gentoo.org/~grobian/distfiles/toolchain-prefix-wrapper-${W_VER}.tar.xz;
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="sunld"
-
-S=${WORKDIR}/toolchain-prefix-wrapper-${W_VER}
-
-# NOTE: the ld wrapper is only enabled on rpath versions of prefix.
-
-src_prepare() {
-   cp "${FILESDIR}"/${P} ./${PN} || die
-   if use prefix-guest; then
-   epatch "${FILESDIR}/${P}-ldwrapper.patch"
-   fi
-   eprefixify ${PN}
-
-   # fix configure stupidity, until next release
-   sed -i -e 's/x10\.\[3456789\]/x10.*/' configure
-   epatch "${FILESDIR}"/${P}-no-macosx-version-min.patch
-   epatch "${FILESDIR}"/${P}-aix-ld-svr4.patch
-}
-
-src_configure() {
-   if use prefix-guest; then
-   econf --with-macosx-version-min=${MACOSX_DEPLOYMENT_TARGET} \
-   $(use_with sunld native-ld)
-   fi
-}
-
-src_install() {
-   if use prefix-guest; then
-   use prefix-guest && \
-   emake install DESTDIR="${D}"
-   fi
-
-   dobin ${PN}
-   doman "${FILESDIR}"/${PN}.8
-}
-
-pkg_postinst() {
-   # refresh all links and the wrapper
-   if [[ ${ROOT%/} == "" ]] ; then
-   [[ -f ${EROOT}/etc/env.d/binutils/config-${CHOST} ]] \
-   && binutils-config $(binutils-config 
--get-current-profile)
-   fi
-}

diff --git a/sys-devel/binutils-config/binutils-config-4-r1.ebuild 
b/sys-devel/binutils-config/binutils-config-4-r1.ebuild
deleted file mode 100644
index b9720d00b8..00
--- a/sys-devel/binutils-config/binutils-config-4-r1.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: 
/var/cvsroot/gentoo-x86/sys-devel/binutils-config/binutils-config-3-r3.ebuild,v 
1.9 2012/07/29 18:36:13 armin76 Exp $
-
-EAPI=5
-
-inherit eutils toolchain-funcs prefix
-
-DESCRIPTION="Utility to change the binutils version being used - prefix 
version"
-HOMEPAGE="http://www.gentoo.org/;
-W_VER="0.3.1723"

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/, sys-devel/binutils-config/files/

2017-11-25 Thread Fabian Groffen
commit: 508ee40a45b3f911bfcbf335236906eb032ab13a
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Nov 25 17:26:58 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Nov 25 17:26:58 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=508ee40a

sys-devel/binutils-config: don't add runpaths for builddir searchpaths

Package-Manager: Portage-2.3.13-prefix, Repoman-2.3.4

 sys-devel/binutils-config/binutils-config-5-r02.1.ebuild |  1 -
 sys-devel/binutils-config/files/ldwrapper.c  | 11 +++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/sys-devel/binutils-config/binutils-config-5-r02.1.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r02.1.ebuild
index 3c1bc7e44d..07c6b494dc 100644
--- a/sys-devel/binutils-config/binutils-config-5-r02.1.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r02.1.ebuild
@@ -1,6 +1,5 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 EAPI=5
 

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index fda6e9b603..84431fb3ac 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -149,6 +149,8 @@ main(int argc, char *argv[])
char **newargv = NULL;
char *wrapper = argc > 0 ? argv[0] : "ld-wrapper";
char verbose = getenv("BINUTILS_CONFIG_VERBOSE") != NULL;
+   char *builddir = getenv("PORTAGE_BUILDDIR");
+   size_t builddirlen;
char *p;
int i;
int j;
@@ -161,6 +163,11 @@ main(int argc, char *argv[])
if (strncmp(wrapper, p, strlen(p)) == 0)
wrapper += strlen(p);
 
+   /* ensure builddir is something useful */
+   if (builddir != NULL && *builddir != '/')
+   builddir = NULL;
+   builddirlen = builddir == NULL ? 0 : strlen(builddir);
+
/* walk over the arguments to see if there's anything interesting
 * for us and calculate the final number of arguments */
for (i = 1; i < argc; i++) {
@@ -254,6 +261,10 @@ main(int argc, char *argv[])
if (*path != '/')
continue;
 
+   /* does it refer to the build directory? skip */
+   if (builddir != NULL && strncmp(builddir, path, 
builddirlen) != 0)
+   continue;
+
len = 2 + strlen(path) + 1;
newargv[k] = malloc(sizeof(char) * len);
if (newargv[k] == NULL) {



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/, sys-devel/binutils/files/

2017-11-25 Thread Fabian Groffen
commit: 31af8d7ef0176a390faf59af480393f834948292
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Nov 25 15:16:35 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Nov 25 15:16:35 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=31af8d7e

sys-devel/binutils: sync

Package-Manager: Portage-2.3.13-prefix, Repoman-2.3.4
RepoMan-Options: --force

 sys-devel/binutils/Manifest|  2 ++
 sys-devel/binutils/binutils-2.29.1-r1.ebuild   | 31 ++
 .../files/binutils-2.29.1-nogoldtest.patch | 27 +++
 3 files changed, 60 insertions(+)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index e348252d68..20f982f5aa 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -2,3 +2,5 @@ DIST binutils-2.27-patches-1.0.tar.xz 8852 SHA256 
07be45786e1e56498aad2c52a43d41
 DIST binutils-2.27.tar.bz2 26099568 SHA256 
369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 SHA512 
cf276f84935312361a2ca077e04d0b469d23a3aed979d8ba5d92ea590904ffb2c2e7ed12cc842822bfc402836be86f479660cef3791aa62f3753d8a1a6f564cb
 WHIRLPOOL 
d3204b4900529f697285fb1fe622ecc949c43f064e6b83a1cecb1ea8810a214842c729266c9a44537dc0a86d6d2b3ac100f54c721cc284e54f9d6feb90930d15
 DIST binutils-2.28.1-patches-1.0.tar.xz 19772 SHA256 
50cfce6ef7f546dcdb983a8b632507b5cdd51095e4acf1f15bfcd68027d438a4 SHA512 
c2c7d22e1013e79040c4dcb4d70649e78a070976ba3a4bc2ceb4805827b9d93eea1805c85db4fcb6b31be5218c3d7b42a4990437a7c01dc01fd7e9dedb606828
 WHIRLPOOL 
2369fce643cc9b83724b486521621d744de0eaf3d95fdd34c7f1c785bc400f3ed31ae6105001870f33539664d84dd9caae854725e20007f136929d2ece755247
 DIST binutils-2.28.1.tar.bz2 28120394 SHA256 
6924999be62d4464458eb53c11f27277cfb63755df8c1cd47b8d15d02c1942ea SHA512 
5ec5212497b0fa8324f6a0884c284cb71c01942bbd39356d1ae745a5c9d97274c10f9d9c723f4bef6f0217662dfcd0c36e4e955a7599b11217658dc7b97553eb
 WHIRLPOOL 
5c616f719827e5da7db23e89c761323cd4828b4779e79c3983d3ea429bce57ed40219982c478237b4dd728b77bae0a6447d912d96490ed1f5fc279ba5fd73bc6
+DIST binutils-2.29.1-patches-3.tar.xz 20904 SHA256 
a9c6cc884637a398cc6969ca7b734c48967e5ad11e2a74aae25cf53931c85b2b SHA512 
ba54efaf9e9f668d2922972acd2cdf5c3e6f174cfcc73d29953ab4ba6e157ce0cb500c583568a4e3b92c9d30c394a327f29b51292acc66f8d3f20f5eae2a
 WHIRLPOOL 
993b08862835843fdda3d3916f7dfed2d9e195c13e6b52deac42b3e714a022b36f62d41a4c2de89c0dc7eb751f28ac3f2fd8774e3bc4551b411c16688400e2c3
+DIST binutils-2.29.1.tar.bz2 29123355 SHA256 
1509dff41369fb70aed23682351b663b56db894034773e6dbf7d5d6071fc55cc SHA512 
4063d3426922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592
 WHIRLPOOL 
55bf62434bb00b9a355f8d7138c97b6d984eed3a83d7eb37137cf3ab8efcc8e536415d68eba375ae0ab30743f5b3014a664f7d3c773ed55da40c8814691e04d8

diff --git a/sys-devel/binutils/binutils-2.29.1-r1.ebuild 
b/sys-devel/binutils/binutils-2.29.1-r1.ebuild
new file mode 100644
index 00..e799d64aad
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.29.1-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PATCHVER="3"
+ELF2FLT_VER=""
+inherit toolchain-binutils
+
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+PATCHES=(
+   "${FILESDIR}/${P}-nogoldtest.patch"
+   "${FILESDIR}"/${PN}-2.22-solaris-anonymous-version-script-fix.patch
+   "${FILESDIR}"/${PN}-2.24-cygwin-nointl.patch
+)
+
+pkg_setup() {
+   [[ ${CHOST} == *-mint* ]] && die "mint patches require rebasing to 
${P}" # 609274
+}
+
+src_compile() {
+   if has noinfo "${FEATURES}" \
+   || ! type -p makeinfo >/dev/null
+   then
+   # binutils >= 2.17 (accidentally?) requires 'makeinfo'
+   export EXTRA_EMAKE="MAKEINFO=true"
+   fi
+
+   toolchain-binutils_src_compile
+}

diff --git a/sys-devel/binutils/files/binutils-2.29.1-nogoldtest.patch 
b/sys-devel/binutils/files/binutils-2.29.1-nogoldtest.patch
new file mode 100644
index 00..8e0669922d
--- /dev/null
+++ b/sys-devel/binutils/files/binutils-2.29.1-nogoldtest.patch
@@ -0,0 +1,27 @@
+From 40f6e93e5078f16897f23856886566fe3b546206 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= 
+Date: Fri, 3 Nov 2017 21:51:35 +0100
+Subject: [PATCH] Gentoo: Disable gold testsuite for users since it fails
+ upstream
+
+https://bugs.gentoo.org/634348
+https://sourceware.org/bugzilla/show_bug.cgi?id=21090
+---
+ Makefile.in | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 3acb83b8de..49de829bfa 100644
+--- a/Makefile.in
 b/Makefile.in
+@@ -2340,7 +2340,6 @@ check-host:  \
+ maybe-check-mpc \
+ maybe-check-isl \
+ maybe-check-libelf \
+-maybe-check-gold \
+ maybe-check-gprof \
+

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2017-09-12 Thread Fabian Groffen
commit: 15168301ed651d99279503a4d2e98b8ff6d2
Author: Fabian Groffen  gentoo  org>
AuthorDate: Tue Sep 12 08:38:36 2017 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Tue Sep 12 08:38:36 2017 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=15168301

sys-devel/binutils: sync, add patch for solaris/anonymous version scripts

Package-Manager: Portage-2.3.8-prefix, Repoman-2.3.3
RepoMan-Options: --force

 sys-devel/binutils/Manifest|  2 ++
 sys-devel/binutils/binutils-2.28.1.ebuild  | 31 ++
 ...2.22-solaris-anonymous-version-script-fix.patch | 24 +
 3 files changed, 57 insertions(+)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 904ae6a2be..bfb43e8b96 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -33,3 +33,5 @@ DIST binutils-2.26.1-patches-1.0.tar.xz 11212 SHA256 
e56e2a6b64b8abe2f4aed1a9b15
 DIST binutils-2.26.1.tar.bz2 25595243 SHA256 
39c346c87aa4fb14b2f786560aec1d29411b6ec34dce3fe7309fe3dd56949fd8 SHA512 
9d9165609fd3b0f20d616f9891fc8e2b466eb13e2bfce40125e12427f8f201d20e2b8322bb6cb2b45e8df812f0e8ac059149f8a1f69ba3ed9d86a35c6a540b67
 WHIRLPOOL 
c33eecdf855dd17314c3b7bbb0060399148d4dba867eb038bfb7555010fd003ba8b5b86480e4df389e19bba7b1fd0b9264291e6af20be4ffd4ff504d2255d003
 DIST binutils-2.27-patches-1.0.tar.xz 8852 SHA256 
07be45786e1e56498aad2c52a43d4104ccd0ded3c6a84a930486bc418d7fa36d SHA512 
489b5fff87886682d8e98eafa2f082e6dcf811d2a693b6c41d76bd1ac50815a6e7d26fb7c9e3811c2d8e0e1dc307557e6ffe46d1d0f7caeb581060cf14bda899
 WHIRLPOOL 
cf73342292a6dd8450a420f62a6a28e1ae38eed2c0b62643619ac002f3e9233ba5a0df19deb862167e88bd2c4a7ef4e002fe4d76f971eba876014d145dc30171
 DIST binutils-2.27.tar.bz2 26099568 SHA256 
369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 SHA512 
cf276f84935312361a2ca077e04d0b469d23a3aed979d8ba5d92ea590904ffb2c2e7ed12cc842822bfc402836be86f479660cef3791aa62f3753d8a1a6f564cb
 WHIRLPOOL 
d3204b4900529f697285fb1fe622ecc949c43f064e6b83a1cecb1ea8810a214842c729266c9a44537dc0a86d6d2b3ac100f54c721cc284e54f9d6feb90930d15
+DIST binutils-2.28.1-patches-1.0.tar.xz 19772 SHA256 
50cfce6ef7f546dcdb983a8b632507b5cdd51095e4acf1f15bfcd68027d438a4 SHA512 
c2c7d22e1013e79040c4dcb4d70649e78a070976ba3a4bc2ceb4805827b9d93eea1805c85db4fcb6b31be5218c3d7b42a4990437a7c01dc01fd7e9dedb606828
 WHIRLPOOL 
2369fce643cc9b83724b486521621d744de0eaf3d95fdd34c7f1c785bc400f3ed31ae6105001870f33539664d84dd9caae854725e20007f136929d2ece755247
+DIST binutils-2.28.1.tar.bz2 28120394 SHA256 
6924999be62d4464458eb53c11f27277cfb63755df8c1cd47b8d15d02c1942ea SHA512 
5ec5212497b0fa8324f6a0884c284cb71c01942bbd39356d1ae745a5c9d97274c10f9d9c723f4bef6f0217662dfcd0c36e4e955a7599b11217658dc7b97553eb
 WHIRLPOOL 
5c616f719827e5da7db23e89c761323cd4828b4779e79c3983d3ea429bce57ed40219982c478237b4dd728b77bae0a6447d912d96490ed1f5fc279ba5fd73bc6

diff --git a/sys-devel/binutils/binutils-2.28.1.ebuild 
b/sys-devel/binutils/binutils-2.28.1.ebuild
new file mode 100644
index 00..bf51c569c2
--- /dev/null
+++ b/sys-devel/binutils/binutils-2.28.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PATCHVER="1.0"
+ELF2FLT_VER=""
+inherit toolchain-binutils
+
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~m68k-mint ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-2.22-solaris-anonymous-version-script-fix.patch
+#  "${FILESDIR}"/${PN}-2.22-mint.patch
+#  "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
+   "${FILESDIR}"/${PN}-2.24-cygwin-nointl.patch
+)
+pkg_setup() {
+   [[ ${CHOST} == *-mint* ]] && die "mint patches require rebasing to 
${P}" # 609274
+}
+
+src_compile() {
+   if has noinfo "${FEATURES}" \
+   || ! type -p makeinfo >/dev/null
+   then
+   # binutils >= 2.17 (accidentally?) requires 'makeinfo'
+   export EXTRA_EMAKE="MAKEINFO=true"
+   fi
+
+   toolchain-binutils_src_compile
+}

diff --git 
a/sys-devel/binutils/files/binutils-2.22-solaris-anonymous-version-script-fix.patch
 
b/sys-devel/binutils/files/binutils-2.22-solaris-anonymous-version-script-fix.patch
new file mode 100644
index 00..e4abccd4ee
--- /dev/null
+++ 
b/sys-devel/binutils/files/binutils-2.22-solaris-anonymous-version-script-fix.patch
@@ -0,0 +1,24 @@
+https://sourceware.org/bugzilla/show_bug.cgi?id=12548
+
+diff --git a/ld/emultempl/solaris2.em b/ld/emultempl/solaris2.em
+index dfb173d..84c9629 100644
+--- a/ld/emultempl/solaris2.em
 b/ld/emultempl/solaris2.em
+@@ -100,8 +100,15 @@ elf_solaris2_before_allocation (void)
+   if (soname == NULL)
+   soname = lbasename (bfd_get_filename (link_info.output_bfd));
+ 
+-  /* Register the node.  */
+-  lang_register_vers_node (soname, basever, NULL);
++  /* PR 12548: For compatibility with the Solaris linker 

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2016-05-15 Thread Fabian Groffen
commit: 64c18bc7bb802464d841afcfa9b75cae848b2a0e
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sun May 15 16:44:24 2016 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sun May 15 16:44:24 2016 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=64c18bc7

sys-devel/binutils-config: fix compilation on Darwin, char[] != char*

 sys-devel/binutils-config/files/ldwrapper.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 8777ad6..6991784 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -124,11 +124,13 @@ find_real_ld(char **ld, char verbose, char *wrapper)
*e = '\0';
if ((f = popen("binutils-config -c", "r")) != NULL) {
char p[ESIZ];
+   char *q;
if (fgets(p, ESIZ, f) != NULL) {
-   if (strncmp(p, CHOST "-", strlen(CHOST "-")) == 0)
-   p += strlen(CHOST "-");
+   q = p;
+   if (strncmp(q, CHOST "-", strlen(CHOST "-")) == 0)
+   q += strlen(CHOST "-");
snprintf(e, ESIZ, EPREFIX "/usr/" CHOST 
"/binutils-bin/%s/%s",
-   p, wrapper);
+   q, wrapper);
} else {
*p = '\0';
}



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2016-05-13 Thread Fabian Groffen
commit: 95f7a7bd56f5cbb3fdcb5e28a7e2f776181e628b
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri May 13 12:05:58 2016 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri May 13 12:05:58 2016 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=95f7a7bd

sys-devel/binutils-config/ldwrapper: some better error reporting

 sys-devel/binutils-config/files/ldwrapper.c | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 9823da8..a98b1e6 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -92,6 +92,7 @@ find_real_ld(char **ld, char verbose, char *wrapper)
/* parse EPREFIX/etc/env.d/binutils/config-CHOST to get CURRENT, then
 * consider $EPREFIX/usr/CHOST/binutils-bin/CURRENT where we should
 * be able to find ld */
+   *e = '\0';
if ((f = fopen(EPREFIX "/etc/env.d/binutils/config-" CHOST, "r")) != 
NULL) {
char p[ESIZ];
while (fgets(p, ESIZ, f) != NULL) {
@@ -115,10 +116,12 @@ find_real_ld(char **ld, char verbose, char *wrapper)
}
if (verbose)
fprintf(stdout, "%s: linker not found via " EPREFIX
-   "/etc/env.d/binutils/config-" CHOST "\n", 
wrapper);
+   "/etc/env.d/binutils/config-" CHOST " 
(ld=%s)\n",
+   wrapper, e);

/* last try, call binutils-config to tell us what the linker is
 * supposed to be */
+   *e = '\0';
if ((f = popen("binutils-config -c", "r")) != NULL) {
char p[ESIZ];
if (fgets(p, ESIZ, f) != NULL) {
@@ -134,8 +137,8 @@ find_real_ld(char **ld, char verbose, char *wrapper)
}
}
if (verbose)
-   fprintf(stdout, "%s: linker not found via binutils-config -c\n",
-   wrapper);
+   fprintf(stdout, "%s: linker not found via binutils-config -c 
(ld=%s)\n",
+   wrapper, e);
 }
 
 int



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/

2016-05-13 Thread Fabian Groffen
commit: 3e78af281df7434c8a21b924946d12c24eb92b65
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri May 13 12:13:51 2016 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri May 13 12:13:51 2016 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=3e78af28

sys-devel/binutils-config: interrevbump for ld localisation fixes

 .../{binutils-config-5-r2.ebuild => binutils-config-5-r02.1.ebuild}   | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5-r2.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r02.1.ebuild
similarity index 100%
rename from sys-devel/binutils-config/binutils-config-5-r2.ebuild
rename to sys-devel/binutils-config/binutils-config-5-r02.1.ebuild



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2016-05-13 Thread Fabian Groffen
commit: c76c1b6d1ee3fcb4462e191e58a5c1bc6569fb03
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri May 13 12:09:27 2016 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri May 13 12:09:27 2016 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=c76c1b6d

sys-devel/binutils-config/ldwrapper: strip CHOST from binutils-config -c output

we only need the number here, not the full profile name

 sys-devel/binutils-config/files/ldwrapper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index a98b1e6..a08985f 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -125,6 +125,8 @@ find_real_ld(char **ld, char verbose, char *wrapper)
if ((f = popen("binutils-config -c", "r")) != NULL) {
char p[ESIZ];
if (fgets(p, ESIZ, f) != NULL) {
+   if (strncmp(p, CHOST "-", strlen(CHOST "-")) == 0)
+   p += strlen(CHOST "-");
snprintf(e, ESIZ, EPREFIX "/usr/" CHOST 
"/binutils-bin/%s/%s",
p, wrapper);
} else {



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2016-05-13 Thread Fabian Groffen
commit: 80df42f4649c3695c0ab0258a98e3b5bf2db0e80
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri May 13 12:10:17 2016 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri May 13 12:10:17 2016 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=80df42f4

sys-devel/binutils-config/ldwrapper: fix cannonicalising of wrapper

When ld is invoked as CHOST-ld (no path) then we should also remove
CHOST, so don't do this only when we found a / earlier.

 sys-devel/binutils-config/files/ldwrapper.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index a08985f..8777ad6 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -157,12 +157,11 @@ main(int argc, char *argv[])
int k;
 
/* cannonicanise wrapper, stripping path and CHOST */
-   if ((p = strrchr(wrapper, '/')) != NULL) {
+   if ((p = strrchr(wrapper, '/')) != NULL)
wrapper = p + 1;
-   p = CHOST "-";
-   if (strncmp(wrapper, p, strlen(p)) == 0)
-   wrapper += strlen(p);
-   }
+   p = CHOST "-";
+   if (strncmp(wrapper, p, strlen(p)) == 0)
+   wrapper += strlen(p);
 
/* walk over the arguments to see if there's anything interesting
 * for us and calculate the final number of arguments */



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2016-04-18 Thread Michael Haubenwallner
commit: 1f90d833970f8f6813a48f9385c234e197c3ee55
Author: Michael Haubenwallner  ssi-schaefer 
 com>
AuthorDate: Fri Apr 15 09:07:19 2016 +
Commit: Michael Haubenwallner  gentoo  org>
CommitDate: Mon Apr 18 08:06:00 2016 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=1f90d833

ldwrapper.c: check last PATH env entry; restore PATH env value; fix missing 
string.h warnings

 sys-devel/binutils-config/files/ldwrapper.c | 36 ++---
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 958bed4..9823da8 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -8,6 +8,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -46,6 +47,9 @@ find_real_ld(char **ld, char verbose, char *wrapper)
char *e;
struct stat lde;
 
+   /* we may not succeed finding the linker */
+   *ld = NULL;
+
/* respect the override in environment */
ldoveride = getenv("BINUTILS_CONFIG_LD");
if (ldoveride != NULL && *ldoveride != '\0') {
@@ -67,23 +71,20 @@ find_real_ld(char **ld, char verbose, char *wrapper)
 
/* find ld in PATH, allowing easy PATH overrides */
path = getenv("PATH");
-   if (path != NULL && *path != '\0') {
-   char *p;
-   char *q;
-
-   for (p = path; (q = strchr(p, ':')) != NULL; p = q + 1) {
-   if (q)
-   *q = '\0';
-   if (strstr(p, "/" CHOST "/binutils-bin/") != NULL) {
-   snprintf(e, ESIZ, "%s/%s", p, wrapper);
-   if (stat(e, ) == 0) {
-   *ld = e;
-   return;
-   }
-   }
-   if (!q)
-   break;
+   while (path > (char*)1 && *path != '\0') {
+   char *q = strchr(path, ':');
+   if (q)
+   *q = '\0';
+   if (strstr(path, "/" CHOST "/binutils-bin/") != NULL) {
+   snprintf(e, ESIZ, "%s/%s", path, wrapper);
+   if (stat(e, ) == 0)
+   *ld = e;
}
+   if (q)
+   *q = ':'; /* restore PATH value */
+   if (*ld)
+   return;
+   path = q + 1;
}
if (verbose)
fprintf(stdout, "%s: linker not found in PATH\n", wrapper);
@@ -135,9 +136,6 @@ find_real_ld(char **ld, char verbose, char *wrapper)
if (verbose)
fprintf(stdout, "%s: linker not found via binutils-config -c\n",
wrapper);
-
-   /* we didn't succeed finding the linker */
-   *ld = NULL;
 }
 
 int



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2016-02-15 Thread Fabian Groffen
commit: 8cb9c22e827757a7c5151c53afb2b4d4e0a3d0c6
Author: Fabian Groffen  gentoo  org>
AuthorDate: Mon Feb 15 14:30:37 2016 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Mon Feb 15 14:30:37 2016 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=8cb9c22e

sys-devel/binutils-config: position all added arguments after given arguments 
in ldwrapper

Package-Manager: portage-2.2.20-prefix

 sys-devel/binutils-config/files/ldwrapper.c | 58 +
 1 file changed, 43 insertions(+), 15 deletions(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 4256e78..958bed4 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -151,6 +151,7 @@ main(int argc, char *argv[])
char *p;
int i;
int j;
+   int k;
 
/* cannonicanise wrapper, stripping path and CHOST */
if ((p = strrchr(wrapper, '/')) != NULL) {
@@ -207,36 +208,63 @@ main(int argc, char *argv[])
/* inject this first to make the intention clear */
newargv[j++] = "-search_paths_first";
 #endif
+   /* position k right after the original arguments */
+   k = j - 1 + argc;
for (i = 1; i < argc; i++, j++) {
newargv[j] = argv[i];
 #ifndef TARGET_DARWIN
/* on ELF targets we add runpaths for all found search paths */
-   if (argv[i][0] == '-' && argv[i][1] == 'L' && argv[i][2] == 
'/') {
-   newargv[++j] = strdup(argv[i]);
-   if (newargv[j] == NULL) {
+   if (argv[i][0] == '-' && argv[i][1] == 'L') {
+   char *path;
+   size_t len;
+
+   /* arguments can be in many ways here:
+* -L
+* -L  (yes, this is accepted)
+* -L(whitespace)? 
+* where path is absolute (not relative) */
+   path = [i][2];
+   while (*path != '\0' && isspace(*path))
+   path++;
+   if (*path == '\0') {
+   /* no more arguments?!? skip */
+   if (i + 1 >= argc)
+   continue;
+   path = argv[i + 1];
+   while (*path != '\0' && isspace(*path))
+   path++;
+   }
+   /* not absolute (or empty)?!? skip */
+   if (*path != '/')
+   continue;
+
+   len = 2 + strlen(path) + 1;
+   newargv[k] = malloc(sizeof(char) * len);
+   if (newargv[k] == NULL) {
fprintf(stderr, "%s: failed to allocate memory 
for "
"'%s' -R argument\n", wrapper, 
argv[i]);
exit(1);
}
-   newargv[j][1] = 'R';
+   snprintf(newargv[k], len, "-R%s", path);
+   k++;
}
 #endif
}
/* add the custom paths */
 #ifdef TARGET_DARWIN
-   newargv[j++] = "-L" EPREFIX "/usr/lib";
-   newargv[j++] = "-L" EPREFIX "/lib";
+   newargv[k++] = "-L" EPREFIX "/usr/lib";
+   newargv[k++] = "-L" EPREFIX "/lib";
 #else
-   newargv[j++] = "-L" EPREFIX "/usr/" CHOST "/lib/gcc";
-   newargv[j++] = "-R" EPREFIX "/usr/" CHOST "/lib/gcc";
-   newargv[j++] = "-L" EPREFIX "/usr/" CHOST "/lib";
-   newargv[j++] = "-R" EPREFIX "/usr/" CHOST "/lib";
-   newargv[j++] = "-L" EPREFIX "/usr/lib";
-   newargv[j++] = "-R" EPREFIX "/usr/lib";
-   newargv[j++] = "-L" EPREFIX "/lib";
-   newargv[j++] = "-R" EPREFIX "/lib";
+   newargv[k++] = "-L" EPREFIX "/usr/" CHOST "/lib/gcc";
+   newargv[k++] = "-R" EPREFIX "/usr/" CHOST "/lib/gcc";
+   newargv[k++] = "-L" EPREFIX "/usr/" CHOST "/lib";
+   newargv[k++] = "-R" EPREFIX "/usr/" CHOST "/lib";
+   newargv[k++] = "-L" EPREFIX "/usr/lib";
+   newargv[k++] = "-R" EPREFIX "/usr/lib";
+   newargv[k++] = "-L" EPREFIX "/lib";
+   newargv[k++] = "-R" EPREFIX "/lib";
 #endif
-   newargv[j] = NULL;
+   newargv[k] = NULL;
 
if (verbose) {
fprintf(stdout, "%s: invoking %s with arguments:\n", wrapper, 
ld);



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/, sys-devel/binutils-config/

2016-02-14 Thread Fabian Groffen
commit: 72ebd34b9821ad0b04bc98b7decf07c9588c7191
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sun Feb 14 13:48:51 2016 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sun Feb 14 13:48:51 2016 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=72ebd34b

sys-devel/binutils-config: first version of rewritten ldwrapper, bug #572390

Package-Manager: portage-2.2.20-prefix

 .../binutils-config/binutils-config-5-r2.ebuild|  40 ++--
 .../files/binutils-config-5-ldwrapper.patch|  22 ++
 sys-devel/binutils-config/files/ldwrapper.c| 252 +
 3 files changed, 297 insertions(+), 17 deletions(-)

diff --git a/sys-devel/binutils-config/binutils-config-5-r2.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r2.ebuild
index 3af562d..60c601e 100644
--- a/sys-devel/binutils-config/binutils-config-5-r2.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r2.ebuild
@@ -8,49 +8,55 @@ inherit eutils prefix
 
 DESCRIPTION="Utility to change the binutils version being used"
 HOMEPAGE="https://www.gentoo.org/;
-W_VER="0.3.1723"
-SRC_URI="http://dev.gentoo.org/~grobian/distfiles/toolchain-prefix-wrapper-${W_VER}.tar.xz;
 
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~ppc-aix ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux 
~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris 
~x86-solaris"
-IUSE="sunld"
 
 # We also RDEPEND on sys-apps/findutils which is in base @system
 RDEPEND="sys-apps/gentoo-functions
!
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/**
+ * ldwrapper: Prefix helper to inject -L and -R flags to the invocation
+ * of ld.
+ *
+ * On Darwin it adds -search_path_first to make sure the given paths are
+ * searched before the default search path.
+ * The wrapper will inject -L entries for:
+ *   - EPREFIX/usr/CHOST/lib/gcc (when gcc)
+ *   - EPREFIX/usr/CHOST/lib (when binutils)
+ *   - EPREFIX/usr/lib
+ *   - EPREFIX/lib 
+ * On ELF platforms, the wrapper will then add -R (-rpath) entries for
+ * all -L entries found in the invocation to ensure the libraries found
+ * at link time will be found at runtime too.
+ */
+
+#ifndef EPREFIX
+# error EPREFIX must be defined!
+#endif
+#ifndef CHOST
+# error CHOST must be defined!
+#endif
+
+
+static inline void
+find_real_ld(char **ld, char verbose, char *wrapper)
+{
+   FILE *f = NULL;
+   char *ldoveride;
+   char *path;
+#define ESIZ 1024
+   char *e;
+   struct stat lde;
+
+   /* respect the override in environment */
+   ldoveride = getenv("BINUTILS_CONFIG_LD");
+   if (ldoveride != NULL && *ldoveride != '\0') {
+   if (verbose)
+   fprintf(stdout, "%s: using BINUTILS_CONFIG_LD=%s "
+   "from environment\n", wrapper, 
ldoveride);
+   *ld = ldoveride;
+   return;
+   }
+   if (verbose)
+   fprintf(stdout, "%s: BINUTILS_CONFIG_LD not found in 
environment\n",
+   wrapper);
+   
+   if ((e = malloc(sizeof(char) * ESIZ)) == NULL) {
+   fprintf(stderr, "%s: out of memory allocating string for path 
to ld\n",
+   wrapper);
+   exit(1);
+   }
+
+   /* find ld in PATH, allowing easy PATH overrides */
+   path = getenv("PATH");
+   if (path != NULL && *path != '\0') {
+   char *p;
+   char *q;
+
+   for (p = path; (q = strchr(p, ':')) != NULL; p = q + 1) {
+   if (q)
+   *q = '\0';
+   if (strstr(p, "/" CHOST "/binutils-bin/") != NULL) {
+   snprintf(e, ESIZ, "%s/%s", p, wrapper);
+   if (stat(e, ) == 0) {
+   *ld = e;
+   return;
+   }
+   }
+   if (!q)
+   break;
+   }
+   }
+   if (verbose)
+   fprintf(stdout, "%s: linker not found in PATH\n", wrapper);
+
+   /* parse EPREFIX/etc/env.d/binutils/config-CHOST to get CURRENT, then
+* consider $EPREFIX/usr/CHOST/binutils-bin/CURRENT where we should
+* be able to find ld */
+   if ((f = fopen(EPREFIX "/etc/env.d/binutils/config-" CHOST, "r")) != 
NULL) {
+   char p[ESIZ];
+   while (fgets(p, ESIZ, f) != NULL) {
+   if (strncmp(p, "CURRENT=", strlen("CURRENT=")) == 0) {
+   char *q = p + strlen(p);
+   /* strip trailing whitespace (fgets at least 
includes
+* the \n) */
+   for (q--; isspace(*q); q--)
+   

[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/files/

2016-02-14 Thread Fabian Groffen
commit: 4d852a87f65738c62a3e4c7e68bd8d387023d000
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sun Feb 14 13:50:57 2016 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sun Feb 14 13:50:57 2016 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=4d852a87

sys-devel/binutils-config: only add rpaths for absolute -L paths

Package-Manager: portage-2.2.20-prefix

 sys-devel/binutils-config/files/ldwrapper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 355840f..4256e78 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -211,7 +211,7 @@ main(int argc, char *argv[])
newargv[j] = argv[i];
 #ifndef TARGET_DARWIN
/* on ELF targets we add runpaths for all found search paths */
-   if (argv[i][0] == '-' && argv[i][1] == 'L') {
+   if (argv[i][0] == '-' && argv[i][1] == 'L' && argv[i][2] == 
'/') {
newargv[++j] = strdup(argv[i]);
if (newargv[j] == NULL) {
fprintf(stderr, "%s: failed to allocate memory 
for "



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/

2015-12-23 Thread Fabian Groffen
commit: 168a940f019e3466b14871221c244efce9845b29
Author: Fabian Groffen  gentoo  org>
AuthorDate: Thu Dec 24 07:58:37 2015 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Thu Dec 24 07:58:37 2015 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=168a940f

sys-devel/binutils: drop patches which don't apply, bug #568636

Package-Manager: portage-2.2.20-prefix
RepoMan-Options: --force

 sys-devel/binutils/binutils-2.24.51.0.2.ebuild | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sys-devel/binutils/binutils-2.24.51.0.2.ebuild 
b/sys-devel/binutils/binutils-2.24.51.0.2.ebuild
index 7c740fa..029838a 100644
--- a/sys-devel/binutils/binutils-2.24.51.0.2.ebuild
+++ b/sys-devel/binutils/binutils-2.24.51.0.2.ebuild
@@ -10,9 +10,10 @@ inherit toolchain-binutils
 
 src_unpack() {
toolchain-binutils_src_unpack
-   cd "${S}"
-   epatch "${FILESDIR}"/${PN}-2.22-mint.patch
-   epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
+# bug #568636
+#  cd "${S}"
+#  epatch "${FILESDIR}"/${PN}-2.22-mint.patch
+#  epatch "${FILESDIR}"/${PN}-2.19.50.0.1-mint.patch
 }
 
 src_compile() {



[gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils-config/, sys-devel/binutils-config/files/

2015-12-15 Thread Fabian Groffen
commit: 0e83584b43e98eaeed13e30fb6f90391214b0b06
Author: Fabian Groffen  gentoo  org>
AuthorDate: Tue Dec 15 19:48:38 2015 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Tue Dec 15 19:48:38 2015 +
URL:https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=0e83584b

sys-devel/binutils-config: sync version 5-r2

Package-Manager: portage-2.2.20-prefix

 .../binutils-config/binutils-config-5-r2.ebuild|  76 
 sys-devel/binutils-config/files/binutils-config-5  | 494 +
 sys-devel/binutils-config/files/binutils.eselect   |  45 ++
 3 files changed, 615 insertions(+)

diff --git a/sys-devel/binutils-config/binutils-config-5-r2.ebuild 
b/sys-devel/binutils-config/binutils-config-5-r2.ebuild
new file mode 100644
index 000..3af562d
--- /dev/null
+++ b/sys-devel/binutils-config/binutils-config-5-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils prefix
+
+DESCRIPTION="Utility to change the binutils version being used"
+HOMEPAGE="https://www.gentoo.org/;
+W_VER="0.3.1723"
+SRC_URI="http://dev.gentoo.org/~grobian/distfiles/toolchain-prefix-wrapper-${W_VER}.tar.xz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc-aix ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux 
~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris 
~x86-solaris"
+IUSE="sunld"
+
+# We also RDEPEND on sys-apps/findutils which is in base @system
+RDEPEND="sys-apps/gentoo-functions
+   !&2
+   exit 1
+}
+esyslog() { :; }
+die() { eerror "${argv0}: $*"; exit 1; }
+umask 022
+
+usage() {
+cat << USAGE_END
+Usage: ${HILITE}binutils-config${NORMAL} ${GOOD}[options]${NORMAL} 
${BRACKET}[binutils profile]${NORMAL}
+
+${HILITE}General Options:${NORMAL}
+  ${GOOD}-c, --get-current-profile${NORMAL}  Print current profile
+  ${GOOD}-l, --list-profiles${NORMAL}Print a list of available profiles
+  ${GOOD}-u, --uninstall${NORMAL}Remove all signs of specified 
target
+  ${GOOD}-d, --debug${NORMAL}Execute with debug output
+
+${HILITE}General Cruft:${NORMAL}
+  ${GOOD}--linker${NORMAL}   Switch to specified linker (if 
supported)
+
+Profile names are of the form:  ${BRACKET}-${NORMAL}
+For example:
${BRACKET}i686-pc-linux-gnu-2.15.92.0.2${NORMAL}
+
+For more info, please see ${HILITE}binutils-config${NORMAL}(8).
+USAGE_END
+
+   exit ${1:-1}
+}
+
+mv_if_diff() {
+   if cmp -s "$1" "$2" ; then
+   rm -f "$1"
+   else
+   mv -f "$1" "$2"
+   fi
+}
+atomic_ln() {
+   local target=$1 linkdir=$2 linkname=$3 linktmp linkfull
+   linktmp="${linkdir}/.binutils-config.tmp.${linkname}"
+   linkfull="${linkdir}/${linkname}"
+   if [[ -d ${linkfull} ]] ; then
+   # if linking to a dir, we need a little magic to
+   # make it atomic since `mv -T` is not portable
+   rm -rf "${linktmp}"
+   mkdir -p "${linktmp}"
+   ln -sf "${target}" "${linktmp}/${linkname}"
+   mv "${linktmp}/${linkname}" "${linktmp}/../"
+   rmdir "${linktmp}"
+   else
+   # `ln` will expand into unlink();symlink(); which
+   # is not atomic for a small amount of time, but
+   # `mv` is a single rename() call
+   ln -sf "${target}" "${linktmp}"
+   mv "${linktmp}" "${linkfull}"
+   fi
+}
+
+setup_env() {
+   unset TARGET VER LIBPATH
+   source "${ENV_D}/${PROFILE}"
+   if [[ -z ${TARGET} ]] ; then
+   eerror "${PROFILE} is invalid (no \$TARGET defined) :("
+   return 1
+   fi
+   if [[ -z ${VER} ]] ; then
+   eerror "${PROFILE} is invalid (no \$VER defined) :("
+   return 1
+   fi
+
+   #
+   # Generate binary symlinks
+   #
+   BINPATH=""
+   BINPATH_LINKS=""
+   if [[ ${TARGET} != ${HOST} ]] ; then
+   #
+   # Newer paths: /usr/${HOST}/${TARGET}/...
+   # Older paths: /usr/${TARGET}/...
+   #
+   if [[ -d 
${ROOT}${EPREFIX}/usr/${HOST}/${TARGET}/binutils-bin/${VER} ]] ; then
+   
BINPATH="${EPREFIX}"/usr/${HOST}/${TARGET}/binutils-bin/${VER}
+   BINPATH_LINKS="${EPREFIX}"/usr/libexec/gcc/${TARGET}
+   fi
+   fi
+   if [[ -z ${BINPATH} ]] ; then
+   BINPATH="${EPREFIX}"/usr/${TARGET}/binutils-bin/${VER}
+   BINPATH_LINKS="${EPREFIX}"/usr/${TARGET}/bin
+   fi
+}
+
+# Lists of headers that various versions have installed.
+HEADERS=(
+   ansidecl.h bfd.h bfdlink.h demangle.h dis-asm.h dyn-string.h
+   fibheap.h hashtab.h libiberty.h objalloc.h plugin-api.h
+   splay-tree.h symcat.h
+)
+
+switch_profile() {
+