On Wed, 12 Aug 2009 02:27:54 +0100
Chris Lamb <la...@debian.org> wrote:

> I've just uploaded libgc 1:7.1-1 to experimental.
> 
> I tried applying your patch for that upload, but the atomic-test-and-set
> hunk didn't apply due to some refactoring upstream; I'm not sure it's
> even needed now, but I could be totally wrong.
> 
> Could you take a look?

Attached is a fresh working patch for this version. Also, looking at the
build logs, (and the AVR32 build I tried), the symbols are arch specific,
also attached is the symbols diff for AVR32.

Regards,
Bradley Smith


-- 
Bradley Smith                                     b...@brad-smith.co.uk
Debian GNU/Linux Developer                         bradsm...@debian.org
GPG: 0xC718D347       D201 7274 2FE1 A92A C45C EFAB 8F70 629A C718 D347
diff -Naur libgc-7.1/debian/patches/03-add-avr32-support.diff 
libgc-7.1.new/debian/patches/03-add-avr32-support.diff
--- libgc-7.1/debian/patches/03-add-avr32-support.diff  1970-01-01 
01:00:00.000000000 +0100
+++ libgc-7.1.new/debian/patches/03-add-avr32-support.diff      2009-08-12 
20:10:52.000000000 +0100
@@ -0,0 +1,124 @@
+Index: libgc-7.1.new/include/private/gcconfig.h
+===================================================================
+--- libgc-7.1.new.orig/include/private/gcconfig.h      2009-08-12 
20:10:04.000000000 +0100
++++ libgc-7.1.new/include/private/gcconfig.h   2009-08-12 20:10:18.000000000 
+0100
+@@ -258,6 +258,10 @@
+ #    define ARM32
+ #    define mach_type_known
+ # endif
++# if defined(LINUX) && defined(__avr32__)
++#    define AVR32
++#    define mach_type_known
++# endif
+ # if defined(LINUX) && defined(__sh__)
+ #    define SH
+ #    define mach_type_known
+@@ -1781,6 +1785,19 @@
+ #   endif
+ #endif
+ 
++# ifdef AVR32
++#   define MACH_TYPE "AVR32"
++#   define CPP_WORDSZ 32
++#   define ALIGNMENT 4
++#   define OS_TYPE "LINUX"
++#   define DYNAMIC_LOADING
++#   define LINUX_STACKBOTTOM
++#   define USE_GENERIC_PUSH_REGS
++#   define SEARCH_FOR_DATA_START
++      extern int _end[];
++#   define DATAEND (_end)
++# endif
++
+ # ifdef CRIS
+ #   define MACH_TYPE "CRIS"
+ #   define CPP_WORDSZ 32
+Index: libgc-7.1.new/include/private/thread_local_alloc.h
+===================================================================
+--- libgc-7.1.new.orig/include/private/thread_local_alloc.h    2009-08-12 
20:10:04.000000000 +0100
++++ libgc-7.1.new/include/private/thread_local_alloc.h 2009-08-12 
20:10:18.000000000 +0100
+@@ -39,7 +39,7 @@
+ #     else
+ #       define USE_WIN32_COMPILER_TLS
+ #     endif /* !GNU */
+-#   elif defined(LINUX) && !defined(ARM32) && \
++#   elif defined(LINUX) && !defined(ARM32) && !defined(AVR32) && \
+                (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >=3))
+ #     define USE_COMPILER_TLS
+ #   elif (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
+Index: libgc-7.1.new/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/avr32.h
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ libgc-7.1.new/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/avr32.h 
2009-08-12 20:10:18.000000000 +0100
+@@ -0,0 +1,44 @@
++/*
++ * Copyright (C) 2009 Bradley Smith <b...@brad-smith.co.uk>
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the
++ * "Software"), to deal in the Software without restriction, including
++ * without limitation the rights to use, copy, modify, merge, publish,
++ * distribute, sublicense, and/or sell copies of the Software, and to
++ * permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included
++ * in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++ *
++ */
++
++#include "../all_atomic_load_store.h"
++
++#include "../ordered.h"  /* There are no multiprocessor implementations. */
++
++#include "../test_and_set_t_is_ao_t.h"
++
++AO_INLINE AO_TS_VAL_t
++AO_test_and_set(volatile AO_TS_t *addr) {
++      int ret;
++
++      __asm__ __volatile__(
++              "xchg %[old], %[mem], %[newv]"
++              : [old] "=&r"(ret)
++              : [mem] "r"(addr), [newv] "r"(1)
++              : "memory");
++
++      return ret;
++}
++
++#define AO_HAVE_test_and_set
+Index: libgc-7.1.new/libatomic_ops-1.2/src/atomic_ops.h
+===================================================================
+--- libgc-7.1.new.orig/libatomic_ops-1.2/src/atomic_ops.h      2009-08-12 
20:10:04.000000000 +0100
++++ libgc-7.1.new/libatomic_ops-1.2/src/atomic_ops.h   2009-08-12 
20:10:18.000000000 +0100
+@@ -229,6 +229,9 @@
+ # if defined(__cris__) || defined(CRIS)
+ #   include "atomic_ops/sysdeps/gcc/cris.h"
+ # endif
++# if defined(__avr32__)
++#   include "atomic_ops/sysdeps/gcc/avr32.h"
++# endif
+ #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
+ 
+ #if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS)
+Index: libgc-7.1.new/mach_dep.c
+===================================================================
+--- libgc-7.1.new.orig/mach_dep.c      2009-08-12 20:10:25.000000000 +0100
++++ libgc-7.1.new/mach_dep.c   2009-08-12 20:10:46.000000000 +0100
+@@ -175,7 +175,7 @@
+ #   if defined(HAVE_PUSH_REGS)
+       GC_push_regs();
+ #   elif defined(UNIX_LIKE) && !defined(DARWIN) && !defined(ARM32) && \
+-       !defined(HURD)
++       !defined(HURD) && !defined(AVR32)
+       /* Older versions of Darwin seem to lack getcontext(). */
+       /* ARM Linux often doesn't support a real getcontext(). */
+       ucontext_t ctxt;
diff -Naur libgc-7.1/debian/patches/series libgc-7.1.new/debian/patches/series
--- libgc-7.1/debian/patches/series     2009-08-12 18:50:52.000000000 +0100
+++ libgc-7.1.new/debian/patches/series 2009-08-12 20:10:12.000000000 +0100
@@ -1,2 +1,3 @@
 01-catch-all-linux.diff
 02-manpage.diff
