bug#13210: [PATCH] maint: cygwin build broken

2012-12-19 Thread Pádraig Brady

On 12/17/2012 11:20 PM, Pádraig Brady wrote:

On 12/17/2012 11:50 AM, Z. Majeed wrote:

Building latest git source in a non-src directory on cygwin win7 with gcc 4.5.3 
is broken



I had to configure --disable-gcc-warnings to avoid the following errors because 
gcc 4.5.3 is the latest on cygwin

 > and not covered by the ignore warnings pragma in extern-inline.m4 for gcc 
4.6 and higher:

   CC   dtotimespec.o
In file included from dtotimespec.c:25:0:
timespec.h:58:1: error: no previous declaration for 'timespec_cmp'
[-Werror=missing-declarations]
  timespec_cmp (struct timespec a, struct timespec b)


That's a possible gnulib issue. I'll CC there separately.


It could be avoided in gnulib as detailed here:
http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00087.html

But I think the attached coreutils patch
which just avoids auto enabling all these gcc
warnings on older compilers is more appropriate.

thanks,
Pádraig.
>From 8b11507d6dec4238dcf441ad2b3da9c8db7442bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= 
Date: Wed, 19 Dec 2012 09:13:21 +
Subject: [PATCH] build: avoid --enable-gcc-warnings on GCC <= 4.5

* configure.ac: Only enable warnings automatically when
on GCC >= 4.6 (and when building from a git checkout)
as that was the first GCC version to support fine-grained
control of warnings, allowing them to be adjusted around
certain code sections.  gnulib relies on this for certain
warnings, so avoid auto enabling this option lest we trigger
build failures on now over two year old compilers.
Reported by Zartaj Majeed with GCC 4.5.3 on cygwin.
---
 configure.ac |   32 +---
 1 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6504144..295802d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,21 +67,6 @@ cu_have_perl=yes
 case $PERL in *"/missing "*) cu_have_perl=no;; esac
 AM_CONDITIONAL([HAVE_PERL], [test $cu_have_perl = yes])
 
-AC_ARG_ENABLE([gcc-warnings],
-  [AS_HELP_STRING([--enable-gcc-warnings],
- [turn on many GCC warnings (for developers; best with GNU make)])],
-  [case $enableval in
- yes|no) ;;
- *)  AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
-   esac
-   gl_gcc_warnings=$enableval],
-  [if test -d "$srcdir"/.git; then
- gl_gcc_warnings=yes
-   else
- gl_gcc_warnings=no
-   fi]
-)
-
 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
 # 
 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
@@ -100,6 +85,23 @@ AC_DEFUN([gl_GCC_VERSION_IFELSE],
   ]
 )
 
+AC_ARG_ENABLE([gcc-warnings],
+  [AS_HELP_STRING([--enable-gcc-warnings],
+ [turn on many GCC warnings (for developers; best with GNU make)])],
+  [case $enableval in
+ yes|no) ;;
+ *)  AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
+   esac
+   gl_gcc_warnings=$enableval],
+  [
+   # GCC provides fine-grained control over diagnostics which
+   # is used in gnulib for example to suppress warnings from
+   # certain sections of code.  So if this is available and
+   # we're running from a git repo, then auto enable the warnings.
+   gl_gcc_warnings=no
+   gl_GCC_VERSION_IFELSE([4], [6], [test -d "$srcdir"/.git && gl_gcc_warnings=yes])]
+)
+
 if test "$gl_gcc_warnings" = yes; then
   gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
   AC_SUBST([WERROR_CFLAGS])
-- 
1.7.6.4



bug#13210: [PATCH] maint: cygwin build broken

2012-12-19 Thread Z. Majeed
Thanks for fixing all the issues - are you folks open to adding a ginstall.exe 
manifest for the cygwin build?

Zartaj

--- On Mon, 12/17/12, Z. Majeed  wrote:

> You're probably right about the mkdir
> doc hack - I think I added it based on a similar rule for
> another subdir - the win7 elevation requirement is discussed
> at length at 
> http://social.msdn.microsoft.com/forums/en-US/windowssecurity/thread/73f86e9e-928f-40b7-8dd5-27e40db6997e/
> - the upshot is ginstall.exe needs a manifest to be exempt
> from win7 racial profiling - the cygwin folks must have a
> manifest when creating a coreutils package - the latest on
> cygwin is coreutils 8.15
> 
> Zartaj
> 
> --- On Mon, 12/17/12, Pádraig Brady 
> wrote:
> 
> > 
> > > On win7 running ginstall for man/install.1 build
> > required admin rights
> > 
> > Surprising. ginstall --help shouldn't need admin
> privs.
> > I'm not in a position to test windows though, sorry.
> > Perhaps you could trace the call requiring admin
> rights?
> > 
> > thanks,
> > Pádraig.
> >
>





