From 8645420963417ffc64d2e88f64935249e0db225c Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 21 Aug 2017 05:51:07 +0200 Subject: add basic support for frosted operating system https://github.com/insane-adding-machines/frosted Rework our architecture selection and os dependent logic a little bit to be cleaner. As only arm is supported, we only modify arm systems to comply with new changeset. --- toolchain/newlib/Makefile | 16 +++++++++++++--- toolchain/newlib/Makefile.inc | 7 +++++++ toolchain/newlib/patches/git/fix-tooldir.patch | 12 ++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 toolchain/newlib/patches/git/fix-tooldir.patch (limited to 'toolchain') diff --git a/toolchain/newlib/Makefile b/toolchain/newlib/Makefile index affbe239a..d2b3a5758 100644 --- a/toolchain/newlib/Makefile +++ b/toolchain/newlib/Makefile @@ -6,6 +6,18 @@ include ../rules.mk include Makefile.inc include ${ADK_TOPDIR}/mk/buildhlp.mk +NEWLIB_CONFIGURE_ARGS:= --enable-newlib-io-long-long \ + --enable-newlib-register-fini \ + --disable-newlib-supplied-syscalls + +ifeq ($(ADK_TARGET_OS_FROSTED),y) +NEWLIB_CONFIGURE_ARGS+= --enable-newlib-fvwrite-in-streamio=no \ + --enable-newlib-fseek-optimization=no \ + --enable-newlib_wide_orient=no \ + --enable-newlib-unbuf-stream-opt=yes +endif + + $(WRKBUILD)/.configured: (cd $(WRKBUILD); \ CC='' \ @@ -13,10 +25,8 @@ $(WRKBUILD)/.configured: LDFLAGS='' \ ./configure --prefix=/usr \ --target=$(GNU_TARGET_NAME) \ - --enable-newlib-io-long-long \ - --enable-newlib-register-fini \ - --disable-newlib-supplied-syscalls \ --disable-nls \ + $(NEWLIB_CONFIGURE_ARGS) \ ) touch $@ diff --git a/toolchain/newlib/Makefile.inc b/toolchain/newlib/Makefile.inc index c006f553b..3fe740835 100644 --- a/toolchain/newlib/Makefile.inc +++ b/toolchain/newlib/Makefile.inc @@ -22,3 +22,10 @@ PKG_RELEASE:= 1 PKG_SITES:= https://github.com/riscv/riscv-newlib.git DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz endif +ifeq ($(ADK_TARGET_LIB_NEWLIB_FROSTED),y) +PKG_VERSION:= git +PKG_RELEASE:= 1 +PKG_GIT_SUBMODULE:= 1 +PKG_SITES:= https://github.com/insane-adding-machines/newlib.git +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz +endif diff --git a/toolchain/newlib/patches/git/fix-tooldir.patch b/toolchain/newlib/patches/git/fix-tooldir.patch new file mode 100644 index 000000000..652f7494b --- /dev/null +++ b/toolchain/newlib/patches/git/fix-tooldir.patch @@ -0,0 +1,12 @@ +diff -Nur newlib-2.2.0-1.orig/configure newlib-2.2.0-1/configure +--- newlib-2.2.0-1.orig/configure 2014-07-05 23:09:07.000000000 +0200 ++++ newlib-2.2.0-1/configure 2015-11-25 06:33:11.461178398 +0100 +@@ -6985,7 +6985,7 @@ + + # Some systems (e.g., one of the i386-aix systems the gas testers are + # using) don't handle "\$" correctly, so don't use it here. +-tooldir='${exec_prefix}'/${target_noncanonical} ++tooldir='${exec_prefix}' + build_tooldir=${tooldir} + + # Create a .gdbinit file which runs the one in srcdir -- cgit v1.2.3