diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2017-08-21 05:51:07 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-08-27 19:46:26 +0200 |
commit | 8645420963417ffc64d2e88f64935249e0db225c (patch) | |
tree | 1d35667cf063d8c370634da66047d01455e9d741 /toolchain | |
parent | 68769b1a66f9df3387811c9de7aa146c2e17ff92 (diff) |
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.
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/newlib/Makefile | 16 | ||||
-rw-r--r-- | toolchain/newlib/Makefile.inc | 7 | ||||
-rw-r--r-- | toolchain/newlib/patches/git/fix-tooldir.patch | 12 |
3 files changed, 32 insertions, 3 deletions
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 |