[gentoo-commits] proj/elt-patches:master commit in: patches/g-debug/

2024-09-12 Thread Sam James
commit: 4a1d8825ac850cc1a60868879c82fd642e896066
Author: Eli Schwartz  gmail  com>
AuthorDate: Thu Sep 12 04:47:22 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Sep 12 13:51:05 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=4a1d8825

patches: g-debug: add old version hacked up as a roundup patch

This basically unlocks a bunch of new patches for affected libtool
versions:
- specs
- fsanitize
- fuse-ld
- werror
- color-record

Signed-off-by: Eli Schwartz  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 patches/g-debug/2.2.6-roundup | 35 +++
 1 file changed, 35 insertions(+)

diff --git a/patches/g-debug/2.2.6-roundup b/patches/g-debug/2.2.6-roundup
new file mode 100644
index 000..bbf34ec
--- /dev/null
+++ b/patches/g-debug/2.2.6-roundup
@@ -0,0 +1,35 @@
+Roundup of a few more options, to unlock the entire series.
+- tp
+- sysroot
+- O, flto, fwhopr, fuse-linker-plugin
+
+From fbd9b32ef2bdf52729e29423732cc5c2fd4be563 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab 
+Date: Tue, 21 Aug 2012 20:17:04 -0500
+Subject: [PATCH] Pass through -g* so that debugging information is not dropped
+
+* ltmain.m4sh (func_mode_link): Pass through -g*.
+
+Signed-off-by: Eli Schwartz 
+---
+ ltmain.sh | 6 +-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 247c739..61e3eaf 100644
+--- a/ltmain.sh
 b/ltmain.sh
+@@ -4796,8 +4796,12 @@ func_mode_link ()
+   # -F/path gives path to uninstalled frameworks, gcc on darwin
+   # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+   # @file GCC response files
++  # -tp=*Portland pgcc target processor selection
++  # --sysroot=*  for sysroot support
++  # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time 
optimization
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-  -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
++  
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
++  -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin)
+ func_quote_for_eval "$arg"
+   arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"



[gentoo-commits] proj/elt-patches:master commit in: /, patches/clang-runtime-ltmain/, patches/clang-runtime/

2024-08-24 Thread Sam James
commit: b852475e1efd8600c385bf09be7b85441abb2a7d
Author: Alfred Wingate  protonmail  com>
AuthorDate: Thu Jul 18 20:54:51 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Aug 24 15:19:15 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=b852475e

patches: add patch to fix use of clang builtins

Bug: https://bugs.gentoo.org/914068
Signed-off-by: Alfred Wingate  protonmail.com>
Closes: https://github.com/gentoo/elt-patches/pull/2
Signed-off-by: Sam James  gentoo.org>

 eltpatch.in|  6 +-
 patches/clang-runtime-ltmain/2.4.7 | 33 +
 patches/clang-runtime/2.4.7| 31 +++
 3 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index d253d66..2714ba0 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -129,7 +129,7 @@ elibtoolize() {
local force="false"
local elt_patches="
install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
-   g-debug specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record sed-quote openmp verbose-pic fix-file-check
+   g-debug specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record sed-quote openmp verbose-pic fix-file-check clang-runtime-ltmain 
clang-runtime
"
 
for x in "$@" ; do
@@ -421,6 +421,10 @@ elibtoolize() {
ELT_walk_patches "${d}/configure" "${p}"
ret=$?
;;
+clang-runtime)
+   ELT_walk_patches "${d}/configure" "${p}"
+   ret=$?
+   ;;
*)
# ltmain.sh patches are applied above
;;

diff --git a/patches/clang-runtime-ltmain/2.4.7 
b/patches/clang-runtime-ltmain/2.4.7
new file mode 100644
index 000..9857608
--- /dev/null
+++ b/patches/clang-runtime-ltmain/2.4.7
@@ -0,0 +1,33 @@
+https://github.com/chimera-linux/cports/blob/master/main/libtool/patches/cxx-clang-runtimes.patch
+https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00016.html
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=1d2577357ee704da2d6d7c7da119ad82ba8ca172
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=6132006b5fb6b95f31c30a972fbb829f93e1878b
+
+https://bugs.gentoo.org/914068
+
+From 969258b1b25b5b0f78a2a0a2427c4dd4b038f13f Mon Sep 17 00:00:00 2001
+From: q66 
+Date: Sat, 3 Sep 2022 09:41:45 +
+Subject: [PATCH] permit clang builtins library to be linked in
+
+libtool links c++ stuff with -nostdlib and manually extracts the
+allowed libs, but this did not previously cover the clang runtimes
+and broke builds on some targets where builtins are needed.
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index a5f21a1..e1d4d81 100644
+--- a/build-aux/ltmain.in
 b/build-aux/ltmain.in
+@@ -5900,6 +5900,12 @@ func_mode_link ()
+ lib)
+   # Linking convenience modules into shared libraries is allowed,
+   # but linking other static libraries is non-portable.
++  case "$deplib" in
++*/libclang_rt*.$libext)
++  deplibs="$deplib $deplibs"
++  continue
++;;
++  esac
+   case " $dlpreconveniencelibs " in
+   *" $deplib "*) ;;
+   *)

diff --git a/patches/clang-runtime/2.4.7 b/patches/clang-runtime/2.4.7
new file mode 100644
index 000..7aaf29f
--- /dev/null
+++ b/patches/clang-runtime/2.4.7
@@ -0,0 +1,31 @@
+https://github.com/chimera-linux/cports/blob/master/main/libtool/patches/cxx-clang-runtimes.patch
+https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00016.html
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=1d2577357ee704da2d6d7c7da119ad82ba8ca172
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=6132006b5fb6b95f31c30a972fbb829f93e1878b
+
+https://bugs.gentoo.org/914068
+
+From 969258b1b25b5b0f78a2a0a2427c4dd4b038f13f Mon Sep 17 00:00:00 2001
+From: q66 
+Date: Sat, 3 Sep 2022 09:41:45 +
+Subject: [PATCH] permit clang builtins library to be linked in
+
+libtool links c++ stuff with -nostdlib and manually extracts the
+allowed libs, but this did not previously cover the clang runtimes
+and broke builds on some targets where builtins are needed.
+
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index 79a2451..9c08481 100644
+--- a/m4/libtool.m4
 b/m4/libtool.m4
+@@ -7554,7 +7554,7 @@ if AC_TRY_EVAL(ac_compile); then
+   for p in `eval "$output_verbose_link_cmd"`; do
+ case $prev$p in
+ 
+--L* | -R* | -l*)
++-L* | -R* | -l* | */libclang_rt*.a)
+# Some compilers place space between "-{L,R}" and the path.
+# Remove the space.
+if test x-L = 

[gentoo-commits] proj/elt-patches:master commit in: patches/fix-file-check/, /

2024-08-24 Thread Sam James
commit: d284d49b7c692ad11cdeefd84345faa61295bb3a
Author: Alfred Wingate  protonmail  com>
AuthorDate: Mon Jul 29 17:57:10 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Aug 24 12:44:07 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=d284d49b

patches: new patch to fix finding file on mips64

Signed-off-by: Alfred Wingate  protonmail.com>
Closes: https://github.com/gentoo/elt-patches/pull/3
Signed-off-by: Sam James  gentoo.org>

 eltpatch.in  |  6 +-
 patches/fix-file-check/2.5.0 | 36 
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index f1afdb8..d253d66 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -129,7 +129,7 @@ elibtoolize() {
local force="false"
local elt_patches="
install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
-   g-debug specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record sed-quote openmp verbose-pic
+   g-debug specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record sed-quote openmp verbose-pic fix-file-check
"
 
for x in "$@" ; do
@@ -417,6 +417,10 @@ elibtoolize() {
ELT_walk_patches "${d}/configure" "${p}"
ret=$?
;;
+fix-file-check)
+   ELT_walk_patches "${d}/configure" "${p}"
+   ret=$?
+   ;;
*)
# ltmain.sh patches are applied above
;;

diff --git a/patches/fix-file-check/2.5.0 b/patches/fix-file-check/2.5.0
new file mode 100644
index 000..07cedb5
--- /dev/null
+++ b/patches/fix-file-check/2.5.0
@@ -0,0 +1,36 @@
+https://lists.gnu.org/archive/html/libtool-patches/2024-06/msg0.html
+
+Diffed genereated configure without patch and with patch.
+
+--- configure   2024-07-29 21:14:28.848124370 +0300
 configure   2024-07-29 21:15:32.329013530 +0300
+@@ -8106,7 +8106,8 @@
+   ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
+ else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
++as_dummy=":"
++for as_dir in $as_dummy
+ do
+   IFS=$as_save_IFS
+   case $as_dir in #(((
+@@ -8152,7 +8153,8 @@
+   ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
+ else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
++as_dummy=":"
++for as_dir in $as_dummy
+ do
+   IFS=$as_save_IFS
+   case $as_dir in #(((
+@@ -8183,7 +8185,7 @@
+ fi
+ 
+   if test "x$ac_ct_FILECMD" = x; then
+-FILECMD=":"
++FILECMD="file"
+   else
+ case $cross_compiling:$ac_tool_warned in
+ yes:)
+



[gentoo-commits] proj/elt-patches:master commit in: patches/verbose-pic/

2024-08-15 Thread Sam James
commit: 0363623cad91252c8084b3aa0d427f5f8997a873
Author: Sam James  gentoo  org>
AuthorDate: Fri Aug 16 02:35:52 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Aug 16 02:35:52 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=0363623c

patches: verbose-pic: add upstream patch link

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

 patches/verbose-pic/1.3134-2.2.7a-gnu | 2 ++
 patches/verbose-pic/2.4.7 | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/patches/verbose-pic/1.3134-2.2.7a-gnu 
b/patches/verbose-pic/1.3134-2.2.7a-gnu
index 9aa4756..d271ef5 100644
--- a/patches/verbose-pic/1.3134-2.2.7a-gnu
+++ b/patches/verbose-pic/1.3134-2.2.7a-gnu
@@ -1,3 +1,5 @@
+https://lists.gnu.org/archive/html/libtool-patches/2024-08/msg0.html
+
 From: Sam James 
 Date: Sun, 21 Jul 2024 13:33:17 +0100
 Subject: [PATCH] ltmain.in: don't suppress output for PIC compilations

diff --git a/patches/verbose-pic/2.4.7 b/patches/verbose-pic/2.4.7
index 3dfd34f..99d0fc3 100644
--- a/patches/verbose-pic/2.4.7
+++ b/patches/verbose-pic/2.4.7
@@ -1,3 +1,5 @@
+https://lists.gnu.org/archive/html/libtool-patches/2024-08/msg0.html
+
 From ebe94942061d632ca2a6fa86cdebdf72c7863c07 Mon Sep 17 00:00:00 2001
 From: Sam James 
 Date: Mon, 15 Apr 2024 07:15:15 +0100



[gentoo-commits] proj/elt-patches:master commit in: patches/verbose-pic/

2024-07-21 Thread Sam James
commit: 17931e1b6b52d43eb304e5be2319e578e9c22e9f
Author: Sam James  gentoo  org>
AuthorDate: Sun Jul 21 12:35:38 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jul 21 12:35:38 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=17931e1b

patches/verbose-pic: add 1.3134-2.2.7a-gnu variant

A user reported a confusing failure with GCC, so let's fix it there too.

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

 patches/verbose-pic/1.3134-2.2.7a-gnu | 40 +++
 1 file changed, 40 insertions(+)

diff --git a/patches/verbose-pic/1.3134-2.2.7a-gnu 
b/patches/verbose-pic/1.3134-2.2.7a-gnu
new file mode 100644
index 000..9aa4756
--- /dev/null
+++ b/patches/verbose-pic/1.3134-2.2.7a-gnu
@@ -0,0 +1,40 @@
+From: Sam James 
+Date: Sun, 21 Jul 2024 13:33:17 +0100
+Subject: [PATCH] ltmain.in: don't suppress output for PIC compilations
+
+I just hit this in a fascinating place.
+
+When working on xz, I set `-Werror=suggest-attribute=returns_nonnull`, and
+the build failed (as I expected it to), but with no visible error from
+the compiler.
+
+There's a mysterious '>/dev/null 2>&1' on the second line where
+liblzma_la-common.o is built without PIC.
+
+With -fPIC, IPA doesn't end up doing attribute discovery. Without it,
+it does. This behaviour is insane and we should patch it out.
+
+Bug: https://bugs.gentoo.org/135865
+Signed-off-by: Sam James 
+---
+---
+ ltmain.sh | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 70990740b6c4..493e83c36f14 100644
+--- a/ltmain.sh
 b/ltmain.sh
+@@ -1576,8 +1576,6 @@ compiler."
+   command="$command -o $obj"
+   fi
+ 
+-  # Suppress compiler output if we already did a PIC compilation.
+-  command="$command$suppress_output"
+   func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+ 
+
+-- 
+2.45.2
+



[gentoo-commits] proj/elt-patches:master commit in: patches/cross/

2024-05-31 Thread Sam James
commit: 198dbed6cce6e461e177b34818d688937d38c3ff
Author: Sam James  gentoo  org>
AuthorDate: Fri May 31 15:28:25 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri May 31 15:28:25 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=198dbed6

patches: cross: add Gentoo bug reference too

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

 patches/cross/2.2   | 1 +
 patches/cross/2.4   | 1 +
 patches/cross/2.4.3 | 1 +
 3 files changed, 3 insertions(+)

diff --git a/patches/cross/2.2 b/patches/cross/2.2
index 92459b9..cd2112b 100644
--- a/patches/cross/2.2
+++ b/patches/cross/2.2
@@ -1,3 +1,4 @@
+https://bugs.gentoo.org/572038
 
https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=3221f9f0fb98d5740ab5d0e8db6a731302520644
 
https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=b8cad780da77b7cf3aae1b660be3298b7fc48d1e
 https://lists.gnu.org/archive/html/libtool/2024-05/msg00018.html

diff --git a/patches/cross/2.4 b/patches/cross/2.4
index d7e443e..da7c52c 100644
--- a/patches/cross/2.4
+++ b/patches/cross/2.4
@@ -1,3 +1,4 @@
+https://bugs.gentoo.org/572038
 
https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=3221f9f0fb98d5740ab5d0e8db6a731302520644
 
https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=b8cad780da77b7cf3aae1b660be3298b7fc48d1e
 https://lists.gnu.org/archive/html/libtool/2024-05/msg00018.html

diff --git a/patches/cross/2.4.3 b/patches/cross/2.4.3
index 3c89a43..c665200 100644
--- a/patches/cross/2.4.3
+++ b/patches/cross/2.4.3
@@ -1,3 +1,4 @@
+https://bugs.gentoo.org/572038
 
https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=3221f9f0fb98d5740ab5d0e8db6a731302520644
 
https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=b8cad780da77b7cf3aae1b660be3298b7fc48d1e
 https://lists.gnu.org/archive/html/libtool/2024-05/msg00018.html



[gentoo-commits] proj/elt-patches:master commit in: patches/cross/

2024-05-31 Thread Sam James
commit: ba0a45baa503e39ae29b2a3a81dcca905607c70d
Author: Sam James  gentoo  org>
AuthorDate: Fri May 31 15:25:21 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri May 31 15:25:40 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=ba0a45ba

