pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/perl5 GCC versions prior to 3.4 have a bug handli...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c3cb0de25729
branches:  trunk
changeset: 512335:c3cb0de25729
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat May 06 12:32:20 2006 +0000

description:
GCC versions prior to 3.4 have a bug handling the "unused" attribute
in declarations when compiling C++ code.  Patch the perl.h and XSUB.h
headers to avoid using this attribute if using GCC<3.4 and building
C++ modules.  This fixes PR pkg/33403 by OBATA Akio.

Bump PKGREVISION to 2.

diffstat:

 lang/perl5/Makefile         |   4 ++--
 lang/perl5/distinfo         |   4 +++-
 lang/perl5/patches/patch-aq |  26 ++++++++++++++++++++++++++
 lang/perl5/patches/patch-ar |  33 +++++++++++++++++++++++++++++++++
 4 files changed, 64 insertions(+), 3 deletions(-)

diffs (98 lines):

diff -r 931d26a9efb7 -r c3cb0de25729 lang/perl5/Makefile
--- a/lang/perl5/Makefile       Sat May 06 12:00:24 2006 +0000
+++ b/lang/perl5/Makefile       Sat May 06 12:32:20 2006 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.119 2006/04/11 22:51:23 jlam Exp $
+# $NetBSD: Makefile,v 1.120 2006/05/06 12:32:20 jlam Exp $
 
 DISTNAME=      perl-5.8.8
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    lang devel perl5
 MASTER_SITES=  ${MASTER_SITE_PERL_CPAN:S,/modules/by-module/$,/src/,}
 EXTRACT_SUFX=  .tar.bz2
diff -r 931d26a9efb7 -r c3cb0de25729 lang/perl5/distinfo
--- a/lang/perl5/distinfo       Sat May 06 12:00:24 2006 +0000
+++ b/lang/perl5/distinfo       Sat May 06 12:32:20 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.33 2006/04/09 06:34:32 jlam Exp $
+$NetBSD: distinfo,v 1.34 2006/05/06 12:32:20 jlam Exp $
 
 SHA1 (perl-5.8.8.tar.bz2) = 4aab490040727ca4419098720eca2ba4367df539
 RMD160 (perl-5.8.8.tar.bz2) = e78f26d9b96e6db35f946ad4ff55e3a69385c71b
@@ -9,6 +9,8 @@
 SHA1 (patch-am) = cf1687063d0c0542e811545aaaad291bad12d75e
 SHA1 (patch-an) = 987763c3098bf4356993dd6d8741962a1ff8190d
 SHA1 (patch-ap) = 178d6909a8aa6544b849c2b63530fcf1893b77ea
+SHA1 (patch-aq) = b9569d0cd74a06912e82498cd2bfba131c0b6f3b
+SHA1 (patch-ar) = 9d257ceeca337e3d477b80215560bbc290d19dd2
 SHA1 (patch-ba) = 096835f71a69f29e50bdad47944afa838dba5aec
 SHA1 (patch-ca) = 5ed14e043a6d5f8dadf5711b59418f01aa5f6f21
 SHA1 (patch-cb) = 65e523885a404b79349a5c9601fe52965772d820
diff -r 931d26a9efb7 -r c3cb0de25729 lang/perl5/patches/patch-aq
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/perl5/patches/patch-aq       Sat May 06 12:32:20 2006 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-aq,v 1.1 2006/05/06 12:32:20 jlam Exp $
+
+--- XSUB.h.orig        2006-01-02 09:45:29.000000000 -0500
++++ XSUB.h
+@@ -85,17 +85,16 @@ handled automatically by C<xsubpp>.
+ #ifndef PERL_UNUSED_VAR
+ #  define PERL_UNUSED_VAR(x) ((void)x)
+ #endif
++#ifndef PERL_UNUSED_DECL
++#  define PERL_UNUSED_DECL
++#endif
+ 
+ #define ST(off) PL_stack_base[ax + (off)]
+ 
+ #if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
+ #  define XS(name) __declspec(dllexport) void name(pTHX_ CV* cv)
+ #else
+-#  ifdef HASATTRIBUTE_UNUSED
+-#    define XS(name) void name(pTHX_ CV* cv __attribute__unused__)
+-#  else
+-#    define XS(name) void name(pTHX_ CV* cv)
+-#  endif
++#  define XS(name) void name(pTHX_ CV* cv PERL_UNUSED_DECL)
+ #endif
+ 
+ #define dAX const I32 ax = MARK - PL_stack_base + 1
diff -r 931d26a9efb7 -r c3cb0de25729 lang/perl5/patches/patch-ar
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/perl5/patches/patch-ar       Sat May 06 12:32:20 2006 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-ar,v 1.1 2006/05/06 12:32:20 jlam Exp $
+
+--- perl.h.orig        2006-01-13 13:17:12.000000000 -0500
++++ perl.h
+@@ -150,6 +150,15 @@ struct perl_thread;
+ #  define CALLPROTECT CALL_FPTR(PL_protect)
+ #endif
+ 
++/* GCC versions prior to 3.4 have a bug handling the "unused" attribute
++ * in declarations when compiling C++ code.
++ */
++#if defined(__GNUC__) && defined(__cplusplus)
++#  if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
++#    define PERL_UNUSED_DECL
++#  endif
++#endif
++
+ #if defined(SYMBIAN) && defined(__GNUC__)
+ #  ifdef __cplusplus
+ #    define PERL_UNUSED_DECL
+@@ -2375,7 +2384,11 @@ typedef struct clone_params CLONE_PARAMS
+ #    define HASATTRIBUTE_PURE
+ #  endif
+ #  if __GNUC__ >= 3 /* gcc 3.0 -> */ /* XXX Verify this version */
+-#    define HASATTRIBUTE_UNUSED
++#    if (__GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3) /* 3.4 -> */
++#      define HASATTRIBUTE_UNUSED
++#    elif !defined(__cplusplus)
++#      define HASATTRIBUTE_UNUSED
++#    endif
+ #  endif
+ #  if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 /* 3.4 -> */
+ #    define HASATTRIBUTE_WARN_UNUSED_RESULT



Home | Main Index | Thread Index | Old Index