summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2011-12-18 19:51:33 +0000
committerdholland <dholland@pkgsrc.org>2011-12-18 19:51:33 +0000
commit6530769a463df25fac7b5286240e5ff6cca6b6c0 (patch)
tree10f657b86f899ffb43e304705e727c2c56bd9e66 /emulators
parent78769c7dacb88df0bd2c0296eb604e6ec6cdc213 (diff)
downloadpkgsrc-6530769a463df25fac7b5286240e5ff6cca6b6c0.tar.gz
Patch up gcc inline mess. Fixes build with gcc 4.5.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/simulavr/distinfo9
-rw-r--r--emulators/simulavr/patches/patch-src_avrcore_h227
-rw-r--r--emulators/simulavr/patches/patch-src_decoder_h15
-rw-r--r--emulators/simulavr/patches/patch-src_flash_h15
-rw-r--r--emulators/simulavr/patches/patch-src_register_h55
-rw-r--r--emulators/simulavr/patches/patch-src_storage_h24
-rw-r--r--emulators/simulavr/patches/patch-src_utils_h22
-rw-r--r--emulators/simulavr/patches/patch-src_vdevs_h15
8 files changed, 381 insertions, 1 deletions
diff --git a/emulators/simulavr/distinfo b/emulators/simulavr/distinfo
index e183b130e2b..1fb17610bcf 100644
--- a/emulators/simulavr/distinfo
+++ b/emulators/simulavr/distinfo
@@ -1,6 +1,13 @@
-$NetBSD: distinfo,v 1.4 2007/03/07 17:31:22 joerg Exp $
+$NetBSD: distinfo,v 1.5 2011/12/18 19:51:33 dholland Exp $
SHA1 (simulavr-0.1.2.1.tar.bz2) = 276580f05ae57523684f6a61528cd3170858a3a4
RMD160 (simulavr-0.1.2.1.tar.bz2) = 0728f35617629c382157f6657b2cf0f7418bd071
Size (simulavr-0.1.2.1.tar.bz2) = 359233 bytes
SHA1 (patch-aa) = 4989d86dd551eccaac1fab0769d53feea90cc1e7
+SHA1 (patch-src_avrcore_h) = 7b19e59a68f25bbf09a2ea3685782cea94a3b12c
+SHA1 (patch-src_decoder_h) = 2b3b4627c4184672fbd33ad01314e3584f61eeb1
+SHA1 (patch-src_flash_h) = f559b2c865789c031951fccfac46019dbcd101ff
+SHA1 (patch-src_register_h) = 163b631c75680a9415c7ec6f4e01ed4b0f8407d9
+SHA1 (patch-src_storage_h) = 8fe5d7342f3db9b136569a7d2a753ca37f1dfb24
+SHA1 (patch-src_utils_h) = e86bbaa8ccbdcec531a403324198c1c32d93af3b
+SHA1 (patch-src_vdevs_h) = 682d13eeacb4355a6bf63392be187a61a52cdf02
diff --git a/emulators/simulavr/patches/patch-src_avrcore_h b/emulators/simulavr/patches/patch-src_avrcore_h
new file mode 100644
index 00000000000..1b3d88e7bb0
--- /dev/null
+++ b/emulators/simulavr/patches/patch-src_avrcore_h
@@ -0,0 +1,227 @@
+$NetBSD: patch-src_avrcore_h,v 1.1 2011/12/18 19:51:33 dholland Exp $
+
+ - Patch up gcc inline mess.
+
+--- src/avrcore.h.orig 2003-12-01 07:35:52.000000000 +0000
++++ src/avrcore.h
+@@ -127,20 +129,20 @@ extern void avr_core_get_sizes (AvrCore
+
+ /* Attach a Virtual Device to the core */
+
+-extern inline void
++static inline void
+ avr_core_attach_vdev (AvrCore *core, VDevice *dev)
+ {
+ vdev_set_core (dev, (AvrClass *)core);
+ mem_attach (core->mem, dev);
+ }
+
+-extern inline VDevice *
++static inline VDevice *
+ avr_core_get_vdev_by_name (AvrCore *core, char *name)
+ {
+ return mem_get_vdevice_by_name (core->mem, name);
+ }
+
+-extern inline VDevice *
++static inline VDevice *
+ avr_core_get_vdev_by_addr (AvrCore *core, int addr)
+ {
+ return mem_get_vdevice_by_addr (core->mem, addr);
+@@ -148,13 +150,13 @@ avr_core_get_vdev_by_addr (AvrCore *core
+
+ /* State Access Methods */
+
+-extern inline int
++static inline int
+ avr_core_get_state (AvrCore *core)
+ {
+ return core->state;
+ }
+
+-extern inline void
++static inline void
+ avr_core_set_state (AvrCore *core, StateType state)
+ {
+ core->state = state;
+@@ -162,14 +164,14 @@ avr_core_set_state (AvrCore *core, State
+
+ /* Sleep Mode Access Methods */
+
+-extern inline void
++static inline void
+ avr_core_set_sleep_mode (AvrCore *core, int sleep_mode)
+ {
+ core->state = STATE_SLEEP;
+ core->sleep_mode = ((unsigned int)1 << sleep_mode);
+ }
+
+-extern inline int
++static inline int
+ avr_core_get_sleep_mode (AvrCore *core)
+ {
+ return core->sleep_mode;
+@@ -229,13 +231,13 @@ avr_core_sreg_set (AvrCore *core, uint8_
+ sreg_set (core->sreg, v);
+ }
+
+-extern inline int
++static inline int
+ avr_core_sreg_get_bit (AvrCore *core, int b)
+ {
+ return sreg_get_bit (core->sreg, b);
+ }
+
+-extern inline void
++static inline void
+ avr_core_sreg_set_bit (AvrCore *core, int b, int v)
+ {
+ sreg_set_bit (core->sreg, b, v);
+@@ -243,13 +245,13 @@ avr_core_sreg_set_bit (AvrCore *core, in
+
+ /* RAMPZ Access Methods */
+
+-extern inline uint8_t
++static inline uint8_t
+ avr_core_rampz_get (AvrCore *core)
+ {
+ return rampz_get (core->rampz);
+ }
+
+-extern inline void
++static inline void
+ avr_core_rampz_set (AvrCore *core, uint8_t v)
+ {
+ rampz_set (core->rampz, v);
+@@ -273,13 +275,13 @@ avr_core_gpwr_set (AvrCore *core, int re
+
+ extern void avr_core_io_display_names (AvrCore *core);
+
+-extern inline uint8_t
++static inline uint8_t
+ avr_core_io_read (AvrCore *core, int reg)
+ {
+ return avr_core_mem_read (core, reg + IO_REG_ADDR_BEGIN);
+ }
+
+-extern inline void
++static inline void
+ avr_core_io_write (AvrCore *core, int reg, uint8_t val)
+ {
+ avr_core_mem_write (core, reg + IO_REG_ADDR_BEGIN, val);
+@@ -294,13 +296,13 @@ avr_core_io_fetch (AvrCore *core, int re
+
+ /* Stack Access Methods */
+
+-extern inline uint32_t
++static inline uint32_t
+ avr_core_stack_pop (AvrCore *core, int bytes)
+ {
+ return stack_pop (core->stack, bytes);
+ }
+
+-extern inline void
++static inline void
+ avr_core_stack_push (AvrCore *core, int bytes, uint32_t val)
+ {
+ stack_push (core->stack, bytes, val);
+@@ -314,7 +316,7 @@ avr_core_stack_push (AvrCore *core, int
+ values which go past zero. These should be interpreted as wrapping back
+ around the last address in the flash. */
+
+-extern inline void
++static inline void
+ _adjust_PC_to_max (AvrCore *core)
+ {
+ if (core->PC < 0)
+@@ -326,7 +328,7 @@ _adjust_PC_to_max (AvrCore *core)
+
+ /* Program Counter Access Methods */
+
+-extern inline int32_t
++static inline int32_t
+ avr_core_PC_size (AvrCore *core)
+ {
+ return core->PC_size;
+@@ -352,7 +354,7 @@ avr_core_PC_set (AvrCore *core, int32_t
+ display_pc (core->PC);
+ }
+
+-extern inline void
++static inline void
+ avr_core_PC_incr (AvrCore *core, int val)
+ {
+ core->PC += val;
+@@ -365,7 +367,7 @@ avr_core_PC_incr (AvrCore *core, int val
+ extern void avr_core_irq_raise (AvrCore *core, int irq);
+ extern void avr_core_irq_clear (AvrCore *core, IntVect *irq);
+
+-extern inline void
++static inline void
+ avr_core_irq_clear_all (AvrCore *core)
+ {
+ dlist_delete_all (core->irq_pending);
+@@ -388,13 +390,13 @@ extern void avr_core_reset (AvrCore *cor
+
+ /* Methods for accessing CK and inst_CKS */
+
+-extern inline uint64_t
++static inline uint64_t
+ avr_core_CK_get (AvrCore *core)
+ {
+ return core->CK;
+ }
+
+-extern inline void
++static inline void
+ avr_core_CK_incr (AvrCore *core)
+ {
+ core->CK++;
+@@ -403,13 +405,13 @@ avr_core_CK_incr (AvrCore *core)
+ display_clock (core->CK);
+ }
+
+-extern inline int
++static inline int
+ avr_core_inst_CKS_get (AvrCore *core)
+ {
+ return core->inst_CKS;
+ }
+
+-extern inline void
++static inline void
+ avr_core_inst_CKS_set (AvrCore *core, int val)
+ {
+ core->inst_CKS = val;
+@@ -417,13 +419,13 @@ avr_core_inst_CKS_set (AvrCore *core, in
+
+ /* Methods for handling clock callbacks */
+
+-extern inline void
++static inline void
+ avr_core_clk_cb_add (AvrCore *core, CallBack *cb)
+ {
+ core->clk_cb = callback_list_add (core->clk_cb, cb);
+ }
+
+-extern inline void
++static inline void
+ avr_core_clk_cb_exec (AvrCore *core)
+ {
+ core->clk_cb =
+@@ -432,13 +434,13 @@ avr_core_clk_cb_exec (AvrCore *core)
+
+ /* Methods for handling asynchronous callbacks */
+
+-extern inline void
++static inline void
+ avr_core_async_cb_add (AvrCore *core, CallBack *cb)
+ {
+ core->async_cb = callback_list_add (core->async_cb, cb);
+ }
+
+-extern inline void
++static inline void
+ avr_core_async_cb_exec (AvrCore *core)
+ {
+ core->async_cb =
diff --git a/emulators/simulavr/patches/patch-src_decoder_h b/emulators/simulavr/patches/patch-src_decoder_h
new file mode 100644
index 00000000000..1fdfa00e495
--- /dev/null
+++ b/emulators/simulavr/patches/patch-src_decoder_h
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_decoder_h,v 1.1 2011/12/18 19:51:33 dholland Exp $
+
+ - Patch up gcc inline mess.
+
+--- src/decoder.h.orig 2003-12-02 08:25:00.000000000 +0000
++++ src/decoder.h
+@@ -48,7 +50,7 @@ extern void decode_init_lookup_table (vo
+ extern int avr_op_UNKNOWN (AvrCore *core, uint16_t opcode, unsigned int arg1,
+ unsigned int arg2);
+
+-extern inline struct opcode_info *
++static inline struct opcode_info *
+ decode_opcode (uint16_t opcode)
+ {
+ struct opcode_info *opi;
diff --git a/emulators/simulavr/patches/patch-src_flash_h b/emulators/simulavr/patches/patch-src_flash_h
new file mode 100644
index 00000000000..28cf2a00bc3
--- /dev/null
+++ b/emulators/simulavr/patches/patch-src_flash_h
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_flash_h,v 1.1 2011/12/18 19:51:33 dholland Exp $
+
+ - Patch up gcc inline mess.
+
+--- src/flash.h.orig 2003-12-02 08:25:00.000000000 +0000
++++ src/flash.h
+@@ -46,7 +48,7 @@ extern void flash_destroy (void *flash);
+ extern int flash_get_size (Flash *flash);
+ extern void flash_dump_core (Flash *flash, FILE * f_core);
+
+-extern inline uint16_t
++static inline uint16_t
+ flash_read (Flash *flash, int addr)
+ {
+ return storage_readw ((Storage *)flash, addr * 2);
diff --git a/emulators/simulavr/patches/patch-src_register_h b/emulators/simulavr/patches/patch-src_register_h
new file mode 100644
index 00000000000..7b39a4905a2
--- /dev/null
+++ b/emulators/simulavr/patches/patch-src_register_h
@@ -0,0 +1,55 @@
+$NetBSD: patch-src_register_h,v 1.1 2011/12/18 19:51:33 dholland Exp $
+
+ - Patch up gcc inline mess.
+
+--- src/register.h.orig 2003-12-01 07:35:53.000000000 +0000
++++ src/register.h
+@@ -83,26 +84,26 @@ extern SREG *sreg_new (void);
+ extern void sreg_construct (SREG *sreg);
+ extern void sreg_destroy (void *sreg);
+
+-extern inline uint8_t
++static inline uint8_t
+ sreg_get (SREG *sreg)
+ {
+ return sreg->sreg.reg;
+ }
+
+-extern inline void
++static inline void
+ sreg_set (SREG *sreg, uint8_t val)
+ {
+ sreg->sreg.reg = val;
+ display_io_reg (SREG_IO_REG, sreg->sreg.reg);
+ }
+
+-extern inline uint8_t
++static inline uint8_t
+ sreg_get_bit (SREG *sreg, int bit)
+ {
+ return !!(sreg->sreg.reg & (1 << bit));
+ }
+
+-extern inline void
++static inline void
+ sreg_set_bit (SREG *sreg, int bit, int val)
+ {
+ sreg->sreg.reg = set_bit_in_byte (sreg->sreg.reg, bit, val);
+@@ -133,7 +134,7 @@ extern GPWR *gpwr_new (void);
+ extern void gpwr_construct (GPWR *gpwr);
+ extern void gpwr_destroy (void *gpwr);
+
+-extern inline uint8_t
++static inline uint8_t
+ gpwr_get (GPWR *gpwr, int reg)
+ {
+ #if defined(CHECK_REGISTER_BOUNDS)
+@@ -144,7 +145,7 @@ gpwr_get (GPWR *gpwr, int reg)
+ return gpwr->reg[reg];
+ }
+
+-extern inline void
++static inline void
+ gpwr_set (GPWR *gpwr, int reg, uint8_t val)
+ {
+ #if defined(CHECK_REGISTER_BOUNDS)
diff --git a/emulators/simulavr/patches/patch-src_storage_h b/emulators/simulavr/patches/patch-src_storage_h
new file mode 100644
index 00000000000..3da717e7142
--- /dev/null
+++ b/emulators/simulavr/patches/patch-src_storage_h
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_storage_h,v 1.1 2011/12/18 19:51:33 dholland Exp $
+
+ - Patch up gcc inline mess.
+
+--- src/storage.h~ 2003-12-02 08:25:00.000000000 +0000
++++ src/storage.h
+@@ -46,7 +48,7 @@ extern Storage *storage_new (int base, i
+ extern void storage_construct (Storage *stor, int base, int size);
+ extern void storage_destroy (void *stor);
+
+-extern inline uint8_t
++static inline uint8_t
+ storage_readb (Storage *stor, int addr)
+ {
+ int _addr = addr - stor->base;
+@@ -60,7 +62,7 @@ storage_readb (Storage *stor, int addr)
+ return stor->data[_addr];
+ }
+
+-extern inline uint16_t
++static inline uint16_t
+ storage_readw (Storage *stor, int addr)
+ {
+ int _addr = addr - stor->base;
diff --git a/emulators/simulavr/patches/patch-src_utils_h b/emulators/simulavr/patches/patch-src_utils_h
new file mode 100644
index 00000000000..df3d21f0895
--- /dev/null
+++ b/emulators/simulavr/patches/patch-src_utils_h
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_utils_h,v 1.1 2011/12/18 19:51:33 dholland Exp $
+
+ - Patch up gcc inline mess.
+
+--- src/utils.h~ 2003-12-01 07:35:54.000000000 +0000
++++ src/utils.h
+@@ -47,13 +49,13 @@ extern int str2ffmt (char *str);
+ *
+ \****************************************************************************/
+
+-extern inline uint8_t
++static inline uint8_t
+ set_bit_in_byte (uint8_t src, int bit, int val)
+ {
+ return ((src & ~(1 << bit)) | ((val != 0) << bit));
+ }
+
+-extern inline uint16_t
++static inline uint16_t
+ set_bit_in_word (uint16_t src, int bit, int val)
+ {
+ return ((src & ~(1 << bit)) | ((val != 0) << bit));
diff --git a/emulators/simulavr/patches/patch-src_vdevs_h b/emulators/simulavr/patches/patch-src_vdevs_h
new file mode 100644
index 00000000000..4699f37f051
--- /dev/null
+++ b/emulators/simulavr/patches/patch-src_vdevs_h
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_vdevs_h,v 1.1 2011/12/18 19:51:33 dholland Exp $
+
+ - Patch up gcc inline mess.
+
+--- src/vdevs.h~ 2003-12-02 08:25:00.000000000 +0000
++++ src/vdevs.h
+@@ -72,7 +74,7 @@ extern char *vdev_get_reg_name (VDevice
+
+ extern void vdev_set_core (VDevice *dev, AvrClass *core);
+
+-extern inline AvrClass *vdev_get_core (VDevice *dev)
++static inline AvrClass *vdev_get_core (VDevice *dev)
+ {
+ return dev->core;
+ }