patches: cross: add upstream references (and commit!)

I suppose we will have to keep our own variant for this where we default
it to (E)SYSROOT, though. Need to think about that.

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

 patches/cross/2.2   | 3 +++
 patches/cross/2.4   | 3 +++
 patches/cross/2.4.3 | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/patches/cross/2.2 b/patches/cross/2.2
index e8fc2be..92459b9 100644
--- a/patches/cross/2.2
+++ b/patches/cross/2.2
@@ -1,3 +1,6 @@
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=3221f9f0fb98d5740ab5d0e8db6a731302520644
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=b8cad780da77b7cf3aae1b660be3298b7fc48d1e
+https://lists.gnu.org/archive/html/libtool/2024-05/msg00018.html
 --- ltmain.sh
 +++ ltmain.sh
 @@ -5768,7 +5768,7 @@

diff --git a/patches/cross/2.4 b/patches/cross/2.4
index 9b35295..d7e443e 100644
--- a/patches/cross/2.4
+++ b/patches/cross/2.4
@@ -1,3 +1,6 @@
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=3221f9f0fb98d5740ab5d0e8db6a731302520644
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=b8cad780da77b7cf3aae1b660be3298b7fc48d1e
+https://lists.gnu.org/archive/html/libtool/2024-05/msg00018.html
 --- ltmain.sh
 +++ ltmain.sh
 @@ -5768,7 +5768,7 @@

diff --git a/patches/cross/2.4.3 b/patches/cross/2.4.3
index 760104f..3c89a43 100644
--- a/patches/cross/2.4.3
+++ b/patches/cross/2.4.3
@@ -1,3 +1,6 @@
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=3221f9f0fb98d5740ab5d0e8db6a731302520644
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=b8cad780da77b7cf3aae1b660be3298b7fc48d1e
+https://lists.gnu.org/archive/html/libtool/2024-05/msg00018.html
 --- ltmain.sh
 +++ ltmain.sh
 @@ -8367,7 +8367,7 @@



[gentoo-commits] proj/elt-patches:master commit in: patches/static-flags/

2024-05-31 Thread Sam James
commit: 3ab63046815327409fb23b9ecd0de406aad412ce
Author: Sam James  gentoo  org>
AuthorDate: Fri May 31 14:32:01 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri May 31 14:32:01 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=3ab63046

patches: static-flags: add explicit libtool bug link

Bug: https://bugs.gnu.org/17750
Signed-off-by: Sam James  gentoo.org>

 patches/static-flags/2.4.6 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/patches/static-flags/2.4.6 b/patches/static-flags/2.4.6
index 892d7aa..49fea26 100644
--- a/patches/static-flags/2.4.6
+++ b/patches/static-flags/2.4.6
@@ -1,4 +1,5 @@
 https://bugs.gentoo.org/812026
+https://bugs.gnu.org/17750
 https://lists.gnu.org/archive/html/libtool-patches/2019-05/msg0.html
 
 From: Vincent Lefevre 



[gentoo-commits] proj/elt-patches:master commit in: /

2024-05-12 Thread Sam James
commit: bc356deb703c7f5352470ccc2aa647d9a17a804d
Author: orbea  riseup  net>
AuthorDate: Wed Mar 27 21:36:41 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun May 12 15:38:28 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=bc356deb

eltpatch.in: support slibtoolize

Patching ltmain.sh is not applicable when LIBTOOLIZE=slibtoolize which
copies a ltmain.sh script with #!/dev/null in the shebang.

Bug: https://bugs.gentoo.org/927823
Signed-off-by: orbea  riseup.net>
Closes: https://github.com/gentoo/elt-patches/pull/1
Signed-off-by: Sam James  gentoo.org>

 eltpatch.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index 8c6daee..f1afdb8 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -217,7 +217,7 @@ elibtoolize() {
fi
 
# patching ltmain.sh
-   [[ -f ${d}/ltmain.sh ]] &&
+   [[ -f ${d}/ltmain.sh ]] && sed -n '1p' ${d}/ltmain.sh | grep 
-qsv '/dev/null' &&
for p in ${elt_patches} ; do
ret=0
 



[gentoo-commits] proj/elt-patches:master commit in: patches/verbose-pic/, /

2024-04-14 Thread Sam James
commit: 9d08565368ff450c17a27bd0394a814d0aa928e7
Author: Sam James  gentoo  org>
AuthorDate: Mon Apr 15 06:17:43 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Apr 15 06:17:43 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=9d085653

patches/verbose-pic: new patch to not suppress compiler output (!)

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

 eltpatch.in   |  2 +-
 patches/verbose-pic/2.4.7 | 39 +++
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index f41563a..8c6daee 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -129,7 +129,7 @@ elibtoolize() {
local force="false"
local elt_patches="
install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
-   g-debug specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record sed-quote openmp
+   g-debug specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record sed-quote openmp verbose-pic
"
 
for x in "$@" ; do

diff --git a/patches/verbose-pic/2.4.7 b/patches/verbose-pic/2.4.7
new file mode 100644
index 000..3dfd34f
--- /dev/null
+++ b/patches/verbose-pic/2.4.7
@@ -0,0 +1,39 @@
+From ebe94942061d632ca2a6fa86cdebdf72c7863c07 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Mon, 15 Apr 2024 07:15:15 +0100
+Subject: [PATCH] ltmain.in: don't suppress output for PIC compilations
+
+I just hit this in a fascinating place.
+
+When working on xz, I set `-Werror=suggest-attribute=returns_nonnull`, and
+the build failed (as I expected it to), but with no visible error from
+the compiler.
+
+There's a mysterious '>/dev/null 2>&1' on the second line where
+liblzma_la-common.o is built without PIC.
+
+With -fPIC, IPA doesn't end up doing attribute discovery. Without it,
+it does. This behaviour is insane and we should patch it out.
+
+Bug: https://bugs.gentoo.org/135865
+Signed-off-by: Sam James 
+---
+ build-aux/ltmain.in | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 090a4fe8..e383e4cb 100644
+--- a/build-aux/ltmain.in
 b/build-aux/ltmain.in
+@@ -1665,8 +1665,6 @@ compiler."
+   func_append command " -o $obj"
+   fi
+ 
+-  # Suppress compiler output if we already did a PIC compilation.
+-  func_append command "$suppress_output"
+   func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+ 
+-- 
+2.44.0
+



[gentoo-commits] proj/elt-patches:master commit in: /, patches/openmp/

2024-03-24 Thread Sam James
commit: d3c77e47d0c2ae8806b340aabb53947012c239f5
Author: Sam James  gentoo  org>
AuthorDate: Sun Mar 24 08:29:20 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Mar 24 08:34:20 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=d3c77e47

patches/openmp: new patch to allow -fopenmp=*

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

 eltpatch.in  |  2 +-
 patches/openmp/2.4.6 | 36 
 patches/openmp/2.4.7 | 36 
 3 files changed, 73 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index 08ab587..f41563a 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -129,7 +129,7 @@ elibtoolize() {
local force="false"
local elt_patches="
install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
-   g-debug specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record sed-quote
+   g-debug specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record sed-quote openmp
"
 
for x in "$@" ; do

diff --git a/patches/openmp/2.4.6 b/patches/openmp/2.4.6
new file mode 100644
index 000..dca6110
--- /dev/null
+++ b/patches/openmp/2.4.6
@@ -0,0 +1,36 @@
+https://lists.gnu.org/archive/html/libtool-patches/2024-03/msg3.html
+https://bugs.gentoo.org/740310
+
+From cbe0f31e92142b624da92487ceed6b95e948f726 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Sun, 24 Mar 2024 08:24:30 +
+Subject: [PATCH] ltmain.in: Pass through -fopenmp=*
+
+Clang uses -fopenmp=* to allow choosing between libgomp and libomp.
+
+* build-aux/ltmain.in: Pass through -fopenmp=*.
+
+Signed-off-by: Sam James 
+--- a/build-aux/ltmain.in
 b/build-aux/ltmain.in
+@@ -5159,7 +5159,7 @@ func_mode_link ()
+   ;;
+ 
+   -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+-  |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
++  |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+   func_append compiler_flags " $arg"
+   func_append compile_command " $arg"
+   func_append finalize_command " $arg"
+@@ -5693,7 +5693,7 @@ func_mode_link ()
+   found=false
+   case $deplib in
+   -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+-|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
++|-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test prog,link = "$linkmode,$pass"; then
+   compile_deplibs="$deplib $compile_deplibs"
+   finalize_deplibs="$deplib $finalize_deplibs"
+-- 
+2.44.0
+

diff --git a/patches/openmp/2.4.7 b/patches/openmp/2.4.7
new file mode 100644
index 000..9aa171b
--- /dev/null
+++ b/patches/openmp/2.4.7
@@ -0,0 +1,36 @@
+https://lists.gnu.org/archive/html/libtool-patches/2024-03/msg3.html
+https://bugs.gentoo.org/740310
+
+From c3e479801e530f86c37a5598e3ec8e910b957cd2 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Sun, 24 Mar 2024 08:24:30 +
+Subject: [PATCH] ltmain.in: Pass through -fopenmp=*
+
+Clang uses -fopenmp=* to allow choosing between libgomp and libomp.
+
+* build-aux/ltmain.in: Pass through -fopenmp=*.
+
+Signed-off-by: Sam James 
+--- a/build-aux/ltmain.in
 b/build-aux/ltmain.in
+@@ -5198,7 +5198,7 @@ func_mode_link ()
+   continue
+   ;;
+   -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
+-  |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
++  |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+   func_append compiler_flags " $arg"
+   func_append compile_command " $arg"
+   func_append finalize_command " $arg"
+@@ -5755,7 +5755,7 @@ func_mode_link ()
+   found=false
+   case $deplib in
+   -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+-|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
++|-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test prog,link = "$linkmode,$pass"; then
+   compile_deplibs="$deplib $compile_deplibs"
+   finalize_deplibs="$deplib $finalize_deplibs"
+-- 
+2.44.0
+



[gentoo-commits] proj/elt-patches:master commit in: patches/werror/

2024-03-14 Thread Sam James
commit: d44f2d6855d8f61ef5084c0b50ef589331637af8
Author: Sam James  gentoo  org>
AuthorDate: Fri Mar 15 05:59:31 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Mar 15 06:01:12 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=d44f2d68

patches: werror: add 1.3134-2.2.7a-gnu (hack)

The ancient fork of libtool in binutils/gdb/gcc doesn't know about most
of these flags (the fork mostly exists because of divergence in what 
--with-sysroot
means but there's some other unknown/undocumented differences too).

I'm kind of cheating here because this isn't split up per-type, which I should
probably go and do, but it feels silly to spend time on it given it's solely
for 3 packages...

Anyway, for this, we now get proper colour and -Werror and such with LTO.

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

 patches/werror/1.3134-2.2.7a-gnu | 57 
 1 file changed, 57 insertions(+)

diff --git a/patches/werror/1.3134-2.2.7a-gnu b/patches/werror/1.3134-2.2.7a-gnu
new file mode 100644
index 000..6037873
--- /dev/null
+++ b/patches/werror/1.3134-2.2.7a-gnu
@@ -0,0 +1,57 @@
+Rollup of the flag fixes for the version of libtool in gcc/binutils/gdb.
+--- a/ltmain.sh
 b/ltmain.sh
+@@ -4968,19 +4968,41 @@ func_mode_link ()
+   arg="$func_quote_for_eval_result"
+   ;;
+ 
+-  # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+-  # -r[0-9][0-9]* specifies the processor on the SGI compiler
+-  # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+-  # +DA*, +DD* enable 64-bit mode on the HP compiler
+-  # -q* pass through compiler args for the IBM compiler
+-  # -m*, -t[45]*, -txscale* pass through architecture-specific
+-  # compiler args for GCC
+-  # -F/path gives path to uninstalled frameworks, gcc on darwin
+-  # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+-  # @file GCC response files
+-  # -tp=* Portland pgcc target processor selection
++  # Flags to be passed through unchanged, with rationale:
++  # -64, -mips[0-9]  enable 64-bit mode for the SGI compiler
++  # -r[0-9][0-9]*specify processor for the SGI compiler
++  # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
++  # +DA*, +DD*   enable 64-bit mode for the HP compiler
++  # -q*  compiler args for the IBM compiler
++  # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
++  # -F/path  path to uninstalled frameworks, gcc on darwin
++  # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
++  # -fstack-protector*   stack protector flags for GCC
++  # @fileGCC response files
++  # -tp=*Portland pgcc target processor selection
++  # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time 
optimization
++  # -specs=* GCC specs files
++  # -stdlib=*select c++ std lib with clang
++  # -fdiagnostics-color* simply affects output
++  # -frecord-gcc-switches used to verify flags were respected
++  # -fsanitize=* Clang/GCC memory and address sanitizer
++  # -fno-sanitize*   Clang/GCC memory and address sanitizer
++  # -shared-libsan   Link with shared sanitizer runtimes (Clang)
++  # -static-libsan   Link with static sanitizer runtimes (Clang)
++  # -fuse-ld=*   Linker select flags for GCC
++  # -rtlib=* select c runtime lib with clang
++  # --unwindlib=*select unwinder library with clang
++  # -f{file|debug|macro|profile}-prefix-map=* needed for lto linking
++  # -Wa,*Pass flags directly to the assembler
++  # -Werror, -Werror=*   Report (specified) warnings as errors
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+-  -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
++  -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*| \
++  -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*| \
++  -stdlib=*|-rtlib=*|--unwindlib=*| \
++  -specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
++  
-ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*|
 \
++  -fdiagnostics-color*|-frecord-gcc-switches| \
++  -fuse-ld=*|-Wa,*|-Werror|-Werror=*)
+ func_quote_for_eval "$arg"
+   arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"



[gentoo-commits] proj/elt-patches:master commit in: patches/g-debug/, /

2024-02-13 Thread Sam James
commit: 92078e09ce8ad813128501ca04a91eb0f36b0599
Author: Eli Schwartz  gmail  com>
AuthorDate: Mon Feb 12 20:22:42 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Feb 13 08:12:23 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=92078e09

patches: g-debug: add upstream patch for debug info

Goes well together with frecord-gcc-switches

Signed-off-by: Eli Schwartz  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 eltpatch.in   |  2 +-
 patches/g-debug/2.4.2 | 29 +
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index b1a623c..08ab587 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -129,7 +129,7 @@ elibtoolize() {
local force="false"
local elt_patches="
install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
-   specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record sed-quote
+   g-debug specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record sed-quote
"
 
for x in "$@" ; do

diff --git a/patches/g-debug/2.4.2 b/patches/g-debug/2.4.2
new file mode 100644
index 000..afc7776
--- /dev/null
+++ b/patches/g-debug/2.4.2
@@ -0,0 +1,29 @@
+From 9b726f35db98da01a7edaf143788cba2c2ae900a Mon Sep 17 00:00:00 2001
+From: Andreas Schwab 
+Date: Tue, 21 Aug 2012 20:17:04 -0500
+Subject: [PATCH] Pass through -g* so that debugging information is not dropped
+
+* ltmain.m4sh (func_mode_link): Pass through -g*.
+
+Signed-off-by: Eli Schwartz 
+---
+ build-aux/ltmain.m4sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh
+index 48e259b6..1d71f0e2 100644
+--- a/build-aux/ltmain.m4sh
 b/build-aux/ltmain.m4sh
+@@ -5090,11 +5090,11 @@ func_mode_link ()
+   # @fileGCC response files
+   # -tp=*Portland pgcc target processor selection
+   # --sysroot=*  for sysroot support
+-  # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
++  # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time 
optimization
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+-  -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
++  -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin)
+ func_quote_for_eval "$arg"
+   arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"



[gentoo-commits] proj/elt-patches:master commit in: patches/specs/, patches/fuse-ld/, patches/werror/, patches/color-record/, ...

2024-02-13 Thread Sam James
commit: f7a1dd1cb0c51abf987ac2c317dbcfa1b2d1b7bb
Author: Eli Schwartz  gmail  com>
AuthorDate: Mon Feb 12 21:29:40 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Feb 13 08:12:23 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=f7a1dd1c

patches: backport a bunch of patches to libtool 2.4.2

Newly applying:

- specs/2.4.2
- fsanitize/2.4.2
- fuse-ld/2.4.2
- werror/2.4.2
- color-record/2.4.2

At least, these all apply against the very recent gpgme 1.23.2 tarball
which was stabilized today.

(Naturally, as is only fitting for security software, the 2023 release
of gpgme is built on an early 2012 version of Debian Wheezy from before
testing graduated to stable. It's okay -- the final release of Debian
Wheezy only had libtool 2.4.2-1 -> 2.4.2-1.1 with trivial patches. Even
Jessie has 2.4.2-1.11 with substantially the same content. So these
patches should, fingers crossed, be widely applicable.)

Signed-off-by: Eli Schwartz  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 patches/color-record/2.4.2 | 29 +
 patches/fsanitize/2.4.2| 35 +++
 patches/fuse-ld/2.4.2  | 34 ++
 patches/specs/2.4.2| 30 ++
 patches/werror/2.4.2   | 28 
 5 files changed, 156 insertions(+)

diff --git a/patches/color-record/2.4.2 b/patches/color-record/2.4.2
new file mode 100644
index 000..9647592
--- /dev/null
+++ b/patches/color-record/2.4.2
@@ -0,0 +1,29 @@
+https://lists.gnu.org/archive/html/libtool-patches/2024-01/msg00029.html
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=533d816dea307ad78c4e7ba16dcdec4c285b0bc8
+
+From 533d816dea307ad78c4e7ba16dcdec4c285b0bc8 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Sun, 14 Jan 2024 06:27:33 +
+Subject: ltmain.in: Pass through -fdiagnostics-color, -frecord-gcc-switches
+
+* -fdiagnostics-color: who doesn't like color? No reason to strip it. This
+  makes the link phase stick out like a sore thumb if there's warnings emitted.
+
+* -frecord-gcc-switches: we use it in Gentoo to check if a package respects
+  *FLAGS. Note that we do not need to include -grecord-gcc-switches explicitly
+  here as -g* is already whitelisted.
+
+* build-aux/ltmain.in: Handle -fdiagnostics-color* & -frecord-gcc-switches.
+--- ltmain.in
 ltmain.in
+@@ -5363,7 +5363,8 @@ func_mode_link ()
+   # -stdlib=*select c++ std lib with clang
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+   -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin| \
+-  -specs=*|-fsanitize=*|-fuse-ld=*|-Werror|-Werror=*)
++  -specs=*|-fsanitize=*|-fuse-ld=*|-Werror|-Werror=*| \
++  -fdiagnostics-color*|-frecord-gcc-switches)
+ func_quote_for_eval "$arg"
+   arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"

diff --git a/patches/fsanitize/2.4.2 b/patches/fsanitize/2.4.2
new file mode 100644
index 000..6374dca
--- /dev/null
+++ b/patches/fsanitize/2.4.2
@@ -0,0 +1,35 @@
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=a5c6466528c060cc4660ad0319c00740db0e42ba
+
+From a5c6466528c060cc4660ad0319c00740db0e42ba Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia 
+Date: Sun, 18 Oct 2015 21:55:39 -0700
+Subject: [PATCH] libtool: fix GCC/clang linking with -fsanitize=*
+
+References:
+https://lists.gnu.org/archive/html/libtool/2014-04/msg00026.html
+
+* build-aux/ltmain.in (func_mode_link): Pass -fsanitize=* to the
+linker to allow trivial use of the clang address sanitizer.
+
+Signed-off-by: Jeremy Huddleston Sequoia 
+Copyright-paperwork-exempt: Yes
+---
+ build-aux/ltmain.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 1cbe875dfd86..2a5aaadd68c0 100644
+--- ltmain.sh
 ltmain.sh
+@@ -5382,10 +5382,11 @@ func_mode_link ()
+   # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time 
optimization
+   # -specs=* GCC specs files
++  # -fsanitize=* Clang/GCC memory and address sanitizer
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+   -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin| \
+-  -specs=*)
++  -specs=*|-fsanitize=*)
+ func_quote_for_eval "$arg"
+   arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"

