summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2013-05-16 09:31:44 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2013-05-16 09:31:44 +0000
commit7bcf437adf1e6b856709cee42aa86ba0b144d5fc (patch)
treee395f189de59683834549aa9224a629cd59a3a11 /dev-lang
parentAdd live ebuild. (diff)
downloadgentoo-2-7bcf437adf1e6b856709cee42aa86ba0b144d5fc.tar.gz
gentoo-2-7bcf437adf1e6b856709cee42aa86ba0b144d5fc.tar.bz2
gentoo-2-7bcf437adf1e6b856709cee42aa86ba0b144d5fc.zip
Fix 'uint_32' type size (otherwise final binaries are completely broken on amd64).
(Portage version: 2.2.0_alpha173_p24/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/jwasm/ChangeLog10
-rw-r--r--dev-lang/jwasm/files/jwasm-2.10-types-test.patch60
-rw-r--r--dev-lang/jwasm/files/jwasm-2.10-uint_32-on-amd64.patch28
-rw-r--r--dev-lang/jwasm/jwasm-2.10-r1.ebuild (renamed from dev-lang/jwasm/jwasm-2.10.ebuild)6
4 files changed, 101 insertions, 3 deletions
diff --git a/dev-lang/jwasm/ChangeLog b/dev-lang/jwasm/ChangeLog
index 77087d3e3589..b7ad57fbf1c6 100644
--- a/dev-lang/jwasm/ChangeLog
+++ b/dev-lang/jwasm/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-lang/jwasm
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/jwasm/ChangeLog,v 1.1 2013/05/16 06:40:56 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/jwasm/ChangeLog,v 1.2 2013/05/16 09:31:44 slyfox Exp $
+
+*jwasm-2.10-r1 (16 May 2013)
+
+ 16 May 2013; Sergei Trofimovich <slyfox@gentoo.org>
+ +files/jwasm-2.10-types-test.patch, +files/jwasm-2.10-uint_32-on-amd64.patch,
+ +jwasm-2.10-r1.ebuild, -jwasm-2.10.ebuild:
+ Fix 'uint_32' type size (otherwise final binaries are completely broken on
+ amd64).
*jwasm-2.10 (16 May 2013)
diff --git a/dev-lang/jwasm/files/jwasm-2.10-types-test.patch b/dev-lang/jwasm/files/jwasm-2.10-types-test.patch
new file mode 100644
index 000000000000..e57c08afc83e
--- /dev/null
+++ b/dev-lang/jwasm/files/jwasm-2.10-types-test.patch
@@ -0,0 +1,60 @@
+From b19339d4356efbd9b49f73e67ed7c09b9dad4b75 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 16 May 2013 12:24:17 +0300
+Subject: [PATCH 1/2] types: add sanity tests for used sizes
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ GccUnix.mak | 2 +-
+ checks.c | 26 ++++++++++++++++++++++++++
+ 2 files changed, 27 insertions(+), 1 deletion(-)
+ create mode 100644 checks.c
+
+diff --git a/GccUnix.mak b/GccUnix.mak
+index 567b842..bcb2fef 100644
+--- a/GccUnix.mak
++++ b/GccUnix.mak
+@@ -44,7 +44,7 @@ proj_obj = $(OUTD)/main.o $(OUTD)/assemble.o $(OUTD)/assume.o \
+ $(OUTD)/apiemu.o $(OUTD)/dbgcv.o $(OUTD)/end.o \
+ $(OUTD)/backptch.o $(OUTD)/msgtext.o $(OUTD)/tbyte.o \
+ $(OUTD)/cpumodel.o $(OUTD)/safeseh.o $(OUTD)/cmdline.o \
+- $(OUTD)/fastpass.o
++ $(OUTD)/fastpass.o $(OUTD)/checks.o
+ ######
+
+ #.c.o:
+diff --git a/checks.c b/checks.c
+new file mode 100644
+index 0000000..af8630f
+--- /dev/null
++++ b/checks.c
+@@ -0,0 +1,26 @@
++/****************************************************************************
++*
++* This code is Public Domain.
++*
++* ========================================================================
++*
++* Description: make sure "inttype.h" filelds are of the desired size.
++*
++****************************************************************************/
++
++#include "inttype.h"
++
++/* fails to compile if type sizes are of unexpected size */
++static void validate_inttype_sizes()
++{
++/* try to create */
++#define T_IS_SIZE(__type, __expected_size, __test_name) \
++ char __test_name[2 * (sizeof (__type) == (__expected_size)) - 1];
++
++ T_IS_SIZE(uint_8, 1, size_of_uint_8_must_be_1_byte);
++ T_IS_SIZE(uint_16, 2, size_of_uint_16_must_be_2_bytes);
++ T_IS_SIZE(uint_32, 4, size_of_uint_32_must_be_4_bytes);
++ T_IS_SIZE(uint_64, 8, size_of_uint_64_must_be_8_bytes);
++
++#undef T_IS_SIZE
++}
+--
+1.8.2.1
+
diff --git a/dev-lang/jwasm/files/jwasm-2.10-uint_32-on-amd64.patch b/dev-lang/jwasm/files/jwasm-2.10-uint_32-on-amd64.patch
new file mode 100644
index 000000000000..f6100f657fcb
--- /dev/null
+++ b/dev-lang/jwasm/files/jwasm-2.10-uint_32-on-amd64.patch
@@ -0,0 +1,28 @@
+From 4399dabdd55fdf9da08c3604c5b3545391c1d44f Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 16 May 2013 12:24:44 +0300
+Subject: [PATCH 2/2] H/inttype.h: make uint_32 be a 32-bit int on x86_64-gcc
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ H/inttype.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/H/inttype.h b/H/inttype.h
+index 7316cbc..af2ef17 100644
+--- a/H/inttype.h
++++ b/H/inttype.h
+@@ -31,6 +31,10 @@
+
+ #ifndef _INTTYPE_H_INCLUDED_
+ #define _INTTYPE_H_INCLUDED_
++/* some autoconfiguration */
++#if defined(__LP64__)
++# define LONG_IS_64BITS 1
++#endif /* __LP64__ */
+
+ typedef unsigned uint;
+
+--
+1.8.2.1
+
diff --git a/dev-lang/jwasm/jwasm-2.10.ebuild b/dev-lang/jwasm/jwasm-2.10-r1.ebuild
index a51dc7f350e3..4df7de606e4a 100644
--- a/dev-lang/jwasm/jwasm-2.10.ebuild
+++ b/dev-lang/jwasm/jwasm-2.10-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/jwasm/jwasm-2.10.ebuild,v 1.1 2013/05/16 06:40:56 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/jwasm/jwasm-2.10-r1.ebuild,v 1.1 2013/05/16 09:31:44 slyfox Exp $
EAPI=5
@@ -26,8 +26,10 @@ S="${WORKDIR}"
src_prepare() {
epatch "${FILESDIR}"/${P}-gcc-4.8-fwdecl.patch
+ epatch "${FILESDIR}"/${P}-types-test.patch
+ epatch "${FILESDIR}"/${P}-uint_32-on-amd64.patch
# don't strip binary
- sed -i GccUnix.mak -e 's/ -s //g' || die
+ sed -i GccUnix.mak -e 's/ -s / /g' || die
}
src_compile() {