Bug#766695: atlas: add ppc64el support

2014-10-28 Thread Mauricio Faria de Oliveira

Hi Sébastien,

Please disregard the previous e-mails.  I believe your point below
is now addressed.

On 10/25/2014 03:39 PM, Sébastien Villemot wrote:

Also, I really dislike the kludge consisting in modifying the quilt
series file. Isn't it rather possible to use a standard patch (applied
on all arches) based on #ifdefs?


Yes. The attached patch now does that. Is it in a better position for
starting a conversation w/ the Release Team?

I reviewed the patches, and all - except for one - were using cpp
conditionals (#if/#else/#endif) properly. Their changes are trivial
and small, well localized to the minimal changes required to powerpc.

1)
	++   #if defined(__powerpc64__)  (__BYTE_ORDER__ == 
__ORDER_LITTLE_ENDIAN__)

++  ...
++   #endif

2)  
+-  #if defined(ATL_USE64BITS)
++  #if defined(ATL_USE64BITS)  _CALL_ELF != 2

3)
++  #if _CALL_ELF == 2
++  /* ABIv2 */
++  ...
++  #else
++  /* ABIv1 */
+   ...
++  #endif


That exception was a patch removing some optimized cases from lists.
I replaced it with another patch that uses #if/#else/#endif per-arch,
leaving the original source code as-is on non-ppc64el arches.

4)
++#if defined(__powerpc64__)  (__BYTE_ORDER__ == 
__ORDER_LITTLE_ENDIAN__)
++/* FIXME: port to little-endian powerpc64. */
++#else
++
+ ...
++
++#endif/* little-endian powerpc64 */

That said, AFAICT, the changes do not pose any problem to other
powerpc-based ports.

I could successfully build atlas on ppc64el with it, and will
perform/report of builds on powerpc and ppc64 shortly.

--
Mauricio Faria de Oliveira
IBM Linux Technology Center
diff -Nru atlas-3.10.2/debian/archdefs/README 
atlas-3.10.2/debian/archdefs/README
--- atlas-3.10.2/debian/archdefs/README 2014-07-12 07:23:26.0 -0300
+++ atlas-3.10.2/debian/archdefs/README 2014-10-28 07:46:40.0 -0200
@@ -16,5 +16,6 @@
 - mips: ATLAS 3.10.1 / gabrielli.debian.org / sid / 2013-07-27
 - mipsel: ATLAS 3.10.1 / eder.debian.org / sid / 2013-06-07
 - powerpc: ATLAS 3.10.1 / partch.debian.org / sid / 2013-06-06
+- ppc64el: ATLAS 3.10.2 / pastel.debian.net / sid / 2014-10-24
 - s390x: ATLAS 3.10.1 / zelenka.debian.org / sid / 2013-06-06
 - sparc: ATLAS 3.10.1 / smetana.debian.org / wheezy / 2013-06-06
diff -Nru atlas-3.10.2/debian/changelog atlas-3.10.2/debian/changelog
--- atlas-3.10.2/debian/changelog   2014-10-15 16:35:41.0 -0300
+++ atlas-3.10.2/debian/changelog   2014-10-28 09:28:17.0 -0200
@@ -1,3 +1,17 @@
+atlas (3.10.2-4ppc64el2) UNRELEASED; urgency=medium
+
+  * Add ppc64el support (work in progress)
+- debian/patches/ (thanks, Michael Normand et al).
+  - atlas-new_archdef_for_ppc64le.patch
+  - atlas.3.10.2-ppc64le_abiv2_step2.patch
+  - atlas.3.10.2-ppc64le_abiv2_step3.patch
+  - atlas.3.10.2-ppc64le_ifdef_files_with_lvx.patch
+- debian/archdefs/ppc64el/GENERIC64LE.tar.bz2: archdefs/timings,
+  currently the same file for POWER7, POWER7+ and POWER8 systems.
+- debian/archdefs/README: updated accordingly.
+
+ -- Mauricio Faria de Oliveira mauri...@linux.vnet.ibm.com  Thu, 28 Oct 2014 
09:28:00 -0200
+
 atlas (3.10.2-4) unstable; urgency=medium
 
   [ Alastair McKinstry ]
diff -Nru atlas-3.10.2/debian/patches/atlas-new_archdef_for_ppc64le.patch 
atlas-3.10.2/debian/patches/atlas-new_archdef_for_ppc64le.patch
--- atlas-3.10.2/debian/patches/atlas-new_archdef_for_ppc64le.patch 
1969-12-31 21:00:00.0 -0300
+++ atlas-3.10.2/debian/patches/atlas-new_archdef_for_ppc64le.patch 
2014-10-28 07:46:40.0 -0200
@@ -0,0 +1,38 @@
+Origin: https://bugzilla.redhat.com/show_bug.cgi?id=1080073#c43
+Forwarded: http://sourceforge.net/p/math-atlas/patches/66/
+Description: Append 'LE' to archdef on little-endian PowerPC64
+ For more details, see:
+ https://bugzilla.redhat.com/show_bug.cgi?id=1080073#c40
+Last-Update: 2014-10-24
+Subject: atlas new archdef for ppc64le
+From: Michel Normand norm...@linux.vnet.ibm.com
+Date: Sun, 13 Jun 2014 18:02:47 +0200
+
+Need to define different archdef names
+for ppc64 (that is Big Endian) and ppc64le (that is Little Endian).
+This is already done upstream in atlas 3.11.30 with issue
+https://sourceforge.net/p/math-atlas/patches/66/
+
+Required at least as long as I need the bypass of
+atlas.3.10.2-ppc64le_do_not_use_files_with_lvx.patch
+
+Signed-off-by: Michel Normand norm...@linux.vnet.ibm.com
+---
+ CONFIG/src/SpewMakeInc.c |4 
+ 1 file changed, 4 insertions(+)
+
+Index: ATLAS/CONFIG/src/SpewMakeInc.c
+===
+--- ATLAS.orig/CONFIG/src/SpewMakeInc.c
 ATLAS/CONFIG/src/SpewMakeInc.c
+@@ -542,6 +542,10 @@ int main(int nargs, char **args)
+fprintf(fpout, #  -\n);
+fprintf(fpout

Bug#766695: atlas: add ppc64el support

2014-10-28 Thread Mauricio Faria de Oliveira

On 10/28/2014 10:10 AM, Mauricio Faria de Oliveira wrote:


That said, AFAICT, the changes do not pose any problem to other
powerpc-based ports.

I could successfully build atlas on ppc64el with it, and will
perform/report of builds on powerpc and ppc64 shortly.


powerpc: built successfully.
ppc64: in progress (seems it will take longer; no archdef)

As only powerpc is affect as far as jessie is concerned,
would you have any comments on the v2 debdiff, and about
talking to the Release Team for authorizing an upload?

Thank you,

--
Mauricio Faria de Oliveira
IBM Linux Technology Center

--
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#766695: atlas: add ppc64el support

2014-10-28 Thread Mauricio Faria de Oliveira

On 10/28/2014 05:14 PM, Sébastien Villemot wrote:

Thanks Mauricio for your work. It looks much better now, and I will
definitely ask the Release Team for getting this into Jessie (probably
in a few days though).


Great! Thanks a *lot*, Sébastien.

If you have the time, I'd ask you to please give any news once avail. :)

--
Mauricio Faria de Oliveira
IBM Linux Technology Center

--
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#766695: atlas: add ppc64el support

2014-10-28 Thread Mauricio Faria de Oliveira

On 10/28/2014 12:57 PM, Mauricio Faria de Oliveira wrote:

I could successfully build atlas on ppc64el with it, and will
perform/report of builds on powerpc and ppc64 shortly.


powerpc: built successfully.
ppc64: in progress (seems it will take longer; no archdef)


ppc64: built successfully too.

--
Mauricio Faria de Oliveira
IBM Linux Technology Center

--
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#766695: atlas: add ppc64el support

2014-10-27 Thread Mauricio Faria de Oliveira

Hi Sébastien,

On 10/25/2014 03:39 PM, Sébastien Villemot wrote:

However I am not sure to understand some bits of it. Why do you add a
new POWER8 architecture type, if you are using the GENERIC one? It is
either one or the other. My impression is that
atlas.3.10.2-add_power8_cpu.patch is unneeded.


Yes, I agree. The reason for it to be there is just to follow as close
as possible to what (we expect) would be upstream in some time, so the
package downstream didn't differ much.

That one can certainly be removed (and the 'if ppc64el' bits for generic
on debian/rules that cope with it).


Also, I really dislike the kludge consisting in modifying the quilt
series file. Isn't it rather possible to use a standard patch (applied
on all arches) based on #ifdefs?


Indeed not the most elegant way (kludging the quilt series).  It's being
used because one of the patched files modifies a non-preprocessed file
(AFAICT) - the cases/optimized routines one -, thus it seems not to be
possible to use an #ifdef (which would look way better).

Do you happen to know another way/suggestion for it?  I'd be happy to
rework the patches/mechanism in another way that fits the source pkg/
maintainers preferences.


May you please consider it for an upload? (specially for making
jessie)


Note that it's now too late to upload this patch before the freeze
(because the freeze starts on November 5, and there is a 10-day
migration delay). However, we may obtain the permission of the Release
Team to upload this patch to jessie; simplifying this patch as much as
possible will increase the possibility of having this happening.


Ok, that's certainly understandable.  With the above comments (can drop
power8 patch and its associated piece for generic arch in debian/rules,
and asking for alternative mechanisms for non-#ifdef patches), what do
you think is a good way to go?

Thank you,

--
Mauricio Faria de Oliveira
IBM Linux Technology Center.

--
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#766695: atlas: add ppc64el support

2014-10-24 Thread Mauricio Faria de Oliveira

Package: src:atlas
Version: 3.10.2-4
Tags: patch
User: debian-powe...@lists.debian.org
Usertags: ppc64el

Hi atlas maintainers,

This patch adds support for the ppc64el port.

It contains:
1) the patch-set authored by Michael Normand  (submitted upstream, also
   documented in [1])