diff --git a/patches/fuse-ld/2.4.2 b/patches/fuse-ld/2.4.2
new file mode 100644
index 000..c6af7f2
--- /dev/null
+++ b/patches/fuse-ld/2.4.2
@@ -0,0 +1,34 @@
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=f9970d99293faf908fdc153a653fa5781095fb7a
+
+From f9970d99293faf908fdc153a653fa5781095fb7a Mon Sep 17 00:00:00 20

[gentoo-commits] proj/elt-patches:master commit in: patches/werror/

2024-01-15 Thread Sam James
commit: 4be8f4241cf7b9f7146e41f5d072c73726a59796
Author: Eli Schwartz  gmail  com>
AuthorDate: Tue Jan 16 01:25:19 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Jan 16 01:36:58 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=4be8f424

werror patch: add a variant that works on debian-built dists

Debian applies their own patches to libtool, so tarballs generated on
debian systems need different patches.

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

 patches/werror/2.4.7-debian | 34 ++
 1 file changed, 34 insertions(+)

diff --git a/patches/werror/2.4.7-debian b/patches/werror/2.4.7-debian
new file mode 100644
index 000..d585724
--- /dev/null
+++ b/patches/werror/2.4.7-debian
@@ -0,0 +1,34 @@
+https://lists.gnu.org/archive/html/libtool-patches/2022-12/msg0.html
+
+From eb8952bf6df858b144f2dc8b573782e25b527c01 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Sat, 10 Dec 2022 02:00:22 +
+Subject: [PATCH] Allow -Werror and -Werror=* through flag filtering
+
+* build-aux/ltmain.in (func_mode_link): allow -Werror and -Werror=* through
+  flat filtering at link time.
+
+  This is needed for detecting likely-runtime problems with LTO using
+  e.g. -Werror=odr or -Werror=lto-type-mismatch.
+
+Bug: https://bugs.gentoo.org/884767
+Signed-off-by: Sam James 
+[rebased on top of Debian ltmain.sh]
+Signed-off-by: Eli Schwartz 
+--- a/ltmain.sh
 b/ltmain.sh
+@@ -7564,10 +7564,11 @@ func_mode_link ()
+   # -static-*direct GCC to link specific libraries statically
+   # -fcilkplus   Cilk Plus language extension features for C/C++
+   # -Wa,*Pass flags directly to the assembler
++  # -Werror, -Werror=*   Report (specified) warnings as errors
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+   
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-  -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*)
++  
-specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*|-Werror|-Werror=*)
+ func_quote_arg pretty "$arg"
+   arg=$func_quote_arg_result
+ func_append compile_command " $arg"
+--
+2.43.0



[gentoo-commits] proj/elt-patches:master commit in: patches/color-record/

2024-01-15 Thread Sam James
commit: 91d85f9761aa8250470fe9d5ca0524d52feb9c77
Author: Eli Schwartz  gmail  com>
AuthorDate: Tue Jan 16 01:30:46 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Jan 16 01:36:59 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=91d85f97

color-record patch: add a variant that works on debian-built dists

Debian applies their own patches to libtool, so tarballs generated on
debian systems need different patches.

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

 patches/color-record/2.4.7-debian | 40 +++
 1 file changed, 40 insertions(+)

diff --git a/patches/color-record/2.4.7-debian 
b/patches/color-record/2.4.7-debian
new file mode 100644
index 000..562cc98
--- /dev/null
+++ b/patches/color-record/2.4.7-debian
@@ -0,0 +1,40 @@
+https://lists.gnu.org/archive/html/libtool-patches/2024-01/msg00029.html
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=533d816dea307ad78c4e7ba16dcdec4c285b0bc8
+
+From 50f97756e75da06269374fff455cb211c7cf5cda Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Sun, 14 Jan 2024 06:27:33 +
+Subject: ltmain.in: Pass through -fdiagnostics-color, -frecord-gcc-switches
+
+* -fdiagnostics-color: who doesn't like color? No reason to strip it. This
+  makes the link phase stick out like a sore thumb if there's warnings emitted.
+
+* -frecord-gcc-switches: we use it in Gentoo to check if a package respects
+  *FLAGS. Note that we do not need to include -grecord-gcc-switches explicitly
+  here as -g* is already whitelisted.
+
+* build-aux/ltmain.in: Handle -fdiagnostics-color* & -frecord-gcc-switches.
+
+[rebased on top of Debian ltmain.sh]
+Signed-off-by: Eli Schwartz 
+--- ltmain.in
 ltmain.in
+@@ -7559,6 +7559,8 @@ func_mode_link ()
+   # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time 
optimization
+   # -specs=* GCC specs files
+   # -stdlib=*select c++ std lib with clang
++  # -fdiagnostics-color* simply affects output
++  # -frecord-gcc-switches used to verify flags were respected
+   # -fsanitize=* Clang/GCC memory and address sanitizer
+   # -fuse-ld=*   Linker select flags for GCC
+   # -static-*direct GCC to link specific libraries statically
+@@ -7568,6 +7570,7 @@ func_mode_link ()
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+   
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
++  -fdiagnostics-color*|-frecord-gcc-switches| \
+   
-specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*|-Werror|-Werror=*)
+ func_quote_arg pretty "$arg"
+   arg=$func_quote_arg_result
+--
+2.43.0



[gentoo-commits] proj/elt-patches:master commit in: /

2024-01-14 Thread Sam James
commit: dd72f5f57aee037d93922129018a8c120fc49237
Author: Sam James  gentoo  org>
AuthorDate: Sun Jan 14 18:33:53 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jan 14 18:34:29 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=dd72f5f5

Makefile: add trivial check target

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

 Makefile | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 90ddc87..badd60b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 DESTDIR =
@@ -26,6 +26,9 @@ eltpatch: eltpatch.in
 clean:
rm -f eltpatch
 
+check: eltpatch
+   cd tests && ./setup.sh && ./run.sh
+
 install-bin: eltpatch
install -d $(DESTDIR)$(bindir)
install -m0755 $< $(DESTDIR)$(bindir)



[gentoo-commits] proj/elt-patches:master commit in: patches/fsanitize/

2024-01-14 Thread Sam James
commit: 888325f65bcf2f97c894dc05693e83345eafabd0
Author: Sam James  gentoo  org>
AuthorDate: Sun Jan 14 18:22:38 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jan 14 18:22:38 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=888325f6

patches: fsanitize: add upstream commit link

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

 patches/fsanitize/2.4.6 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/patches/fsanitize/2.4.6 b/patches/fsanitize/2.4.6
index f5113f5..853355b 100644
--- a/patches/fsanitize/2.4.6
+++ b/patches/fsanitize/2.4.6
@@ -1,3 +1,5 @@
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=a5c6466528c060cc4660ad0319c00740db0e42ba
+
 From a5c6466528c060cc4660ad0319c00740db0e42ba Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston Sequoia 
 Date: Sun, 18 Oct 2015 21:55:39 -0700



[gentoo-commits] proj/elt-patches:master commit in: patches/cxx-pthread/

2024-01-14 Thread Sam James
commit: 53883fe316a82edd41d1a758c472a4b12ebcba2b
Author: Sam James  gentoo  org>
AuthorDate: Sun Jan 14 18:20:38 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jan 14 18:20:38 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=53883fe3

patches: cxx-pthread: add another upstream reference

Bug: https://debbugs.gnu.org/15646
Signed-off-by: Sam James  gentoo.org>

 patches/cxx-pthread/2.4.6 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/patches/cxx-pthread/2.4.6 b/patches/cxx-pthread/2.4.6
index a57f58e..16ba6b2 100644
--- a/patches/cxx-pthread/2.4.6
+++ b/patches/cxx-pthread/2.4.6
@@ -1,4 +1,5 @@
 http://permalink.gmane.org/gmane.comp.gnu.libtool.patches/11704
+https://debbugs.gnu.org/15646
 https://bugs.gentoo.org/650876
 
 From: Pavel Raiskup  redhat.com>



[gentoo-commits] proj/elt-patches:master commit in: patches/specs/

2024-01-14 Thread Sam James
commit: 5148b9bf0307cee1e36be86a7f082dbb2b08bcfb
Author: Sam James  gentoo  org>
AuthorDate: Sun Jan 14 18:23:42 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jan 14 18:23:42 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=5148b9bf

patches: specs: add upstream commit link

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

 patches/specs/2.4.6 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/patches/specs/2.4.6 b/patches/specs/2.4.6
index 8541145..4e8e442 100644
--- a/patches/specs/2.4.6
+++ b/patches/specs/2.4.6
@@ -1,3 +1,5 @@
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=702a97fbb09bd7088a50f2b239016d1e32843c24
+
 From 702a97fbb09bd7088a50f2b239016d1e32843c24 Mon Sep 17 00:00:00 2001
 From: Pavel Raiskup 
 Date: Fri, 18 Sep 2015 10:36:43 +0200



[gentoo-commits] proj/elt-patches:master commit in: patches/fuse-ld/

2024-01-14 Thread Sam James
commit: 7cd00d093a790aacb897c7f294de357fc5e9a3a8
Author: Sam James  gentoo  org>
AuthorDate: Sun Jan 14 18:21:37 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jan 14 18:21:37 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=7cd00d09

patches: fuse-ld: add upstream commit link

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

 patches/fuse-ld/2.4.6 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/patches/fuse-ld/2.4.6 b/patches/fuse-ld/2.4.6
index c8f107c..907caa4 100644
--- a/patches/fuse-ld/2.4.6
+++ b/patches/fuse-ld/2.4.6
@@ -1,3 +1,5 @@
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=f9970d99293faf908fdc153a653fa5781095fb7a
+
 From f9970d99293faf908fdc153a653fa5781095fb7a Mon Sep 17 00:00:00 2001
 From: Mike Frysinger 
 Date: Sat, 13 Feb 2016 02:14:29 -0500



[gentoo-commits] proj/elt-patches:master commit in: /, patches/sed-quote/

2024-01-14 Thread Sam James
commit: 6c423a0961c235b9a898d21954705a3b8f943d1f
Author: Sam James  gentoo  org>
AuthorDate: Sun Jan 14 18:07:45 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jan 14 18:10:49 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=6c423a09

patches: sed-quote: add new patch

