This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: [ECOS] Compile error in if_i82559.c
- From: Andrew Lunn <andrew at lunn dot ch>
- To: David Brennan <ecos at brennanhome dot com>
- Cc: eCos Patches <ecos-patches at ecos dot sourceware dot org>
- Date: Sat, 15 Sep 2007 16:00:21 +0200
- Subject: Re: [ECOS] Compile error in if_i82559.c
- References: <888069a80709122230s7248dadbhbc0019543915482e@mail.gmail.com>
On Wed, Sep 12, 2007 at 10:30:03PM -0700, David Brennan wrote:
> I am just returning to eCos after a prolonged absence. I got the
> latest CVS version and tried to compile for a basic pc with network
> functions. However the if_i82559.c module will not compile with
> default template.
>
> ubuntu@ubuntu:/opt/ecos/pc-base$ rm -rf *
> ubuntu@ubuntu:/opt/ecos/pc-base$ ecosconfig new pc net
> U CYGBLD_ISO_STRUCTTIMEVAL_HEADER, new inferred value <cyg/posix/sys/time.h>
> U CYGBLD_ISO_FNMATCH_HEADER, new inferred value <cyg/fileio/fnmatch.h>
> ubuntu@ubuntu:/opt/ecos/pc-base$ ecosconfig tree
> ubuntu@ubuntu:/opt/ecos/pc-base$ make -s
> headers finished
> /opt/ecos/ecos/packages/devs/eth/intel/i82559/current/src/if_i82559.c:
> In function `pci_init_find_82559s':
> /opt/ecos/ecos/packages/devs/eth/intel/i82559/current/src/if_i82559.c:2992:
> `eth_dsr' undeclared (first use in this function)
> /opt/ecos/ecos/packages/devs/eth/intel/i82559/current/src/if_i82559.c:2992:
> (Each undeclared identifier is reported only once
> /opt/ecos/ecos/packages/devs/eth/intel/i82559/current/src/if_i82559.c:2992:
> for each function it appears in.)
> make[1]: *** [src/if_i82559.o.d] Error 1
> make: *** [build] Error 2
lunn@londo:~/eCos/work$ rm -fr *
lunn@londo:~/eCos/work$ ecosconfig new pc net
U CYGBLD_ISO_STRUCTTIMEVAL_HEADER, new inferred value <cyg/posix/sys/time.h>
U CYGBLD_ISO_FNMATCH_HEADER, new inferred value <cyg/fileio/fnmatch.h>
lunn@londo:~/eCos/work$ ecosconfig tree
lunn@londo:~/eCos/work$ make -s
headers finished
build finished
Hummmm?
[Scratches head]
lunn@londo:~/eCos$ cd anoncvs-clean/packages/devs/eth/
lunn@londo:~/eCos/anoncvs-clean/packages/devs/eth$ cvs -n up
M intel/i82559/current/ChangeLog
M intel/i82559/current/src/if_i82559.c
Duh!
[Hangs head in same]
lunn@londo:~/eCos/anoncvs-clean/packages/devs/eth$ cvs -n up
M intel/i82559/current/ChangeLog
M intel/i82559/current/src/if_i82559.c
lunn@londo:~/eCos/anoncvs-clean/packages/devs/eth$
lunn@londo:~/eCos/anoncvs-clean/packages/devs/eth$ cvs diff
Index: intel/i82559/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/intel/i82559/current/ChangeLog,v
retrieving revision 1.27
diff -u -r1.27 ChangeLog
--- intel/i82559/current/ChangeLog 23 Nov 2006 17:20:09 -0000 1.27
+++ intel/i82559/current/ChangeLog 15 Sep 2007 13:55:30 -0000
@@ -1,3 +1,8 @@
+2007-06-12 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/if_i82559.c (eth_dsr): Fixed the previous change which broken
+ linkage under some conditions.
+
2006-11-23 David Fernandez <dfernandez@cct.co.uk>
* src/if_i82559.c Modifications to remove compile warnings.
Index: intel/i82559/current/src/if_i82559.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/intel/i82559/current/src/if_i82559.c,v
retrieving revision 1.29
diff -u -r1.29 if_i82559.c
--- intel/i82559/current/src/if_i82559.c 23 Nov 2006 17:20:09 -0000 1.29
+++ intel/i82559/current/src/if_i82559.c 15 Sep 2007 13:55:32 -0000
@@ -907,9 +907,9 @@
static void InitTxRing(struct i82559* p_i82559);
static void ResetTxRing(struct i82559* p_i82559);
-#if defined(CYGHWR_DEVS_ETH_INTEL_I82559_MISSED_INTERRUPT) \
-|| (defined(CYGNUM_DEVS_ETH_INTEL_I82559_SEPARATE_MUX_INTERRUPT) && \
- !defined(CYGPKG_IO_ETH_DRIVERS_STAND_ALONE) )
+#if defined(CYGHWR_DEVS_ETH_INTEL_I82559_MISSED_INTERRUPT) || \
+ defined(CYGNUM_DEVS_ETH_INTEL_I82559_SEPARATE_MUX_INTERRUPT) || \
+ !defined(CYGPKG_IO_ETH_DRIVERS_STAND_ALONE)
static void
eth_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data);
#endif
@@ -2713,10 +2713,9 @@
// ------------------------------------------------------------------------
-#if defined(CYGHWR_DEVS_ETH_INTEL_I82559_MISSED_INTERRUPT) \
-|| (defined(CYGNUM_DEVS_ETH_INTEL_I82559_SEPARATE_MUX_INTERRUPT) && \
- !defined(CYGPKG_IO_ETH_DRIVERS_STAND_ALONE) )
-
+#if defined(CYGHWR_DEVS_ETH_INTEL_I82559_MISSED_INTERRUPT) || \
+ defined(CYGNUM_DEVS_ETH_INTEL_I82559_SEPARATE_MUX_INTERRUPT) || \
+ !defined(CYGPKG_IO_ETH_DRIVERS_STAND_ALONE)
static void
eth_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
{
lunn@londo:~/eCos/anoncvs-clean/packages/devs/eth$ cvs commit
Checking in intel/i82559/current/ChangeLog;
/cvs/ecos/ecos/packages/devs/eth/intel/i82559/current/ChangeLog,v <-- ChangeLog
new revision: 1.28; previous revision: 1.27
done
Checking in intel/i82559/current/src/if_i82559.c;
/cvs/ecos/ecos/packages/devs/eth/intel/i82559/current/src/if_i82559.c,v <-- if_i82559.c
new revision: 1.30; previous revision: 1.29
done
Err, bit late now but...
lunn@londo:~/eCos/work$ ecosconfig new pc redboot
U CYGSEM_HAL_USE_ROM_MONITOR, new inferred value 0
U CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK, new inferred value 0
lunn@londo:~/eCos/work$ ecosconfig tree
lunn@londo:~/eCos/work$ make -s
headers finished
/home/lunn/eCos/anoncvs-clean/packages/hal/i386/arch/current/src/redboot_linux_exec.c: In function `do_exec':
/home/lunn/eCos/anoncvs-clean/packages/hal/i386/arch/current/src/redboot_linux_exec.c:261: warning: implicit declaration of function `cyg_hal_plf_screen_position'
/home/lunn/eCos/anoncvs-clean/packages/hal/common/current/src/hal_stub.c: In function `handle_exception_cleanup':
/home/lunn/eCos/anoncvs-clean/packages/hal/common/current/src/hal_stub.c:457: warning: comparison between pointer and integer
build finished
Phew!
Andrew