+03-add-avr32-support.diff
diff -Naur libgc-7.1/debian/rules libgc-7.1.new/debian/rules
--- libgc-7.1/debian/rules      2009-08-12 18:50:52.000000000 +0100
+++ libgc-7.1.new/debian/rules  2009-08-12 20:10:12.000000000 +0100
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_BUILD_ARCH:=$(shell dpkg --print-architecture)
 
 ifeq ($(DEB_BUILD_ARCH),hurd-i386)
@@ -22,7 +24,9 @@
                --mandir=\$${prefix}/share/man \
                --sysconfdir=/etc \
                --localstatedir=/var/lib \
-               --datadir=\$${prefix}/share/doc
+               --datadir=\$${prefix}/share/doc \
+               --host=$(DEB_HOST_GNU_TYPE) \
+               --build=$(DEB_BUILD_GNU_TYPE)
 
 override_dh_install:
        install -D doc/gc.man debian/tmp/usr/share/man/man3/gc_malloc.3
@@ -30,7 +34,7 @@
 
 override_dh_auto_clean:
        dh_auto_clean
-       rm -rf autom4te.cache
+       rm -rf autom4te.cache libatomic_ops atomic_ops_sysdeps.S atomic_ops.c
 
 override_dh_installchangelogs:
        dh_installchangelogs doc/README.changes
