The userlibs are build with w/o '-nostdinc'. Consequently, the standard
search paths of the tool chain are used. Because the user land is
normally build with the Codesourcery tool chain
'arm-none-linux-gnueabi', the complete glibc headers (that come with the
tool chain) end up in the default search path. Coincidentally, the
userlibs SConstruct file misses to supply the Codezero libc headers,
which goes undetected because headers such as 'stdio.h' are silently
taken from the tool chain's libc. This patch supplies Codezero's libc
include-search path for building the userlibs. This enables the userlibs
to be built with tool chains that do not come with a complete libc.

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
diff --git a/conts/userlibs/SConstruct b/conts/userlibs/SConstruct
index 41c7913..421b563 100644
--- a/conts/userlibs/SConstruct
+++ b/conts/userlibs/SConstruct
@@ -11,6 +11,7 @@ PROJRELROOT = '../..'
 sys.path.append(PROJRELROOT)
 
 from scripts.config.config_invoke import *
+from scripts.config.projpaths import *
 
 config = configuration_retrieve()
 gcc_arch_flag = config.gcc_arch_flag
@@ -28,7 +29,7 @@ env = Environment(CC = config.toolchain_userspace + 'gcc',
                   ASFLAGS = ['-D__ASSEMBLY__', '-march=' + gcc_arch_flag],
                   ENV = {'PATH' : os.environ['PATH']},
                   LIBS = 'gcc',	# libgcc.a - Required for division routines.
-                  CPPPATH = KERNEL_HEADERS,
+                  CPPPATH = [KERNEL_HEADERS, LIBC_INCLUDE],
                   CPPFLAGS = '-include l4/config.h -include l4/macros.h -include l4/types.h')
 
 # Set the build directory for this source tree
_______________________________________________
codezero-devel mailing list
codezero-devel@lists.l4dev.org
http://lists.l4dev.org/mailman/listinfo/codezero-devel_lists.l4dev.org

Reply via email to