This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Which default CFLAGS should a HAL define?
- From: Manuel Borchers <manuel at matronix dot de>
- To: Ecos Discuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 29 Jun 2010 13:39:22 +0200
- Subject: [ECOS] Which default CFLAGS should a HAL define?
Hi all,
when trying to build a network stack (OpenBSD) into my kernel, I
struggled over a missing define.
When building I got:
-- SNIP --
In file included
from /home/manuel/Arbeit/netX-ACCOS/netx_accos/trunk/src/ecos/work/netx500_ram_standalone_eth/install/include/cyg/io/eth/eth_drv.h:62,
from /home/manuel/Arbeit/netX-ACCOS/netx_accos/trunk/src/ecos/ecos-cvs/packages/devs/eth/arm/netx/current/src/netx_eth.c:64:
/home/manuel/Arbeit/netX-ACCOS/netx_accos/trunk/src/ecos/work/netx500_ram_standalone_eth/install/include/sys/param.h:94:28: error: sys/simplelock.h: Datei oder Verzeichnis nicht gefunden
/home/manuel/Arbeit/netX-ACCOS/netx_accos/trunk/src/ecos/work/netx500_ram_standalone_eth/install/include/sys/param.h:106:27: error: sys/syslimits.h: Datei oder Verzeichnis nicht gefunden
/home/manuel/Arbeit/netX-ACCOS/netx_accos/trunk/src/ecos/work/netx500_ram_standalone_eth/install/include/sys/param.h:136:24: error: sys/signal.h: Datei oder Verzeichnis nicht gefunden
-- SNIP --
[The german error message means, that the file or dir couldn't be found)
After looking into the header file param.h I found out that these
includes were guarded by #ifndef __ECOS, which wasn't in my list of
global CFLAGS, but only in the build options for the BSD stack. I added
-D__ECOS in my ecc file and the build works now.
So, my question is, should this define (and which other defines, I'm
potentially missing?) be in the list of default CFLAGS defined by my
platform HAL?
Currently I'm defining just cpu-specific and optimization related
defines/options:
default_value { CYGBLD_GLOBAL_WARNFLAGS . CYGBLD_ARCH_CFLAGS .
"-mcpu=arm926ej-s -g -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
default_value { CYGBLD_ARCH_LDFLAGS . "-mcpu=arm926ej-s --no-target-default-spec -Wl,--gc-sections -Wl,-static -g -O0 -nostdlib" }
Cheers,
Manuel
--
Manuel Borchers
Web: http://www.matronix.de
eMail: manuel@matronix.de
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss