Bug#765370: xutils-dev: fix CCOPTIONS/LDOPTIONS causing FTBFS on sciplot on ppc64el [PATCH]

2016-01-13 Thread Fernando Seiti Furusato
Hi Julien.

I sent the patches through git send-email as you recommended.
Are you able to review them?
For some reason they didn't group within the same thread.

http://lists.x.org/archives/xorg-devel/2016-January/048475.html
http://lists.x.org/archives/xorg-devel/2016-January/048472.html
http://lists.x.org/archives/xorg-devel/2016-January/048474.html

Thanks and regards.
Fernando



Bug#765370: xutils-dev: fix CCOPTIONS/LDOPTIONS causing FTBFS on sciplot on ppc64el [PATCH]

2016-01-07 Thread Fernando Seiti Furusato
Source: xutils-dev
Followup-For: Bug #765370

Thank you for the info, Julien.
I actually submitted a bug report [1] and sent the patches there.
However, I am not sure it is the correct path to do so.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=93631

Cheers.

Fernando



Bug#765370: xutils-dev: fix CCOPTIONS/LDOPTIONS causing FTBFS on sciplot on ppc64el [PATCH]

2015-12-07 Thread Julien Cristau
On Mon, Dec  7, 2015 at 08:57:27 -0300, Fernando Seiti Furusato wrote:

> Hello, Julien.
> 
> I see that at least sciplot is failing to build due to the usage of 
> Imake's
> -mminimal-toc flag.
> Are you planning to apply Mauricio's patch?
> 
I think the patch should be sent/discussed upstream
(xorg-de...@lists.x.org) first.  The relevant repo is
http://cgit.freedesktop.org/xorg/util/cf/ and guidelines at
http://www.x.org/wiki/Development/Documentation/SubmittingPatches/

Thanks,
Julien


signature.asc
Description: PGP signature


Bug#765370: xutils-dev: fix CCOPTIONS/LDOPTIONS causing FTBFS on sciplot on ppc64el [PATCH]

2015-12-07 Thread Fernando Seiti Furusato
Hello, Julien.

I see that at least sciplot is failing to build due to the usage of 
Imake's
-mminimal-toc flag.
Are you planning to apply Mauricio's patch?

I ask because there might be possible to workaround on sciplot, if you
decide not to use the patch on this report.
In which case, I might send a patch to sciplot.

Thanks and regards.

Fernando



Bug#765370: xutils-dev: fix CCOPTIONS/LDOPTIONS causing FTBFS on sciplot on ppc64el [PATCH]

2014-10-15 Thread Julien Cristau
Control: tag -1 moreinfo

On Tue, Oct 14, 2014 at 11:13:53 -0300, Mauricio Faria de Oliveira wrote:

 Package: src:xutils-dev
 Version: 1:7.7+3
 Tags: patch
 User: debian-powe...@lists.debian.org
 Usertags: ppc64el
 
 The attached patch adds the ppc64el pieces and fixes a FTBFS on sciplot
 (and potentially others), avoiding to pass -mminimal-toc from CCOPTIONS
 to LDOPTIONS (because it's incorrect for 'ld -mvalue').
 
 May you please consider it for an upload?
 
The 'add ppc64el support' patch seems to make the other one unnecessary,
since -mminimal-toc is only added for ppc64architecture, which wouldn't
apply to ppc64el?  Am I missing something?

Also, have any of these patches been sent upstream?

Cheers,
Julien


signature.asc
Description: Digital signature


Bug#765370: xutils-dev: fix CCOPTIONS/LDOPTIONS causing FTBFS on sciplot on ppc64el [PATCH]

2014-10-15 Thread Mauricio Faria de Oliveira

Hi Julien,

On 10/15/2014 05:45 AM, Julien Cristau wrote:

The 'add ppc64el support' patch seems to make the other one unnecessary,
since -mminimal-toc is only added for ppc64architecture, which wouldn't
apply to ppc64el?  Am I missing something?


It happens the patch doesn't disable the ppc64architecture, it just adds
the ppc64el architecture - so if you're in powerpc64 and little endian,
both are defined (see there's no #else in this piece):

+ # ifdef __powerpc64__
++#  ifdef __LITTLE_ENDIAN__
++#ifndef Ppc64elArchitecture
++#  define Ppc64elArchitecture
++#endif
++#  endif
+ #  ifndef Ppc64Architecture
+ #   define Ppc64Architecture
+ #  endif

I haven't discussed the patch with its author. Do you believe this point
should be handled differently? (i.e., use an #else)

One thing I had in mind when writing the other patch was trying not to
modify existing stuff, so not to break what used it before, so maybe
that fits here too - ppc64el is also some sort of ppc64, except for
the endianness-dependent pieces.



Also, have any of these patches been sent upstream?


I don't think so. I'd be happy to submit them (w/ the other author's
acknowledgement) if you/other maintainers are OK w/ them (as you're
more experienced - I only looked at a small piece for fixing it).

Thanks!

--
Mauricio Faria de Oliveira
IBM Linux Technology Center


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org




Bug#765370: xutils-dev: fix CCOPTIONS/LDOPTIONS causing FTBFS on sciplot on ppc64el [PATCH]

2014-10-15 Thread Julien Cristau
On Wed, Oct 15, 2014 at 11:56:31 -0300, Mauricio Faria de Oliveira wrote:

 Hi Julien,
 
 On 10/15/2014 05:45 AM, Julien Cristau wrote:
 The 'add ppc64el support' patch seems to make the other one unnecessary,
 since -mminimal-toc is only added for ppc64architecture, which wouldn't
 apply to ppc64el?  Am I missing something?
 
 It happens the patch doesn't disable the ppc64architecture, it just adds
 the ppc64el architecture - so if you're in powerpc64 and little endian,
 both are defined (see there's no #else in this piece):
 
Ah, right, I must have been blind...

   + # ifdef __powerpc64__
   ++#  ifdef __LITTLE_ENDIAN__
   ++#ifndef Ppc64elArchitecture
   ++#  define Ppc64elArchitecture
   ++#endif
   ++#  endif
   + #  ifndef Ppc64Architecture
   + #   define Ppc64Architecture
   + #  endif
 
 I haven't discussed the patch with its author. Do you believe this point
 should be handled differently? (i.e., use an #else)
 
This way seems to be how mips is handled, so let's leave it as-is.

 One thing I had in mind when writing the other patch was trying not to
 modify existing stuff, so not to break what used it before, so maybe
 that fits here too - ppc64el is also some sort of ppc64, except for
 the endianness-dependent pieces.
 
I wonder if the -mminimal-toc thing is actually needed on BE ppc64.  It
seems to have been introduced by
https://bugs.freedesktop.org/show_bug.cgi?id=303 but I don't know why.
So if we could just remove that, it seems like it'd be easier all
around.

Cheers,
Julien


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#765370: xutils-dev: fix CCOPTIONS/LDOPTIONS causing FTBFS on sciplot on ppc64el [PATCH]

2014-10-15 Thread Mauricio Faria de Oliveira

On 10/15/2014 12:17 PM, Julien Cristau wrote:

On Wed, Oct 15, 2014 at 11:56:31 -0300, Mauricio Faria de Oliveira wrote:

It happens the patch doesn't disable the ppc64architecture, it just adds
the ppc64el architecture - so if you're in powerpc64 and little endian,
both are defined (see there's no #else in this piece):


Ah, right, I must have been blind...

...

This way seems to be how mips is handled, so let's leave it as-is.


Haha, no problem. Ok.


One thing I had in mind when writing the other patch was trying not to
modify existing stuff, so not to break what used it before, so maybe
that fits here too - ppc64el is also some sort of ppc64, except for
the endianness-dependent pieces.


I wonder if the -mminimal-toc thing is actually needed on BE ppc64.  It
seems to have been introduced by
https://bugs.freedesktop.org/show_bug.cgi?id=303  but I don't know why.


Well, I can't say of it in CCOPTIONS, because it's a valid CC option;
but in LDOPTIONS, it's certainly wrong (it's not an emulation mode).

BTW, I just noticed sciplot FTBFS on ppc64 too, for the same reason [1].


So if we could just remove that, it seems like it'd be easier all
around.


There are legitimate reasons one may want -mminimal-toc in CCOPTIONS
(I don't understand much of it, but have seen it elsewhere).

That said, I certainly wouldn't want to break its users/packages.
It would be enough to just remove it from LDOPTIONS for ppc64/el.

If you recommend to forward and discuss this upstream, perharps to
understand how this happened, I would be willing to help/ask.

If you have the time and a quick way to track to the point where
CCOPTIONS were added to LDOPTIONS it might help. I can try/learn
later, otherwise.

What you'd prefer?

Thanks for your time and attention.

[1] http://buildd.debian-ports.org/status/package.php?p=sciplotsuite=sid

--
Mauricio Faria de Oliveira
IBM Linux Technology Center


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#765370: xutils-dev: fix CCOPTIONS/LDOPTIONS causing FTBFS on sciplot on ppc64el [PATCH]

2014-10-14 Thread Mauricio Faria de Oliveira

Package: src:xutils-dev
Version: 1:7.7+3
Tags: patch
User: debian-powe...@lists.debian.org
Usertags: ppc64el

The attached patch adds the ppc64el pieces and fixes a FTBFS on sciplot
(and potentially others), avoiding to pass -mminimal-toc from CCOPTIONS
to LDOPTIONS (because it's incorrect for 'ld -mvalue').

May you please consider it for an upload?

Thanks!


Details:


The fixed FTBFS error [1]:

	ld -shared  -o libsciplot.so.1.36 SciPlot.o SciPlotUtil.o 
-mminimal-toc   -lXm [...]  -soname libsciplot.so.1 -lc

ld: unrecognised emulation mode: minimal-toc
	Supported emulations: elf64lppc elf32lppc elf32lppclinux elf32lppcsim 
elf32ppclinux elf32ppc elf32ppcsim elf64ppc

make[2]: *** [shared] Error 1

[1] 
https://buildd.debian.org/status/fetch.php?pkg=sciplotarch=ppc64elver=1.36-16stamp=1410447072


--
Mauricio Faria de Oliveira
IBM Linux Technology Center
diff -Nru xutils-dev-7.7+3/debian/changelog 
xutils-dev-7.7+3ppc64el1/debian/changelog
--- xutils-dev-7.7+3/debian/changelog   2014-05-21 16:46:36.0 -0300
+++ xutils-dev-7.7+3ppc64el1/debian/changelog   2014-10-14 10:49:40.0 
-0300
@@ -1,3 +1,12 @@
+xutils-dev (1:7.7+3ppc64el1) UNRELEASED; urgency=medium
+
+  * 98_ppc64el-not-ld-options.diff: Add DefaultNotLDOptions/NOTLDOPTIONS for
+filtering out CCOPTIONS that are not valid LDOPTIONS (cause linker errors).
+  * 99_ppc64el.diff: Add support for ppc64el as little-endian ppc64.
+(Credits: Adam Conrad)
+
+ -- Mauricio Faria de Oliveira mauri...@linux.vnet.ibm.com  Tue, 14 Oct 2014 
10:45:41 -0300
+
 xutils-dev (1:7.7+3) unstable; urgency=medium
 
   * gccmakedep 1.0.3.
diff -Nru xutils-dev-7.7+3/debian/patches/98_ppc64el-not-ld-options.diff 
xutils-dev-7.7+3ppc64el1/debian/patches/98_ppc64el-not-ld-options.diff
--- xutils-dev-7.7+3/debian/patches/98_ppc64el-not-ld-options.diff  
1969-12-31 21:00:00.0 -0300
+++ xutils-dev-7.7+3ppc64el1/debian/patches/98_ppc64el-not-ld-options.diff  
2014-10-14 10:44:36.0 -0300
@@ -0,0 +1,34 @@
+Description: Some CCOPTIONS are not valid LDOPTIONS (e.g., -mminimal-toc), so 
filter-out NOTLDOPTIONS
+Author: Mauricio Faria de Oliveira mauri...@linux.vnet.ibm.com
+Last-Update: 2014-10-14
+ 
+diff -Nru xorg-cf-files.orig/Imake.tmpl xorg-cf-files/Imake.tmpl
+--- a/xorg-cf-files/Imake.tmpl 2014-10-14 10:02:03.0 -0300
 b/xorg-cf-files/Imake.tmpl 2014-10-14 10:24:50.0 -0300
+@@ -2165,6 +2165,7 @@
+ 
+   CDEBUGFLAGS = DefaultCDebugFlags
+ CCOPTIONS = DefaultCCOptions  /* to distinguish from param flags */
++ NOTLDOPTIONS = DefaultNotLDOptions   /* not to be used as linker 
options */
+ /*
+  * STD_INCLUDES contains system-specific includes
+  * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
+@@ -2179,6 +2180,7 @@
+  LDPRELIB = LdPreLib $(INSTALLED_LIBS)
+ LDPOSTLIB = LdPostLib
+ LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)  $(EXTRA_LDOPTIONS) 
$(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
++LDOPTIONS := $(filter-out $(NOTLDOPTIONS),$(LDOPTIONS))
+  CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) 
$(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
+ 
+LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) 
$(EXTRA_LIBRARIES)
+diff -Nru xorg-cf-files.orig/linux.cf xorg-cf-files/linux.cf
+--- a/xorg-cf-files.orig/linux.cf  2014-10-14 10:02:03.0 -0300
 b/xorg-cf-files/linux.cf   2014-10-14 10:21:52.0 -0300
+@@ -1005,6 +1005,7 @@
+ 
+ #ifdef Ppc64Architecture
+ # define DefaultCCOptions -mminimal-toc
++# define DefaultNotLDOptions  -mminimal-toc
+ # ifndef OptimizedCDebugFlags
+ #  define OptimizedCDebugFlagsDefaultGcc2Ppc64Opt GccAliasingArgs
+ # endif
diff -Nru xutils-dev-7.7+3/debian/patches/99_ppc64el.diff 
xutils-dev-7.7+3ppc64el1/debian/patches/99_ppc64el.diff
--- xutils-dev-7.7+3/debian/patches/99_ppc64el.diff 1969-12-31 
21:00:00.0 -0300
+++ xutils-dev-7.7+3ppc64el1/debian/patches/99_ppc64el.diff 2014-10-14 
10:44:41.0 -0300
@@ -0,0 +1,32 @@
+Description: Add support for ppc64el as little-endian ppc64.
+Author: Adam Conrad adcon...@ubuntu.com
+Origin: 
https://launchpadlibrarian.net/160111286/xutils-dev_1:7.7~1ubuntu5_1:7.7~1ubuntu6.diff.gz
+Last-Update: 2014-10-14
+
+diff -Nru xutils-dev-7.7~1ubuntu5/xorg-cf-files/Imake.cf 
xutils-dev-7.7~1ubuntu6/xorg-cf-files/Imake.cf
+--- xutils-dev-7.7~1ubuntu5/xorg-cf-files/Imake.cf 2013-07-30 
12:22:15.0 -0600
 xutils-dev-7.7~1ubuntu6/xorg-cf-files/Imake.cf 2013-12-18 
05:22:24.0 -0700
+@@ -930,6 +930,11 @@
+ #  undef __powerpc__
+ # endif
+ # ifdef __powerpc64__
++#  ifdef __LITTLE_ENDIAN__
++#ifndef Ppc64elArchitecture
++#  define Ppc64elArchitecture
++#endif
++#  endif
+ #  ifndef Ppc64Architecture
+ #   define Ppc64Architecture
+ #  endif
+diff -Nru xutils-dev-7.7~1ubuntu5/xorg-cf-files/Imake.tmpl