See https://harald.hoyer.xyz/2015/03/05/libtool-getting-rid-of-18-sed-forks/

Interestingly, at the time, we added the patch to sys-devel/libtool in 
5f4225eb727dcd8cc0eebd60620d4b2b160712aa,
but we never pulled it into elt-patches.

Note that we could try to pull in two more fixes:
* 'libtool: optimizing options-parser hooks' 
(https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=16dbc070d32e6d4601cb5878dfdf69f2e29c84e1)
* 'funclib: refactor quoting methods a bit' 
(https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=9187e9a231e0a06cc29c336857e95f07f855b2c9)

Unconvinced it's worth it for those though: they're a lot bigger and they affect
the API of the functions so more care is needed with any risk of fuzz, etc.

Bug: https://bugs.gnu.org/20006
Bug: https://bugs.gentoo.org/542252
Signed-off-by: Sam James  gentoo.org>

 eltpatch.in |   2 +-
 patches/sed-quote/2.4.6 | 128 
 2 files changed, 129 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index dfa994f..b1a623c 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -129,7 +129,7 @@ elibtoolize() {
local force="false"
local elt_patches="
install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
-   specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record
+   specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record sed-quote
"
 
for x in "$@" ; do

diff --git a/patches/sed-quote/2.4.6 b/patches/sed-quote/2.4.6
new file mode 100644
index 000..073e40e
--- /dev/null
+++ b/patches/sed-quote/2.4.6
@@ -0,0 +1,128 @@
+https://harald.hoyer.xyz/2015/03/05/libtool-getting-rid-of-18-sed-forks/
+https://bugs.gnu.org/20006
+https://bugs.gentoo.org/542252
+
+From 32f0df9835ac15ac17e04be57c368172c3ad1d19 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup 
+Date: Sun, 4 Oct 2015 21:55:03 +0200
+Subject: [PATCH] libtool: mitigate the $sed_quote_subst slowdown
+
+When it is reasonably possible, use shell implementation for
+quoting.
+
+References:
+http://lists.gnu.org/archive/html/libtool/2015-03/msg5.html
+http://lists.gnu.org/archive/html/libtool/2015-02/msg0.html
+https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20006
+
+* ltmain.in (func_emit_wrapper): Use func_quote instead
+of '$SED $sed_quote_subst'.
+(func_mode_link): Likewise.
+--- ltmain.sh
 ltmain.sh
+@@ -1026,6 +1026,57 @@ func_relative_path ()
+ }
+ 
+ 
++# func_quote ARG
++# --
++# Aesthetically quote one ARG, store the result into $func_quote_result.  Note
++# that we keep attention to performance here (so far O(N) complexity as long 
as
++# func_append is O(1)).
++func_quote ()
++{
++$debug_cmd
++
++func_quote_result=$1
++
++case $func_quote_result in
++  *[\\\`\"\$]*)
++case $func_quote_result in
++  *[\[\*\?]*)
++func_quote_result=`$ECHO "$func_quote_result" | $SED 
"$sed_quote_subst"`
++return 0
++;;
++esac
++
++func_quote_old_IFS=$IFS
++for _G_char in '\' '`' '"' '$'
++do
++  # STATE($1) PREV($2) SEPARATOR($3)
++  set start "" ""
++  func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy
++  IFS=$_G_char
++  for _G_part in $func_quote_result
++  do
++case $1 in
++quote)
++  func_append func_quote_result "$3$2"
++  set quote "$_G_part" "\\$_G_char"
++  ;;
++start)
++  set first "" ""
++  func_quote_result=
++  ;;
++first)
++  set quote "$_G_part" ""
++  ;;
++esac
++  done
++  IFS=$func_quote_old_IFS
++done
++;;
++  *) ;;
++esac
++}
++
++
+ # func_quote_for_eval ARG...
+ # --
+ # Aesthetically quote ARGs to be evaled later.
+@@ -1042,12 +1093,8 @@ func_quote_for_eval ()
+ func_quote_for_eval_unquoted_result=
+ func_quote_for_eval_result=
+ while test 0 -lt $#; do
+-  case $1 in
+-*[\\\`\"\$]*)
+-_G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+-*)
+-  _G_unquoted_arg=$1 ;;
+-  esac
++  func_quote "$1"
++  _G_unquoted_arg=$func_quote_result
+   if test -n "$func_quote_for_eval_unquoted_result"; then
+   func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+   else
+@@ -3346,7 +3346,8 @@ else
+   if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+ 
+-

[gentoo-commits] proj/elt-patches:master commit in: patches/darwin20-conf/

2024-01-14 Thread Sam James
commit: 19ec97cbe1ccddfd1571e48f68b16d18f80486cc
Author: Sam James  gentoo  org>
AuthorDate: Sun Jan 14 17:34:28 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jan 14 17:34:41 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=19ec97cb

patches: darwin20-conf: add upstream references

Bug: https://bugs.gnu.org/44605
Signed-off-by: Sam James  gentoo.org>

 patches/darwin20-conf/2.2.7 | 3 +++
 patches/darwin20-conf/2.4.6 | 3 +++
 patches/darwin20-conf/2.4.6-alt | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/patches/darwin20-conf/2.2.7 b/patches/darwin20-conf/2.2.7
index 939b305..3af0b29 100644
--- a/patches/darwin20-conf/2.2.7
+++ b/patches/darwin20-conf/2.2.7
@@ -1,3 +1,6 @@
+https://bugs.gnu.org/44605
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=9e8c882517082fe5755f2524d23efb02f1522490
+
 macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X releases.
 macOS Monterey is 12.0.
 --- configure

diff --git a/patches/darwin20-conf/2.4.6 b/patches/darwin20-conf/2.4.6
index 7bfb3bb..4eb08ff 100644
--- a/patches/darwin20-conf/2.4.6
+++ b/patches/darwin20-conf/2.4.6
@@ -1,3 +1,6 @@
+https://bugs.gnu.org/44605
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=9e8c882517082fe5755f2524d23efb02f1522490
+
 macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X releases.
 macOS Monterey is 12.0.
 --- configure

diff --git a/patches/darwin20-conf/2.4.6-alt b/patches/darwin20-conf/2.4.6-alt
index 3454602..1e819ab 100644
--- a/patches/darwin20-conf/2.4.6-alt
+++ b/patches/darwin20-conf/2.4.6-alt
@@ -1,3 +1,6 @@
+https://bugs.gnu.org/44605
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=9e8c882517082fe5755f2524d23efb02f1522490
+
 macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X releases.
 macOS Monterey is 12.0.
 --- configure



[gentoo-commits] proj/elt-patches:master commit in: patches/color-record/

2024-01-14 Thread Sam James
commit: e8a4a38633fdeeb8652bf060ea267f02a223537f
Author: Sam James  gentoo  org>
AuthorDate: Sun Jan 14 17:24:09 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jan 14 17:24:42 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=e8a4a386

patches: color-record: add upstream link/references

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

 patches/color-record/2.4.6 | 22 +-
 patches/color-record/2.4.6-alt | 20 ++--
 patches/color-record/2.4.7 | 16 
 3 files changed, 47 insertions(+), 11 deletions(-)

diff --git a/patches/color-record/2.4.6 b/patches/color-record/2.4.6
index 7e8ac0c..acad694 100644
--- a/patches/color-record/2.4.6
+++ b/patches/color-record/2.4.6
@@ -1,15 +1,19 @@
-From 64baaf00e93b990154a53a1345be24c9d9bb25c5 Mon Sep 17 00:00:00 2001
+https://lists.gnu.org/archive/html/libtool-patches/2024-01/msg00029.html
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=533d816dea307ad78c4e7ba16dcdec4c285b0bc8
+
+From 533d816dea307ad78c4e7ba16dcdec4c285b0bc8 Mon Sep 17 00:00:00 2001
 From: Sam James 
-Date: Tue, 9 Jan 2024 01:40:56 +
-Subject: [PATCH] ltmain.in: Pass through -fdiagnostics-color,
- -frecord-gcc-switches
+Date: Sun, 14 Jan 2024 06:27:33 +
+Subject: ltmain.in: Pass through -fdiagnostics-color, -frecord-gcc-switches
+
+* -fdiagnostics-color: who doesn't like color? No reason to strip it. This
+  makes the link phase stick out like a sore thumb if there's warnings emitted.
 

- build-aux/ltmain.in | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+* -frecord-gcc-switches: we use it in Gentoo to check if a package respects
+  *FLAGS. Note that we do not need to include -grecord-gcc-switches explicitly
+  here as -g* is already whitelisted.
 
-diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
-index d5cf07a6..b372dc87 100644
+* build-aux/ltmain.in: Handle -fdiagnostics-color* & -frecord-gcc-switches.
 --- ltmain.in
 +++ ltmain.in
 @@ -5363,7 +5363,8 @@ func_mode_link ()

diff --git a/patches/color-record/2.4.6-alt b/patches/color-record/2.4.6-alt
index c2e62ef..e036aa1 100644
--- a/patches/color-record/2.4.6-alt
+++ b/patches/color-record/2.4.6-alt
@@ -1,5 +1,21 @@
 ltmain.sh.bak  2024-01-09 01:44:40.796693940 +
-+++ ltmain.sh  2024-01-09 01:45:13.455072670 +
+https://lists.gnu.org/archive/html/libtool-patches/2024-01/msg00029.html
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=533d816dea307ad78c4e7ba16dcdec4c285b0bc8
+
+From 533d816dea307ad78c4e7ba16dcdec4c285b0bc8 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Sun, 14 Jan 2024 06:27:33 +
+Subject: ltmain.in: Pass through -fdiagnostics-color, -frecord-gcc-switches
+
+* -fdiagnostics-color: who doesn't like color? No reason to strip it. This
+  makes the link phase stick out like a sore thumb if there's warnings emitted.
+
+* -frecord-gcc-switches: we use it in Gentoo to check if a package respects
+  *FLAGS. Note that we do not need to include -grecord-gcc-switches explicitly
+  here as -g* is already whitelisted.
+
+* build-aux/ltmain.in: Handle -fdiagnostics-color* & -frecord-gcc-switches.
+--- ltmain.sh
 ltmain.sh
 @@ -7304,7 +7304,8 @@
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \

-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \

diff --git a/patches/color-record/2.4.7 b/patches/color-record/2.4.7
index 54e0478..9baae3d 100644
--- a/patches/color-record/2.4.7
+++ b/patches/color-record/2.4.7
@@ -1,3 +1,19 @@
+https://lists.gnu.org/archive/html/libtool-patches/2024-01/msg00029.html
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=533d816dea307ad78c4e7ba16dcdec4c285b0bc8
+
+From 533d816dea307ad78c4e7ba16dcdec4c285b0bc8 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Sun, 14 Jan 2024 06:27:33 +
+Subject: ltmain.in: Pass through -fdiagnostics-color, -frecord-gcc-switches
+
+* -fdiagnostics-color: who doesn't like color? No reason to strip it. This
+  makes the link phase stick out like a sore thumb if there's warnings emitted.
+
+* -frecord-gcc-switches: we use it in Gentoo to check if a package respects
+  *FLAGS. Note that we do not need to include -grecord-gcc-switches explicitly
+  here as -g* is already whitelisted.
+
+* build-aux/ltmain.in: Handle -fdiagnostics-color* & -frecord-gcc-switches.
 --- ltmain.in
 +++ ltmain.in
 @@ -5405,6 +5405,8 @@ func_mode_link ()



[gentoo-commits] proj/elt-patches:master commit in: tests/2.4.7/

2024-01-08 Thread Sam James
commit: 8d0606bf9416a1526b0e02180a8abd31fd5da57b
Author: Sam James  gentoo  org>
AuthorDate: Tue Jan  9 01:48:32 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Jan  9 01:48:32 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=8d0606bf

tests: add 2.4.7

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

 tests/2.4.7/configure.ac | 4 
 1 file changed, 4 insertions(+)

diff --git a/tests/2.4.7/configure.ac b/tests/2.4.7/configure.ac
new file mode 100644
index 000..764d8df
--- /dev/null
+++ b/tests/2.4.7/configure.ac
@@ -0,0 +1,4 @@
+AC_PREREQ([2.69])
+AC_INIT([elt-patches], [ver])
+LT_INIT
+AC_OUTPUT



[gentoo-commits] proj/elt-patches:master commit in: patches/color-record/, /

2024-01-08 Thread Sam James
commit: 407aa28e484a9acaaee7a94fd993498f18253d40
Author: Sam James  gentoo  org>
AuthorDate: Tue Jan  9 01:48:48 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Jan  9 01:48:48 2024 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=407aa28e

patches: add color-record

Allow through -fdiagnostics-color=* and -frecord-gcc-switches. We use
the latter for QA checks in Gentoo.

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

 eltpatch.in|  2 +-
 patches/color-record/2.4.6 | 27 +++
 patches/color-record/2.4.6-alt | 12 
 patches/color-record/2.4.7 | 19 +++
 4 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index 1e6920d..dfa994f 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -129,7 +129,7 @@ elibtoolize() {
local force="false"
local elt_patches="
install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
-   specs fsanitize fuse-ld static-flags werror cxx-pthread
+   specs fsanitize fuse-ld static-flags werror cxx-pthread 
color-record
"
 
for x in "$@" ; do

diff --git a/patches/color-record/2.4.6 b/patches/color-record/2.4.6
new file mode 100644
index 000..7e8ac0c
--- /dev/null
+++ b/patches/color-record/2.4.6
@@ -0,0 +1,27 @@
+From 64baaf00e93b990154a53a1345be24c9d9bb25c5 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Tue, 9 Jan 2024 01:40:56 +
+Subject: [PATCH] ltmain.in: Pass through -fdiagnostics-color,
+ -frecord-gcc-switches
+
+---
+ build-aux/ltmain.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index d5cf07a6..b372dc87 100644
+--- ltmain.in
 ltmain.in
+@@ -5363,7 +5363,8 @@ func_mode_link ()
+   # -stdlib=*select c++ std lib with clang
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+-  
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
++  
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
++  -fdiagnostics-color*|-frecord-gcc-switches)
+ func_quote_for_eval "$arg"
+   arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
+-- 
+2.43.0
+

diff --git a/patches/color-record/2.4.6-alt b/patches/color-record/2.4.6-alt
new file mode 100644
index 000..c2e62ef
--- /dev/null
+++ b/patches/color-record/2.4.6-alt
@@ -0,0 +1,12 @@
+--- ltmain.sh.bak  2024-01-09 01:44:40.796693940 +
 ltmain.sh  2024-01-09 01:45:13.455072670 +
+@@ -7304,7 +7304,8 @@
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+   
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-  -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Werror|-Werror=*)
++  
-specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Werror|-Werror=*| \
++  -fdiagnostics-color*|-frecord-gcc-switches)
+ func_quote_for_eval "$arg"
+   arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"

diff --git a/patches/color-record/2.4.7 b/patches/color-record/2.4.7
new file mode 100644
index 000..54e0478
--- /dev/null
+++ b/patches/color-record/2.4.7
@@ -0,0 +1,19 @@
+--- ltmain.in
 ltmain.in
+@@ -5405,6 +5405,8 @@ func_mode_link ()
+   # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time 
optimization
+   # -specs=* GCC specs files
+   # -stdlib=*select c++ std lib with clang
++  # -fdiagnostics-color* simply affects output
++  # -frecord-gcc-switches used to verify flags were respected
+   # -fsanitize=* Clang/GCC memory and address sanitizer
+   # -fuse-ld=*   Linker select flags for GCC
+   # -Wa,*Pass flags directly to the assembler
+@@ -5412,6 +5414,7 @@ func_mode_link ()
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+   
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
++  -fdiagnostics-color*|-frecord-gcc-switches| \
+   -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-Werror|-Werror=*)
+ func_quote_arg pretty "$arg"
+   arg=$func_quote_arg_result



[gentoo-commits] proj/elt-patches:master commit in: /, patches/cxx-pthread/

2023-12-27 Thread Sam James
commit: 62add71b9ab7a444189d80e00a8eaca179cd1c85
Author: Sam James  gentoo  org>
AuthorDate: Thu Dec 28 00:54:17 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Dec 28 00:56:42 2023 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=62add71b

patches: add cxx-pthread

Bug: https://bugs.gentoo.org/650876
Bug: https://debbugs.gnu.org/15646
Signed-off-by: Sam James  gentoo.org>

 eltpatch.in   |  2 +-
 patches/cxx-pthread/2.4.6 | 38 ++
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index e3842bd..1e6920d 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -129,7 +129,7 @@ elibtoolize() {
local force="false"
local elt_patches="
install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
-   specs fsanitize fuse-ld static-flags werror
+   specs fsanitize fuse-ld static-flags werror cxx-pthread
"
 
for x in "$@" ; do

diff --git a/patches/cxx-pthread/2.4.6 b/patches/cxx-pthread/2.4.6
new file mode 100644
index 000..a57f58e
--- /dev/null
+++ b/patches/cxx-pthread/2.4.6
@@ -0,0 +1,38 @@
+http://permalink.gmane.org/gmane.comp.gnu.libtool.patches/11704
+https://bugs.gentoo.org/650876
+
+From: Pavel Raiskup  redhat.com>
+Subject: [PATCH] libtool: handle the -pthread{,s} options for g++
+Newsgroups: gmane.comp.gnu.libtool.patches
+Date: Thursday 28th November 2013 14:18:05 UTC (over 4 years ago)
+
+As we are forced to pass -nostdlib to g++ for linking, this option
+expectedly disables the effectiveness of passed -pthread flag - so
+add the -lpthread explicitly to $deplibs to link correctly.
+
+References:
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
+https://bugzilla.redhat.com/show_bug.cgi?id=661333
+http://lists.gnu.org/archive/html/bug-libtool/2013-01/msg00018.htm
+
+* build-aux/ltmain.in (func_mode_link): Explicitly add -lpthread
+flag into $deplibs when -pthread is passed (for g++ only).
+--- a/ltmain.sh
 b/ltmain.sh
+@@ -7127,6 +7127,16 @@
+   *" $arg "*) ;;
+   * ) func_append new_inherited_linker_flags " $arg" ;;
+   esac
++
++  # As we are forced to pass -nostdlib to g++ during linking, the option
++  # -pthread{,s} is not in effect;  add the -lpthread to $deplist
++  # explicitly to link correctly.
++  if test "$tagname" = CXX -a x"$with_gcc" = xyes; then
++case "$arg" in
++  -pthread*) func_append deplibs " -lpthread" ;;
++esac
++  fi
++
+   continue
+   ;;
+ 



[gentoo-commits] proj/elt-patches:master commit in: patches/werror/

2022-12-09 Thread Sam James
commit: 2050663473323e28e566047f436a3b9878c90ce7
Author: Sam James  gentoo  org>
AuthorDate: Sat Dec 10 02:50:11 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Dec 10 02:50:11 2022 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=20506634

2.4.6, 2.4.7: add werror upstream link

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

 patches/werror/2.4.6 | 2 ++
 patches/werror/2.4.7 | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/patches/werror/2.4.6 b/patches/werror/2.4.6
index d1e8a6d..15d1776 100644
--- a/patches/werror/2.4.6
+++ b/patches/werror/2.4.6
@@ -1,3 +1,5 @@
+https://lists.gnu.org/archive/html/libtool-patches/2022-12/msg0.html
+
 From d72817b1ee5d7b666bf30b0234e32423252d6ad8 Mon Sep 17 00:00:00 2001
 From: Sam James 
 Date: Sat, 10 Dec 2022 02:00:22 +

diff --git a/patches/werror/2.4.7 b/patches/werror/2.4.7
index 8b0a761..0cf9399 100644
--- a/patches/werror/2.4.7
+++ b/patches/werror/2.4.7
@@ -1,3 +1,5 @@
+https://lists.gnu.org/archive/html/libtool-patches/2022-12/msg0.html
+
 From d72817b1ee5d7b666bf30b0234e32423252d6ad8 Mon Sep 17 00:00:00 2001
 From: Sam James 
 Date: Sat, 10 Dec 2022 02:00:22 +



[gentoo-commits] proj/elt-patches:master commit in: /, patches/werror/

2022-12-09 Thread Sam James
commit: 7ff3d75742a356034af9c92b282a99cc1486
Author: Sam James  gentoo  org>
AuthorDate: Sat Dec 10 02:31:23 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Dec 10 02:31:23 2022 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=7ff3d757

2.4.6, 2.4.7: add -Werror filter bypass for LTO

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

 eltpatch.in  |  2 +-
 patches/werror/2.4.6 | 28 
 patches/werror/2.4.7 | 30 ++
 3 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index a0b0607..e3842bd 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -129,7 +129,7 @@ elibtoolize() {
local force="false"
local elt_patches="
install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
-   specs fsanitize fuse-ld static-flags
+   specs fsanitize fuse-ld static-flags werror
"
 
for x in "$@" ; do

diff --git a/patches/werror/2.4.6 b/patches/werror/2.4.6
new file mode 100644
index 000..d1e8a6d
--- /dev/null
+++ b/patches/werror/2.4.6
@@ -0,0 +1,28 @@
+From d72817b1ee5d7b666bf30b0234e32423252d6ad8 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Sat, 10 Dec 2022 02:00:22 +
+Subject: [PATCH] Allow -Werror and -Werror=* through flag filtering
+
+* build-aux/ltmain.in (func_mode_link): allow -Werror and -Werror=* through
+  flat filtering at link time.
+
+  This is needed for detecting likely-runtime problems with LTO using
+  e.g. -Werror=odr or -Werror=lto-type-mismatch.
+
+Bug: https://bugs.gentoo.org/884767
+Signed-off-by: Sam James 
+--- a/ltmain.sh
 b/ltmain.sh
+@@ -7382,10 +7382,11 @@ func_mode_link ()
+   # -fuse-ld=*   Linker select flags for GCC
+   # -static-*direct GCC to link specific libraries statically
+   # -fcilkplus   Cilk Plus language extension features for C/C++
++  # -Werror, -Werror=*   Report (specified) warnings as errors
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+   
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-  -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
++  -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Werror|-Werror=*)
+ func_quote_for_eval "$arg"
+   arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"

diff --git a/patches/werror/2.4.7 b/patches/werror/2.4.7
new file mode 100644
index 000..8b0a761
--- /dev/null
+++ b/patches/werror/2.4.7
@@ -0,0 +1,30 @@
+From d72817b1ee5d7b666bf30b0234e32423252d6ad8 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Sat, 10 Dec 2022 02:00:22 +
+Subject: [PATCH] Allow -Werror and -Werror=* through flag filtering
+
+* build-aux/ltmain.in (func_mode_link): allow -Werror and -Werror=* through
+  flat filtering at link time.
+
+  This is needed for detecting likely-runtime problems with LTO using
+  e.g. -Werror=odr or -Werror=lto-type-mismatch.
+
+Bug: https://bugs.gentoo.org/884767
+Signed-off-by: Sam James 
+--- a/ltmain.sh
 b/ltmain.sh
+@@ -5408,10 +5408,11 @@ func_mode_link ()
+   # -fsanitize=* Clang/GCC memory and address sanitizer
+   # -fuse-ld=*   Linker select flags for GCC
+   # -Wa,*Pass flags directly to the assembler
++  # -Werror, -Werror=*   Report (specified) warnings as errors
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+   
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-  -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
++  -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-Werror|-Werror=*)
+ func_quote_arg pretty "$arg"
+   arg=$func_quote_arg_result
+ func_append compile_command " $arg"
+--
+2.38.1



[gentoo-commits] proj/elt-patches:master commit in: patches/darwin20-conf/

2022-08-30 Thread Sam James
commit: 285bc8a90bd1cb60a8e7c7097d5ef1e46b68248c
Author: Sam James  gentoo  org>
AuthorDate: Tue Aug 30 23:48:13 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Aug 30 23:53:54 2022 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=285bc8a9

darwin20-conf: split 2.4.6 into two

Apparently doesn't apply properly (skips second hunk?) otherwise.

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

 patches/darwin20-conf/2.4.6| 11 ---
 patches/darwin20-conf/{2.4.6 => 2.4.6-alt} | 11 ---
 2 files changed, 22 deletions(-)

diff --git a/patches/darwin20-conf/2.4.6 b/patches/darwin20-conf/2.4.6
index 0932eae..7bfb3bb 100644
--- a/patches/darwin20-conf/2.4.6
+++ b/patches/darwin20-conf/2.4.6
@@ -11,14 +11,3 @@ macOS Monterey is 12.0.
  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
  ;;
 configure
-+++ configure
-@@ -8949,7 +8949,7 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; }
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-   10.[012][,.]*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;
--  10.*|11.*)
-+  1[0-9].*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-   esac
- ;;

diff --git a/patches/darwin20-conf/2.4.6 b/patches/darwin20-conf/2.4.6-alt
similarity index 58%
copy from patches/darwin20-conf/2.4.6
copy to patches/darwin20-conf/2.4.6-alt
index 0932eae..3454602 100644
--- a/patches/darwin20-conf/2.4.6
+++ b/patches/darwin20-conf/2.4.6-alt
@@ -2,17 +2,6 @@ macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X 
releases.
 macOS Monterey is 12.0.
 --- configure
 +++ configure
-@@ -1076,7 +1076,7 @@
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-   10.[[012]][[,.]]*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;
--  10.*)
-+  1[0-9].*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-   esac
- ;;
 configure
-+++ configure
 @@ -8949,7 +8949,7 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; }
  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10.[012][,.]*)



[gentoo-commits] proj/elt-patches:master commit in: patches/darwin20-conf/

2022-08-30 Thread Sam James
commit: 5a6f764631151b8cbfb2cd81c10bcbe3222673e5
Author: David Seifert  gentoo  org>
AuthorDate: Tue Aug 30 20:04:54 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Aug 30 23:50:28 2022 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=5a6f7646

darwin20-conf: change regex for future releases

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

 patches/darwin20-conf/2.2.7 | 2 +-
 patches/darwin20-conf/2.4.6 | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/patches/darwin20-conf/2.2.7 b/patches/darwin20-conf/2.2.7
index fda..939b305 100644
--- a/patches/darwin20-conf/2.2.7
+++ b/patches/darwin20-conf/2.2.7
@@ -7,7 +7,7 @@ macOS Monterey is 12.0.
10.[012][,.]*)
  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined 
${wl}suppress' ;;
 -  10.*)
-+  10.*|11.*|12.*)
++  1[0-9].*)
  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
esac
  ;;

diff --git a/patches/darwin20-conf/2.4.6 b/patches/darwin20-conf/2.4.6
index 2d4518a..0932eae 100644
--- a/patches/darwin20-conf/2.4.6
+++ b/patches/darwin20-conf/2.4.6
@@ -7,7 +7,7 @@ macOS Monterey is 12.0.
10.[[012]][[,.]]*)
  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;
 -  10.*)
-+  10.*|11.*|12.*)
++  1[0-9].*)
  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
  ;;
@@ -18,7 +18,7 @@ macOS Monterey is 12.0.
10.[012][,.]*)
  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;
 -  10.*|11.*)
-+  10.*|11.*|12.*)
++  1[0-9].*)
  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
  ;;



[gentoo-commits] proj/elt-patches:master commit in: patches/darwin20-conf/

2022-08-30 Thread Sam James
commit: 44b8aa487e75a0e23b20cea4d218d6d3db727ef6
Author: Sam James  gentoo  org>
AuthorDate: Tue Aug 30 20:00:35 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Aug 30 23:50:28 2022 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=44b8aa48

darwin20-conf: add variant for 2.4.6

Noticed with libxml2.

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

 patches/darwin20-conf/2.4.6 | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/patches/darwin20-conf/2.4.6 b/patches/darwin20-conf/2.4.6
index 7285490..2d4518a 100644
--- a/patches/darwin20-conf/2.4.6
+++ b/patches/darwin20-conf/2.4.6
@@ -11,3 +11,14 @@ macOS Monterey is 12.0.
  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
  ;;
+--- configure
 configure
+@@ -8949,7 +8949,7 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; }
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+   10.[012][,.]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;
+-  10.*|11.*)
++  10.*|11.*|12.*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+   esac
+ ;;



[gentoo-commits] proj/elt-patches:master commit in: patches/darwin20-conf/

2021-11-04 Thread Sam James
commit: 94cb4ce2ce4ca7d9e8acf512d8971b4b80b1a146
Author: Sam James  gentoo  org>
AuthorDate: Thu Nov  4 23:05:34 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Nov  4 23:05:34 2021 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=94cb4ce2

darwin20-conf: add Darwin 21 (macOS Monterey)

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

 patches/darwin20-conf/2.2.7 | 4 ++--
 patches/darwin20-conf/2.4.6 | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/patches/darwin20-conf/2.2.7 b/patches/darwin20-conf/2.2.7
index 3f667be..fda 100644
--- a/patches/darwin20-conf/2.2.7
+++ b/patches/darwin20-conf/2.2.7
@@ -1,5 +1,5 @@
 macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X releases.
-
+macOS Monterey is 12.0.
 --- configure
 +++ configure
 @@ -8121,7 +8121,7 @@
@@ -7,7 +7,7 @@ macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X 
releases.
10.[012][,.]*)
  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined 
${wl}suppress' ;;
 -  10.*)
-+  10.*|11.*)
++  10.*|11.*|12.*)
  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
esac
  ;;

diff --git a/patches/darwin20-conf/2.4.6 b/patches/darwin20-conf/2.4.6
index 2a296a4..7285490 100644
--- a/patches/darwin20-conf/2.4.6
+++ b/patches/darwin20-conf/2.4.6
@@ -1,5 +1,5 @@
 macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X releases.
-
+macOS Monterey is 12.0.
 --- configure
 +++ configure
 @@ -1076,7 +1076,7 @@
@@ -7,7 +7,7 @@ macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X 
releases.
10.[[012]][[,.]]*)
  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;
 -  10.*)
-+  10.*|11.*)
++  10.*|11.*|12.*)
  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
  ;;



[gentoo-commits] proj/elt-patches:master commit in: /, patches/static-flags/

2021-11-04 Thread Mike Frysinger
commit: 2b7112d147d2fe5d418ecdf2f8d150935761de79
Author: Joakim Tjernlund  infinera  com>
AuthorDate: Tue Nov  2 22:42:18 2021 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Thu Nov  4 10:33:34 2021 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=2b7112d1

backport -static-* & -fcilkplus for 2.4.6

Bug: https://bugs.gentoo.org/812026
Signed-off-by: Joakim Tjernlund  infinera.com>
Signed-off-by: Mike Frysinger  gentoo.org>

 eltpatch.in|  2 +-
 patches/static-flags/2.4.6 | 38 ++
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index 7d3980e..a0b0607 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -129,7 +129,7 @@ elibtoolize() {
local force="false"
local elt_patches="
install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
-   specs fsanitize fuse-ld
+   specs fsanitize fuse-ld static-flags
"
 
for x in "$@" ; do

diff --git a/patches/static-flags/2.4.6 b/patches/static-flags/2.4.6
new file mode 100644
index 000..892d7aa
--- /dev/null
+++ b/patches/static-flags/2.4.6
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/812026
+https://lists.gnu.org/archive/html/libtool-patches/2019-05/msg0.html
+
+From: Vincent Lefevre 
+Subject: [PATCH] libtool: pass more flags to the linker
+Date: Fri, 3 May 2019 15:19:19 +0200
+To: libtool-patc...@gnu.org
+
+Resolves bug 17750.
+
+* build-aux/ltmain.in (func_mode_link): In the flags to be passed through
+unchanged, also pass -static-* and -fcilkplus.
+
+Signed-off-by: Vincent Lefevre 
+---
+ build-aux/ltmain.in | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 96b37003..c0e925bb 100644
+--- ltmain.sh
 ltmain.sh
+@@ -5380,10 +5380,12 @@ func_mode_link ()
+   # -stdlib=*select c++ std lib with clang
+   # -fsanitize=* Clang/GCC memory and address sanitizer
+   # -fuse-ld=*   Linker select flags for GCC
++  # -static-*direct GCC to link specific libraries statically
++  # -fcilkplus   Cilk Plus language extension features for C/C++
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+   
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-  -specs=*|-fsanitize=*|-fuse-ld=*)
++  -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
+ func_quote_for_eval "$arg"
+   arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
+-- 
+2.20.1



[gentoo-commits] proj/elt-patches:master commit in: /, patches/specs/

2021-11-04 Thread Mike Frysinger
commit: c89bcab82ce9218522d9b47fe543a419dc74a93b
Author: Mike Frysinger  gentoo  org>
AuthorDate: Thu Nov  4 10:17:46 2021 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Thu Nov  4 10:17:46 2021 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=c89bcab8

patches: backport -specs patch

This is needed for the -fsanitize/-fuse-ld to apply cleanly to the
original 2.4.6 release and not just what distros are shipping.

Signed-off-by: Mike Frysinger  gentoo.org>

 eltpatch.in |  2 +-
 patches/specs/2.4.6 | 29 +
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index 7fa21bc..887fc6f 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -127,7 +127,7 @@ elibtoolize() {
local force="false"
local elt_patches="
install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
-   fsanitize fuse-ld
+   specs fsanitize fuse-ld
"
 
for x in "$@" ; do

diff --git a/patches/specs/2.4.6 b/patches/specs/2.4.6
new file mode 100644
index 000..8541145
--- /dev/null
+++ b/patches/specs/2.4.6
@@ -0,0 +1,29 @@
+From 702a97fbb09bd7088a50f2b239016d1e32843c24 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup 
+Date: Fri, 18 Sep 2015 10:36:43 +0200
+Subject: [PATCH] libtool: fix GCC linking with -specs=*
+
+References:
+https://bugzilla.redhat.com/show_bug.cgi?id=985592
+
+* build-aux/ltmain.in (func_mode_link): Pass -specs=*
+to the linker, Fedora uses this option for hardening.
+
+Signed-off-by: Pavel Raiskup 
+
+--- ltmain.sh
 ltmain.sh
+@@ -7272,10 +7272,12 @@
+   # -tp=*Portland pgcc target processor selection
+   # --sysroot=*  for sysroot support
+   # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time 
optimization
++  # -specs=* GCC specs files
+   # -stdlib=*select c++ std lib with clang
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+-  
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
++  
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
++  -specs=*)
+ func_quote_for_eval "$arg"
+   arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"



[gentoo-commits] proj/elt-patches:master commit in: /

2021-11-04 Thread Mike Frysinger
commit: 964785ff0def008f3367f9f1d3f7eca2b17f78b6
Author: Mike Frysinger  gentoo  org>
AuthorDate: Thu Nov  4 10:18:48 2021 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Thu Nov  4 10:18:48 2021 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=964785ff

ignore generated eltpatch

Signed-off-by: Mike Frysinger  gentoo.org>

 .gitignore | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..728412a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*~
+
+/eltpatch



[gentoo-commits] proj/elt-patches:master commit in: /

2021-11-04 Thread Mike Frysinger
commit: c4ea896a322a84876a92bc530ef506c098f40c2c
Author: Mike Frysinger  gentoo  org>
AuthorDate: Thu Nov  4 10:19:36 2021 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Thu Nov  4 10:19:36 2021 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=c4ea896a

eltpatch: allow ELT_patchdir to be overridden via env

This will allow for local testing.

Signed-off-by: Mike Frysinger  gentoo.org>

 eltpatch.in | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/eltpatch.in b/eltpatch.in
index 887fc6f..7d3980e 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -7,6 +7,8 @@ type -P gfind &>/dev/null && FIND=gfind || FIND=find
 type -P gpatch &>/dev/null && PATCH=gpatch || PATCH=patch
 type -P gsed &>/dev/null && SED=gsed || SED=sed
 
+: "${ELT_patchdir:=@ELT_patchdir@}"
+
 source "@ELT_gentoofuncs@" || exit 1
 
 die() {
@@ -74,7 +76,7 @@ ELT_walk_patches() {
local ret=1
local file=$1
local patch_set=$2
-   local patch_dir="@ELT_patchdir@/${patch_set}"
+   local patch_dir="${ELT_patchdir}/${patch_set}"
local rem_int_dep=$3
 
[[ -z ${patch_set} ]] && return 1
@@ -88,7 +90,7 @@ ELT_walk_patches() {
sed_args+=( -e "s|@REM_INT_DEP@|${rem_int_dep}|g" )
fi
 
-   pushd "@ELT_patchdir@" >/dev/null || die "pushd to elt-patch dir failed"
+   pushd "${ELT_patchdir}" >/dev/null || die "pushd to elt-patch dir 
failed"
 
# Go through the patches in reverse order (newer version to older)
for patch in $(${FIND} "${patch_set}" -maxdepth 1 -type f | LC_ALL=C 
sort -r) ; do



[gentoo-commits] proj/elt-patches:master commit in: tests/, tests/2.4.6/

2021-11-04 Thread Mike Frysinger
commit: b5776014890258fd5865917d2e2f7ea90d89d574
Author: Mike Frysinger  gentoo  org>
AuthorDate: Thu Nov  4 10:23:41 2021 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Thu Nov  4 10:23:41 2021 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=b5776014

tests: start basic framework for ad-hoc testing

It's not automated (i.e. no `make check`), but it's enough for local
ad-hoc testing to check patches work against libtool-2.4.6 at least.

Signed-off-by: Mike Frysinger  gentoo.org>

 tests/.gitignore |  8 +++
 tests/2.4.6/configure.ac |  4 
 tests/README.md  |  7 ++
 tests/run.sh | 31 
 tests/setup.sh   | 62 
 5 files changed, 112 insertions(+)

diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 000..0cff469
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,8 @@
+/libtools/
+/*.tmp/
+aclocal.m4
+autom4te.cache/
+config.guess
+config.sub
+configure
+ltmain.sh

diff --git a/tests/2.4.6/configure.ac b/tests/2.4.6/configure.ac
new file mode 100644
index 000..764d8df
--- /dev/null
+++ b/tests/2.4.6/configure.ac
@@ -0,0 +1,4 @@
+AC_PREREQ([2.69])
+AC_INIT([elt-patches], [ver])
+LT_INIT
+AC_OUTPUT

diff --git a/tests/README.md b/tests/README.md
new file mode 100644
index 000..ccfd78f
--- /dev/null
+++ b/tests/README.md
@@ -0,0 +1,7 @@
+To run the tests, first initialize the environment:
+$ ./setup.sh
+
+Then run the tests:
+$ ./run.sh
+
+Logs will be stored in the tmp dir for checking.

diff --git a/tests/run.sh b/tests/run.sh
new file mode 100755
index 000..5424085
--- /dev/null
+++ b/tests/run.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 1999-2021 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Run eltpatch against copies of libtool for quick testing.
+
+set -e
+cd "$(dirname "$(realpath "$0")")"
+
+export LD=ld
+export CHOST=x86_64-gentoo-linux-gnu
+export ELT_patchdir="${PWD}/../patches"
+eltpatch=${PWD}/../eltpatch
+
+test() {
+   local PV="$1"
+
+   rm -rf "${PV}.tmp"
+   cp -a "${PV}" "${PV}.tmp"
+   export S="${PWD}/${PV}.tmp"
+   export TMPDIR=${S}
+   "${eltpatch}"
+}
+
+mkdir -p libtools
+for f in *.*/configure.ac ; do
+   v=${f%/*}
+   [[ ${v} == *.tmp ]] && continue
+   echo "### ${v}"
+   test "${v}"
+done

diff --git a/tests/setup.sh b/tests/setup.sh
new file mode 100755
index 000..6b2022d
--- /dev/null
+++ b/tests/setup.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+# Copyright 1999-2021 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Setup local copies of pristine libtool for testing against.
+
+set -e
+cd "$(dirname "$(realpath "$0")")"
+
+: "${DISTDIR:=/var/cache/distfiles}"
+URI_BASE="https://ftpmirror.gnu.org/libtool/";
+
+setup() {
+   local PV="$1"
+   local P="libtool-${PV}"
+   local A="${P}.tar.xz"
+
+   script="libtools/${P}/destdir/bin/libtool"
+   if [[ -e ${script} ]] ; then
+   return
+   fi
+
+   pushd libtools >/dev/null
+   rm -rf "${P}"
+   if [[ -e ${DISTDIR}/${A} ]] ; then
+   printf "unpack "
+   tar xf "${DISTDIR}/${A}"
+   else
+   if [[ ! -e ${A} ]] ; then
+   printf "fetch "
+   wget -nv "${URI_BASE}/${A}"
+   fi
+   printf "unpack "
+   tar xf "${A}"
+   fi
+
+   printf "compile "
+   cd "${P}"
+   ./configure --prefix="${PWD}/destdir" -q >/dev/null
+   make install -j -s >/dev/null
+
+   popd >/dev/null
+}
+
+build() {
+   local PV="$1"
+
+   pushd "${PV}" >/dev/null
+   PATH="${PWD}/../libtools/libtool-${PV}/destdir/bin:${PATH}"
+   autoreconf -i
+   popd >/dev/null
+}
+
+mkdir -p libtools
+for f in *.*/configure.ac ; do
+   v=${f%/*}
+   [[ ${v} == *.tmp ]] && continue
+   printf "${v}: "
+   setup "${v}"
+   build "${v}"
+   echo "done"
+done



[gentoo-commits] proj/elt-patches:master commit in: /, patches/fsanitize/, patches/fuse-ld/

2021-09-24 Thread Mike Frysinger
commit: 944788cf8e200dd0a51e14be1ad37753b17bdb4c
Author: Mike Frysinger  chromium  org>
AuthorDate: Fri Sep 24 21:21:05 2021 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Fri Sep 24 21:21:05 2021 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=944788cf

backport -fsanitize & -fuse-ld for 2.4.6

Signed-off-by: Mike Frysinger  gentoo.org>

 eltpatch.in |  5 -
 patches/fsanitize/2.4.6 | 37 +
 patches/fuse-ld/2.4.6   | 36 
 3 files changed, 77 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index 0765d49..7fa21bc 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -125,7 +125,10 @@ elibtoolize() {
local deptoremove=
local do_shallow="no"
local force="false"
-   local elt_patches="install-sh ltmain portage relink max_cmd_len sed 
test tmp cross as-needed target-nm ppc64le"
+   local elt_patches="
+   install-sh ltmain portage relink max_cmd_len sed test tmp cross 
as-needed target-nm ppc64le
+   fsanitize fuse-ld
+   "
 
for x in "$@" ; do
case ${x} in

diff --git a/patches/fsanitize/2.4.6 b/patches/fsanitize/2.4.6
new file mode 100644
index 000..f5113f5
--- /dev/null
+++ b/patches/fsanitize/2.4.6
@@ -0,0 +1,37 @@
+From a5c6466528c060cc4660ad0319c00740db0e42ba Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia 
+Date: Sun, 18 Oct 2015 21:55:39 -0700
+Subject: [PATCH] libtool: fix GCC/clang linking with -fsanitize=*
+
+References:
+https://lists.gnu.org/archive/html/libtool/2014-04/msg00026.html
+
+* build-aux/ltmain.in (func_mode_link): Pass -fsanitize=* to the
+linker to allow trivial use of the clang address sanitizer.
+
+Signed-off-by: Jeremy Huddleston Sequoia 
+Copyright-paperwork-exempt: Yes
+---
+ build-aux/ltmain.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 1cbe875dfd86..2a5aaadd68c0 100644
+--- ltmain.sh
 ltmain.sh
+@@ -5382,10 +5382,11 @@ func_mode_link ()
+   # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time 
optimization
+   # -specs=* GCC specs files
+   # -stdlib=*select c++ std lib with clang
++  # -fsanitize=* Clang/GCC memory and address sanitizer
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+   
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-  -specs=*)
++  -specs=*|-fsanitize=*)
+ func_quote_for_eval "$arg"
+   arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
+-- 
+2.33.0
+

diff --git a/patches/fuse-ld/2.4.6 b/patches/fuse-ld/2.4.6
new file mode 100644
index 000..c8f107c
--- /dev/null
+++ b/patches/fuse-ld/2.4.6
@@ -0,0 +1,36 @@
+From f9970d99293faf908fdc153a653fa5781095fb7a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger 
+Date: Sat, 13 Feb 2016 02:14:29 -0500
+Subject: [PATCH] libtool: pass through -fuse-ld flags
+
+Starting with gcc-4.8, there's a -fuse-ld flag that can be used to
+select between bfd & gold.  Make sure we pass it through to the
+linking stage.
+
+* build-aux/ltmain.in (func_mode_link): Pass -fuse-ld=* flags
+through.
+Copyright-paperwork-exempt: Yes
+---
+ build-aux/ltmain.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 40eb0297f37d..26015641925e 100644
+--- ltmain.sh
 ltmain.sh
+@@ -5383,10 +5383,11 @@ func_mode_link ()
+   # -specs=* GCC specs files
+   # -stdlib=*select c++ std lib with clang
+   # -fsanitize=* Clang/GCC memory and address sanitizer
++  # -fuse-ld=*   Linker select flags for GCC
+   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+   
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+-  -specs=*|-fsanitize=*)
++  -specs=*|-fsanitize=*|-fuse-ld=*)
+ func_quote_for_eval "$arg"
+   arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
+-- 
+2.33.0
+



[gentoo-commits] proj/elt-patches:master commit in: patches/darwin20-conf/

2021-08-27 Thread Fabian Groffen
commit: cc1b9eb5d33b6773e7648810d811ab8898a06745
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri Aug 27 15:11:29 2021 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri Aug 27 15:11:29 2021 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=cc1b9eb5

darwin20-conf: add variant for libtool 2.2.7(a)

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

 patches/darwin20-conf/2.2.7 | 13 +
 1 file changed, 13 insertions(+)

diff --git a/patches/darwin20-conf/2.2.7 b/patches/darwin20-conf/2.2.7
new file mode 100644
index 000..3f667be
--- /dev/null
+++ b/patches/darwin20-conf/2.2.7
@@ -0,0 +1,13 @@
+macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X releases.
+
+--- configure
 configure
+@@ -8121,7 +8121,7 @@
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+   10.[012][,.]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined 
${wl}suppress' ;;
+-  10.*)
++  10.*|11.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+   esac
+ ;;



[gentoo-commits] proj/elt-patches:master commit in: /, patches/darwin20-conf/

2020-12-05 Thread Fabian Groffen
commit: f682fed75c79293cebc23e5c0e0d9cf4255dd541
Author: Fabian Groffen  gentoo  org>
AuthorDate: Sat Dec  5 13:45:55 2020 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Sat Dec  5 13:45:55 2020 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=f682fed7

darwin20-conf: add patch for detection of newer macOS

Make sure we act like previous release on darwin20, a.k.a. Big Sur 11.0.

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

 eltpatch.in |  4 ++--
 patches/darwin20-conf/2.4.6 | 13 +
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/eltpatch.in b/eltpatch.in
index e12f754..0765d49 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -173,7 +173,7 @@ elibtoolize() {
 
case ${CHOST} in
*-aix*) elt_patches+=" hardcode aixrtl" ;; #213277
-   *-darwin*)  elt_patches+=" darwin-ltconf darwin-ltmain 
darwin-conf" ;;
+   *-darwin*)  elt_patches+=" darwin-ltconf darwin-ltmain 
darwin-conf darwin20-conf" ;;
*-solaris*) elt_patches+=" sol2-conf sol2-ltmain" ;;
*-freebsd*) elt_patches+=" fbsd-conf fbsd-ltconf" ;;
*-hpux*)elt_patches+=" hpux-conf deplibs hc-flag-ld 
hardcode hardcode-relink relink-prog no-lc" ;;
@@ -400,7 +400,7 @@ elibtoolize() {
fi
done
;;
-   mint-conf|gold-conf|sol2-conf)
+   mint-conf|gold-conf|sol2-conf|darwin20-conf)
ELT_walk_patches "${d}/configure" "${p}"
ret=$?
;;

diff --git a/patches/darwin20-conf/2.4.6 b/patches/darwin20-conf/2.4.6
new file mode 100644
index 000..2a296a4
--- /dev/null
+++ b/patches/darwin20-conf/2.4.6
@@ -0,0 +1,13 @@
+macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X releases.
+
+--- configure
 configure
+@@ -1076,7 +1076,7 @@
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+   10.[[012]][[,.]]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;
+-  10.*)
++  10.*|11.*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+   esac
+ ;;



[gentoo-commits] proj/elt-patches:master commit in: /

2020-03-13 Thread Michael Haubenwallner
commit: a13029e428c2bc84343bb0a3d629ab7c7f33590c
Author: Michael Haubenwallner  gentoo  org>
AuthorDate: Mon Oct 28 14:11:53 2019 +
Commit: Michael Haubenwallner  gentoo  org>
CommitDate: Fri Mar 13 13:56:24 2020 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=a13029e4

winnt: die if libtool version is not 2.4.6+

Reorder in elt_patches to perform the check early.

Signed-off-by: Michael Haubenwallner  gentoo.org>

 eltpatch.in | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index 6b69216..e12f754 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -179,7 +179,7 @@ elibtoolize() {
*-hpux*)elt_patches+=" hpux-conf deplibs hc-flag-ld 
hardcode hardcode-relink relink-prog no-lc" ;;
*-irix*)elt_patches+=" irix-ltmain" ;;
*-mint*)elt_patches+=" mint-conf" ;;
-   *-winnt*)   elt_patches+=" winnt-conf winnt-ltmain" ;;
+   *-winnt*)   elt_patches+=" winnt-ltmain winnt-conf" ;;
esac
 
if ${LD} --version 2>&1 | grep -qs 'GNU gold'; then
@@ -286,6 +286,18 @@ elibtoolize() {
ret=$?
fi
;;
+   winnt-ltmain)
+   local version=$(ELT_libtool_version 
"${d}/ltmain.sh")
+   case ${version} in
+   2.4.6 | 2.4.6[' .']* )
+   ELT_walk_patches 
"${d}/ltmain.sh" "${p}"
+   ret=$?
+   ;;
+   *)
+   die "${p}: need libtool 2.4.6+ 
(not ${version}) in ${d}"
+   ;;
+   esac
+   ;;
*)
ELT_walk_patches "${d}/ltmain.sh" "${p}"
ret=$?



[gentoo-commits] proj/elt-patches:master commit in: patches/winnt-ltmain/, patches/winnt-conf/, /

2020-03-13 Thread Michael Haubenwallner
commit: 71158123fe7bf653625ac1f5dea1a941786663c0
Author: Michael Haubenwallner  gentoo  org>
AuthorDate: Tue Oct 10 15:38:43 2017 +
Commit: Michael Haubenwallner  gentoo  org>
CommitDate: Thu Mar 12 07:35:47 2020 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=71158123

add lt-2.4.6 winnt patches for use with parity-2

If a package does not have libtool-2.4.6 there is no guarantee things
will work, and the package should use eautoreconf instead.

Signed-off-by: Michael Haubenwallner  gentoo.org>

 eltpatch.in |   3 +-
 patches/winnt-conf/2.4.6-cmd-max-len|  15 +
 patches/winnt-conf/2.4.6-deplibs-method |  15 +
 patches/winnt-conf/2.4.6-dlload |  15 +
 patches/winnt-conf/2.4.6-dlopen-deplibs |  16 +
 patches/winnt-conf/2.4.6-dynlink|  46 +++
 patches/winnt-conf/2.4.6-dynlink-c  |  46 +++
 patches/winnt-conf/2.4.6-global-syms| 129 ++
 patches/winnt-conf/2.4.6-pathconv   |  21 +
 patches/winnt-conf/2.4.6-pic-c  |  19 +
 patches/winnt-conf/2.4.6-pic-cxx|  18 +
 patches/winnt-conf/2.4.6-setup  |  23 ++
 patches/winnt-conf/2.4.6-shlibs |  15 +
 patches/winnt-conf/2.4.6-shlibs-c   |  20 +
 patches/winnt-conf/2.4.6-shlibs-cxx |  33 ++
 patches/winnt-conf/2.4.6-strip  |  30 ++
 patches/winnt-ltmain/2.4.6  | 683 
 17 files changed, 1146 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index d8c847b..6b69216 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -179,6 +179,7 @@ elibtoolize() {
*-hpux*)elt_patches+=" hpux-conf deplibs hc-flag-ld 
hardcode hardcode-relink relink-prog no-lc" ;;
*-irix*)elt_patches+=" irix-ltmain" ;;
*-mint*)elt_patches+=" mint-conf" ;;
+   *-winnt*)   elt_patches+=" winnt-conf winnt-ltmain" ;;
esac
 
if ${LD} --version 2>&1 | grep -qs 'GNU gold'; then
@@ -371,7 +372,7 @@ elibtoolize() {
ret=$?
fi
;;
-   aixrtl|hpux-conf)
+   aixrtl|hpux-conf|winnt-conf)
ret=1
local subret=0
# apply multiple patches as often as 
they match

diff --git a/patches/winnt-conf/2.4.6-cmd-max-len 
b/patches/winnt-conf/2.4.6-cmd-max-len
new file mode 100644
index 000..0b7b290
--- /dev/null
+++ b/patches/winnt-conf/2.4.6-cmd-max-len
@@ -0,0 +1,15 @@
+--- configure
 configure
+@@ -5915,11 +5915,11 @@
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+ 
+-  interix*)
++  interix* | winnt*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+ 
+   os2*)

diff --git a/patches/winnt-conf/2.4.6-deplibs-method 
b/patches/winnt-conf/2.4.6-deplibs-method
new file mode 100644
index 000..92b2ac9
--- /dev/null
+++ b/patches/winnt-conf/2.4.6-deplibs-method
@@ -0,0 +1,15 @@
+--- configure
 configure
+@@ -6285,11 +6285,11 @@
+   # func_win32_libid is a shell function defined in ltmain.sh
+   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+   lt_cv_file_magic_cmd='func_win32_libid'
+   ;;
+ 
+-mingw* | pw32*)
++mingw* | pw32* | winnt*)
+   # Base MSYS/MinGW do not provide the 'file' command needed by
+   # func_win32_libid shell function, so use a weaker test based on 'objdump',
+   # unless we find 'file', for example because we are cross-compiling.
+   if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'

diff --git a/patches/winnt-conf/2.4.6-dlload b/patches/winnt-conf/2.4.6-dlload
new file mode 100644
index 000..ea9b804
--- /dev/null
+++ b/patches/winnt-conf/2.4.6-dlload
@@ -0,0 +1,15 @@
+--- configure
 configure
+@@ -13596,11 +13716,11 @@
+ 
+   ;;
+ beos*)
+   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+   ;;
+-cygwin* | mingw* | pw32*)
++cygwin* | mingw* | pw32* | winnt*)
+   ac_fn_c_check_decl "$LINENO" "cygwin_conv_path" 
"ac_cv_have_decl_cygwin_conv_path" "#include 
+ "
+ if test "x$ac_cv_have_decl_cygwin_conv_path" = xyes; then :
+   ac_have_decl=1
+ else

diff --git a/patches/winnt-conf/2.4.6-dlopen-deplibs 
b/patches/winnt-conf/2.4.6-dlopen-deplibs
new file mode 100644
index 000..c0b6404
--- /dev/null
+++ b/patches/winnt-conf/2.4.6-dlopen-deplibs
@@ -0,0 +1,16 @@
+--- configure
 configure
+@@ -13935,10 +14055,13 @@
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+   sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ libltdl_cv_sys_dlopen_deplibs=yes
+ ;;
++  winnt*)
++lt_c

[gentoo-commits] proj/elt-patches:master commit in: patches/winnt-conf/

2020-03-13 Thread Michael Haubenwallner
commit: 175453de57aa3d64a2c179c024a28a0b71b73567
Author: Michael Haubenwallner  gentoo  org>
AuthorDate: Thu Oct 24 12:48:05 2019 +
Commit: Michael Haubenwallner  gentoo  org>
CommitDate: Thu Mar 12 07:35:47 2020 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=175453de

add lt-2.4.6.42-b88ce winnt patches for use with parity-2

If a package does not have libtool-2.4.6 or 2.4.6.42-b88c3 there is no
guarantee things will work, and the package should use eautoreconf.

Signed-off-by: Michael Haubenwallner  gentoo.org>

 patches/winnt-conf/2.4.6.42-global-syms | 129 
 patches/winnt-conf/2.4.6.42-shlibs  |  15 
 patches/winnt-conf/2.4.6.42-shlibs-c|  20 +
 patches/winnt-conf/2.4.6.42-shlibs-cxx  |  33 
 patches/winnt-conf/2.4.6.42-strip   |  30 
 5 files changed, 227 insertions(+)

diff --git a/patches/winnt-conf/2.4.6.42-global-syms 
b/patches/winnt-conf/2.4.6.42-global-syms
new file mode 100644
index 000..704ee84
--- /dev/null
+++ b/patches/winnt-conf/2.4.6.42-global-syms
@@ -0,0 +1,129 @@
+--- configure
 configure
+@@ -7115,11 +7115,11 @@
+ # Define system-specific variables.
+ case $host_os in
+ aix*)
+   symcode='[BCDT]'
+   ;;
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | mingw* | pw32* | cegcc* | winnt*)
+   symcode='[ABCDGISTW]'
+   ;;
+ hpux*)
+   if test ia64 = "$host_cpu"; then
+ symcode='[ABCDEGRST]'
+@@ -7154,46 +7154,56 @@
+   symcode='[ABCDGIRSTW]' ;;
+ esac
+ 
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+   # Gets list of data symbols to import.
+-  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
++  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* 
\([a-zA-Z_][0-9a-zA-Z_]*\)$/\1/p'"
+   # Adjust the below global symbol transforms to fixup imported variables.
+-  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char 
\1;/p'"
+-  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
++  lt_cdecl_hook=" -e 's/^I .* \([a-zA-Z_][0-9a-zA-Z_]*\)$/extern 
__declspec(dllimport) char \1;/p'"
++  lt_c_name_hook=" -e 's/^I .* \([a-zA-Z_][0-9a-zA-Z_]*\)$/  {\"\1\", (void 
*) 0},/p'"
+   lt_c_name_lib_hook="\
+-  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
+-  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
++  -e 's/^I .* \(lib[a-zA-Z_][0-9a-zA-Z_]*\)$/  {\"\1\", (void *) 0},/p'\
++  -e 's/^I .* \([a-zA-Z_][0-9a-zA-Z_]*\)$/  {\"lib\1\", (void *) 0},/p'"
+ else
+   # Disable hooks by default.
+   lt_cv_sys_global_symbol_to_import=
+   lt_cdecl_hook=
+   lt_c_name_hook=
+   lt_c_name_lib_hook=
++  case $host_os in
++  winnt*)
++lt_cv_sys_global_symbol_to_import="sed -n -e 's/^D [^ ]* 
\([a-zA-Z_][0-9a-zA-Z_]*\)$/\1/p'"
++lt_cdecl_hook=" -e 's/^D [^ ]* \([a-zA-Z_][0-9a-zA-Z_]*\)$/extern 
__declspec(dllimport) char \1;/p'"
++lt_c_name_hook=" -e 's/^D [^ ]* \([a-zA-Z_][0-9a-zA-Z_]*\)$/  {\"\1\", 
(void *) 0},/p'"
++lt_c_name_lib_hook="\
++-e 's/^D [^ ]* \(lib[a-zA-Z_][0-9a-zA-Z_]*\)$/  {\"\1\", (void *) 0},/p'\
++-e 's/^D [^ ]* \([a-zA-Z_][0-9a-zA-Z_]*\)$/  {\"lib\1\", (void *) 0},/p'"
++;;
++  esac
+ fi
+ 
+ # Transform an extracted symbol line into a proper C declaration.
+ # Some systems (esp. on ia64) link data and code symbols differently,
+ # so use this general approach.
+ lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+ $lt_cdecl_hook\
+-" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+-" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
++" -e 's/^T .* \([a-zA-Z_][0-9a-zA-Z_]*\)$/extern int \1();/p'"\
++" -e 's/^$symcode$symcode* .* \([a-zA-Z_][0-9a-zA-Z_]*\)$/extern char \1;/p'"
+ 
+ # Transform an extracted symbol line into symbol name and symbol address
+ lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+ $lt_c_name_hook\
+ " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+-" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
++" -e 's/^$symcode$symcode* .* \([a-zA-Z_][0-9a-zA-Z_]*\)$/  {\"\1\", (void *) 
\&\1},/p'"
+ 
+ # Transform an extracted symbol line into symbol name with lib prefix and
+ # symbol address.
+ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+ $lt_c_name_lib_hook\
+ " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+-" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
+-" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
++" -e 's/^$symcode$symcode* .* \(lib[a-zA-Z_][0-9a-zA-Z_]*\)$/  {\"\1\", (void 
*) \&\1},/p'"\
++" -e 's/^$symcode$symcode* .* \([a-zA-Z_][0-9a-zA-Z_]*\)$/  {\"lib\1\", (void 
*) \&\1},/p'"
+ 
+ # Handle CRLF in mingw tool chain
+ opt_cr=
+ case $build_os in
+ mingw*)
+@@ -7203,35 +7213,43 @@
+ 
+ # Try without a prefix underscore, then with it.
+ for ac_symprfx in "" "_"; do
+ 
+   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+-  symxfrm="\\1 $ac_symprfx\\2 \\2"
++  # In Windows import libraries, symbols may be prefixed with __imp_, as

[gentoo-commits] proj/elt-patches:master commit in: patches/winnt-conf/

2020-03-13 Thread Michael Haubenwallner
commit: c779bd5978be02322da65480943c41269b7f4ca5
Author: Michael Haubenwallner  gentoo  org>
AuthorDate: Thu Oct 24 12:49:13 2019 +
Commit: Michael Haubenwallner  gentoo  org>
CommitDate: Thu Mar 12 07:35:47 2020 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=c779bd59

winnt: enable WOE properties, found in intl.m4

Signed-off-by: Michael Haubenwallner  gentoo.org>

 patches/winnt-conf/woe32| 11 +++
 patches/winnt-conf/woe32dll | 11 +++
 2 files changed, 22 insertions(+)

diff --git a/patches/winnt-conf/woe32 b/patches/winnt-conf/woe32
new file mode 100644
index 000..3eea6d1
--- /dev/null
+++ b/patches/winnt-conf/woe32
@@ -0,0 +1,11 @@
+--- configure
 configure
+@@ -14769,7 +14769,7 @@
+ 
+ 
+ case "$host_os" in
+-  mingw* | cygwin*) is_woe32=yes ;;
++  mingw* | cygwin* | winnt*) is_woe32=yes ;;
+   *) is_woe32=no ;;
+ esac
+ WOE32=$is_woe32

diff --git a/patches/winnt-conf/woe32dll b/patches/winnt-conf/woe32dll
new file mode 100644
index 000..b4fac5f
--- /dev/null
+++ b/patches/winnt-conf/woe32dll
@@ -0,0 +1,11 @@
+--- configure
 configure
+@@ -24762,7 +24762,7 @@
+ 
+ if test "$enable_shared" = yes; then
+   case "$host_os" in
+-mingw* | cygwin*) is_woe32dll=yes ;;
++mingw* | cygwin* | winnt*) is_woe32dll=yes ;;
+ *) is_woe32dll=no ;;
+   esac
+ else



[gentoo-commits] proj/elt-patches:master commit in: /

2017-08-26 Thread Michał Górny
commit: 64edea29f6e62c0ac1005d072f391fe5d4dc0822
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Aug 26 11:16:13 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Aug 26 11:16:13 2017 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=64edea29

Use explicit tool vars instead of aliases

Aliases do not work for calling the tool in a subshell, so just
explicitly set FIND, PATCH and SED variables to the correct tool,
and use them to call them.

 eltpatch.in | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/eltpatch.in b/eltpatch.in
index 8f6f9f3..d8c847b 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -3,10 +3,9 @@
 # Distributed under the terms of the GNU General Public License v2
 
 # BSD support; https://bugs.gentoo.org/628882
-# note: this need to happen before function definitions
-type -P gfind &>/dev/null && alias find=gfind
-type -P gpatch &>/dev/null && alias patch=gpatch
-type -P gsed &>/dev/null && alias sed=gsed
+type -P gfind &>/dev/null && FIND=gfind || FIND=find
+type -P gpatch &>/dev/null && PATCH=gpatch || PATCH=patch
+type -P gsed &>/dev/null && SED=gsed || SED=sed
 
 source "@ELT_gentoofuncs@" || exit 1
 
@@ -40,11 +39,11 @@ ELT_try_and_apply_patch() {
# Save file for permission restoration.  `patch` sometimes resets 
things.
# Ideally we'd want 'stat -c %a', but stat is highly non portable and 
we are
# guaranted to have GNU find, so use that instead.
-   local perms="$(find ${file} -maxdepth 0 -printf '%m')"
+   local perms="$(${FIND} ${file} -maxdepth 0 -printf '%m')"
# We only support patchlevel of 0 - why worry if its static patches?
-   if patch -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then
+   if ${PATCH} -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then
einfo "  Applying ${disp} ..."
-   patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" >> 
"${log}" 2>&1
+   ${PATCH} -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" 
>> "${log}" 2>&1
ret=$?
ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${src}"
else
@@ -92,9 +91,9 @@ ELT_walk_patches() {
pushd "@ELT_patchdir@" >/dev/null || die "pushd to elt-patch dir failed"
 
# Go through the patches in reverse order (newer version to older)
-   for patch in $(find "${patch_set}" -maxdepth 1 -type f | LC_ALL=C sort 
-r) ; do
+   for patch in $(${FIND} "${patch_set}" -maxdepth 1 -type f | LC_ALL=C 
sort -r) ; do
tmp="${TMPDIR}/libtool-elt.patch"
-   sed "${sed_args[@]}" "${patch}" > "${tmp}" || die "sed on patch 
${patch} failed"
+   ${SED} "${sed_args[@]}" "${patch}" > "${tmp}" || die "sed on 
patch ${patch} failed"
if ELT_try_and_apply_patch "${file}" "${tmp}" "${patch}" ; then
# Break to unwind w/popd rather than return directly
ret=0
@@ -192,7 +191,7 @@ elibtoolize() {
[[ -f ${S}/ltmain.sh || -f ${S}/configure ]] && dirs+=( "${S}" )
else
[[ ${#dirs[@]} -eq 0 ]] && dirs+=( "${S}" )
-   dirs=( $(find "${dirs[@]}" '(' -name ltmain.sh -o -name 
configure ')' -printf '%h\n' | sort -u) )
+   dirs=( $(${FIND} "${dirs[@]}" '(' -name ltmain.sh -o -name 
configure ')' -printf '%h\n' | sort -u) )
fi
 
local d p ret



[gentoo-commits] proj/elt-patches:master commit in: /

2017-08-26 Thread Michał Górny
commit: f632a16afebd48162815c3001554cf9bbb91e1da
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Aug 25 11:06:40 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Aug 25 13:21:35 2017 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=f632a16a

Prefer GNU tools on BSD systems

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

 eltpatch.in | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/eltpatch.in b/eltpatch.in
index a4e87d2..8f6f9f3 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -2,6 +2,12 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+# BSD support; https://bugs.gentoo.org/628882
+# note: this need to happen before function definitions
+type -P gfind &>/dev/null && alias find=gfind
+type -P gpatch &>/dev/null && alias patch=gpatch
+type -P gsed &>/dev/null && alias sed=gsed
+
 source "@ELT_gentoofuncs@" || exit 1
 
 die() {



[gentoo-commits] proj/elt-patches:master commit in: /

2017-08-15 Thread Michał Górny
commit: 2e532c0afb904d63c70525fd387431c42cee6f82
Author: Michał Górny  gentoo  org>
AuthorDate: Tue Aug 15 07:11:35 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Aug 15 07:11:35 2017 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=2e532c0a

Support substituting functions.sh path as well, to fix Prefix

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

 Makefile| 5 -
 eltpatch.in | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 05a8b7e..90ddc87 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 
 DESTDIR =
-prefix = /usr
+rootprefix =
+gentoofuncs = $(rootprefix)/lib/gentoo/functions.sh
+prefix = $(rootprefix)/usr
 bindir = $(prefix)/bin
 libdirname = lib
 datadir = $(prefix)/share
@@ -16,6 +18,7 @@ eltpatch: eltpatch.in
rm -f $@ $@.tmp
sed -e 's^@ELT_patchdir@^$(patchdir)^' \
-e 's^@ELT_libdir@^$(libdirname)^' \
+   -e 's^@ELT_gentoofuncs@^$(gentoofuncs)^' \
$< > $@.tmp
chmod +x $@.tmp
mv $@.tmp $@

diff --git a/eltpatch.in b/eltpatch.in
index 7dae4bb..a4e87d2 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -2,7 +2,7 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-source "/lib/gentoo/functions.sh" || exit 1
+source "@ELT_gentoofuncs@" || exit 1
 
 die() {
eerror "${@}"



[gentoo-commits] proj/elt-patches:master commit in: patches/hpux-conf/, patches/fbsd-ltconf/, hardcode/, ppc64le/, ...

2017-08-11 Thread Michał Górny
commit: ec76f6e000bdfdc91f4b5da7fa05c57a39cc3f27
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Apr 22 07:03:47 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Apr 22 07:27:26 2017 +
URL:https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=ec76f6e0

Add application script, and a Makefile

 Makefile   |  47 ++
 eltpatch.in| 488 +
 {aixrtl => patches/aixrtl}/1.5.0-cmds-c|   0
 {aixrtl => patches/aixrtl}/1.5.0-cmds-cxx  |   0
 {aixrtl => patches/aixrtl}/1.5.0-expsym-c  |   0
 {aixrtl => patches/aixrtl}/1.5.0-expsym-cxx|   0
 {aixrtl => patches/aixrtl}/1.5.0-noundef-c |   0
 {aixrtl => patches/aixrtl}/1.5.0-noundef-cxx   |   0
 {aixrtl => patches/aixrtl}/1.5.0-soname|   0
 {aixrtl => patches/aixrtl}/1.5.0-usertl-c  |   0
 {aixrtl => patches/aixrtl}/1.5.0-usertl-cxx|   0
 {aixrtl => patches/aixrtl}/1.5.22-cmds-c   |   0
 {aixrtl => patches/aixrtl}/1.5.22-cmds-cxx |   0
 {aixrtl => patches/aixrtl}/2.0.0-fpic-c|   0
 {aixrtl => patches/aixrtl}/2.0.0-fpic-cxx  |   0
 {aixrtl => patches/aixrtl}/2.2.0-cmds-c|   0
 {aixrtl => patches/aixrtl}/2.2.0-cmds-cxx  |   0
 {aixrtl => patches/aixrtl}/2.2.0-expsym-c  |   0
 {aixrtl => patches/aixrtl}/2.2.0-expsym-cxx|   0
 {aixrtl => patches/aixrtl}/2.2.0-noundef-c |   0
 {aixrtl => patches/aixrtl}/2.2.0-noundef-cxx   |   0
 {aixrtl => patches/aixrtl}/2.2.0-usertl-cxx|   0
 {aixrtl => patches/aixrtl}/2.2.8-cmds-c|   0
 {aixrtl => patches/aixrtl}/2.2.8-cmds-cxx  |   0
 {aixrtl => patches/aixrtl}/2.4.0-expsym-c  |   0
 {aixrtl => patches/aixrtl}/2.4.0-expsym-cxx|   0
 {aixrtl => patches/aixrtl}/2.4.2.418-cmds-c|   0
 {aixrtl => patches/aixrtl}/2.4.2.418-cmds-cxx  |   0
 {aixrtl => patches/aixrtl}/2.4.2.418-soname|   0
 {aixrtl => patches/aixrtl}/2.4.4-expsym-c  |   0
 {aixrtl => patches/aixrtl}/2.4.4-expsym-cxx|   0
 {aixrtl => patches/aixrtl}/2.4.4-with-svr4 |   0
 {as-needed => patches/as-needed}/1.5   |   0
 {as-needed => patches/as-needed}/1.5.26|   0
 {as-needed => patches/as-needed}/2.2.6 |   0
 {as-needed => patches/as-needed}/2.4.2 |   0
 {as-needed => patches/as-needed}/2.4.3 |   0
 {cross => patches/cross}/2.2   |   0
 {cross => patches/cross}/2.4   |   0
 {cross => patches/cross}/2.4.3 |   0
 {darwin-conf => patches/darwin-conf}/1.5   |   0
 {darwin-conf => patches/darwin-conf}/1.5b  |   0
 {darwin-conf => patches/darwin-conf}/2.2.4 |   0
 {darwin-conf => patches/darwin-conf}/2.2.6 |   0
 {darwin-conf => patches/darwin-conf}/2.4.6 |   0
 {darwin-ltconf => patches/darwin-ltconf}/1.2.0 |   0
 {darwin-ltconf => patches/darwin-ltconf}/1.3.0 |   0
 {darwin-ltmain => patches/darwin-ltmain}/1.2.0 |   0
 {darwin-ltmain => patches/darwin-ltmain}/1.3.0 |   0
 {deplibs => patches/deplibs}/1.5   |   0
 {deplibs => patches/deplibs}/2.1b  |   0
 {fbsd-conf => patches/fbsd-conf}/00broken-libglade |   0
 {fbsd-conf => patches/fbsd-conf}/1.4.0 |   0
 {fbsd-conf => patches/fbsd-conf}/1.5.10|   0
 {fbsd-conf => patches/fbsd-conf}/1.5.18|   0
 {fbsd-conf => patches/fbsd-conf}/1.5.20|   0
 {fbsd-conf => patches/fbsd-conf}/1.5.20b   |   0
 {fbsd-conf => patches/fbsd-conf}/1.9f  |   0
 {fbsd-ltconf => patches/fbsd-ltconf}/1.2.0 |   0
 {fbsd-ltconf => patches/fbsd-ltconf}/1.3.0 |   0
 {fbsd-ltconf => patches/fbsd-ltconf}/1.4a  |   0
 {fbsd-ltconf => patches/fbsd-ltconf}/1.4a-GCC3.0   |   0
 {fix-relink => patches/fix-relink}/1.4.0   |   0
 {fix-relink => patches/fix-relink}/1.4.3   |   0
 {fix-relink => patches/fix-relink}/1.5.0   |   0
 {gold-conf => patches/gold-conf}/2.2.6 |   0
 {hardcode-relink => patches/hardcode-relink}/1.3d  |   0
 {hardcode => patches/hardcode}/1.3d|   0
 {hardcode => patches/hardcode}/2.1b|   0
 {hc-flag-ld => patches/hc-flag-ld}/1.5 |   0
 {hpux-conf => patches/hpux-conf}/1.5.22-syslibpath |   0
 {install-sh => patches/install-sh}/1.5 |   0
 {install-sh => patches/install-sh}/1.5.4   |   0
 {install-sh => patches/install-sh}/1.5.6   |   0
 {irix-ltmain => patches/irix-ltmain}/2.2.6 |   0
 {ltmain => patches/ltmain}/1.5 |   0
 {max_cmd_len => patches/max_cmd_len}/1.5.0 |   0
 {max_cmd_len => patches/max_cmd_len}/1.5.14|   0
 {max_cmd_len => patches/max_cmd_len}/1.5.20|   0
 {mint-conf => patches/mint-conf}/2.2.6 |