--- dpkg-gensymbols_libgc1c2_avr32
+++ dpkg-gensymbolswo5ZiU   2009-08-12 19:23:45.000000000 +0000
@@ -255,6 +255,7 @@
  gc_is_visible_print_p...@base 1:7.1
  gc_java_finalizat...@base 1:7.1
  gc_jmp_...@base 1:7.1
+ gc_key_cre...@base 1:7.1-1
  gc_large_alloc_warn_inter...@base 1:7.1
  gc_large_alloc_warn_suppres...@base 1:7.1
  gc_lea...@base 1:7.1
@@ -332,11 +333,11 @@
  gc_obj_ki...@base 1:7.1
  gc_objects_are_mar...@base 1:7.1
  gc_objfreelist_...@base 1:7.1
- gc_old_bus_hand...@base 1:7.1
- gc_old_bus_handler_used...@base 1:7.1
+#MISSING: 1:7.1-1# gc_old_bus_hand...@base 1:7.1
+#MISSING: 1:7.1-1# gc_old_bus_handler_used...@base 1:7.1
  gc_old_normal...@base 1:7.1
- gc_old_segv_hand...@base 1:7.1
- gc_old_segv_handler_used...@base 1:7.1
+#MISSING: 1:7.1-1# gc_old_segv_hand...@base 1:7.1
+#MISSING: 1:7.1-1# gc_old_segv_handler_used...@base 1:7.1
  gc_old_stack...@base 1:7.1
  gc_on_st...@base 1:7.1
  gc_oom...@base 1:7.1
@@ -370,7 +371,7 @@
  gc_pri...@base 1:7.1
  gc_proje...@base 1:7.1
  gc_promote_black_li...@base 1:7.1
- gc_protect_h...@base 1:7.1
+#MISSING: 1:7.1-1# gc_protect_h...@base 1:7.1
  gc_pthread_cre...@base 1:7.1
  gc_pthread_det...@base 1:7.1
  gc_pthread_j...@base 1:7.1
@@ -433,6 +434,7 @@
  gc_remove_protect...@base 1:7.1
  gc_remove_ro...@base 1:7.1
  gc_remove_roots_in...@base 1:7.1
+ gc_remove_speci...@base 1:7.1-1
  gc_remove_tmp_ro...@base 1:7.1
  gc_repeat_r...@base 1:7.1
  gc_reset_fault_hand...@base 1:7.1
@@ -451,11 +453,13 @@
  gc_set_max_heap_s...@base 1:7.1
  gc_set_warn_p...@base 1:7.1
  gc_setpages...@base 1:7.1
+ gc_setspeci...@base 1:7.1-1
  gc_setup_temporary_fault_hand...@base 1:7.1
  gc_should_coll...@base 1:7.1
  gc_should_invoke_finaliz...@base 1:7.1
  gc_signal_mark_stack_overf...@base 1:7.1
  gc_s...@base 1:7.1
+ gc_slow_getspeci...@base 1:7.1-1
  gc_smas...@base 1:7.1
  gc_spin_co...@base 1:7.1
  gc_split_bl...@base 1:7.1
@@ -512,8 +516,8 @@
  gc_world_is_stop...@base 1:7.1
  gc_world_stop...@base 1:7.1
  gc_wr...@base 1:7.1
- gc_write_fault_hand...@base 1:7.1
- async_set_pht_entry_from_in...@base 1:7.1
+#MISSING: 1:7.1-1# gc_write_fault_hand...@base 1:7.1
+#MISSING: 1:7.1-1# async_set_pht_entry_from_in...@base 1:7.1
  free_list_index...@base 1:7.1
 libgccpp.so.1 libgc1c2 #MINVER#
  _zd...@base 1:7.1

Attachment: signature.asc
Description: PGP signature

Reply via email to