bug#13210: [PATCH] maint: cygwin build broken

2012-12-19 Thread Pádraig Brady

On 12/19/2012 12:57 PM, Z. Majeed wrote:

Thanks for fixing all the issues - are you folks open to adding a ginstall.exe 
manifest for the cygwin build?


I presume the cygwin package puts one in place,
and it would be nice to keep windows specific stuff there.
There is a related thread here:
http://cygwin.com/ml/cygwin/2012-07/msg00293.html

thanks,
Pádraig.





bug#13210: [PATCH] maint: cygwin build broken

2012-12-19 Thread Eric Blake
On 12/19/2012 06:25 AM, Pádraig Brady wrote:
> On 12/19/2012 12:57 PM, Z. Majeed wrote:
>> Thanks for fixing all the issues - are you folks open to adding a
>> ginstall.exe manifest for the cygwin build?
> 
> I presume the cygwin package puts one in place,
> and it would be nice to keep windows specific stuff there.
> There is a related thread here:
> http://cygwin.com/ml/cygwin/2012-07/msg00293.html

Correct - when I build coreutils for the cygwin distro, the manifest
file is built as part of the cygwin-specific patches that I apply.  I'm
not sure whether it makes sense to try and upstream something that is so
platform specific; on the one hand, it would make out-of-the-box
development on cygwin easier; on the other hand, we don't have too many
people doing out-of-the-box development (most people rely on the
pre-built coreutils in the cygwin distro).

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


bug#13210: [PATCH] maint: cygwin build broken

2012-12-19 Thread Eric Blake
On 12/19/2012 03:23 AM, Pádraig Brady wrote:
> 
> But I think the attached coreutils patch
> which just avoids auto enabling all these gcc
> warnings on older compilers is more appropriate.

I like the idea of only enabling the warnings on newer gcc.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


bug#13210: [PATCH] maint: cygwin build broken

2012-12-19 Thread Z. Majeed
or maybe there aren't many people building on cygwin because of issues like the 
ones I reported - cygwin packages can fall quite behind and coreutils is not 
available on cygwinports either - I know I was close to giving up and just 
working on linux

Zartaj

--- On Wed, 12/19/12, Eric Blake  wrote:
> 
> On 12/19/2012 06:25 AM, Pádraig
> Brady wrote:
> > On 12/19/2012 12:57 PM, Z. Majeed wrote:
> >> Thanks for fixing all the issues - are you folks
> open to adding a
> >> ginstall.exe manifest for the cygwin build?
> > 
> > I presume the cygwin package puts one in place,
> > and it would be nice to keep windows specific stuff
> there.
> > There is a related thread here:
> > http://cygwin.com/ml/cygwin/2012-07/msg00293.html
> 
> Correct - when I build coreutils for the cygwin distro, the
> manifest
> file is built as part of the cygwin-specific patches that I
> apply.  I'm
> not sure whether it makes sense to try and upstream
> something that is so
> platform specific; on the one hand, it would make
> out-of-the-box
> development on cygwin easier; on the other hand, we don't
> have too many
> people doing out-of-the-box development (most people rely on
> the
> pre-built coreutils in the cygwin distro).
> 
> -- 
> Eric Blake   eblake redhat com   
> +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
> 
>





bug#13210: [PATCH] maint: cygwin build broken

2012-12-19 Thread Paul Eggert

On 12/19/2012 07:46 AM, Z. Majeed wrote:

I know I was close to giving up and just working on linux


That's not giving up!





bug#13227: seq -s broken in coretutils 8.20?

2012-12-19 Thread Philipp Gortan
Dear coreutils crowd,

I recently upgraded the coreutils on my Gentoo AMD64 from 8.16 to 8.20.
I used the seq command to generate the values of an SQL "in" statement.
Since I upgraded, the SQL is no longer correct - here is what I found out:

$ seq -s, 6 9; seq --version

6
7,8,9,seq (GNU coreutils) 8.20
...

(nb: newline after the "6", the comma after the 9 and the missing newline)

After downgrading to 8.16, I get:

$ seq -s, 6 9; seq --version
6,7,8,9
seq (GNU coreutils) 8.16
...

For reference, on a RHEL 5.6, the output is also:

$ seq -s, 6 9; seq --version
6,7,8,9
seq (GNU coreutils) 5.97


