This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] [01/03] GLIBC PPC64LE/ELF2 ABI consolidation


After the discussion about the recent idea of changing the PPC64LE/ELF2
ABI to GLIBC 2.17, I'm creating another thread post the required patches
to close this issue so we can proceed with 2.19 release.

Steve summarize his decision at https://sourceware.org/ml/libc-alpha/2014-01/msg00799.html
so I'm using as base for the patches. This first patch is the one to correctly
select the powerpc64le abi files without the need to create the multiples folders.
I describe this change at https://sourceware.org/ml/libc-alpha/2014-02/msg00061.html
showing on x86_64 build it has no change, only for powerp64le where it defines the
abilist-pattern variable.

---

2014-01-31  Roland McGrath  <roland@hack.frob.com>
	    Adhemerval Zanella  <azanella@linux.vnet.ibm.com>

	* sysdeps/powerpc/Makefile [$(config-machine) ends with 'le']
	(abilist-pattern): New variable, set to %-le.abilist.

	* Makerules (abilist-pattern): New variable.
	(vpath): Add $(abilist-pattern) variable.
	(check-abi-% pattern rule): Add implicit rule for new variable
	abilist-parttern.
	(check-abi, update-abi): Likewise.

--

diff --git a/Makerules b/Makerules
index b7e556f..b46b09b 100644
--- a/Makerules
+++ b/Makerules
@@ -1175,6 +1175,14 @@ ifeq ($(build-shared),yes)
 	LC_ALL=C $(OBJDUMP) --dynamic-syms $< > $@T
 	mv -f $@T $@
 
+# A sysdeps/.../Makefile can set abilist-pattern to something like
+# %-foo.abilist to look for libc-foo.abilist instead of libc.abilist.
+# This makes sense if multiple ABIs can be most cleanly supported by a
+# configuration without using separate sysdeps directories for each.
+ifdef abilist-pattern
+vpath $(abilist-pattern) $(+sysdep_dirs)
+endif
+
 vpath %.abilist $(+sysdep_dirs)
 
 # The .PRECIOUS rule prevents the files built by an implicit rule whose
@@ -1184,18 +1192,42 @@ vpath %.abilist $(+sysdep_dirs)
 .PRECIOUS: %.symlist
 generated += $(extra-libs:=.symlist)
 
+ifdef abilist-pattern
+check-abi-%: $(common-objpfx)config.make $(abilist-pattern) $(objpfx)%.symlist
+	$(check-abi-pattern)
+check-abi-%: $(common-objpfx)config.make $(abilist-pattern) \
+	     $(common-objpfx)%.symlist
+	$(check-abi-pattern)
+endif
 check-abi-%: $(common-objpfx)config.make %.abilist $(objpfx)%.symlist
 	$(check-abi)
 check-abi-%: $(common-objpfx)config.make %.abilist $(common-objpfx)%.symlist
 	$(check-abi)
+define check-abi-pattern
+	diff -p -U 0 $(filter $(abilist-pattern),$^) $(filter %.symlist,$^)
+endef
 define check-abi
 	diff -p -U 0 $(filter %.abilist,$^) $(filter %.symlist,$^)
 endef
 
+ifdef abilist-pattern
+update-abi-%: $(objpfx)%.symlist $(abilist-pattern)
+	$(update-abi-pattern)
+update-abi-%: $(common-objpfx)%.symlist $(abilist-pattern)
+	$(update-abi-pattern)
+endif
 update-abi-%: $(objpfx)%.symlist %.abilist
 	$(update-abi)
 update-abi-%: $(common-objpfx)%.symlist %.abilist
 	$(update-abi)
+define update-abi-pattern
+@if cmp -s $^ 2> /dev/null; \
+ then \
+      echo '+++ $(filter $(abilist-pattern),$^) is unchanged'; \
+ else cp -f $^; \
+      echo '*** Now check $(filter $(abilist-pattern),$^) changes for correctness ***'; \
+ fi
+endef
 define update-abi
 @if cmp -s $^ 2> /dev/null; \
  then \
diff --git a/sysdeps/powerpc/Makefile b/sysdeps/powerpc/Makefile
index f75e625..b11edd7 100644
--- a/sysdeps/powerpc/Makefile
+++ b/sysdeps/powerpc/Makefile
@@ -27,3 +27,7 @@ ifeq ($(subdir),misc)
 sysdep_headers += sys/platform/ppc.h
 tests += test-gettimebase
 endif
+
+ifneq (,$(filter %le,$(config-machine)))
+abilist-pattern = %-le.abilist
+endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]