public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/toolchain/binutils-patches:master commit in: 9999/
Date: Sat, 24 Jul 2021 20:57:32 +0000 (UTC)	[thread overview]
Message-ID: <1627155641.bc2a10f35b091063cf84b9cfd5300b6c0f0cf428.dilfridge@gentoo> (raw)

commit:     bc2a10f35b091063cf84b9cfd5300b6c0f0cf428
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 24 19:40:41 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul 24 19:40:41 2021 +0000
URL:        https://gitweb.gentoo.org/proj/toolchain/binutils-patches.git/commit/?id=bc2a10f3

Add libctf soversion patches

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 ...ibctf-optionally-a-gentoo-specific-sovers.patch | 177 +++++++++++++++++++++
 ...-soversion-suffix-then-we-also-use-the-bd.patch | 111 +++++++++++++
 2 files changed, 288 insertions(+)

diff --git a/9999/0007-Give-also-libctf-optionally-a-gentoo-specific-sovers.patch b/9999/0007-Give-also-libctf-optionally-a-gentoo-specific-sovers.patch
new file mode 100644
index 0000000..6f1c6b3
--- /dev/null
+++ b/9999/0007-Give-also-libctf-optionally-a-gentoo-specific-sovers.patch
@@ -0,0 +1,177 @@
+From d3cd41f5c7e405a8db5e85a7be9dfc42d44ef1b8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
+Date: Sat, 24 Jul 2021 15:20:16 +0200
+Subject: [PATCH 1/2] Give also libctf optionally a gentoo-specific soversion
+
+---
+ libctf/Makefile.am  | 13 ++++++++++++-
+ libctf/Makefile.in  |  8 +++++++-
+ libctf/configure    | 31 +++++++++++++++++++++++++++++--
+ libctf/configure.ac |  8 ++++++++
+ 4 files changed, 56 insertions(+), 4 deletions(-)
+
+diff --git a/libctf/Makefile.am b/libctf/Makefile.am
+index e586d25fb37..eabc7fa8394 100644
+--- a/libctf/Makefile.am
++++ b/libctf/Makefile.am
+@@ -21,6 +21,8 @@ ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
+ 
+ AUTOMAKE_OPTIONS = dejagnu foreign no-texinfo.tex
+ 
++EXTRA_SOVERSION_SUFFIX = @EXTRA_SOVERSION_SUFFIX@
++
+ # This is where we get zlib from.  zlibdir is -L../zlib and zlibinc is
+ # -I../zlib, unless we were configured with --with-system-zlib, in which
+ # case both are empty.
+@@ -41,8 +43,17 @@ include_HEADERS =
+ noinst_LTLIBRARIES = libctf.la libctf-nobfd.la
+ endif
+ 
++# libctf by default uses libtool versioning. Unfortunately that keeps us from adding
++# a supplement to the soversion. So we need to switch tracks and be creative.
++
++if HAVE_EXTRA_SOVERSION_SUFFIX
++gentoo_ctf_soversion = 0.0.0.$(EXTRA_SOVERSION_SUFFIX)
++else
++gentoo_ctf_soversion = 0.0.0
++endif
++
+ libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB)
+-libctf_nobfd_la_LDFLAGS = -version-info 0:0:0 @SHARED_LDFLAGS@ @VERSION_FLAGS@
++libctf_nobfd_la_LDFLAGS = -release $(gentoo_ctf_soversion) @SHARED_LDFLAGS@ @VERSION_FLAGS@
+ libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1
+ libctf_nobfd_la_SOURCES = ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c \
+ 			  ctf-hash.c ctf-labels.c ctf-dedup.c ctf-link.c ctf-lookup.c \
+diff --git a/libctf/Makefile.in b/libctf/Makefile.in
+index 5cfa100f9cc..b528781af97 100644
+--- a/libctf/Makefile.in
++++ b/libctf/Makefile.in
+@@ -338,6 +338,7 @@ EXEEXT = @EXEEXT@
+ 
+ # Setup the testing framework, if you have one
+ EXPECT = expect
++EXTRA_SOVERSION_SUFFIX = @EXTRA_SOVERSION_SUFFIX@
+ FGREP = @FGREP@
+ GENCAT = @GENCAT@
+ GMSGFMT = @GMSGFMT@
+@@ -469,8 +470,13 @@ AM_CFLAGS = -std=gnu99 @ac_libctf_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @
+ @INSTALL_LIBBFD_FALSE@include_HEADERS = 
+ @INSTALL_LIBBFD_TRUE@include_HEADERS = $(INCDIR)/ctf.h $(INCDIR)/ctf-api.h
+ @INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libctf.la libctf-nobfd.la
++@HAVE_EXTRA_SOVERSION_SUFFIX_FALSE@gentoo_ctf_soversion = 0.0.0
++
++# libctf by default uses libtool versioning. Unfortunately that keeps us from adding
++# a supplement to the soversion. So we need to switch tracks and be creative.
++@HAVE_EXTRA_SOVERSION_SUFFIX_TRUE@gentoo_ctf_soversion = 0.0.0.$(EXTRA_SOVERSION_SUFFIX)
+ libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB)
+-libctf_nobfd_la_LDFLAGS = -version-info 0:0:0 @SHARED_LDFLAGS@ @VERSION_FLAGS@
++libctf_nobfd_la_LDFLAGS = -release $(gentoo_ctf_soversion) @SHARED_LDFLAGS@ @VERSION_FLAGS@
+ libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1
+ libctf_nobfd_la_SOURCES = ctf-archive.c ctf-dump.c ctf-create.c \
+ 	ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-dedup.c \
+diff --git a/libctf/configure b/libctf/configure
+index 82bcf13a606..e961f637a69 100755
+--- a/libctf/configure
++++ b/libctf/configure
+@@ -643,6 +643,9 @@ CTF_LIBADD
+ SHARED_LDFLAGS
+ NEED_CTF_QSORT_R_FALSE
+ NEED_CTF_QSORT_R_TRUE
++HAVE_EXTRA_SOVERSION_SUFFIX_FALSE
++HAVE_EXTRA_SOVERSION_SUFFIX_TRUE
++EXTRA_SOVERSION_SUFFIX
+ ENABLE_LIBCTF_HASH_DEBUGGING_FALSE
+ ENABLE_LIBCTF_HASH_DEBUGGING_TRUE
+ zlibinc
+@@ -804,6 +807,7 @@ enable_maintainer_mode
+ enable_install_libbfd
+ with_system_zlib
+ enable_libctf_hash_debugging
++with_extra_soversion_suffix
+ '
+       ac_precious_vars='build_alias
+ host_alias
+@@ -1461,6 +1465,8 @@ Optional Packages:
+                           both]
+   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+   --with-system-zlib      use installed libz
++  --with-extra-soversion-suffix=SUFFIX
++                          Append '.SUFFIX' to SONAME [[default=]]
+ 
+ Some influential environment variables:
+   CC          C compiler command
+@@ -11586,7 +11592,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11589 "configure"
++#line 11607 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -11692,7 +11698,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11695 "configure"
++#line 11713 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -12899,6 +12905,23 @@ else
+ fi
+ 
+ 
++EXTRA_SOVERSION_SUFFIX=
++
++# Check whether --with-extra-soversion-suffix was given.
++if test "${with_extra_soversion_suffix+set}" = set; then :
++  withval=$with_extra_soversion_suffix; EXTRA_SOVERSION_SUFFIX="${withval}"
++fi
++
++
++ if test -n "${with_extra_soversion_suffix}"; then
++  HAVE_EXTRA_SOVERSION_SUFFIX_TRUE=
++  HAVE_EXTRA_SOVERSION_SUFFIX_FALSE='#'
++else
++  HAVE_EXTRA_SOVERSION_SUFFIX_TRUE='#'
++  HAVE_EXTRA_SOVERSION_SUFFIX_FALSE=
++fi
++
++
+ # Similar to GDB_AC_CHECK_BFD.
+ OLD_CFLAGS=$CFLAGS
+ OLD_LDFLAGS=$LDFLAGS
+@@ -13657,6 +13680,10 @@ if test -z "${ENABLE_LIBCTF_HASH_DEBUGGING_TRUE}" && test -z "${ENABLE_LIBCTF_HA
+   as_fn_error $? "conditional \"ENABLE_LIBCTF_HASH_DEBUGGING\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
++if test -z "${HAVE_EXTRA_SOVERSION_SUFFIX_TRUE}" && test -z "${HAVE_EXTRA_SOVERSION_SUFFIX_FALSE}"; then
++  as_fn_error $? "conditional \"HAVE_EXTRA_SOVERSION_SUFFIX\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
+ 
+ if test -z "${NEED_CTF_QSORT_R_TRUE}" && test -z "${NEED_CTF_QSORT_R_FALSE}"; then
+   as_fn_error $? "conditional \"NEED_CTF_QSORT_R\" was never defined.
+diff --git a/libctf/configure.ac b/libctf/configure.ac
+index 80644b89d67..f7e6180afd8 100644
+--- a/libctf/configure.ac
++++ b/libctf/configure.ac
+@@ -77,6 +77,14 @@ if test "${enable_libctf_hash_debugging}" = yes; then
+ fi
+ AM_CONDITIONAL(ENABLE_LIBCTF_HASH_DEBUGGING, test "${enable_libctf_hash_debugging}" = yes)
+ 
++EXTRA_SOVERSION_SUFFIX=
++AC_ARG_WITH(extra-soversion-suffix,
++  AS_HELP_STRING([--with-extra-soversion-suffix=SUFFIX],
++                 [Append '.SUFFIX' to SONAME [[default=]]]),
++[EXTRA_SOVERSION_SUFFIX="${withval}"])
++AC_SUBST(EXTRA_SOVERSION_SUFFIX)
++AM_CONDITIONAL([HAVE_EXTRA_SOVERSION_SUFFIX], [test -n "${with_extra_soversion_suffix}"])
++
+ # Similar to GDB_AC_CHECK_BFD.
+ OLD_CFLAGS=$CFLAGS
+ OLD_LDFLAGS=$LDFLAGS
+-- 
+2.31.1
+