So to me, it looks as if the speed optimizations in 8.20 broke the "-s"
feature of seq.

I have recompiled coreutils with the vanilla useflag, which means that
no gentoo-specific patches are applied. The attachted text file contains
further information (compiler version and flags, etc.).

Can anyone reproduce this behavior?

Philipp

Portage 2.1.11.31 (default/linux/amd64/10.0/desktop, gcc-4.5.4, glibc-2.15-r3, 
3.5.7-gentoo x86_64)
=
System Settings
=
System uname: Linux-3.5.7-gentoo-x86_64-with-gentoo-2.1
Timestamp of tree: Wed, 19 Dec 2012 07:45:01 +
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:  4.2_p37
dev-java/java-config: 2.1.11-r3
dev-lang/python:  2.7.3-r2, 3.2.3
dev-util/cmake:   2.8.9
dev-util/pkgconfig:   0.27.1
sys-apps/baselayout:  2.1-r1
sys-apps/openrc:  0.11.8
sys-apps/sandbox: 2.5
sys-devel/autoconf:   2.13, 2.68
sys-devel/automake:   1.9.6-r3, 1.11.6
sys-devel/binutils:   2.22-r1
sys-devel/gcc:4.5.4
sys-devel/gcc-config: 1.7.3
sys-devel/libtool:2.4-r1
sys-devel/make:   3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:   2.15-r3
Repositories: gentoo local perl-experimental
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mno-avx -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ 
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild 
/etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d 
/etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -mno-avx -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks 
ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox 
sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://gentoo.inode.at/source/ 
ftp://gd.tuwien.ac.at/opsys/linux/gentoo/";
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress 
--force --whole-file --delete --stats --human-readable --timeout=180 
--exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/perl-experimental"
SYNC="rsync://rsync.at.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi ads aften alsa amd64 bash-completion berkdb bluetooth 
branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dmx 
doc dri dts dvd dvdr eap-tls emacs emboss emerald encode exif extra ffmpeg 
firefox flac fontconfig gcj gd gdbm geoip gif gimp gpm gstreamer gtk hddtemp 
iconv icu imagemagick introspection iptc jadetex jpeg kerberos kpathsea laptop 
latex lcms ldap libnotify lm_sensors mad minizip mms mmx mng modules mp3 mp4 
mpeg msdoc msppt msxls mudflap multilib ncurses network-cron new-login nls nptl 
oci8-instant-client offensive ogg opengl openmp oracle pam pam_ssh pango pcre 
pcsc-lite pdf pdfimport perl pkcs11 png policykit postgres ppds pppd python 
qt3support qt4 readline sdl session smartcard sna spell sqlite sse sse2 ssh ssl 
startup-notification subversion svg tcpd tex tiff tk truetype udev udisks 
unicode upower usb vorbis vpx winbind x264 xcb xft xinerama xml xv xvid zip 
zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 
emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m 
maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file 
hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug 
rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic 
authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm 
authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache 
cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expir

bug#13227: seq -s broken in coretutils 8.20?

2012-12-19 Thread Pádraig Brady

On 12/19/2012 04:53 PM, Philipp Gortan wrote:

Dear coreutils crowd,

I recently upgraded the coreutils on my Gentoo AMD64 from 8.16 to 8.20.
I used the seq command to generate the values of an SQL "in" statement.
Since I upgraded, the SQL is no longer correct - here is what I found out:

$ seq -s, 6 9; seq --version

6
7,8,9,seq (GNU coreutils) 8.20
...

(nb: newline after the "6", the comma after the 9 and the missing newline)

After downgrading to 8.16, I get:

$ seq -s, 6 9; seq --version
6,7,8,9
seq (GNU coreutils) 8.16
...

For reference, on a RHEL 5.6, the output is also:

$ seq -s, 6 9; seq --version
6,7,8,9
seq (GNU coreutils) 5.97


So to me, it looks as if the speed optimizations in 8.20 broke the "-s"
feature of seq.

I have recompiled coreutils with the vanilla useflag, which means that
no gentoo-specific patches are applied. The attachted text file contains
further information (compiler version and flags, etc.).

Can anyone reproduce this behavior?