2) a packaging change, to restrict the patch-set to ppc64el builds only;
   it touches common powerpc code, which is certainly not desirable for
   other powerpc-based ports at this moment (bugs/freeze/jessie).
3) an archdef tarball (attached separately)

May you please consider it for an upload? (specially for making jessie)

Thank you,

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1080073#c40

--
Mauricio Faria de Oliveira
IBM Linux Technology Center


GENERIC64LE.tar.bz2
Description: application/bzip
diff -Nru atlas-3.10.2/debian/archdefs/README 
atlas-3.10.2/debian/archdefs/README
--- atlas-3.10.2/debian/archdefs/README 2014-07-12 07:23:26.0 -0300
+++ atlas-3.10.2/debian/archdefs/README 2014-10-24 19:45:37.0 -0200
@@ -16,5 +16,6 @@
 - mips: ATLAS 3.10.1 / gabrielli.debian.org / sid / 2013-07-27
 - mipsel: ATLAS 3.10.1 / eder.debian.org / sid / 2013-06-07
 - powerpc: ATLAS 3.10.1 / partch.debian.org / sid / 2013-06-06
+- ppc64el: ATLAS 3.10.2 / pastel.debian.net / sid / 2014-10-24
 - s390x: ATLAS 3.10.1 / zelenka.debian.org / sid / 2013-06-06
 - sparc: ATLAS 3.10.1 / smetana.debian.org / wheezy / 2013-06-06
diff -Nru atlas-3.10.2/debian/changelog atlas-3.10.2/debian/changelog
--- atlas-3.10.2/debian/changelog   2014-10-15 16:35:41.0 -0300
+++ atlas-3.10.2/debian/changelog   2014-10-24 19:45:37.0 -0200
@@ -1,3 +1,15 @@
+atlas (3.10.2-4ppc64el1) UNRELEASED; urgency=medium
+
+  * Add ppc64el support (work in progress)
+- debian/patches/ppc64el/ (thanks, Michael Normand et al).
+- debian/rules:  restrict ppc64el patches to ppc64el builds.
+- debian/rules:  different 'GENERIC' first number in ARCHs due to POWER8.
+- debian/archdefs/ppc64el/GENERIC64LE.tar.bz2: archdefs/timings,
+  currently the same file for POWER7, POWER7+ and POWER8 systems.
+- debian/archdefs/README: updated accordingly.
+
+ -- Mauricio Faria de Oliveira mauri...@linux.vnet.ibm.com  Thu, 24 Oct 2014 
20:02:00 -0200
+
 atlas (3.10.2-4) unstable; urgency=medium
 
   [ Alastair McKinstry ]
