Skip Menu |
 

This queue is for tickets about the Math-Int128 CPAN distribution.

Report information
The Basics
Id: 67653
Status: resolved
Worked: 20 min
Priority: 0/
Queue: Math-Int128

People
Owner: Nobody in particular
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.04
Fixed in: (no value)



Subject: gcc 4.4 support
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1303371940-18812-99"
Content-Length: 0
Content-Type: text/html; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 228
Hi,

Please find enclosed patch that adds support for (some) gcc 4.4.x compilers.

Info about 128-bit types support in gcc 4.4 - see http://gcc.gnu.org/gcc-4.4/changes.html

--
kmx
Subject: gcc-4.4-patch.diff
MIME-Version: 1.0
Content-Type: application/octet-stream; name="gcc-4.4-patch.diff"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="gcc-4.4-patch.diff"
Content-Transfer-Encoding: base64
Content-Length: 1341
Download gcc-4.4-patch.diff
text/x-diff 1.3k
diff -ru Math-Int128-0.04.orig\Int128.xs Math-Int128-0.04\Int128.xs --- Math-Int128-0.04.orig\Int128.xs Tue Feb 15 15:19:46 2011 +++ Math-Int128-0.04\Int128.xs Thu Apr 21 09:40:24 2011 @@ -8,11 +8,14 @@ #include "ppport.h" +#if __GNUC__ == 4 && __GNUC_MINOR__ >= 4 && __GNUC_MINOR__ < 6 +/* workaroung for gcc 4.4/4.5 - see http://gcc.gnu.org/gcc-4.4/changes.html */ +typedef int int128_t __attribute__ ((__mode__ (TI))); +typedef unsigned int uint128_t __attribute__ ((__mode__ (TI))); +#else typedef __int128 int128_t; typedef unsigned __int128 uint128_t; - -//typedef long long int128_t; -//typedef unsigned long long uint128_t; +#endif #define I128LEN sizeof(int128_t) diff -ru Math-Int128-0.04.orig\Makefile.PL Math-Int128-0.04\Makefile.PL --- Math-Int128-0.04.orig\Makefile.PL Tue Mar 08 18:18:18 2011 +++ Math-Int128-0.04\Makefile.PL Thu Apr 21 09:38:16 2011 @@ -15,9 +15,9 @@ my $cc = (grep defined, $mm->{CC}, $onfig{cc}, 'cc')[0]; my $cc_version = `$cc --version`; -unless ($cc_version =~ /cc\s+\([^)]*\)\s+4\.(\d+)/i and $1 >= 6) { +unless ($cc_version =~ /cc\s+\([^)]*\)\s+4\.(\d+)/i and $1 >= 4) { unlink $mm->{MAKEFILE}; - die "This module requires version 4.6 or above of the GCC compiler.\nAborting!\n\n" + die "This module requires version 4.4 or above of the GCC compiler.\nAborting!\n\n" }
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-18812-1303645077-1753.67653-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 17
patched! thanks


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.