Yes confirmed :(
Looks like we used puts() in the new code
which unconditionally writes a '\n'

patch coming up...

thanks,
Pádraig.





bug#13227: seq -s broken in coretutils 8.20?

2012-12-19 Thread Pádraig Brady

On 12/19/2012 07:01 PM, Pádraig Brady wrote:

On 12/19/2012 04:53 PM, Philipp Gortan wrote:

Dear coreutils crowd,

I recently upgraded the coreutils on my Gentoo AMD64 from 8.16 to 8.20.
I used the seq command to generate the values of an SQL "in" statement.
Since I upgraded, the SQL is no longer correct - here is what I found out:

$ seq -s, 6 9; seq --version

6
7,8,9,seq (GNU coreutils) 8.20
...

(nb: newline after the "6", the comma after the 9 and the missing newline)


The attached should fix it.

thanks,
Pádraig.
>From 9d9cdfd5df898ade2e680aab5ce37fcd0032c687 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= 
Date: Wed, 19 Dec 2012 19:27:10 +
Subject: [PATCH] seq: fix newline output when -s specified

This regression was introduced in commit v8.19-132-g3786fb6.

* src/seq.c (seq_fast): Don't use puts() to output the first number,
and instead insert it into the buffer as for other numbers.
Also output the terminator unconditionally.
* tests/misc/seq.pl: Add some basic tests for the -s option.
* NEWS: Mention the fix.
* THANKS.in: Reported by Philipp Gortan.
---
 NEWS  |4 
 THANKS.in |1 +
 src/seq.c |   20 +---
 tests/misc/seq.pl |5 +
 4 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/NEWS b/NEWS
index e4472df..ae7ec2a 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,10 @@ GNU coreutils NEWS-*- outline -*-
   the output numbers are properly aligned and of the correct width.
   [This bug was present in "the beginning".]
 
+  seq -s now doesn't output an erroneous newline after the first number, and
+  outputs a newline after the last number rather than a trailing separator.
+  [bug introduced in coreutils-8.20]
+
 ** Changes in behavior
 
   df --total now prints '-' into the target column (mount point) of the
diff --git a/THANKS.in b/THANKS.in
index c2651e7..67b60b9 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -505,6 +505,7 @@ Phil Richards   phil.richa...@vf.vodafone.co.uk
 Philippe De Muyter  p...@macqel.be
 Philippe Schnoebelenphilippe.schnoebe...@imag.fr
 Phillip Jones   mo...@datastacks.com
+Philipp Gortan  gor...@gmail.com
 Philipp Thomas  p...@suse.de
 Piergiorgio Sartor  sar...@sony.de
 Pieter Bowman   bow...@math.utah.edu
diff --git a/src/seq.c b/src/seq.c
index 9c2c51f..108808b 100644
--- a/src/seq.c
+++ b/src/seq.c
@@ -419,30 +419,36 @@ seq_fast (char const *a, char const *b)
   bool ok = cmp (p, p_len, q, q_len) <= 0;
   if (ok)
 {
-  /* Buffer at least this many output lines per fwrite call.
+  /* Buffer at least this many numbers per fwrite call.
  This gives a speed-up of more than 2x over the unbuffered code
  when printing the first 10^9 integers.  */
   enum {N = 40};
   char *buf = xmalloc (N * (n + 1));
   char const *buf_end = buf + N * (n + 1);
 
-  puts (p);
   char *z = buf;
+
+  /* Write first number to buffer.  */
+  z = mempcpy (z, p, p_len);
+
+  /* Append separator then number.  */
   while (cmp (p, p_len, q, q_len) < 0)
 {
+  *z++ = *separator;
   incr (&p, &p_len);
   z = mempcpy (z, p, p_len);
-  *z++ = *separator;
-  if (buf_end - n - 1 < z)
+  /* If no place for another separator + number then
+ output buffer so far, and reset to start of buffer.  */
+  if (buf_end - (n + 1) < z)
 {
   fwrite (buf, z - buf, 1, stdout);
   z = buf;
 }
 }
 
-  /* Write any remaining, buffered output.  */
-  if (buf < z)
-fwrite (buf, z - buf, 1, stdout);
+  /* Write any remaining buffered output, and the terminator.  */
+  *z++ = *terminator;
+  fwrite (buf, z - buf, 1, stdout);
 
   IF_LINT (free (buf));
 }
diff --git a/tests/misc/seq.pl b/tests/misc/seq.pl
index 447baa4..416b839 100755
--- a/tests/misc/seq.pl
+++ b/tests/misc/seq.pl
@@ -128,6 +128,11 @@ my @Tests =
['long-leading-zeros2', qw(000 02), {OUT => [qw(0 1 2)]}],
['long-leading-zeros3', qw(00 02), {OUT => [qw(0 1 2)]}],
['long-leading-zeros4', qw(0 02), {OUT => [qw(0 1 2)]}],
+
+   # Exercise the -s option, which was broken in 8.20
+   ['sep-1', qw(-s, 1 3), {OUT => [qw(1,2,3)]}],
+   ['sep-2', qw(-s, 1 1), {OUT => [qw(1)]}],
+   ['sep-3', qw(-s,, 1 3), {OUT => [qw(1,,2,,3)]}],
   );
 
 # Append a newline to each entry in the OUT array.
