Skip to content

Commit

Permalink
app-editors/xemacs: gcc-5.3 patch. See bug 576512.
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.2.26
  • Loading branch information
Mats Lidell committed Apr 2, 2016
1 parent e84a569 commit a7e28a5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
32 changes: 32 additions & 0 deletions app-editors/xemacs/files/xemacs-21.4.24-gcc5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff -r e2da872593c0 configure.in
--- a/configure.in Tue Mar 24 22:15:53 2015 -0400
+++ b/configure.in Sun Mar 13 13:48:24 2016 +0100
@@ -1939,6 +1939,8 @@
CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
dnl Yuck, bad compares have been worth at least 3 crashes!
CFLAGS="$CFLAGS -Wsign-compare"
+ dnl Use old gnu inline semantics until we fix the source
+ CFLAGS="$CFLAGS -fgnu89-inline"
dnl XEmacs is known not to be strict-aliasing-safe.
case "`gcc -v --help 2>&1`" in
*-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
diff -r e2da872593c0 src/lisp.h
--- a/src/lisp.h Tue Mar 24 22:15:53 2015 -0400
+++ b/src/lisp.h Sun Mar 13 13:48:24 2016 +0100
@@ -193,6 +193,8 @@
# endif /* GNUC */
#endif

+#ifndef _GCC_MAX_ALIGN_T
+#define _GCC_MAX_ALIGN_T
/* No type has a greater alignment requirement than max_align_t.
(except perhaps for types we don't use, like long double) */
typedef union
@@ -202,6 +204,7 @@
struct { void (*f)(void); } f;
struct { double d; } d;
} max_align_t;
+#endif

#ifndef ALIGNOF
# if defined (__GNUC__) && (__GNUC__ >= 2)
7 changes: 6 additions & 1 deletion app-editors/xemacs/xemacs-21.4.24.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
EAPI="5"

WANT_AUTOCONF="2.1"
inherit autotools eutils toolchain-funcs
inherit autotools eutils flag-o-matic toolchain-funcs

DESCRIPTION="highly customizable open source text editor and application development system"
HOMEPAGE="http://www.xemacs.org/"
Expand Down Expand Up @@ -62,6 +62,8 @@ src_unpack() {
src_prepare() {
# see bug 58350, 102540 and 143580
epatch "${FILESDIR}"/xemacs-21.4.19-db.patch
# see bug 576512
epatch "${FILESDIR}"/xemacs-21.4.24-gcc5.patch

# Some binaries and man pages are installed under suffixed names
# to avoid collions with their GNU Emacs counterparts (see below).
Expand Down Expand Up @@ -168,6 +170,9 @@ src_configure() {

einfo "${myconf}"

# see bug 576512
append-cflags -std=gnu89

# Don't use econf because it uses options which this configure
# script does not understand (like --host).
./configure ${myconf} ${EXTRA_ECONF} \
Expand Down

0 comments on commit a7e28a5

Please sign in to comment.