diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-04-20 01:59:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-04-20 01:59:17 +0000 |
commit | 95142a17ed3cfeb7addcc62a60a504e49608d71d (patch) | |
tree | 50268dbc1b404b692b8655f067f2a95f031d6137 /app-emulation | |
parent | Mark amd64 stable #217696. (diff) | |
download | gentoo-2-95142a17ed3cfeb7addcc62a60a504e49608d71d.tar.gz gentoo-2-95142a17ed3cfeb7addcc62a60a504e49608d71d.tar.bz2 gentoo-2-95142a17ed3cfeb7addcc62a60a504e49608d71d.zip |
Fix building with newer versions of gcc #211463 by Ihar Hrachyshka and trick the system to build with gtk-2 #211461 by Ihar Hrachyshka.
(Portage version: 2.2_pre5)
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/gdb-armulator/ChangeLog | 10 | ||||
-rw-r--r-- | app-emulation/gdb-armulator/files/gdb-armulator-5.0-objstack.patch | 99 | ||||
-rwxr-xr-x | app-emulation/gdb-armulator/files/gtk-config | 2 | ||||
-rw-r--r-- | app-emulation/gdb-armulator/gdb-armulator-5.0.ebuild | 10 |
4 files changed, 117 insertions, 4 deletions
diff --git a/app-emulation/gdb-armulator/ChangeLog b/app-emulation/gdb-armulator/ChangeLog index 7241e7f804a3..bf2bf4c3adb4 100644 --- a/app-emulation/gdb-armulator/ChangeLog +++ b/app-emulation/gdb-armulator/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-emulation/gdb-armulator -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/gdb-armulator/ChangeLog,v 1.2 2007/01/25 22:09:38 genone Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/gdb-armulator/ChangeLog,v 1.3 2008/04/20 01:59:17 vapier Exp $ + + 20 Apr 2008; Mike Frysinger <vapier@gentoo.org> + +files/gdb-armulator-5.0-objstack.patch, +files/gtk-config, + gdb-armulator-5.0.ebuild: + Fix building with newer versions of gcc #211463 by Ihar Hrachyshka and trick + the system to build with gtk-2 #211461 by Ihar Hrachyshka. 25 Jan 2007; Marius Mauch <genone@gentoo.org> gdb-armulator-5.0.ebuild: Replacing einfo with elog diff --git a/app-emulation/gdb-armulator/files/gdb-armulator-5.0-objstack.patch b/app-emulation/gdb-armulator/files/gdb-armulator-5.0-objstack.patch new file mode 100644 index 000000000000..9c00b047cea0 --- /dev/null +++ b/app-emulation/gdb-armulator/files/gdb-armulator-5.0-objstack.patch @@ -0,0 +1,99 @@ +--- gdb-5.0/include/obstack.h ++++ gdb-5.0/include/obstack.h +@@ -343,7 +343,7 @@ + + #endif + +-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar) ++#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar)) + + #define obstack_blank_fast(h,n) ((h)->next_free += (n)) + +@@ -411,7 +411,7 @@ + ({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + 1 > __o->chunk_limit) \ + _obstack_newchunk (__o, 1); \ +- *(__o->next_free)++ = (datum); \ ++ obstack_1grow_fast (__o, datum); \ + (void) 0; }) + + /* These assume that the obstack alignment is good enough for pointers or ints, +@@ -423,19 +423,28 @@ + ({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (void *)); \ +- *((void **)__o->next_free)++ = ((void *)datum); \ +- (void) 0; }) ++ obstack_ptr_grow_fast (__o, datum); }) + + # define obstack_int_grow(OBSTACK,datum) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (int) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (int)); \ +- *((int *)__o->next_free)++ = ((int)datum); \ ++ obstack_int_grow_fast (__o, datum); }) ++ ++# define obstack_ptr_grow_fast(OBSTACK,aptr) \ ++__extension__ \ ++({ struct obstack *__o1 = (OBSTACK); \ ++ *(const void **) __o1->next_free = (aptr); \ ++ __o1->next_free += sizeof (const void *); \ + (void) 0; }) + +-# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr) +-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint) ++# define obstack_int_grow_fast(OBSTACK,aint) \ ++__extension__ \ ++({ struct obstack *__o1 = (OBSTACK); \ ++ *(int *) __o1->next_free = (aint); \ ++ __o1->next_free += sizeof (int); \ ++ (void) 0; }) + + # define obstack_blank(OBSTACK,length) \ + __extension__ \ +@@ -443,7 +452,7 @@ + int __len = (length); \ + if (__o->chunk_limit - __o->next_free < __len) \ + _obstack_newchunk (__o, __len); \ +- __o->next_free += __len; \ ++ obstack_blank_fast (__o, __len); \ + (void) 0; }) + + # define obstack_alloc(OBSTACK,length) \ +@@ -530,26 +539,29 @@ + # define obstack_1grow(h,datum) \ + ( (((h)->next_free + 1 > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), 1), 0) : 0), \ +- (*((h)->next_free)++ = (datum))) ++ obstack_1grow_fast (h, datum)) + + # define obstack_ptr_grow(h,datum) \ + ( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ +- (*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum))) ++ obstack_ptr_grow_fast (h, datum)) + + # define obstack_int_grow(h,datum) \ + ( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ +- (*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum))) ++ obstack_int_grow_fast (h, datum)) ++ ++# define obstack_ptr_grow_fast(h,aptr) \ ++ (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr)) + +-# define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr) +-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint) ++# define obstack_int_grow_fast(h,aint) \ ++ (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr)) + + # define obstack_blank(h,length) \ + ( (h)->temp = (length), \ + (((h)->chunk_limit - (h)->next_free < (h)->temp) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ +- ((h)->next_free += (h)->temp)) ++ obstack_blank_fast (h, (h)->temp)) + + # define obstack_alloc(h,length) \ + (obstack_blank ((h), (length)), obstack_finish ((h))) diff --git a/app-emulation/gdb-armulator/files/gtk-config b/app-emulation/gdb-armulator/files/gtk-config new file mode 100755 index 000000000000..14cfa421b380 --- /dev/null +++ b/app-emulation/gdb-armulator/files/gtk-config @@ -0,0 +1,2 @@ +#!/bin/sh +exec pkg-config gtk+-2.0 $(printf "%s" "$*" | sed s:--version:--modversion:) diff --git a/app-emulation/gdb-armulator/gdb-armulator-5.0.ebuild b/app-emulation/gdb-armulator/gdb-armulator-5.0.ebuild index bddbeebe48f6..94ad17912a9a 100644 --- a/app-emulation/gdb-armulator/gdb-armulator-5.0.ebuild +++ b/app-emulation/gdb-armulator/gdb-armulator-5.0.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/gdb-armulator/gdb-armulator-5.0.ebuild,v 1.2 2007/01/25 22:09:38 genone Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/gdb-armulator/gdb-armulator-5.0.ebuild,v 1.3 2008/04/20 01:59:17 vapier Exp $ inherit flag-o-matic eutils @@ -34,10 +34,16 @@ src_unpack() { unpack ${A} cd "${S}" epatch "${WORKDIR}"/gdb-${PV}-uclinux-armulator-${STAMP}.patch + epatch "${FILESDIR}"/${P}-objstack.patch #211463 strip-linguas -u bfd/po opcodes/po + + # add a wrapper to fake gtk-1 with gtk-2 + mkdir "${T}"/path + cp "${FILESDIR}"/gtk-config "${T}"/path/ } src_compile() { + export PATH=${T}/path:${PATH} replace-flags -O? -O2 econf \ --disable-werror \ |