Permalink
Browse files

Reorganized the platform support code on DRY principles.

  • Loading branch information...
bendiken committed Nov 19, 2014
1 parent fa0d11e commit e0de343a88226ac4113ec7089b104bb654856d6c
View
@@ -140,8 +140,8 @@ Configuring for Bare Metal
The special *none* target operating system builds the library with a
system-call interface where all system operations are simply no-op stubs.
-See the ``sys/syscall.h`` header file and the ``sys/none/`` directory for
-the syscall stubs that a bare-metal user of libc11 must implement.
+See the ``sys/syscall.h`` header file and the ``sys/posix/none/`` directory
+for the syscall stubs that a bare-metal user of libc11 must implement.
The following example shows how one might configure a cross-compilation
build on an x86-64 Linux system, targeting an x86-64 bare-metal system::
@@ -151,7 +151,7 @@ build on an x86-64 Linux system, targeting an x86-64 bare-metal system::
Provided your linker supports `weak symbols`_, you can configure the libc11
build as per the aforementioned example, and then when linking libc11 into
your kernel provide your own syscall implementations as strong symbols that
-override the default no-op stubs from ``sys/none/``.
+override the default no-op stubs from ``sys/posix/none/``.
.. _weak symbols: http://en.wikipedia.org/wiki/Weak_symbol
View
@@ -193,7 +193,7 @@ TEST_CFLAGS="$AM_CFLAGS"
AM_LDFLAGS="$AM_LDFLAGS"
TEST_LDFLAGS="$AM_LDFLAGS"
TEST_LDFLAGS="$TEST_LDFLAGS -L\$(top_srcdir)/src -static"
-TEST_LDFLAGS="$TEST_LDFLAGS -XCClinker \$(top_srcdir)/sys/\$(HOST_OS)/\$(HOST_CPU)/crt0.o"
+TEST_LDFLAGS="$TEST_LDFLAGS -XCClinker \$(top_srcdir)/sys/\$(HOST_TYPE)/\$(HOST_OS)/\$(HOST_CPU)/crt0.o"
dnl Check for library functions:
AB_CHECK_BUILTIN([__builtin_memchr])
@@ -235,15 +235,17 @@ AC_CONFIG_FILES([
src/uchar/Makefile
src/unistd/Makefile
sys/Makefile
- sys/bsd/Makefile
- sys/bsd/x86_64/Makefile
- sys/darwin/Makefile
- sys/darwin/x86_64/Makefile
- sys/linux/Makefile
- sys/linux/arm/Makefile
- sys/linux/x86/Makefile
- sys/linux/x86_64/Makefile
- sys/none/Makefile
+ sys/posix/Makefile
+ sys/posix/bsd/Makefile
+ sys/posix/bsd/x86_64/Makefile
+ sys/posix/darwin/Makefile
+ sys/posix/darwin/x86_64/Makefile
+ sys/posix/linux/Makefile
+ sys/posix/linux/arm/Makefile
+ sys/posix/linux/x86/Makefile
+ sys/posix/linux/x86_64/Makefile
+ sys/posix/none/Makefile
+ sys/windows/Makefile
test/Makefile
test/include/Makefile
test/assert/Makefile
View
@@ -1,7 +1,8 @@
lib_LTLIBRARIES = libc.la
libc_la_SOURCES =
-libc_la_LIBADD = $(top_srcdir)/sys/$(HOST_OS)/$(HOST_CPU)/libcsys.la
+libc_la_LIBADD = \
+ $(top_srcdir)/sys/$(HOST_TYPE)/$(HOST_OS)/$(HOST_CPU)/libcsys.la
SUBDIRS = include
View
@@ -1,2 +1,2 @@
-SUBDIRS = $(HOST_OS)
-DIST_SUBDIRS = bsd darwin linux none
+SUBDIRS = $(HOST_TYPE)
+DIST_SUBDIRS = posix windows
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
No changes.

0 comments on commit e0de343

Please sign in to comment.