diff --git a/9999/0008-If-we-use-a-soversion-suffix-then-we-also-use-the-bd.patch b/9999/0008-If-we-use-a-soversion-suffix-then-we-also-use-the-bd.patch
new file mode 100644
index 0000000..b88f50e
--- /dev/null
+++ b/9999/0008-If-we-use-a-soversion-suffix-then-we-also-use-the-bd.patch
@@ -0,0 +1,111 @@
+From 235448cc5c53641417e17fd39ced95a21053c8ca Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
+Date: Sat, 24 Jul 2021 19:25:32 +0200
+Subject: [PATCH 2/2] If we use a soversion suffix, then we also use the bdf
+ version as soversion
+
+---
+ libctf/Makefile.am  | 3 ++-
+ libctf/Makefile.in  | 3 ++-
+ libctf/configure    | 8 ++++++--
+ libctf/configure.ac | 2 ++
+ 4 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/libctf/Makefile.am b/libctf/Makefile.am
+index eabc7fa8394..e1304e8e89b 100644
+--- a/libctf/Makefile.am
++++ b/libctf/Makefile.am
+@@ -22,6 +22,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
+ AUTOMAKE_OPTIONS = dejagnu foreign no-texinfo.tex
+ 
+ EXTRA_SOVERSION_SUFFIX = @EXTRA_SOVERSION_SUFFIX@
++BFD_VERSION = @BFD_VERSION@
+ 
+ # This is where we get zlib from.  zlibdir is -L../zlib and zlibinc is
+ # -I../zlib, unless we were configured with --with-system-zlib, in which
+@@ -47,7 +48,7 @@ endif
+ # a supplement to the soversion. So we need to switch tracks and be creative.
+ 
+ if HAVE_EXTRA_SOVERSION_SUFFIX
+-gentoo_ctf_soversion = 0.0.0.$(EXTRA_SOVERSION_SUFFIX)
++gentoo_ctf_soversion = "$(BFD_VERSION).$(EXTRA_SOVERSION_SUFFIX)"
+ else
+ gentoo_ctf_soversion = 0.0.0
+ endif
+diff --git a/libctf/Makefile.in b/libctf/Makefile.in
+index b528781af97..18d482411e8 100644
+--- a/libctf/Makefile.in
++++ b/libctf/Makefile.in
+@@ -316,6 +316,7 @@ AUTOCONF = @AUTOCONF@
+ AUTOHEADER = @AUTOHEADER@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
++BFD_VERSION = @BFD_VERSION@
+ CATALOGS = @CATALOGS@
+ CATOBJEXT = @CATOBJEXT@
+ CC = @CC@
+@@ -474,7 +475,7 @@ AM_CFLAGS = -std=gnu99 @ac_libctf_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @
+ 
+ # libctf by default uses libtool versioning. Unfortunately that keeps us from adding
+ # a supplement to the soversion. So we need to switch tracks and be creative.
+-@HAVE_EXTRA_SOVERSION_SUFFIX_TRUE@gentoo_ctf_soversion = 0.0.0.$(EXTRA_SOVERSION_SUFFIX)
++@HAVE_EXTRA_SOVERSION_SUFFIX_TRUE@gentoo_ctf_soversion = "$(BFD_VERSION).$(EXTRA_SOVERSION_SUFFIX)"
+ libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB)
+ libctf_nobfd_la_LDFLAGS = -release $(gentoo_ctf_soversion) @SHARED_LDFLAGS@ @VERSION_FLAGS@
+ libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1
+diff --git a/libctf/configure b/libctf/configure
+index e961f637a69..520d3a5cb3e 100755
+--- a/libctf/configure
++++ b/libctf/configure
+@@ -643,6 +643,7 @@ CTF_LIBADD
+ SHARED_LDFLAGS
+ NEED_CTF_QSORT_R_FALSE
+ NEED_CTF_QSORT_R_TRUE
++BFD_VERSION
+ HAVE_EXTRA_SOVERSION_SUFFIX_FALSE
+ HAVE_EXTRA_SOVERSION_SUFFIX_TRUE
+ EXTRA_SOVERSION_SUFFIX
+@@ -11592,7 +11593,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11607 "configure"
++#line 11608 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -11698,7 +11699,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11713 "configure"
++#line 11714 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -12922,6 +12923,9 @@ else
+ fi
+ 
+ 
++BFD_VERSION=$(${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p')
++
++
+ # Similar to GDB_AC_CHECK_BFD.
+ OLD_CFLAGS=$CFLAGS
+ OLD_LDFLAGS=$LDFLAGS
+diff --git a/libctf/configure.ac b/libctf/configure.ac
+index f7e6180afd8..5306e5499ec 100644
+--- a/libctf/configure.ac
++++ b/libctf/configure.ac
+@@ -85,6 +85,8 @@ AC_ARG_WITH(extra-soversion-suffix,
+ AC_SUBST(EXTRA_SOVERSION_SUFFIX)
+ AM_CONDITIONAL([HAVE_EXTRA_SOVERSION_SUFFIX], [test -n "${with_extra_soversion_suffix}"])
+ 
++AC_SUBST(BFD_VERSION, $(${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p'), [Version of the accompanying bfd linker])
++
+ # Similar to GDB_AC_CHECK_BFD.
+ OLD_CFLAGS=$CFLAGS
+ OLD_LDFLAGS=$LDFLAGS
+-- 
+2.31.1
+


             reply	other threads:[~2021-07-24 20:57 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24 20:57 Andreas K. Hüttel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-29 14:18 [gentoo-commits] proj/toolchain/binutils-patches:master commit in: 9999/ Sam James
2025-03-12 20:21 Sam James
2025-03-06 12:54 Sam James
2025-03-06  4:54 Sam James
2025-02-03 18:02 Andreas K. Hüttel
2025-01-14  2:09 Sam James
2025-01-13  6:11 Sam James
2025-01-02 13:48 Sam James
2025-01-01 14:05 Sam James
2024-12-26  1:21 Sam James
2024-12-24  6:27 Sam James
2024-12-21  0:09 Sam James
2024-08-03 22:43 Andreas K. Hüttel
2024-06-29 17:05 Andreas K. Hüttel
2024-06-29 16:32 Andreas K. Hüttel
2024-06-29 16:32 Andreas K. Hüttel
2024-06-28 21:48 Andreas K. Hüttel
2023-10-27  0:44 Sam James
2023-10-27  0:44 Sam James
2023-07-30 14:49 Andreas K. Hüttel
2023-07-28 16:23 Andreas K. Hüttel
2023-06-30  9:21 WANG Xuerui
2023-04-02 11:44 Andreas K. Hüttel
2023-01-05 16:22 Andreas K. Hüttel
2023-01-05 16:21 Andreas K. Hüttel
2023-01-03 23:03 Andreas K. Hüttel
2023-01-02 23:50 Andreas K. Hüttel
2022-10-08 12:15 WANG Xuerui
2022-07-29  7:55 WANG Xuerui
2022-01-15 22:27 Andreas K. Hüttel
2021-08-17 20:07 Andreas K. Hüttel
2021-07-30 23:25 Andreas K. Hüttel
2021-07-20 19:53 Andreas K. Hüttel
2021-07-20 19:50 Andreas K. Hüttel
2021-07-06  7:04 Sergei Trofimovich
2021-07-06  7:04 Sergei Trofimovich
2021-07-06  7:04 Sergei Trofimovich
2020-07-25 17:27 Andreas K. Hüttel
2020-07-25 12:26 Andreas K. Hüttel
2020-07-25 12:23 Andreas K. Hüttel
2020-07-25 12:20 Andreas K. Hüttel
2020-05-19 21:12 Andreas K. Hüttel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1627155641.bc2a10f35b091063cf84b9cfd5300b6c0f0cf428.dilfridge@gentoo \
    --to=dilfridge@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox