* [PATCH] cpupower: Use conventional shared library versioning
@ 2016-06-10 1:05 Ben Hutchings
2016-06-15 11:03 ` Thomas Renninger
0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2016-06-10 1:05 UTC (permalink / raw)
To: Thomas Renninger; +Cc: linux-pm
[-- Attachment #1: Type: text/plain, Size: 2635 bytes --]
The current choice of variable names is rather confusing. LIB_MIN is
used for the soname version, which would normally be the *major* part
of the version.
- Rename LIB_MAJ (the full version) to LIB_VER and LIB_MIN (the soname
version) to LIB_SONAME_VER
- Define LIB_SONAME_VER to be the first component of LIB_VER
- Bump the full version to 1.0.0, since the soname version is currently 1
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
tools/power/cpupower/Makefile | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
index 0b85f5915ce8..1ef6cdfd3f4a 100644
--- a/tools/power/cpupower/Makefile
+++ b/tools/power/cpupower/Makefile
@@ -63,8 +63,8 @@ DESTDIR ?=
# and _should_ modify the PACKAGE_BUGREPORT definition
VERSION= $(shell ./utils/version-gen.sh)
-LIB_MAJ= 0.0.1
-LIB_MIN= 1
+LIB_VER= 1.0.0
+LIB_SONAME_VER= $(word 1,$(subst ., ,$(LIB_VER)))
PACKAGE = cpupower
PACKAGE_BUGREPORT = linux-pm@vger.kernel.org
@@ -201,14 +201,14 @@ $(OUTPUT)lib/%.o: $(LIB_SRC) $(LIB_HEADERS)
$(ECHO) " CC " $@
$(QUIET) $(CC) $(CFLAGS) -fPIC -o $@ -c lib/$*.c
-$(OUTPUT)libcpupower.so.$(LIB_MAJ): $(LIB_OBJS)
+$(OUTPUT)libcpupower.so.$(LIB_VER): $(LIB_OBJS)
$(ECHO) " LD " $@
$(QUIET) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \
- -Wl,-soname,libcpupower.so.$(LIB_MIN) $(LIB_OBJS)
+ -Wl,-soname,libcpupower.so.$(LIB_SONAME_VER) $(LIB_OBJS)
@ln -sf $(@F) $(OUTPUT)libcpupower.so
- @ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_MIN)
+ @ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_SONAME_VER)
-libcpupower: $(OUTPUT)libcpupower.so.$(LIB_MAJ)
+libcpupower: $(OUTPUT)libcpupower.so.$(LIB_VER)
# Let all .o files depend on its .c file and all headers
# Might be worth to put this into utils/Makefile at some point of time
@@ -218,7 +218,7 @@ $(OUTPUT)%.o: %.c
$(ECHO) " CC " $@
$(QUIET) $(CC) $(CFLAGS) -I./lib -I ./utils -o $@ -c $*.c
-$(OUTPUT)cpupower: $(UTIL_OBJS) $(OUTPUT)libcpupower.so.$(LIB_MAJ)
+$(OUTPUT)cpupower: $(UTIL_OBJS) $(OUTPUT)libcpupower.so.$(LIB_VER)
$(ECHO) " CC " $@
ifeq ($(strip $(STATIC)),true)
$(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lrt -lpci -L$(OUTPUT) -o $@
@@ -251,7 +251,7 @@ update-po: $(OUTPUT)po/$(PACKAGE).pot
fi; \
done;
-compile-bench: $(OUTPUT)libcpupower.so.$(LIB_MAJ)
+compile-bench: $(OUTPUT)libcpupower.so.$(LIB_VER)
@V=$(V) confdir=$(confdir) $(MAKE) -C bench O=$(OUTPUT)
# we compile into subdirectories. if the target directory is not the
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cpupower: Use conventional shared library versioning
2016-06-10 1:05 [PATCH] cpupower: Use conventional shared library versioning Ben Hutchings
@ 2016-06-15 11:03 ` Thomas Renninger
2016-06-15 11:13 ` Ben Hutchings
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Renninger @ 2016-06-15 11:03 UTC (permalink / raw)
To: Ben Hutchings; +Cc: linux-pm
Hi Ben,
On Friday, June 10, 2016 02:05:54 AM Ben Hutchings wrote:
> The current choice of variable names is rather confusing. LIB_MIN is
> used for the soname version, which would normally be the *major* part
> of the version.
>
> - Rename LIB_MAJ (the full version) to LIB_VER and LIB_MIN (the soname
> version) to LIB_SONAME_VER
> - Define LIB_SONAME_VER to be the first component of LIB_VER
> - Bump the full version to 1.0.0, since the soname version is currently 1
I am currently working on adding rapl/powercapping things into
cpupower.
I will collect/integrate your patches and send them altogether.
Thanks,
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cpupower: Use conventional shared library versioning
2016-06-15 11:03 ` Thomas Renninger
@ 2016-06-15 11:13 ` Ben Hutchings
0 siblings, 0 replies; 3+ messages in thread
From: Ben Hutchings @ 2016-06-15 11:13 UTC (permalink / raw)
To: Thomas Renninger; +Cc: linux-pm
[-- Attachment #1: Type: text/plain, Size: 981 bytes --]
On Wed, 2016-06-15 at 13:03 +0200, Thomas Renninger wrote:
> Hi Ben,
>
> On Friday, June 10, 2016 02:05:54 AM Ben Hutchings wrote:
> > The current choice of variable names is rather confusing. LIB_MIN is
> > used for the soname version, which would normally be the *major* part
> > of the version.
> >
> > - Rename LIB_MAJ (the full version) to LIB_VER and LIB_MIN (the soname
> > version) to LIB_SONAME_VER
> > - Define LIB_SONAME_VER to be the first component of LIB_VER
> > - Bump the full version to 1.0.0, since the soname version is currently 1
>
> I am currently working on adding rapl/powercapping things into
> cpupower.
> I will collect/integrate your patches and send them altogether.
The ABI break has already happened, so changing the soname version is a
bug fix that should go into 4.7. But I agree this second patch doesn't
need to.
Ben.
--
Ben Hutchings
Reality is just a crutch for people who can't handle science fiction.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-15 11:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-10 1:05 [PATCH] cpupower: Use conventional shared library versioning Ben Hutchings
2016-06-15 11:03 ` Thomas Renninger
2016-06-15 11:13 ` Ben Hutchings
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.