pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/konoha Allow building on platforms where "int3" i...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a368e9e9ca2f
branches:  trunk
changeset: 649083:a368e9e9ca2f
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Mar 31 15:44:47 2015 +0000

description:
Allow building on platforms where "int3" is not a valid debug trap.
Build shared library with -fPIC on all platforms. Bump revision for
that.

diffstat:

 lang/konoha/Makefile                                         |   4 +-
 lang/konoha/distinfo                                         |   4 +-
 lang/konoha/patches/patch-package_konoha.compiler_compiler.c |  49 ++++++++++++
 lang/konoha/patches/patch-package_konoha.io_CMakeLists.txt   |  15 +++
 4 files changed, 69 insertions(+), 3 deletions(-)

diffs (104 lines):

diff -r c4ddb7604c49 -r a368e9e9ca2f lang/konoha/Makefile
--- a/lang/konoha/Makefile      Tue Mar 31 15:43:34 2015 +0000
+++ b/lang/konoha/Makefile      Tue Mar 31 15:44:47 2015 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.13 2014/10/07 16:47:28 adam Exp $
+# $NetBSD: Makefile,v 1.14 2015/03/31 15:44:47 joerg Exp $
 #
 
 DISTNAME=      konoha-1.0.0-952
 PKGNAME=       konoha-1.0.0.952
-PKGREVISION=   9
+PKGREVISION=   10
 CATEGORIES=    lang
 MASTER_SITES=  http://konoha.googlecode.com/files/
 
diff -r c4ddb7604c49 -r a368e9e9ca2f lang/konoha/distinfo
--- a/lang/konoha/distinfo      Tue Mar 31 15:43:34 2015 +0000
+++ b/lang/konoha/distinfo      Tue Mar 31 15:44:47 2015 +0000
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.2 2012/08/12 11:23:59 marino Exp $
+$NetBSD: distinfo,v 1.3 2015/03/31 15:44:47 joerg Exp $
 
 SHA1 (konoha-1.0.0-952.tar.gz) = c4cfdc956bd583f8c3e8e696eeb0316ca78b1389
 RMD160 (konoha-1.0.0-952.tar.gz) = 98eb63382d3877b57606a205ac41cfd3928316b4
 Size (konoha-1.0.0-952.tar.gz) = 5235671 bytes
 SHA1 (patch-include_konoha1_konoha__config.h) = 5faf9bb6575ecab19fe78b15959db849ed6943c5
 SHA1 (patch-include_konoha1_konoha__t.h) = b6296dcef752c0c488f9e93def1fb6673d89a9b9
+SHA1 (patch-package_konoha.compiler_compiler.c) = 7025a74ed934389d87626fb6c8466e141dfa9340
+SHA1 (patch-package_konoha.io_CMakeLists.txt) = da2e8a5acd6c9d930ec1f65c12d0e9bc2b69b1c7
 SHA1 (patch-package_konoha.sql_CMakeLists.txt) = a1a8690f10f40c89feb756eba238f643e136de4d
 SHA1 (patch-src_main_evidence.c) = 58dbce27ac3a3e2a8f8d84d44b68095af13015af
 SHA1 (patch-src_main_os.c) = b939ef713d279c4ab5ba23680dd39e6fb546ebca
diff -r c4ddb7604c49 -r a368e9e9ca2f lang/konoha/patches/patch-package_konoha.compiler_compiler.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/konoha/patches/patch-package_konoha.compiler_compiler.c      Tue Mar 31 15:44:47 2015 +0000
@@ -0,0 +1,49 @@
+$NetBSD: patch-package_konoha.compiler_compiler.c,v 1.1 2015/03/31 15:44:47 joerg Exp $
+
+--- package/konoha.compiler/compiler.c.orig    2015-03-28 23:05:26.000000000 +0000
++++ package/konoha.compiler/compiler.c
+@@ -503,11 +503,19 @@ KMETHOD Compiler_getCurrentUline(CTX ctx
+ 
+ KMETHOD Compiler_debug(CTX ctx, ksfp_t *sfp _RIX)
+ {
++#if defined(__i386__) || defined(__x86_64__)
+       asm volatile("int3");
++#else
++      __builtin_trap();
++#endif
+ }
+ KMETHOD _debug_(CTX ctx, ksfp_t *sfp, kint_t a, kint_t b)
+ {
++#if defined(__i386__) || defined(__x86_64__)
+       asm volatile("int3");
++#else
++      __builtin_trap();
++#endif
+       //void *p1 = (void*) a;
+       //void *p2 = (void*) b;
+       //fprintf(stderr, "%p %p %ld %ld %p %p\n", ctx, sfp, a, b, p1, p2);
+@@ -515,7 +523,11 @@ KMETHOD _debug_(CTX ctx, ksfp_t *sfp, ki
+ void __test__(void *a, void *b)
+ {
+       fprintf(stderr, "%p %p\n", a, b);
++#if defined(__i386__) || defined(__x86_64__)
+       asm volatile("int3");
++#else
++      __builtin_trap();
++#endif
+ }
+ static void kook_compiler_emit(CTX ctx, kMethod *mtd)
+ {
+@@ -565,7 +577,11 @@ kMethod *compiler_LOOKUPMTD(CTX ctx, kOb
+ KMETHOD Method_lazycompile(CTX ctx, ksfp_t *sfp _RIX) {
+     kMethod *mtd = sfp[-1].mtdNC;
+     assert(IS_Method(mtd));
+-    asm volatile("int3");
++#if defined(__i386__) || defined(__x86_64__)
++      asm volatile("int3");
++#else
++      __builtin_trap();
++#endif
+     CWB_t cwbbuf, *cwb = CWB_open(ctx, &cwbbuf);
+     knh_write_cid(ctx, cwb->w, (mtd)->cid);
+     knh_putc(ctx, cwb->w, '.');
diff -r c4ddb7604c49 -r a368e9e9ca2f lang/konoha/patches/patch-package_konoha.io_CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/konoha/patches/patch-package_konoha.io_CMakeLists.txt        Tue Mar 31 15:44:47 2015 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-package_konoha.io_CMakeLists.txt,v 1.1 2015/03/31 15:44:47 joerg Exp $
+
+--- package/konoha.io/CMakeLists.txt.orig      2015-03-28 23:09:49.000000000 +0000
++++ package/konoha.io/CMakeLists.txt
+@@ -1,9 +1,7 @@
+ cmake_minimum_required(VERSION 2.6)
+ set(CMAKE_BUILD_TYPE ${KONOHA_BUILD_TYPE})
+ 
+-if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
+-      set(CMAKE_C_FLAGS "-fPIC")
+-endif()
++set(CMAKE_C_FLAGS "-fPIC")
+ 
+ project(io)
+ set(PACKAGE_SOURCE_CODE src/io.c src/base64.c ./src/digest.c ./src/msgpack.c)



Home | Main Index | Thread Index | Old Index