diff -Nru 
atlas-3.10.2/debian/patches/ppc64el/atlas-new_archdef_for_ppc64le.patch 
atlas-3.10.2/debian/patches/ppc64el/atlas-new_archdef_for_ppc64le.patch
--- atlas-3.10.2/debian/patches/ppc64el/atlas-new_archdef_for_ppc64le.patch 
1969-12-31 21:00:00.0 -0300
+++ atlas-3.10.2/debian/patches/ppc64el/atlas-new_archdef_for_ppc64le.patch 
2014-10-24 19:45:37.0 -0200
@@ -0,0 +1,38 @@
+Origin: https://bugzilla.redhat.com/show_bug.cgi?id=1080073#c43
+Forwarded: http://sourceforge.net/p/math-atlas/patches/66/
+Description: Append 'LE' to archdef on little-endian PowerPC64
+ For more details, see:
+ https://bugzilla.redhat.com/show_bug.cgi?id=1080073#c40
+Last-Update: 2014-10-24
+Subject: atlas new archdef for ppc64le
+From: Michel Normand norm...@linux.vnet.ibm.com
+Date: Sun, 13 Jun 2014 18:02:47 +0200
+
+Need to define different archdef names
+for ppc64 (that is Big Endian) and ppc64le (that is Little Endian).
+This is already done upstream in atlas 3.11.30 with issue
+https://sourceforge.net/p/math-atlas/patches/66/
+
+Required at least as long as I need the bypass of
+atlas.3.10.2-ppc64le_do_not_use_files_with_lvx.patch
+
+Signed-off-by: Michel Normand norm...@linux.vnet.ibm.com
+---
+ CONFIG/src/SpewMakeInc.c |4 
+ 1 file changed, 4 insertions(+)
+
+Index: ATLAS/CONFIG/src/SpewMakeInc.c
+===
+--- ATLAS.orig/CONFIG/src/SpewMakeInc.c
 ATLAS/CONFIG/src/SpewMakeInc.c
+@@ -542,6 +542,10 @@ int main(int nargs, char **args)
+fprintf(fpout, #  -\n);
+fprintf(fpout,ARCH = %s, machnam[mach]);
+fprintf(fpout, %d, ptrbits);
++   /* for ppc64le archi add 'LE' characters */
++   #if defined(__powerpc64__)  (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
++  fprintf(fpout, %s, LE);
++   #endif
+if (ISAX)
+   fprintf(fpout, %s, ISAXNAM[ISAX]);
+if (!USEIEEE)
diff -Nru atlas-3.10.2/debian/patches/ppc64el/atlas.3.10.2-add_power8_cpu.patch 
atlas-3.10.2/debian/patches/ppc64el/atlas.3.10.2-add_power8_cpu.patch
--- atlas-3.10.2/debian/patches/ppc64el/atlas.3.10.2-add_power8_cpu.patch   
1969-12-31 21:00:00.0 -0300
+++ atlas-3.10.2/debian/patches/ppc64el/atlas.3.10.2-add_power8_cpu.patch   
2014-10-24 19:45:37.0 -0200
@@ -0,0 +1,138 @@
+Origin: https://bugzilla.redhat.com/show_bug.cgi?id=1080073#c37
+Forwarded: http://sourceforge.net/p/math-atlas/patches/67/
+Description: Add IBM POWER8 pieces
+ The original patch for 3.10.2 was backported to apply on top
+ of 'debian/patches/generic.diff' - trivial changes to hunks
+ of 'ATLAS/CONFIG