Project import
diff --git a/newlib-1.20.0/Makefile b/newlib-1.20.0/Makefile
new file mode 100644
index 0000000..85a0a13
--- /dev/null
+++ b/newlib-1.20.0/Makefile
@@ -0,0 +1,120 @@
+#
+#    Copyright (c) 2010-2011 Nest, Inc.
+#    All rights reserved.
+#
+#    This document is the property of Nest. It is considered
+#    confidential and proprietary information.
+#
+#    This document may not be reproduced or transmitted in any form,
+#    in whole or in part, without the express written permission of
+#    Nest.
+#
+#    Description:
+#
+
+include pre.mak
+
+PackageName		:= newlib
+
+PackageExtension	:= tar.gz
+PackageSeparator	:= -
+
+PackagePatchArgs 	:= -p1
+
+PackageVersion          := 1.20.0
+PackageArchive		:= $(PackageName)$(PackageSeparator)$(PackageVersion).$(PackageExtension)
+PackageSourceDir	:= $(PackageName)$(PackageSeparator)$(PackageVersion)
+
+PackageBuildMakefile	= $(call GenerateBuildPaths,Makefile)
+
+CleanPaths		+= $(PackageLicenseFile)
+
+all: $(PackageDefaultGoal)
+
+# Generate the package license contents.
+
+#$(PackageLicenseFile): $(PackageSourceDir)/COPYRIGHT
+#	$(copy-result)
+
+# Extract the source from the archive and apply patches, if any.
+
+$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths)
+	$(expand-and-patch-package)
+
+# Prepare the sources.
+
+.PHONY: source
+source: | ${PackageSourceDir}
+
+# Patch the sources, if necessary.
+
+.PHONY: patch
+patch: source
+
+# Configure the source for building.
+
+$(PackageBuildMakefile): | ${PackageSourceDir} ${BuildDirectory}
+	cd $(BuildDirectory) && \
+	$(CURDIR)/$(PackageSourceDir)/configure \
+		--target=arm-none-eabi \
+		--prefix=/usr \
+		--enable-interwork \
+		--disable-newlib-supplied-syscalls \
+		--disable-newlib-io-float \
+		--with-gnu-ld \
+		--with-gnu-as \
+		--disable-shared \
+		--disable-newlib-atexit-dynamic-alloc
+
+
+
+.PHONY: configure
+configure: source ${PackageBuildMakefile}
+
+# Build the source.
+#
+
+.PHONY: build
+build: configure | $(BuildDirectory)
+	$(Verbose)unset MAKEFLAGS \
+		&& $(MAKE) -C $(BuildDirectory) \
+			CC_FOR_TARGET=${CC} \
+			CXX_FOR_TARGET=${CXX} \
+			AS_FOR_TARGET=${AS} \
+			AR_FOR_TARGET=${AR} \
+			LD_FOR_TARGET=${LD} \
+			NM_FOR_TARGET=${NM} \
+			OBJDUMP_FOR_TARGET=${OBJDUMP} \
+			RANLIB_FOR_TARGET=${RANLIB} \
+			READELF_FOR_TARGET=${READELF} \
+			STRIP_FOR_TARGET=${STRIP} \
+			CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -DPREFER_SIZE_OVER_SPEED -D__OPTIMIZE_SIZE__ -Os -fomit-frame-pointer -mcpu=cortex-m3 -mthumb -D__thumb2__ -D__BUFSIZ__=256 -DMALLOC_LOCK_FUNCTION=__nl_malloc_lock -DMALLOC_UNLOCK_FUNCTION=__nl_malloc_unlock" \
+			CCASFLAGS="-mcpu=cortex-m3 -mthumb -D__thumb2__"
+
+# Stage the build to a temporary installation area.
+#
+
+.PHONY: stage
+stage: build | $(ResultDirectory)
+	$(Verbose)unset MAKEFLAGS && \
+	$(MAKE) -C $(BuildDirectory) \
+		CC_FOR_TARGET=${CC} \
+		CXX_FOR_TARGET=${CXX} \
+		AS_FOR_TARGET=${AS} \
+		AR_FOR_TARGET=${AR} \
+		LD_FOR_TARGET=${LD} \
+		NM_FOR_TARGET=${NM} \
+		OBJDUMP_FOR_TARGET=${OBJDUMP} \
+		RANLIB_FOR_TARGET=${RANLIB} \
+		READELF_FOR_TARGET=${READELF} \
+		STRIP_FOR_TARGET=${STRIP} \
+		DESTDIR=$(ResultDirectory) \
+		install
+
+
+clean:
+	$(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
+
+include post.mak
diff --git a/newlib-1.20.0/newlib.patches.tar.gz b/newlib-1.20.0/newlib.patches.tar.gz
new file mode 100644
index 0000000..c818980
--- /dev/null
+++ b/newlib-1.20.0/newlib.patches.tar.gz
Binary files differ
diff --git a/newlib-1.20.0/newlib.url b/newlib-1.20.0/newlib.url
new file mode 100644
index 0000000..858e60d
--- /dev/null
+++ b/newlib-1.20.0/newlib.url
@@ -0,0 +1 @@
+ftp://sourceware.org/pub/newlib/newlib-1.20.0.tar.gz
diff --git a/newlib-1.20.0/newlib.version b/newlib-1.20.0/newlib.version
new file mode 100644
index 0000000..3989355
--- /dev/null
+++ b/newlib-1.20.0/newlib.version
@@ -0,0 +1 @@
+1.20.0