-- 
1.7.6.4



bug#13227: seq -s broken in coretutils 8.20?

2012-12-19 Thread Bernhard Voelker
On 12/20/2012 01:33 AM, Pádraig Brady wrote:
> The attached should fix it.

The patch looks good, thanks.

Have a nice day,
Berny





bug#13118: [PATCH] factor: disable longlong.h logic for x32 builds

2012-12-19 Thread Pádraig Brady

On 12/07/2012 08:55 PM, Pádraig Brady wrote:

On 12/07/2012 08:44 PM, Mike Frysinger wrote:

The current x86_64 asm code does not work for x32 ABIs, so disable it
until someone can fix it.  Simply deleting the q suffix is not enough.

* src/longlong.h: Check for __ILP32__ for x86_64 targets.
---
  src/longlong.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/longlong.h b/src/longlong.h
index f2b2c49..baf001c 100644
--- a/src/longlong.h
+++ b/src/longlong.h
@@ -1006,7 +1006,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, 
UWtype, UWtype);
  #endif
  #endif /* 80x86 */

-#if defined (__amd64__) && W_TYPE_SIZE == 64
+#if defined (__amd64__) && W_TYPE_SIZE == 64 && !defined (__ILP32__)
  #define add_ss(sh, sl, ah, al, bh, bl) \
__asm__ ("addq %5,%q1\n\tadcq %3,%q0"\
 : "=r" (sh), "=&r" (sl)\



I think we may go for something more general here,
as we're having all sorts of problems in this area.
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=history;f=src/longlong.h

It seems that we need _LP64 defined,
to enable W_TYPE_SIZE == 64 code safely.


I've not come up with anything more generic for the moment,
so will go with this slightly adjusted patch for now.
Was this a runtime or build time issue BTW?
What was the failure mode if runtime?

thanks,
Pádraig.

commit 2178e2ad8dce68862ea9545328aae999700c54cc
Author: Mike Frysinger 
Date:   Fri Dec 7 15:44:18 2012 -0500

factor: disable x86_64 assembly code for x32 builds

The current x86_64 asm code does not work for x32 (__ILP32__) ABIs,
so disable it.  Note simply deleting the q suffix is not enough.

* src/longlong.h: Restrict x86_64 assembly to _LP64 targets,
which is consistent with other checks in longlong.h and
avoids this code on x32.

diff --git a/src/longlong.h b/src/longlong.h
index f2b2c49..1792045 100644
--- a/src/longlong.h
+++ b/src/longlong.h
@@ -683,7 +683,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, 
UWtype);
   && defined (_PA_RISC2_0) && defined (_LP64)
 /* Note the _PA_RISC2_0 above is to exclude this code from GCC with
default -march options which doesn't support these instructions.
-   Also the width check for 'long' is to avoid ilp32 runtimes where
+   Also the width check for 'long' is to avoid ILP32 runtimes where
GNU/Linux and narrow HP-UX kernels are known to have issues with
clobbering of context between the add and add,dc instructions.  */
 #define add_ss(sh, sl, ah, al, bh, bl) \
@@ -1006,7 +1006,9 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, 
UWtype, UWtype);
 #endif
 #endif /* 80x86 */

-#if defined (__amd64__) && W_TYPE_SIZE == 64
+#if defined (__amd64__) && W_TYPE_SIZE == 64 && defined (_LP64)
+/* Note the width check for 'long' is to avoid ILP32 runtimes (x32)
+   where the ABI is known to be incompatible with the following.  */
 #define add_ss(sh, sl, ah, al, bh, bl) \
   __asm__ ("addq %5,%q1\n\tadcq %3,%q0"
\
   : "=r" (sh), "=&r" (sl)  \






bug#13118: [PATCH] factor: disable longlong.h logic for x32 builds

2012-12-19 Thread Mike Frysinger
On Wednesday 19 December 2012 21:29:50 Pádraig Brady wrote:
> Was this a runtime or build time issue BTW?
> What was the failure mode if runtime?

build time.  the asm code was rejected due to mismatched constraints.
-mike


signature.asc
Description: This is a digitally signed message part.