diff --git a/COPYING.NEWLIB b/COPYING.NEWLIB
index e0b31f378..7242a44ac 100644
--- a/COPYING.NEWLIB
+++ b/COPYING.NEWLIB
@@ -760,9 +760,9 @@ SUCH DAMAGE.
SUCH DAMAGE.
-(35) - ARM Ltd (arm and thumb variant targets only)
+(35) - Arm Ltd
- Copyright (c) 2009-2015 ARM Ltd
+ Copyright (c) 2009-2018 Arm Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -1140,7 +1140,7 @@ Copyright (c) 2017 SiFive Inc. All rights reserved.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
-of the BSD License. This program is distributed in the hope that
+of the FreeBSD License. This program is distributed in the hope that
it will be useful, but WITHOUT ANY WARRANTY expressed or implied,
including the implied warranties of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. A copy of this license is available at
diff --git a/Makefile.in b/Makefile.in
index 737e6029b..e42a69d8e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -55307,7 +55307,6 @@ all-build-m4: maybe-all-build-texinfo
all-build-fixincludes: maybe-all-build-libiberty
all-build-libcpp: maybe-all-build-libiberty
configure-gcc: maybe-configure-intl
-
configure-stage1-gcc: maybe-configure-stage1-intl
configure-stage2-gcc: maybe-configure-stage2-intl
configure-stage3-gcc: maybe-configure-stage3-intl
@@ -55317,7 +55316,6 @@ configure-stagefeedback-gcc: maybe-configure-stagefeedback-intl
configure-stageautoprofile-gcc: maybe-configure-stageautoprofile-intl
configure-stageautofeedback-gcc: maybe-configure-stageautofeedback-intl
configure-gcc: maybe-all-gmp
-
configure-stage1-gcc: maybe-all-stage1-gmp
configure-stage2-gcc: maybe-all-stage2-gmp
configure-stage3-gcc: maybe-all-stage3-gmp
@@ -55327,7 +55325,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-gmp
configure-stageautoprofile-gcc: maybe-all-stageautoprofile-gmp
configure-stageautofeedback-gcc: maybe-all-stageautofeedback-gmp
configure-gcc: maybe-all-mpfr
-
configure-stage1-gcc: maybe-all-stage1-mpfr
configure-stage2-gcc: maybe-all-stage2-mpfr
configure-stage3-gcc: maybe-all-stage3-mpfr
@@ -55337,7 +55334,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-mpfr
configure-stageautoprofile-gcc: maybe-all-stageautoprofile-mpfr
configure-stageautofeedback-gcc: maybe-all-stageautofeedback-mpfr
configure-gcc: maybe-all-mpc
-
configure-stage1-gcc: maybe-all-stage1-mpc
configure-stage2-gcc: maybe-all-stage2-mpc
configure-stage3-gcc: maybe-all-stage3-mpc
@@ -55347,7 +55343,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-mpc
configure-stageautoprofile-gcc: maybe-all-stageautoprofile-mpc
configure-stageautofeedback-gcc: maybe-all-stageautofeedback-mpc
configure-gcc: maybe-all-isl
-
configure-stage1-gcc: maybe-all-stage1-isl
configure-stage2-gcc: maybe-all-stage2-isl
configure-stage3-gcc: maybe-all-stage3-isl
@@ -55357,7 +55352,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-isl
configure-stageautoprofile-gcc: maybe-all-stageautoprofile-isl
configure-stageautofeedback-gcc: maybe-all-stageautofeedback-isl
configure-gcc: maybe-all-lto-plugin
-
configure-stage1-gcc: maybe-all-stage1-lto-plugin
configure-stage2-gcc: maybe-all-stage2-lto-plugin
configure-stage3-gcc: maybe-all-stage3-lto-plugin
@@ -55367,7 +55361,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin
configure-stageautoprofile-gcc: maybe-all-stageautoprofile-lto-plugin
configure-stageautofeedback-gcc: maybe-all-stageautofeedback-lto-plugin
configure-gcc: maybe-all-binutils
-
configure-stage1-gcc: maybe-all-stage1-binutils
configure-stage2-gcc: maybe-all-stage2-binutils
configure-stage3-gcc: maybe-all-stage3-binutils
@@ -55377,7 +55370,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-binutils
configure-stageautoprofile-gcc: maybe-all-stageautoprofile-binutils
configure-stageautofeedback-gcc: maybe-all-stageautofeedback-binutils
configure-gcc: maybe-all-gas
-
configure-stage1-gcc: maybe-all-stage1-gas
configure-stage2-gcc: maybe-all-stage2-gas
configure-stage3-gcc: maybe-all-stage3-gas
@@ -55387,7 +55379,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-gas
configure-stageautoprofile-gcc: maybe-all-stageautoprofile-gas
configure-stageautofeedback-gcc: maybe-all-stageautofeedback-gas
configure-gcc: maybe-all-ld
-
configure-stage1-gcc: maybe-all-stage1-ld
configure-stage2-gcc: maybe-all-stage2-ld
configure-stage3-gcc: maybe-all-stage3-ld
@@ -55397,7 +55388,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-ld
configure-stageautoprofile-gcc: maybe-all-stageautoprofile-ld
configure-stageautofeedback-gcc: maybe-all-stageautofeedback-ld
configure-gcc: maybe-all-gold
-
configure-stage1-gcc: maybe-all-stage1-gold
configure-stage2-gcc: maybe-all-stage2-gold
configure-stage3-gcc: maybe-all-stage3-gold
@@ -55407,7 +55397,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-gold
configure-stageautoprofile-gcc: maybe-all-stageautoprofile-gold
configure-stageautofeedback-gcc: maybe-all-stageautofeedback-gold
configure-gcc: maybe-all-libelf
-
configure-stage1-gcc: maybe-all-stage1-libelf
configure-stage2-gcc: maybe-all-stage2-libelf
configure-stage3-gcc: maybe-all-stage3-libelf
@@ -55417,7 +55406,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-libelf
configure-stageautoprofile-gcc: maybe-all-stageautoprofile-libelf
configure-stageautofeedback-gcc: maybe-all-stageautofeedback-libelf
configure-gcc: maybe-all-libiconv
-
configure-stage1-gcc: maybe-all-stage1-libiconv
configure-stage2-gcc: maybe-all-stage2-libiconv
configure-stage3-gcc: maybe-all-stage3-libiconv
@@ -55427,7 +55415,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-libiconv
configure-stageautoprofile-gcc: maybe-all-stageautoprofile-libiconv
configure-stageautofeedback-gcc: maybe-all-stageautofeedback-libiconv
all-gcc: all-libiberty
-
all-stage1-gcc: all-stage1-libiberty
all-stage2-gcc: all-stage2-libiberty
all-stage3-gcc: all-stage3-libiberty
@@ -55437,7 +55424,6 @@ all-stagefeedback-gcc: all-stagefeedback-libiberty
all-stageautoprofile-gcc: all-stageautoprofile-libiberty
all-stageautofeedback-gcc: all-stageautofeedback-libiberty
all-gcc: maybe-all-intl
-
all-stage1-gcc: maybe-all-stage1-intl
all-stage2-gcc: maybe-all-stage2-intl
all-stage3-gcc: maybe-all-stage3-intl
@@ -55447,7 +55433,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-intl
all-stageautoprofile-gcc: maybe-all-stageautoprofile-intl
all-stageautofeedback-gcc: maybe-all-stageautofeedback-intl
all-gcc: maybe-all-mpfr
-
all-stage1-gcc: maybe-all-stage1-mpfr
all-stage2-gcc: maybe-all-stage2-mpfr
all-stage3-gcc: maybe-all-stage3-mpfr
@@ -55457,7 +55442,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-mpfr
all-stageautoprofile-gcc: maybe-all-stageautoprofile-mpfr
all-stageautofeedback-gcc: maybe-all-stageautofeedback-mpfr
all-gcc: maybe-all-mpc
-
all-stage1-gcc: maybe-all-stage1-mpc
all-stage2-gcc: maybe-all-stage2-mpc
all-stage3-gcc: maybe-all-stage3-mpc
@@ -55467,7 +55451,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-mpc
all-stageautoprofile-gcc: maybe-all-stageautoprofile-mpc
all-stageautofeedback-gcc: maybe-all-stageautofeedback-mpc
all-gcc: maybe-all-isl
-
all-stage1-gcc: maybe-all-stage1-isl
all-stage2-gcc: maybe-all-stage2-isl
all-stage3-gcc: maybe-all-stage3-isl
@@ -55477,7 +55460,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-isl
all-stageautoprofile-gcc: maybe-all-stageautoprofile-isl
all-stageautofeedback-gcc: maybe-all-stageautofeedback-isl
all-gcc: maybe-all-build-texinfo
-
all-stage1-gcc: maybe-all-build-texinfo
all-stage2-gcc: maybe-all-build-texinfo
all-stage3-gcc: maybe-all-build-texinfo
@@ -55487,7 +55469,6 @@ all-stagefeedback-gcc: maybe-all-build-texinfo
all-stageautoprofile-gcc: maybe-all-build-texinfo
all-stageautofeedback-gcc: maybe-all-build-texinfo
all-gcc: maybe-all-build-bison
-
all-stage1-gcc: maybe-all-build-bison
all-stage2-gcc: maybe-all-build-bison
all-stage3-gcc: maybe-all-build-bison
@@ -55497,7 +55478,6 @@ all-stagefeedback-gcc: maybe-all-build-bison
all-stageautoprofile-gcc: maybe-all-build-bison
all-stageautofeedback-gcc: maybe-all-build-bison
all-gcc: maybe-all-build-flex
-
all-stage1-gcc: maybe-all-build-flex
all-stage2-gcc: maybe-all-build-flex
all-stage3-gcc: maybe-all-build-flex
@@ -55507,7 +55487,6 @@ all-stagefeedback-gcc: maybe-all-build-flex
all-stageautoprofile-gcc: maybe-all-build-flex
all-stageautofeedback-gcc: maybe-all-build-flex
all-gcc: maybe-all-build-libiberty
-
all-stage1-gcc: maybe-all-build-libiberty
all-stage2-gcc: maybe-all-build-libiberty
all-stage3-gcc: maybe-all-build-libiberty
@@ -55517,7 +55496,6 @@ all-stagefeedback-gcc: maybe-all-build-libiberty
all-stageautoprofile-gcc: maybe-all-build-libiberty
all-stageautofeedback-gcc: maybe-all-build-libiberty
all-gcc: maybe-all-build-fixincludes
-
all-stage1-gcc: maybe-all-build-fixincludes
all-stage2-gcc: maybe-all-build-fixincludes
all-stage3-gcc: maybe-all-build-fixincludes
@@ -55527,7 +55505,6 @@ all-stagefeedback-gcc: maybe-all-build-fixincludes
all-stageautoprofile-gcc: maybe-all-build-fixincludes
all-stageautofeedback-gcc: maybe-all-build-fixincludes
all-gcc: maybe-all-build-libcpp
-
all-stage1-gcc: maybe-all-build-libcpp
all-stage2-gcc: maybe-all-build-libcpp
all-stage3-gcc: maybe-all-build-libcpp
@@ -55537,7 +55514,6 @@ all-stagefeedback-gcc: maybe-all-build-libcpp
all-stageautoprofile-gcc: maybe-all-build-libcpp
all-stageautofeedback-gcc: maybe-all-build-libcpp
all-gcc: maybe-all-zlib
-
all-stage1-gcc: maybe-all-stage1-zlib
all-stage2-gcc: maybe-all-stage2-zlib
all-stage3-gcc: maybe-all-stage3-zlib
@@ -55547,7 +55523,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-zlib
all-stageautoprofile-gcc: maybe-all-stageautoprofile-zlib
all-stageautofeedback-gcc: maybe-all-stageautofeedback-zlib
all-gcc: all-libbacktrace
-
all-stage1-gcc: all-stage1-libbacktrace
all-stage2-gcc: all-stage2-libbacktrace
all-stage3-gcc: all-stage3-libbacktrace
@@ -55557,7 +55532,6 @@ all-stagefeedback-gcc: all-stagefeedback-libbacktrace
all-stageautoprofile-gcc: all-stageautoprofile-libbacktrace
all-stageautofeedback-gcc: all-stageautofeedback-libbacktrace
all-gcc: all-libcpp
-
all-stage1-gcc: all-stage1-libcpp
all-stage2-gcc: all-stage2-libcpp
all-stage3-gcc: all-stage3-libcpp
@@ -55567,7 +55541,6 @@ all-stagefeedback-gcc: all-stagefeedback-libcpp
all-stageautoprofile-gcc: all-stageautoprofile-libcpp
all-stageautofeedback-gcc: all-stageautofeedback-libcpp
all-gcc: all-libdecnumber
-
all-stage1-gcc: all-stage1-libdecnumber
all-stage2-gcc: all-stage2-libdecnumber
all-stage3-gcc: all-stage3-libdecnumber
@@ -55577,7 +55550,6 @@ all-stagefeedback-gcc: all-stagefeedback-libdecnumber
all-stageautoprofile-gcc: all-stageautoprofile-libdecnumber
all-stageautofeedback-gcc: all-stageautofeedback-libdecnumber
all-gcc: maybe-all-libiberty
-
all-stage1-gcc: maybe-all-stage1-libiberty
all-stage2-gcc: maybe-all-stage2-libiberty
all-stage3-gcc: maybe-all-stage3-libiberty
@@ -55587,7 +55559,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-libiberty
all-stageautoprofile-gcc: maybe-all-stageautoprofile-libiberty
all-stageautofeedback-gcc: maybe-all-stageautofeedback-libiberty
all-gcc: maybe-all-fixincludes
-
all-stage1-gcc: maybe-all-stage1-fixincludes
all-stage2-gcc: maybe-all-stage2-fixincludes
all-stage3-gcc: maybe-all-stage3-fixincludes
@@ -55597,7 +55568,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-fixincludes
all-stageautoprofile-gcc: maybe-all-stageautoprofile-fixincludes
all-stageautofeedback-gcc: maybe-all-stageautofeedback-fixincludes
all-gcc: maybe-all-lto-plugin
-
all-stage1-gcc: maybe-all-stage1-lto-plugin
all-stage2-gcc: maybe-all-stage2-lto-plugin
all-stage3-gcc: maybe-all-stage3-lto-plugin
@@ -55607,7 +55577,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin
all-stageautoprofile-gcc: maybe-all-stageautoprofile-lto-plugin
all-stageautofeedback-gcc: maybe-all-stageautofeedback-lto-plugin
all-gcc: maybe-all-libiconv
-
all-stage1-gcc: maybe-all-stage1-libiconv
all-stage2-gcc: maybe-all-stage2-libiconv
all-stage3-gcc: maybe-all-stage3-libiconv
@@ -55617,7 +55586,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-libiconv
all-stageautoprofile-gcc: maybe-all-stageautoprofile-libiconv
all-stageautofeedback-gcc: maybe-all-stageautofeedback-libiconv
info-gcc: maybe-all-build-libiberty
-
info-stage1-gcc: maybe-all-build-libiberty
info-stage2-gcc: maybe-all-build-libiberty
info-stage3-gcc: maybe-all-build-libiberty
@@ -55627,7 +55595,6 @@ info-stagefeedback-gcc: maybe-all-build-libiberty
info-stageautoprofile-gcc: maybe-all-build-libiberty
info-stageautofeedback-gcc: maybe-all-build-libiberty
dvi-gcc: maybe-all-build-libiberty
-
dvi-stage1-gcc: maybe-all-build-libiberty
dvi-stage2-gcc: maybe-all-build-libiberty
dvi-stage3-gcc: maybe-all-build-libiberty
@@ -55637,7 +55604,6 @@ dvi-stagefeedback-gcc: maybe-all-build-libiberty
dvi-stageautoprofile-gcc: maybe-all-build-libiberty
dvi-stageautofeedback-gcc: maybe-all-build-libiberty
pdf-gcc: maybe-all-build-libiberty
-
pdf-stage1-gcc: maybe-all-build-libiberty
pdf-stage2-gcc: maybe-all-build-libiberty
pdf-stage3-gcc: maybe-all-build-libiberty
@@ -55647,7 +55613,6 @@ pdf-stagefeedback-gcc: maybe-all-build-libiberty
pdf-stageautoprofile-gcc: maybe-all-build-libiberty
pdf-stageautofeedback-gcc: maybe-all-build-libiberty
html-gcc: maybe-all-build-libiberty
-
html-stage1-gcc: maybe-all-build-libiberty
html-stage2-gcc: maybe-all-build-libiberty
html-stage3-gcc: maybe-all-build-libiberty
@@ -55661,7 +55626,6 @@ install-gcc: maybe-install-lto-plugin
install-strip-gcc: maybe-install-strip-fixincludes
install-strip-gcc: maybe-install-strip-lto-plugin
configure-libcpp: configure-libiberty
-
configure-stage1-libcpp: configure-stage1-libiberty
configure-stage2-libcpp: configure-stage2-libiberty
configure-stage3-libcpp: configure-stage3-libiberty
@@ -55671,7 +55635,6 @@ configure-stagefeedback-libcpp: configure-stagefeedback-libiberty
configure-stageautoprofile-libcpp: configure-stageautoprofile-libiberty
configure-stageautofeedback-libcpp: configure-stageautofeedback-libiberty
configure-libcpp: maybe-configure-intl
-
configure-stage1-libcpp: maybe-configure-stage1-intl
configure-stage2-libcpp: maybe-configure-stage2-intl
configure-stage3-libcpp: maybe-configure-stage3-intl
@@ -55681,7 +55644,6 @@ configure-stagefeedback-libcpp: maybe-configure-stagefeedback-intl
configure-stageautoprofile-libcpp: maybe-configure-stageautoprofile-intl
configure-stageautofeedback-libcpp: maybe-configure-stageautofeedback-intl
configure-libcpp: maybe-all-libiconv
-
configure-stage1-libcpp: maybe-all-stage1-libiconv
configure-stage2-libcpp: maybe-all-stage2-libiconv
configure-stage3-libcpp: maybe-all-stage3-libiconv
@@ -55691,7 +55653,6 @@ configure-stagefeedback-libcpp: maybe-all-stagefeedback-libiconv
configure-stageautoprofile-libcpp: maybe-all-stageautoprofile-libiconv
configure-stageautofeedback-libcpp: maybe-all-stageautofeedback-libiconv
all-libcpp: all-libiberty
-
all-stage1-libcpp: all-stage1-libiberty
all-stage2-libcpp: all-stage2-libiberty
all-stage3-libcpp: all-stage3-libiberty
@@ -55701,7 +55662,6 @@ all-stagefeedback-libcpp: all-stagefeedback-libiberty
all-stageautoprofile-libcpp: all-stageautoprofile-libiberty
all-stageautofeedback-libcpp: all-stageautofeedback-libiberty
all-libcpp: maybe-all-intl
-
all-stage1-libcpp: maybe-all-stage1-intl
all-stage2-libcpp: maybe-all-stage2-intl
all-stage3-libcpp: maybe-all-stage3-intl
@@ -55711,7 +55671,6 @@ all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
all-stageautoprofile-libcpp: maybe-all-stageautoprofile-intl
all-stageautofeedback-libcpp: maybe-all-stageautofeedback-intl
all-libcpp: maybe-all-libiconv
-
all-stage1-libcpp: maybe-all-stage1-libiconv
all-stage2-libcpp: maybe-all-stage2-libiconv
all-stage3-libcpp: maybe-all-stage3-libiconv
@@ -55721,7 +55680,6 @@ all-stagefeedback-libcpp: maybe-all-stagefeedback-libiconv
all-stageautoprofile-libcpp: maybe-all-stageautoprofile-libiconv
all-stageautofeedback-libcpp: maybe-all-stageautofeedback-libiconv
all-fixincludes: maybe-all-libiberty
-
all-stage1-fixincludes: maybe-all-stage1-libiberty
all-stage2-fixincludes: maybe-all-stage2-libiberty
all-stage3-fixincludes: maybe-all-stage3-libiberty
@@ -55731,9 +55689,7 @@ all-stagefeedback-fixincludes: maybe-all-stagefeedback-libiberty
all-stageautoprofile-fixincludes: maybe-all-stageautoprofile-libiberty
all-stageautofeedback-fixincludes: maybe-all-stageautofeedback-libiberty
all-gnattools: maybe-all-target-libada
-all-gnattools: maybe-all-target-libstdc++-v3
all-lto-plugin: maybe-all-libiberty
-
all-stage1-lto-plugin: maybe-all-stage1-libiberty
all-stage2-lto-plugin: maybe-all-stage2-libiberty
all-stage3-lto-plugin: maybe-all-stage3-libiberty
@@ -55743,7 +55699,6 @@ all-stagefeedback-lto-plugin: maybe-all-stagefeedback-libiberty
all-stageautoprofile-lto-plugin: maybe-all-stageautoprofile-libiberty
all-stageautofeedback-lto-plugin: maybe-all-stageautofeedback-libiberty
all-lto-plugin: maybe-all-libiberty-linker-plugin
-
all-stage1-lto-plugin: maybe-all-stage1-libiberty-linker-plugin
all-stage2-lto-plugin: maybe-all-stage2-libiberty-linker-plugin
all-stage3-lto-plugin: maybe-all-stage3-libiberty-linker-plugin
@@ -55752,12 +55707,8 @@ all-stageprofile-lto-plugin: maybe-all-stageprofile-libiberty-linker-plugin
all-stagefeedback-lto-plugin: maybe-all-stagefeedback-libiberty-linker-plugin
all-stageautoprofile-lto-plugin: maybe-all-stageautoprofile-libiberty-linker-plugin
all-stageautofeedback-lto-plugin: maybe-all-stageautofeedback-libiberty-linker-plugin
-configure-libcc1: maybe-configure-gcc
-all-libcc1: maybe-all-gcc
all-gotools: maybe-all-target-libgo
-all-utils: maybe-all-libiberty
configure-intl: maybe-all-libiconv
-
configure-stage1-intl: maybe-all-stage1-libiconv
configure-stage2-intl: maybe-all-stage2-libiconv
configure-stage3-intl: maybe-all-stage3-libiconv
@@ -55767,7 +55718,6 @@ configure-stagefeedback-intl: maybe-all-stagefeedback-libiconv
configure-stageautoprofile-intl: maybe-all-stageautoprofile-libiconv
configure-stageautofeedback-intl: maybe-all-stageautofeedback-libiconv
configure-mpfr: maybe-all-gmp
-
configure-stage1-mpfr: maybe-all-stage1-gmp
configure-stage2-mpfr: maybe-all-stage2-gmp
configure-stage3-mpfr: maybe-all-stage3-gmp
@@ -55777,7 +55727,6 @@ configure-stagefeedback-mpfr: maybe-all-stagefeedback-gmp
configure-stageautoprofile-mpfr: maybe-all-stageautoprofile-gmp
configure-stageautofeedback-mpfr: maybe-all-stageautofeedback-gmp
configure-mpc: maybe-all-mpfr
-
configure-stage1-mpc: maybe-all-stage1-mpfr
configure-stage2-mpc: maybe-all-stage2-mpfr
configure-stage3-mpc: maybe-all-stage3-mpfr
@@ -55787,7 +55736,6 @@ configure-stagefeedback-mpc: maybe-all-stagefeedback-mpfr
configure-stageautoprofile-mpc: maybe-all-stageautoprofile-mpfr
configure-stageautofeedback-mpc: maybe-all-stageautofeedback-mpfr
configure-isl: maybe-all-gmp
-
configure-stage1-isl: maybe-all-stage1-gmp
configure-stage2-isl: maybe-all-stage2-gmp
configure-stage3-isl: maybe-all-stage3-gmp
@@ -55797,7 +55745,6 @@ configure-stagefeedback-isl: maybe-all-stagefeedback-gmp
configure-stageautoprofile-isl: maybe-all-stageautoprofile-gmp
configure-stageautofeedback-isl: maybe-all-stageautofeedback-gmp
all-intl: maybe-all-libiconv
-
all-stage1-intl: maybe-all-stage1-libiconv
all-stage2-intl: maybe-all-stage2-libiconv
all-stage3-intl: maybe-all-stage3-libiconv
@@ -55806,17 +55753,10 @@ all-stageprofile-intl: maybe-all-stageprofile-libiconv
all-stagefeedback-intl: maybe-all-stagefeedback-libiconv
all-stageautoprofile-intl: maybe-all-stageautoprofile-libiconv
all-stageautofeedback-intl: maybe-all-stageautofeedback-libiconv
-configure-gdb: maybe-all-intl
configure-gdb: maybe-configure-sim
-configure-gdb: maybe-all-bfd
-configure-gdb: maybe-all-libiconv
-all-gdb: maybe-all-libiberty
-all-gdb: maybe-all-libiconv
-all-gdb: maybe-all-opcodes
all-gdb: maybe-all-readline
all-gdb: maybe-all-build-bison
all-gdb: maybe-all-sim
-all-gdb: maybe-all-libdecnumber
all-gdb: maybe-all-libtermcap
configure-libgui: maybe-configure-tcl
configure-libgui: maybe-configure-tk
@@ -55824,7 +55764,6 @@ all-libgui: maybe-all-tcl
all-libgui: maybe-all-tk
all-libgui: maybe-all-itcl
configure-bfd: configure-libiberty
-
configure-stage1-bfd: configure-stage1-libiberty
configure-stage2-bfd: configure-stage2-libiberty
configure-stage3-bfd: configure-stage3-libiberty
@@ -55834,7 +55773,6 @@ configure-stagefeedback-bfd: configure-stagefeedback-libiberty
configure-stageautoprofile-bfd: configure-stageautoprofile-libiberty
configure-stageautofeedback-bfd: configure-stageautofeedback-libiberty
configure-bfd: maybe-configure-intl
-
configure-stage1-bfd: maybe-configure-stage1-intl
configure-stage2-bfd: maybe-configure-stage2-intl
configure-stage3-bfd: maybe-configure-stage3-intl
@@ -55844,7 +55782,6 @@ configure-stagefeedback-bfd: maybe-configure-stagefeedback-intl
configure-stageautoprofile-bfd: maybe-configure-stageautoprofile-intl
configure-stageautofeedback-bfd: maybe-configure-stageautofeedback-intl
all-bfd: maybe-all-libiberty
-
all-stage1-bfd: maybe-all-stage1-libiberty
all-stage2-bfd: maybe-all-stage2-libiberty
all-stage3-bfd: maybe-all-stage3-libiberty
@@ -55854,7 +55791,6 @@ all-stagefeedback-bfd: maybe-all-stagefeedback-libiberty
all-stageautoprofile-bfd: maybe-all-stageautoprofile-libiberty
all-stageautofeedback-bfd: maybe-all-stageautofeedback-libiberty
all-bfd: maybe-all-intl
-
all-stage1-bfd: maybe-all-stage1-intl
all-stage2-bfd: maybe-all-stage2-intl
all-stage3-bfd: maybe-all-stage3-intl
@@ -55864,7 +55800,6 @@ all-stagefeedback-bfd: maybe-all-stagefeedback-intl
all-stageautoprofile-bfd: maybe-all-stageautoprofile-intl
all-stageautofeedback-bfd: maybe-all-stageautofeedback-intl
all-bfd: maybe-all-zlib
-
all-stage1-bfd: maybe-all-stage1-zlib
all-stage2-bfd: maybe-all-stage2-zlib
all-stage3-bfd: maybe-all-stage3-zlib
@@ -55874,7 +55809,6 @@ all-stagefeedback-bfd: maybe-all-stagefeedback-zlib
all-stageautoprofile-bfd: maybe-all-stageautoprofile-zlib
all-stageautofeedback-bfd: maybe-all-stageautofeedback-zlib
configure-opcodes: configure-libiberty
-
configure-stage1-opcodes: configure-stage1-libiberty
configure-stage2-opcodes: configure-stage2-libiberty
configure-stage3-opcodes: configure-stage3-libiberty
@@ -55884,7 +55818,6 @@ configure-stagefeedback-opcodes: configure-stagefeedback-libiberty
configure-stageautoprofile-opcodes: configure-stageautoprofile-libiberty
configure-stageautofeedback-opcodes: configure-stageautofeedback-libiberty
all-opcodes: maybe-all-libiberty
-
all-stage1-opcodes: maybe-all-stage1-libiberty
all-stage2-opcodes: maybe-all-stage2-libiberty
all-stage3-opcodes: maybe-all-stage3-libiberty
@@ -55894,7 +55827,6 @@ all-stagefeedback-opcodes: maybe-all-stagefeedback-libiberty
all-stageautoprofile-opcodes: maybe-all-stageautoprofile-libiberty
all-stageautofeedback-opcodes: maybe-all-stageautofeedback-libiberty
configure-binutils: maybe-configure-intl
-
configure-stage1-binutils: maybe-configure-stage1-intl
configure-stage2-binutils: maybe-configure-stage2-intl
configure-stage3-binutils: maybe-configure-stage3-intl
@@ -55904,7 +55836,6 @@ configure-stagefeedback-binutils: maybe-configure-stagefeedback-intl
configure-stageautoprofile-binutils: maybe-configure-stageautoprofile-intl
configure-stageautofeedback-binutils: maybe-configure-stageautofeedback-intl
all-binutils: maybe-all-libiberty
-
all-stage1-binutils: maybe-all-stage1-libiberty
all-stage2-binutils: maybe-all-stage2-libiberty
all-stage3-binutils: maybe-all-stage3-libiberty
@@ -55914,7 +55845,6 @@ all-stagefeedback-binutils: maybe-all-stagefeedback-libiberty
all-stageautoprofile-binutils: maybe-all-stageautoprofile-libiberty
all-stageautofeedback-binutils: maybe-all-stageautofeedback-libiberty
all-binutils: maybe-all-opcodes
-
all-stage1-binutils: maybe-all-stage1-opcodes
all-stage2-binutils: maybe-all-stage2-opcodes
all-stage3-binutils: maybe-all-stage3-opcodes
@@ -55924,7 +55854,6 @@ all-stagefeedback-binutils: maybe-all-stagefeedback-opcodes
all-stageautoprofile-binutils: maybe-all-stageautoprofile-opcodes
all-stageautofeedback-binutils: maybe-all-stageautofeedback-opcodes
all-binutils: maybe-all-bfd
-
all-stage1-binutils: maybe-all-stage1-bfd
all-stage2-binutils: maybe-all-stage2-bfd
all-stage3-binutils: maybe-all-stage3-bfd
@@ -55934,7 +55863,6 @@ all-stagefeedback-binutils: maybe-all-stagefeedback-bfd
all-stageautoprofile-binutils: maybe-all-stageautoprofile-bfd
all-stageautofeedback-binutils: maybe-all-stageautofeedback-bfd
all-binutils: maybe-all-build-flex
-
all-stage1-binutils: maybe-all-build-flex
all-stage2-binutils: maybe-all-build-flex
all-stage3-binutils: maybe-all-build-flex
@@ -55944,7 +55872,6 @@ all-stagefeedback-binutils: maybe-all-build-flex
all-stageautoprofile-binutils: maybe-all-build-flex
all-stageautofeedback-binutils: maybe-all-build-flex
all-binutils: maybe-all-build-bison
-
all-stage1-binutils: maybe-all-build-bison
all-stage2-binutils: maybe-all-build-bison
all-stage3-binutils: maybe-all-build-bison
@@ -55954,7 +55881,6 @@ all-stagefeedback-binutils: maybe-all-build-bison
all-stageautoprofile-binutils: maybe-all-build-bison
all-stageautofeedback-binutils: maybe-all-build-bison
all-binutils: maybe-all-intl
-
all-stage1-binutils: maybe-all-stage1-intl
all-stage2-binutils: maybe-all-stage2-intl
all-stage3-binutils: maybe-all-stage3-intl
@@ -55964,7 +55890,6 @@ all-stagefeedback-binutils: maybe-all-stagefeedback-intl
all-stageautoprofile-binutils: maybe-all-stageautoprofile-intl
all-stageautofeedback-binutils: maybe-all-stageautofeedback-intl
all-binutils: maybe-all-gas
-
all-stage1-binutils: maybe-all-stage1-gas
all-stage2-binutils: maybe-all-stage2-gas
all-stage3-binutils: maybe-all-stage3-gas
@@ -55978,7 +55903,6 @@ install-strip-binutils: maybe-install-strip-opcodes
install-opcodes: maybe-install-bfd
install-strip-opcodes: maybe-install-strip-bfd
configure-gas: maybe-configure-intl
-
configure-stage1-gas: maybe-configure-stage1-intl
configure-stage2-gas: maybe-configure-stage2-intl
configure-stage3-gas: maybe-configure-stage3-intl
@@ -55988,7 +55912,6 @@ configure-stagefeedback-gas: maybe-configure-stagefeedback-intl
configure-stageautoprofile-gas: maybe-configure-stageautoprofile-intl
configure-stageautofeedback-gas: maybe-configure-stageautofeedback-intl
all-gas: maybe-all-libiberty
-
all-stage1-gas: maybe-all-stage1-libiberty
all-stage2-gas: maybe-all-stage2-libiberty
all-stage3-gas: maybe-all-stage3-libiberty
@@ -55998,7 +55921,6 @@ all-stagefeedback-gas: maybe-all-stagefeedback-libiberty
all-stageautoprofile-gas: maybe-all-stageautoprofile-libiberty
all-stageautofeedback-gas: maybe-all-stageautofeedback-libiberty
all-gas: maybe-all-opcodes
-
all-stage1-gas: maybe-all-stage1-opcodes
all-stage2-gas: maybe-all-stage2-opcodes
all-stage3-gas: maybe-all-stage3-opcodes
@@ -56008,7 +55930,6 @@ all-stagefeedback-gas: maybe-all-stagefeedback-opcodes
all-stageautoprofile-gas: maybe-all-stageautoprofile-opcodes
all-stageautofeedback-gas: maybe-all-stageautofeedback-opcodes
all-gas: maybe-all-bfd
-
all-stage1-gas: maybe-all-stage1-bfd
all-stage2-gas: maybe-all-stage2-bfd
all-stage3-gas: maybe-all-stage3-bfd
@@ -56018,7 +55939,6 @@ all-stagefeedback-gas: maybe-all-stagefeedback-bfd
all-stageautoprofile-gas: maybe-all-stageautoprofile-bfd
all-stageautofeedback-gas: maybe-all-stageautofeedback-bfd
all-gas: maybe-all-intl
-
all-stage1-gas: maybe-all-stage1-intl
all-stage2-gas: maybe-all-stage2-intl
all-stage3-gas: maybe-all-stage3-intl
@@ -56027,14 +55947,7 @@ all-stageprofile-gas: maybe-all-stageprofile-intl
all-stagefeedback-gas: maybe-all-stagefeedback-intl
all-stageautoprofile-gas: maybe-all-stageautoprofile-intl
all-stageautofeedback-gas: maybe-all-stageautofeedback-intl
-configure-gprof: maybe-configure-intl
-all-gprof: maybe-all-libiberty
-all-gprof: maybe-all-bfd
-all-gprof: maybe-all-opcodes
-all-gprof: maybe-all-intl
-all-gprof: maybe-all-gas
configure-ld: maybe-configure-intl
-
configure-stage1-ld: maybe-configure-stage1-intl
configure-stage2-ld: maybe-configure-stage2-intl
configure-stage3-ld: maybe-configure-stage3-intl
@@ -56044,7 +55957,6 @@ configure-stagefeedback-ld: maybe-configure-stagefeedback-intl
configure-stageautoprofile-ld: maybe-configure-stageautoprofile-intl
configure-stageautofeedback-ld: maybe-configure-stageautofeedback-intl
all-ld: maybe-all-libiberty
-
all-stage1-ld: maybe-all-stage1-libiberty
all-stage2-ld: maybe-all-stage2-libiberty
all-stage3-ld: maybe-all-stage3-libiberty
@@ -56054,7 +55966,6 @@ all-stagefeedback-ld: maybe-all-stagefeedback-libiberty
all-stageautoprofile-ld: maybe-all-stageautoprofile-libiberty
all-stageautofeedback-ld: maybe-all-stageautofeedback-libiberty
all-ld: maybe-all-bfd
-
all-stage1-ld: maybe-all-stage1-bfd
all-stage2-ld: maybe-all-stage2-bfd
all-stage3-ld: maybe-all-stage3-bfd
@@ -56064,7 +55975,6 @@ all-stagefeedback-ld: maybe-all-stagefeedback-bfd
all-stageautoprofile-ld: maybe-all-stageautoprofile-bfd
all-stageautofeedback-ld: maybe-all-stageautofeedback-bfd
all-ld: maybe-all-opcodes
-
all-stage1-ld: maybe-all-stage1-opcodes
all-stage2-ld: maybe-all-stage2-opcodes
all-stage3-ld: maybe-all-stage3-opcodes
@@ -56074,7 +55984,6 @@ all-stagefeedback-ld: maybe-all-stagefeedback-opcodes
all-stageautoprofile-ld: maybe-all-stageautoprofile-opcodes
all-stageautofeedback-ld: maybe-all-stageautofeedback-opcodes
all-ld: maybe-all-build-bison
-
all-stage1-ld: maybe-all-build-bison
all-stage2-ld: maybe-all-build-bison
all-stage3-ld: maybe-all-build-bison
@@ -56084,7 +55993,6 @@ all-stagefeedback-ld: maybe-all-build-bison
all-stageautoprofile-ld: maybe-all-build-bison
all-stageautofeedback-ld: maybe-all-build-bison
all-ld: maybe-all-build-flex
-
all-stage1-ld: maybe-all-build-flex
all-stage2-ld: maybe-all-build-flex
all-stage3-ld: maybe-all-build-flex
@@ -56094,7 +56002,6 @@ all-stagefeedback-ld: maybe-all-build-flex
all-stageautoprofile-ld: maybe-all-build-flex
all-stageautofeedback-ld: maybe-all-build-flex
all-ld: maybe-all-intl
-
all-stage1-ld: maybe-all-stage1-intl
all-stage2-ld: maybe-all-stage2-intl
all-stage3-ld: maybe-all-stage3-intl
@@ -56104,7 +56011,6 @@ all-stagefeedback-ld: maybe-all-stagefeedback-intl
all-stageautoprofile-ld: maybe-all-stageautoprofile-intl
all-stageautofeedback-ld: maybe-all-stageautofeedback-intl
all-ld: maybe-all-gas
-
all-stage1-ld: maybe-all-stage1-gas
all-stage2-ld: maybe-all-stage2-gas
all-stage3-ld: maybe-all-stage3-gas
@@ -56114,7 +56020,6 @@ all-stagefeedback-ld: maybe-all-stagefeedback-gas
all-stageautoprofile-ld: maybe-all-stageautoprofile-gas
all-stageautofeedback-ld: maybe-all-stageautofeedback-gas
all-ld: maybe-all-binutils
-
all-stage1-ld: maybe-all-stage1-binutils
all-stage2-ld: maybe-all-stage2-binutils
all-stage3-ld: maybe-all-stage3-binutils
@@ -56126,7 +56031,6 @@ all-stageautofeedback-ld: maybe-all-stageautofeedback-binutils
install-ld: maybe-install-gold
install-strip-ld: maybe-install-strip-gold
configure-gold: maybe-configure-intl
-
configure-stage1-gold: maybe-configure-stage1-intl
configure-stage2-gold: maybe-configure-stage2-intl
configure-stage3-gold: maybe-configure-stage3-intl
@@ -56136,7 +56040,6 @@ configure-stagefeedback-gold: maybe-configure-stagefeedback-intl
configure-stageautoprofile-gold: maybe-configure-stageautoprofile-intl
configure-stageautofeedback-gold: maybe-configure-stageautofeedback-intl
all-gold: maybe-all-libiberty
-
all-stage1-gold: maybe-all-stage1-libiberty
all-stage2-gold: maybe-all-stage2-libiberty
all-stage3-gold: maybe-all-stage3-libiberty
@@ -56146,7 +56049,6 @@ all-stagefeedback-gold: maybe-all-stagefeedback-libiberty
all-stageautoprofile-gold: maybe-all-stageautoprofile-libiberty
all-stageautofeedback-gold: maybe-all-stageautofeedback-libiberty
all-gold: maybe-all-intl
-
all-stage1-gold: maybe-all-stage1-intl
all-stage2-gold: maybe-all-stage2-intl
all-stage3-gold: maybe-all-stage3-intl
@@ -56156,7 +56058,6 @@ all-stagefeedback-gold: maybe-all-stagefeedback-intl
all-stageautoprofile-gold: maybe-all-stageautoprofile-intl
all-stageautofeedback-gold: maybe-all-stageautofeedback-intl
all-gold: maybe-all-bfd
-
all-stage1-gold: maybe-all-stage1-bfd
all-stage2-gold: maybe-all-stage2-bfd
all-stage3-gold: maybe-all-stage3-bfd
@@ -56166,7 +56067,6 @@ all-stagefeedback-gold: maybe-all-stagefeedback-bfd
all-stageautoprofile-gold: maybe-all-stageautoprofile-bfd
all-stageautofeedback-gold: maybe-all-stageautofeedback-bfd
all-gold: maybe-all-build-bison
-
all-stage1-gold: maybe-all-build-bison
all-stage2-gold: maybe-all-build-bison
all-stage3-gold: maybe-all-build-bison
@@ -56176,7 +56076,6 @@ all-stagefeedback-gold: maybe-all-build-bison
all-stageautoprofile-gold: maybe-all-build-bison
all-stageautofeedback-gold: maybe-all-build-bison
all-gold: maybe-all-gas
-
all-stage1-gold: maybe-all-stage1-gas
all-stage2-gold: maybe-all-stage2-gas
all-stage3-gold: maybe-all-stage3-gas
@@ -56186,7 +56085,6 @@ all-stagefeedback-gold: maybe-all-stagefeedback-gas
all-stageautoprofile-gold: maybe-all-stageautoprofile-gas
all-stageautofeedback-gold: maybe-all-stageautofeedback-gas
check-gold: maybe-all-binutils
-
check-stage1-gold: maybe-all-stage1-binutils
check-stage2-gold: maybe-all-stage2-binutils
check-stage3-gold: maybe-all-stage3-binutils
@@ -56196,7 +56094,6 @@ check-stagefeedback-gold: maybe-all-stagefeedback-binutils
check-stageautoprofile-gold: maybe-all-stageautoprofile-binutils
check-stageautofeedback-gold: maybe-all-stageautofeedback-binutils
check-gold: maybe-all-gas
-
check-stage1-gold: maybe-all-stage1-gas
check-stage2-gold: maybe-all-stage2-gas
check-stage3-gold: maybe-all-stage3-gas
@@ -56206,7 +56103,6 @@ check-stagefeedback-gold: maybe-all-stagefeedback-gas
check-stageautoprofile-gold: maybe-all-stageautoprofile-gas
check-stageautofeedback-gold: maybe-all-stageautofeedback-gas
configure-opcodes: maybe-configure-intl
-
configure-stage1-opcodes: maybe-configure-stage1-intl
configure-stage2-opcodes: maybe-configure-stage2-intl
configure-stage3-opcodes: maybe-configure-stage3-intl
@@ -56216,7 +56112,6 @@ configure-stagefeedback-opcodes: maybe-configure-stagefeedback-intl
configure-stageautoprofile-opcodes: maybe-configure-stageautoprofile-intl
configure-stageautofeedback-opcodes: maybe-configure-stageautofeedback-intl
all-opcodes: maybe-all-bfd
-
all-stage1-opcodes: maybe-all-stage1-bfd
all-stage2-opcodes: maybe-all-stage2-bfd
all-stage3-opcodes: maybe-all-stage3-bfd
@@ -56226,7 +56121,6 @@ all-stagefeedback-opcodes: maybe-all-stagefeedback-bfd
all-stageautoprofile-opcodes: maybe-all-stageautoprofile-bfd
all-stageautofeedback-opcodes: maybe-all-stageautofeedback-bfd
all-opcodes: maybe-all-libiberty
-
all-stage1-opcodes: maybe-all-stage1-libiberty
all-stage2-opcodes: maybe-all-stage2-libiberty
all-stage3-opcodes: maybe-all-stage3-libiberty
@@ -56236,7 +56130,6 @@ all-stagefeedback-opcodes: maybe-all-stagefeedback-libiberty
all-stageautoprofile-opcodes: maybe-all-stageautoprofile-libiberty
all-stageautofeedback-opcodes: maybe-all-stageautofeedback-libiberty
all-opcodes: maybe-all-intl
-
all-stage1-opcodes: maybe-all-stage1-intl
all-stage2-opcodes: maybe-all-stage2-intl
all-stage3-opcodes: maybe-all-stage3-intl
@@ -56260,38 +56153,23 @@ install-itcl: maybe-install-tcl
install-strip-itcl: maybe-install-strip-tcl
configure-tk: maybe-configure-tcl
all-tk: maybe-all-tcl
-all-sid: maybe-all-libiberty
-all-sid: maybe-all-bfd
-all-sid: maybe-all-opcodes
all-sid: maybe-all-tcl
all-sid: maybe-all-tk
install-sid: maybe-install-tcl
install-strip-sid: maybe-install-strip-tcl
install-sid: maybe-install-tk
install-strip-sid: maybe-install-strip-tk
-configure-sim: maybe-configure-intl
-all-sim: maybe-all-intl
-all-sim: maybe-all-libiberty
-all-sim: maybe-all-bfd
-all-sim: maybe-all-opcodes
all-sim: maybe-all-readline
all-sim: maybe-configure-gdb
-all-fastjar: maybe-all-zlib
all-fastjar: maybe-all-build-texinfo
-all-fastjar: maybe-all-libiberty
-all-bison: maybe-all-intl
all-bison: maybe-all-build-texinfo
all-flex: maybe-all-build-bison
-all-flex: maybe-all-intl
all-flex: maybe-all-m4
all-flex: maybe-all-build-texinfo
-all-m4: maybe-all-intl
all-m4: maybe-all-build-texinfo
-configure-target-boehm-gc: maybe-all-target-libstdc++-v3
configure-target-fastjar: maybe-configure-target-zlib
all-target-fastjar: maybe-all-target-zlib
configure-target-libgo: maybe-configure-target-libffi
-configure-target-libgo: maybe-all-target-libstdc++-v3
all-target-libgo: maybe-all-target-libbacktrace
all-target-libgo: maybe-all-target-libffi
all-target-libgo: maybe-all-target-libatomic
@@ -56305,7 +56183,6 @@ all-target-libjava: maybe-all-target-libffi
configure-target-libobjc: maybe-configure-target-boehm-gc
all-target-libobjc: maybe-all-target-boehm-gc
configure-target-libstdc++-v3: maybe-configure-target-libgomp
-
configure-stage1-target-libstdc++-v3: maybe-configure-stage1-target-libgomp
configure-stage2-target-libstdc++-v3: maybe-configure-stage2-target-libgomp
configure-stage3-target-libstdc++-v3: maybe-configure-stage3-target-libgomp
@@ -56314,9 +56191,7 @@ configure-stageprofile-target-libstdc++-v3: maybe-configure-stageprofile-target-
configure-stagefeedback-target-libstdc++-v3: maybe-configure-stagefeedback-target-libgomp
configure-stageautoprofile-target-libstdc++-v3: maybe-configure-stageautoprofile-target-libgomp
configure-stageautofeedback-target-libstdc++-v3: maybe-configure-stageautofeedback-target-libgomp
-configure-target-liboffloadmic: maybe-configure-target-libgomp
configure-target-libsanitizer: maybe-all-target-libstdc++-v3
-
configure-stage1-target-libsanitizer: maybe-all-stage1-target-libstdc++-v3
configure-stage2-target-libsanitizer: maybe-all-stage2-target-libstdc++-v3
configure-stage3-target-libsanitizer: maybe-all-stage3-target-libstdc++-v3
@@ -56326,7 +56201,6 @@ configure-stagefeedback-target-libsanitizer: maybe-all-stagefeedback-target-libs
configure-stageautoprofile-target-libsanitizer: maybe-all-stageautoprofile-target-libstdc++-v3
configure-stageautofeedback-target-libsanitizer: maybe-all-stageautofeedback-target-libstdc++-v3
configure-target-libvtv: maybe-all-target-libstdc++-v3
-
configure-stage1-target-libvtv: maybe-all-stage1-target-libstdc++-v3
configure-stage2-target-libvtv: maybe-all-stage2-target-libstdc++-v3
configure-stage3-target-libvtv: maybe-all-stage3-target-libstdc++-v3
@@ -56336,7 +56210,6 @@ configure-stagefeedback-target-libvtv: maybe-all-stagefeedback-target-libstdc++-
configure-stageautoprofile-target-libvtv: maybe-all-stageautoprofile-target-libstdc++-v3
configure-stageautofeedback-target-libvtv: maybe-all-stageautofeedback-target-libstdc++-v3
all-target-libstdc++-v3: maybe-configure-target-libgomp
-
all-stage1-target-libstdc++-v3: maybe-configure-stage1-target-libgomp
all-stage2-target-libstdc++-v3: maybe-configure-stage2-target-libgomp
all-stage3-target-libstdc++-v3: maybe-configure-stage3-target-libgomp
@@ -56345,7 +56218,6 @@ all-stageprofile-target-libstdc++-v3: maybe-configure-stageprofile-target-libgom
all-stagefeedback-target-libstdc++-v3: maybe-configure-stagefeedback-target-libgomp
all-stageautoprofile-target-libstdc++-v3: maybe-configure-stageautoprofile-target-libgomp
all-stageautofeedback-target-libstdc++-v3: maybe-configure-stageautofeedback-target-libgomp
-all-target-liboffloadmic: maybe-all-target-libgomp
install-target-libgo: maybe-install-target-libatomic
install-target-libgfortran: maybe-install-target-libquadmath
install-target-libgfortran: maybe-install-target-libgcc
@@ -56363,12 +56235,63 @@ install-target-libobjc: maybe-install-target-libgcc
install-target-libstdc++-v3: maybe-install-target-libgcc
all-target-libgloss: maybe-all-target-newlib
all-target-winsup: maybe-all-target-libtermcap
-configure-target-newlib: maybe-all-binutils
-configure-target-newlib: maybe-all-ld
configure-target-libgfortran: maybe-all-target-libquadmath
configure-target-libgfortran: maybe-all-target-libbacktrace
+@if gcc-bootstrap
+configure-gnattools: stage_last
+configure-libcc1: stage_last
+configure-utils: stage_last
+configure-gdb: stage_last
+configure-gprof: stage_last
+configure-sid: stage_last
+configure-sim: stage_last
+configure-fastjar: stage_last
+configure-bison: stage_last
+configure-flex: stage_last
+configure-m4: stage_last
+@endif gcc-bootstrap
+
+@unless gcc-bootstrap
+all-gnattools: maybe-all-target-libstdc++-v3
+configure-libcc1: maybe-configure-gcc
+all-libcc1: maybe-all-gcc
+all-utils: maybe-all-libiberty
+configure-gdb: maybe-all-intl
+configure-gdb: maybe-all-bfd
+configure-gdb: maybe-all-libiconv
+all-gdb: maybe-all-libiberty
+all-gdb: maybe-all-libiconv
+all-gdb: maybe-all-opcodes
+all-gdb: maybe-all-libdecnumber
+configure-gprof: maybe-configure-intl
+all-gprof: maybe-all-libiberty
+all-gprof: maybe-all-bfd
+all-gprof: maybe-all-opcodes
+all-gprof: maybe-all-intl
+all-gprof: maybe-all-gas
+all-sid: maybe-all-libiberty
+all-sid: maybe-all-bfd
+all-sid: maybe-all-opcodes
+configure-sim: maybe-configure-intl
+all-sim: maybe-all-intl
+all-sim: maybe-all-libiberty
+all-sim: maybe-all-bfd
+all-sim: maybe-all-opcodes
+all-fastjar: maybe-all-zlib
+all-fastjar: maybe-all-libiberty
+all-bison: maybe-all-intl
+all-flex: maybe-all-intl
+all-m4: maybe-all-intl
+configure-target-boehm-gc: maybe-all-target-libstdc++-v3
+configure-target-libgo: maybe-all-target-libstdc++-v3
+configure-target-liboffloadmic: maybe-configure-target-libgomp
+all-target-liboffloadmic: maybe-all-target-libgomp
+configure-target-newlib: maybe-all-binutils
+configure-target-newlib: maybe-all-ld
+@endunless gcc-bootstrap
+
# Dependencies for target modules on other target modules are
# described by lang_env_dependencies; the defaults apply to anything
# not mentioned there.
diff --git a/Makefile.tpl b/Makefile.tpl
index 94a4f79f6..8227d4d36 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -403,6 +403,7 @@ DLLTOOL = @DLLTOOL@
LD = @LD@
LIPO = @LIPO@
NM = @NM@
+OBJCOPY = @OBJCOPY@
OBJDUMP = @OBJDUMP@
RANLIB = @RANLIB@
READELF = @READELF@
@@ -1822,25 +1823,46 @@ configure-target-[+module+]: maybe-all-gcc[+
(define dep-maybe (lambda ()
(if (exist? "hard") "" "maybe-")))
- ;; dep-kind returns "normal" if the dependency is on an "install" target,
- ;; or if either module is not bootstrapped. It returns "bootstrap" for
- ;; configure or build dependencies between bootstrapped modules; it returns
- ;; "prebootstrap" for configure or build dependencies of bootstrapped
- ;; modules on a build module (e.g. all-gcc on all-build-bison). All this
- ;; is only necessary for host modules.
+ ;; dep-kind returns returns "prebootstrap" for configure or build
+ ;; dependencies of bootstrapped modules on a build module
+ ;; (e.g. all-gcc on all-build-bison); "normal" if the dependency is
+ ;; on an "install" target, or if the dependence module is not
+ ;; bootstrapped; otherwise, it returns "bootstrap" or
+ ;; "postbootstrap" depending on whether the dependent module is
+ ;; bootstrapped. All this is only necessary for host and target
+ ;; modules. It might seem like, in order to avoid build races, we
+ ;; might need more elaborate detection between prebootstrap and
+ ;; postbootstrap modules, but there are no host prebootstrap
+ ;; modules. If there were any non-bootstrap host modules that
+ ;; bootstrap modules depended on, we'd get unsatisfied per-stage
+ ;; dependencies on them, which would be immediately noticed.
(define dep-kind (lambda ()
- (if (and (hash-ref boot-modules (dep-module "module"))
- (=* (dep-module "on") "build-"))
- "prebootstrap"
+ (cond
+ ((and (hash-ref boot-modules (dep-module "module"))
+ (=* (dep-module "on") "build-"))
+ "prebootstrap")
- (if (or (= (dep-subtarget "on") "install-")
- (not (hash-ref boot-modules (dep-module "module")))
- (not (hash-ref boot-modules (dep-module "on"))))
- "normal"
- "bootstrap"))))
+ ((or (= (dep-subtarget "on") "install-")
+ (not (hash-ref boot-modules (dep-module "on"))))
+ "normal")
+
+ ((hash-ref boot-modules (dep-module "module"))
+ "bootstrap")
+
+ (1 "postbootstrap"))))
+
+ (define make-postboot-dep (lambda ()
+ (let ((target (dep-module "module")) (dep "stage_last"))
+ (unless (= (hash-ref postboot-targets target) dep)
+ (hash-create-handle! postboot-targets target dep)
+ ;; All non-bootstrap modules' configure target already
+ ;; depend on dep.
+ (unless (=* target "target-")
+ (string-append "configure-" target ": " dep "\n"))))))
;; We now build the hash table that is used by dep-kind.
(define boot-modules (make-hash-table 113))
+ (define postboot-targets (make-hash-table 113))
+]
[+ FOR host_modules +][+
@@ -1857,18 +1879,23 @@ configure-target-[+module+]: maybe-all-gcc[+
# to check for bootstrap/prebootstrap dependencies. To resolve
# prebootstrap dependencies, prebootstrap modules are gathered in
# a hash table.
-[+ FOR dependencies +][+ (make-dep "" "") +]
-[+ CASE (dep-kind) +]
-[+ == "prebootstrap"
- +][+ FOR bootstrap_stage +]
-[+ (make-dep (dep-stage) "") +][+
- ENDFOR bootstrap_stage +]
-[+ == "bootstrap"
- +][+ FOR bootstrap_stage +]
-[+ (make-dep (dep-stage) (dep-stage)) +][+
- ENDFOR bootstrap_stage +]
-[+ ESAC +][+
-ENDFOR dependencies +]
+[+ FOR dependencies +][+ CASE (dep-kind) +]
+[+ == "prebootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +]
+[+ (make-dep (dep-stage) "") +][+ ENDFOR bootstrap_stage +]
+[+ == "bootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +]
+[+ (make-dep (dep-stage) (dep-stage)) +][+ ENDFOR bootstrap_stage +]
+[+ == "normal" +][+ (make-dep "" "") +]
+[+ ESAC +][+ ENDFOR dependencies +]
+
+@if gcc-bootstrap
+[+ FOR dependencies +][+ CASE (dep-kind) +]
+[+ == "postbootstrap" +][+ (make-postboot-dep) +][+ ESAC +][+
+ENDFOR dependencies +]@endif gcc-bootstrap
+
+@unless gcc-bootstrap
+[+ FOR dependencies +][+ CASE (dep-kind) +]
+[+ == "postbootstrap" +][+ (make-dep "" "") +]
+[+ ESAC +][+ ENDFOR dependencies +]@endunless gcc-bootstrap
# Dependencies for target modules on other target modules are
# described by lang_env_dependencies; the defaults apply to anything
diff --git a/config.guess b/config.guess
index 0967f2afa..445c40683 100755
--- a/config.guess
+++ b/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2016 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2016-04-02'
+timestamp='2018-06-26'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2016-04-02'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see .
+# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2016-04-02'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to .
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -106,10 +106,10 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
+case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c" ;
for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
@@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
- eval $set_cc_for_build
- cat <<-EOF > $dummy.c
+ eval "$set_cc_for_build"
+ cat <<-EOF > "$dummy.c"
#include
#if defined(__UCLIBC__)
LIBC=uclibc
@@ -149,13 +149,20 @@ Linux|GNU|GNU/*)
LIBC=gnu
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+ # If ldd exists, use it to detect musl libc.
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl
+ then
+ LIBC=musl
+ fi
;;
esac
# Note: order is significant - the case branches are not exclusive.
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -169,27 +176,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
- /sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || \
+ "/sbin/$sysctl" 2>/dev/null || \
+ "/usr/sbin/$sysctl" 2>/dev/null || \
echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
+ case "$UNAME_MACHINE_ARCH" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
earmv*)
- arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
- endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
- machine=${arch}${endian}-unknown
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine="${arch}${endian}"-unknown
;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
+ # to ELF recently (or will in the future) and ABI.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval "$set_cc_for_build"
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
@@ -205,10 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# Determine ABI tags.
- case "${UNAME_MACHINE_ARCH}" in
+ case "$UNAME_MACHINE_ARCH" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
- abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
;;
esac
# The OS release
@@ -216,46 +226,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
+ case "$UNAME_VERSION" in
Debian*)
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}${abi}"
+ echo "$machine-${os}${release}${abi-}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
exit ;;
*:LibertyBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+ exit ;;
+ *:MidnightBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
exit ;;
*:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
exit ;;
*:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
exit ;;
macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:Sortix:*:*)
- echo ${UNAME_MACHINE}-unknown-sortix
+ echo "$UNAME_MACHINE"-unknown-sortix
exit ;;
+ *:Redox:*:*)
+ echo "$UNAME_MACHINE"-unknown-redox
+ exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -307,28 +326,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
+ echo "$UNAME_MACHINE"-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
+ echo "$UNAME_MACHINE"-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
@@ -340,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
+ echo arm-acorn-riscix"$UNAME_RELEASE"
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
@@ -367,19 +377,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
+ echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
@@ -392,13 +402,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
SUN_ARCH=x86_64
fi
fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
@@ -407,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
exit ;;
sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
;;
sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
+ echo sparc-sun-sunos"$UNAME_RELEASE"
;;
esac
exit ;;
aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
+ echo sparc-auspex-sunos"$UNAME_RELEASE"
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
@@ -436,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
+ echo m68k-milan-mint"$UNAME_RELEASE"
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
+ echo m68k-hades-mint"$UNAME_RELEASE"
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
+ echo m68k-unknown-mint"$UNAME_RELEASE"
exit ;;
m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
+ echo m68k-apple-machten"$UNAME_RELEASE"
exit ;;
powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
+ echo powerpc-apple-machten"$UNAME_RELEASE"
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
+ echo mips-dec-ultrix"$UNAME_RELEASE"
exit ;;
VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
+ echo vax-dec-ultrix"$UNAME_RELEASE"
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
+ echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include /* for printf() prototype */
int main (int argc, char *argv[]) {
@@ -482,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
{ echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
+ echo mips-mips-riscos"$UNAME_RELEASE"
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
@@ -524,17 +534,17 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
+ if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+ [ "$TARGET_BINARY_INTERFACE"x = x ]
then
- echo m88k-dg-dgux${UNAME_RELEASE}
+ echo m88k-dg-dgux"$UNAME_RELEASE"
else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ echo m88k-dg-dguxbcs"$UNAME_RELEASE"
fi
else
- echo i586-dg-dgux${UNAME_RELEASE}
+ echo i586-dg-dgux"$UNAME_RELEASE"
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
@@ -551,7 +561,7 @@ EOF
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
@@ -563,14 +573,14 @@ EOF
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#include
main()
@@ -581,7 +591,7 @@ EOF
exit(0);
}
EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
then
echo "$SYSTEM_NAME"
else
@@ -595,7 +605,7 @@ EOF
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
@@ -604,18 +614,18 @@ EOF
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
@@ -630,28 +640,28 @@ EOF
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ case "$UNAME_MACHINE" in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
+ case "$sc_cpu_version" in
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
+ case "$sc_kernel_bits" in
32) HP_ARCH=hppa2.0n ;;
64) HP_ARCH=hppa2.0w ;;
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ if [ "$HP_ARCH" = "" ]; then
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
#include
@@ -684,13 +694,13 @@ EOF
exit (0);
}
EOF
- (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = hppa2.0w ]
+ if [ "$HP_ARCH" = hppa2.0w ]
then
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -709,15 +719,15 @@ EOF
HP_ARCH=hppa64
fi
fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
exit ;;
ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux"$HPUX_REV"
exit ;;
3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#include
int
main ()
@@ -742,11 +752,11 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
@@ -755,7 +765,7 @@ EOF
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
@@ -763,9 +773,9 @@ EOF
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
+ echo "$UNAME_MACHINE"-unknown-osf1mk
else
- echo ${UNAME_MACHINE}-unknown-osf1
+ echo "$UNAME_MACHINE"-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
@@ -790,127 +800,109 @@ EOF
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
exit ;;
sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
+ echo sparc-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
+ case "$UNAME_PROCESSOR" in
amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
esac
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
+ echo "$UNAME_MACHINE"-pc-cygwin
exit ;;
*:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
+ echo "$UNAME_MACHINE"-pc-mingw64
exit ;;
*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
+ echo "$UNAME_MACHINE"-pc-mingw32
exit ;;
*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ echo "$UNAME_MACHINE"-pc-msys
exit ;;
i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
+ echo "$UNAME_MACHINE"-pc-pw32
exit ;;
*:Interix*:*)
- case ${UNAME_MACHINE} in
+ case "$UNAME_MACHINE" in
x86)
- echo i586-pc-interix${UNAME_RELEASE}
+ echo i586-pc-interix"$UNAME_RELEASE"
exit ;;
authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
+ echo x86_64-unknown-interix"$UNAME_RELEASE"
exit ;;
IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
+ echo ia64-unknown-interix"$UNAME_RELEASE"
exit ;;
esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
+ echo "$UNAME_MACHINE"-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
+ *:Minix:*:*)
+ echo "$UNAME_MACHINE"-unknown-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -924,63 +916,63 @@ EOF
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arm*:Linux:*:*)
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
e2k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
k1om:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
@@ -994,64 +986,70 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
+ test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
;;
+ mips64el:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
openrisc*:Linux:*:*)
- echo or1k-unknown-linux-${LIBC}
+ echo or1k-unknown-linux-"$LIBC"
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-${LIBC}
+ echo sparc-unknown-linux-"$LIBC"
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-${LIBC}
+ echo hppa64-unknown-linux-"$LIBC"
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
- PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
- *) echo hppa-unknown-linux-${LIBC} ;;
+ PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+ PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+ *) echo hppa-unknown-linux-"$LIBC" ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-${LIBC}
+ echo powerpc64-unknown-linux-"$LIBC"
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-${LIBC}
+ echo powerpc-unknown-linux-"$LIBC"
exit ;;
ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-${LIBC}
+ echo powerpc64le-unknown-linux-"$LIBC"
exit ;;
ppcle:Linux:*:*)
- echo powerpcle-unknown-linux-${LIBC}
+ echo powerpcle-unknown-linux-"$LIBC"
+ exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1065,34 +1063,34 @@ EOF
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
+ echo "$UNAME_MACHINE"-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
+ echo "$UNAME_MACHINE"-unknown-stop
exit ;;
i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
+ echo "$UNAME_MACHINE"-unknown-atheos
exit ;;
i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
+ echo "$UNAME_MACHINE"-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
+ echo i386-unknown-lynxos"$UNAME_RELEASE"
exit ;;
i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ echo "$UNAME_MACHINE"-pc-msdosdjgpp
exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
fi
exit ;;
i*86:*:5:[678]*)
@@ -1102,12 +1100,12 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1117,9 +1115,9 @@ EOF
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv32
+ echo "$UNAME_MACHINE"-pc-sysv32
fi
exit ;;
pc:*:*:*)
@@ -1139,9 +1137,9 @@ EOF
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
@@ -1161,9 +1159,9 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
@@ -1172,28 +1170,28 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
+ echo m68k-unknown-lynxos"$UNAME_RELEASE"
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
+ echo sparc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ echo rs6000-unknown-lynxos"$UNAME_RELEASE"
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ echo powerpc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
+ echo mips-dde-sysv"$UNAME_RELEASE"
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
@@ -1204,7 +1202,7 @@ EOF
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
+ echo "$UNAME_MACHINE"-sni-sysv4
else
echo ns32k-sni-sysv
fi
@@ -1224,23 +1222,23 @@ EOF
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
+ echo "$UNAME_MACHINE"-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
+ echo m68k-apple-aux"$UNAME_RELEASE"
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv"$UNAME_RELEASE"
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv"$UNAME_RELEASE"
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
@@ -1259,49 +1257,56 @@ EOF
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
+ echo sx4-nec-superux"$UNAME_RELEASE"
exit ;;
SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
+ echo sx5-nec-superux"$UNAME_RELEASE"
exit ;;
SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
+ echo sx6-nec-superux"$UNAME_RELEASE"
exit ;;
SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
+ echo sx7-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
+ echo sx8-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
+ echo sx8r-nec-superux"$UNAME_RELEASE"
exit ;;
SX-ACE:SUPER-UX:*:*)
- echo sxace-nec-superux${UNAME_RELEASE}
+ echo sxace-nec-superux"$UNAME_RELEASE"
exit ;;
Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ echo powerpc-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
- if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
@@ -1312,7 +1317,7 @@ EOF
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
@@ -1320,19 +1325,25 @@ EOF
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
+ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
+ echo nse-tandem-nsk"$UNAME_RELEASE"
exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
+ NSR-*:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ echo nsv-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk"$UNAME_RELEASE"
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
@@ -1341,7 +1352,7 @@ EOF
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
@@ -1352,7 +1363,7 @@ EOF
else
UNAME_MACHINE="$cputype"
fi
- echo ${UNAME_MACHINE}-unknown-plan9
+ echo "$UNAME_MACHINE"-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
@@ -1373,14 +1384,14 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ echo mips-sei-seiux"$UNAME_RELEASE"
exit ;;
*:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
+ case "$UNAME_MACHINE" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
@@ -1389,37 +1400,48 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+ echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
exit ;;
i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
+ echo "$UNAME_MACHINE"-pc-rdos
exit ;;
i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
+ echo "$UNAME_MACHINE"-pc-aros
exit ;;
x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
+ echo "$UNAME_MACHINE"-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <&2 < in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
@@ -1438,16 +1460,16 @@ hostinfo = `(hostinfo) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
EOF
exit 1
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/config.sub b/config.sub
index b434622c4..fe6229780 100755
--- a/config.sub
+++ b/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2016 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2016-05-10'
+timestamp='2018-07-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2016-05-10'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see .
+# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -33,7 +33,7 @@ timestamp='2016-05-10'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -67,7 +67,7 @@ Report bugs and patches to ."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -94,7 +94,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
- echo $1
+ echo "$1"
exit ;;
* )
@@ -110,134 +110,455 @@ case $# in
exit 1;;
esac
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- android-linux)
- os=-linux-android
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
+# Split fields of configuration type
+IFS="-" read -r field1 field2 field3 field4 <&2
+ exit 1
;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze*)
- os=
- basic_machine=$1
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ os=$field3-$field4
;;
- -bluegene*)
- os=-cnk
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+ | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ os=$field3
+ ;;
+ esac
;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* \
+ | c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* \
+ | harris | dolphin | highlevel | gould | cbm | ns | masscomp \
+ | apple | axis | knuth | cray | microblaze* \
+ | sim | cisco | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ os=
+ ;;
+ *)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ esac
;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*178)
- os=-lynxos178
- ;;
- -lynx*5)
- os=-lynxos5
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=scout
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=sysv
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=cegcc
+ ;;
+ cray)
+ basic_machine=j90-cray
+ os=unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=unicosmp
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=sysv3
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=hpux
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=mach
+ ;;
+ vsta)
+ basic_machine=i386-unknown
+ os=vsta
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=linux
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=seiux
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=sysv2
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=sysv4
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=solaris2
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=vms
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ os=
+ ;;
+ esac
;;
esac
@@ -252,18 +573,18 @@ case $basic_machine in
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arceb \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
- | c4x | c8051 | clipper \
+ | c4x | c8051 | clipper | csky \
| d10v | d30v | dlx | dsp16xx \
| e2k | epiphany \
| fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
- | i370 | i860 | i960 | ia64 \
+ | i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
@@ -296,13 +617,15 @@ case $basic_machine in
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
+ | nfp \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 | or1k | or1knd | or32 \
- | pdp10 | pdp11 | pj | pjl \
+ | pdp10 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pru \
| pyramid \
- | riscv32 | riscv64 \
+ | riscv | riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
@@ -314,7 +637,7 @@ case $basic_machine in
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
- | we32k \
+ | wasm32 \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
@@ -333,20 +656,23 @@ case $basic_machine in
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
- os=-none
+ os=${os:-none}
;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
+ ;;
+ m9s12z | m68hcs12z | hcs12z | s12z)
+ basic_machine=s12z-unknown
+ os=${os:-none}
;;
ms1)
basic_machine=mt-unknown
;;
-
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
- os=-none
+ os=${os:-none}
;;
xscaleeb)
basic_machine=armeb-unknown
@@ -362,11 +688,6 @@ case $basic_machine in
i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
@@ -380,14 +701,14 @@ case $basic_machine in
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | c8051-* | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
+ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
@@ -421,6 +742,7 @@ case $basic_machine in
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
+ | nfp-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
@@ -428,8 +750,9 @@ case $basic_machine in
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pru-* \
| pyramid-* \
- | riscv32-* | riscv64-* \
+ | riscv-* | riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
@@ -444,6 +767,7 @@ case $basic_machine in
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
+ | wasm32-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -456,141 +780,77 @@ case $basic_machine in
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
abacus)
basic_machine=abacus-unknown
;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
+ basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
amiga | amiga-*)
basic_machine=m68k-unknown
;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
asmjs)
basic_machine=asmjs-unknown
;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
+ basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=linux
;;
bluegene*)
basic_machine=powerpc-ibm
- os=-cnk
+ os=cnk
;;
c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
+ os=${os:-unicos}
;;
convex-c1)
basic_machine=c1-convex
- os=-bsd
+ os=bsd
;;
convex-c2)
basic_machine=c2-convex
- os=-bsd
+ os=bsd
;;
convex-c32)
basic_machine=c32-convex
- os=-bsd
+ os=bsd
;;
convex-c34)
basic_machine=c34-convex
- os=-bsd
+ os=bsd
;;
convex-c38)
basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
+ os=bsd
;;
cr16 | cr16-*)
basic_machine=cr16-unknown
- os=-elf
+ os=${os:-elf}
;;
crds | unos)
basic_machine=m68k-crds
@@ -603,7 +863,7 @@ case $basic_machine in
;;
crx)
basic_machine=crx-unknown
- os=-elf
+ os=${os:-elf}
;;
da30 | da30-*)
basic_machine=m68k-da30
@@ -613,50 +873,38 @@ case $basic_machine in
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
- os=-tops10
+ os=tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
- os=-tops20
+ os=tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
- os=-bosx
+ os=${os:-bosx}
;;
- dpx2* | dpx2*-bull)
+ dpx2*)
basic_machine=m68k-bull
- os=-sysv3
+ os=sysv3
;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
+ e500v[12]-*)
+ basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=$os"spe"
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=${os:-bsd}
;;
fx2800)
basic_machine=i860-alliant
@@ -664,45 +912,13 @@ case $basic_machine in
genix)
basic_machine=ns32k-ns
;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
+ os=hiuxwe2
;;
hp300-*)
basic_machine=m68k-hp
;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
@@ -732,200 +948,82 @@ case $basic_machine in
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ os=sysv32
;;
i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ os=sysv4
;;
i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ os=sysv
;;
i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ os=solaris2
;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
+ j90 | j90-cray)
+ basic_machine=j90-cray
+ os=${os:-unicos}
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
- -irix*)
+ irix*)
;;
*)
- os=-irix4
+ os=irix4
;;
esac
;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
leon-*|leon[3-9]-*)
- basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
+ basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
;;
m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
+ basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=linux
;;
microblaze*)
basic_machine=microblaze-xilinx
;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
- mingw32)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
miniframe)
basic_machine=m68000-convergent
;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
- os=-mint
+ os=mint
;;
mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
;;
mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- moxiebox)
- basic_machine=moxie-unknown
- os=-moxiebox
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
+ basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
;;
ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- msys)
- basic_machine=i686-pc
- os=-msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=-nacl
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
+ basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
;;
news-3600 | risc-news)
basic_machine=mips-sony
- os=-newsos
+ os=newsos
;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
+ next | m*-next)
basic_machine=m68k-next
case $os in
- -nextstep* )
+ nextstep* )
;;
- -ns2*)
- os=-nextstep2
+ ns2*)
+ os=nextstep2
;;
*)
- os=-nextstep3
+ os=nextstep3
;;
esac
;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
np1)
basic_machine=np1-gould
;;
@@ -938,40 +1036,26 @@ case $basic_machine in
nsr-tandem)
basic_machine=nsr-tandem
;;
+ nsv-tandem)
+ basic_machine=nsv-tandem
+ ;;
+ nsx-tandem)
+ basic_machine=nsx-tandem
+ ;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
- os=-proelf
+ os=proelf
;;
openrisc | openrisc-*)
basic_machine=or32-unknown
;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
+ os=hiuxwe2
;;
parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
+ basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=linux
;;
pbd)
basic_machine=sparc-tti
@@ -986,7 +1070,7 @@ case $basic_machine in
basic_machine=i386-pc
;;
pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
@@ -1001,16 +1085,16 @@ case $basic_machine in
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
@@ -1020,43 +1104,27 @@ case $basic_machine in
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
+ ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
rm[46]00)
basic_machine=mips-siemens
;;
@@ -1069,10 +1137,6 @@ case $basic_machine in
s390x | s390x-*)
basic_machine=s390x-ibm
;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
@@ -1081,32 +1145,17 @@ case $basic_machine in
;;
sde)
basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
+ os=${os:-elf}
;;
sequent)
basic_machine=i386-sequent
;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
sh5el)
basic_machine=sh5le-unknown
;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
+ simso-wrs)
basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
+ os=vxworks
;;
spur)
basic_machine=spur-unknown
@@ -1114,44 +1163,12 @@ case $basic_machine in
st2000)
basic_machine=m68k-tandem
;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
strongarm-* | thumb-*)
- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
@@ -1161,25 +1178,9 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
tile*)
basic_machine=$basic_machine-unknown
- os=-linux-gnu
+ os=linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
@@ -1187,85 +1188,32 @@ case $basic_machine in
tx39el)
basic_machine=mipstx39el-unknown
;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
tower | tower-32)
basic_machine=m68k-ncr
;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
w65*)
basic_machine=w65-wdc
- os=-none
+ os=none
;;
w89k-*)
basic_machine=hppa1.1-winbond
- os=-proelf
+ os=proelf
;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
+ x64)
+ basic_machine=x86_64-pc
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
- basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
+ basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
;;
none)
basic_machine=none-none
- os=-none
+ os=${os:-none}
;;
# Here we handle the default manufacturer of certain CPU types. It is in
@@ -1291,10 +1239,6 @@ case $basic_machine in
vax)
basic_machine=vax-dec
;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
pdp11)
basic_machine=pdp11-dec
;;
@@ -1304,9 +1248,6 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
cydra)
basic_machine=cydra-cydrome
;;
@@ -1326,7 +1267,7 @@ case $basic_machine in
# Make sure to match an already-canonicalized machine name.
;;
*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1
;;
esac
@@ -1334,10 +1275,10 @@ esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
;;
*-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
;;
*)
;;
@@ -1345,200 +1286,246 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
-if [ x"$os" != x"" ]
+if [ x$os != x ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
;;
- -solaris1 | -solaris1.*)
+ bluegene*)
+ os=cnk
+ ;;
+ solaris1 | solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
- -solaris)
- os=-solaris2
+ solaris)
+ os=solaris2
;;
- -svr4*)
- os=-sysv4
+ unixware*)
+ os=sysv4.2uw
;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
+ gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
- # First accept the basic system types.
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
+ ;;
+ # Now accept the basic system types.
# The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* | -cloudabi* | -sortix* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -jehanne*)
+ # Each alternative MUST end in a * to match a version number.
+ # sysv* is not here because it comes later, after sysvr4.
+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | kopensolaris* | plan9* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | rtu* | xenix* \
+ | knetbsd* | mirbsd* | netbsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* \
+ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+ | linux-newlib* | linux-musl* | linux-uclibc* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* \
+ | morphos* | superux* | rtmk* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | -jehanne*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
- -qnx*)
+ qnx*)
case $basic_machine in
x86-* | i*86-*)
;;
*)
- os=-nto$os
+ os=nto-$os
;;
esac
;;
- -nto-qnx*)
+ hiux*)
+ os=hiuxwe2
;;
- -nto*)
+ nto-qnx*)
+ ;;
+ nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ sim | xray | os68k* | v88r* \
+ | windows* | osx | abug | netware* | os9* \
+ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
+ linux-dietlibc)
+ os=linux-dietlibc
;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
- -linux*)
+ linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ lynx*178)
+ os=lynxos178
;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ lynx*5)
+ os=lynxos5
;;
- -opened*)
- os=-openedition
+ lynx*)
+ os=lynxos
;;
- -os400*)
- os=-os400
+ mac*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
;;
- -wince*)
- os=-wince
+ opened*)
+ os=openedition
;;
- -osfrose*)
- os=-osfrose
+ os400*)
+ os=os400
;;
- -osf*)
- os=-osf
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
- -utek*)
- os=-bsd
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
- -dynix*)
- os=-bsd
+ wince*)
+ os=wince
;;
- -acis*)
- os=-aos
+ utek*)
+ os=bsd
;;
- -atheos*)
- os=-atheos
+ dynix*)
+ os=bsd
;;
- -syllable*)
- os=-syllable
+ acis*)
+ os=aos
;;
- -386bsd)
- os=-bsd
+ atheos*)
+ os=atheos
;;
- -ctix* | -uts*)
- os=-sysv
+ syllable*)
+ os=syllable
;;
- -nova*)
- os=-rtmk-nova
+ 386bsd)
+ os=bsd
;;
- -ns2 )
- os=-nextstep2
+ ctix* | uts*)
+ os=sysv
;;
- -nsk*)
- os=-nsk
+ nova*)
+ os=rtmk-nova
+ ;;
+ ns2)
+ os=nextstep2
+ ;;
+ nsk*)
+ os=nsk
;;
# Preserve the version number of sinix5.
- -sinix5.*)
+ sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
- -sinix*)
- os=-sysv4
+ sinix*)
+ os=sysv4
;;
- -tpf*)
- os=-tpf
+ tpf*)
+ os=tpf
;;
- -triton*)
- os=-sysv3
+ triton*)
+ os=sysv3
;;
- -oss*)
- os=-sysv3
+ oss*)
+ os=sysv3
;;
- -svr4)
- os=-sysv4
+ svr4*)
+ os=sysv4
;;
- -svr3)
- os=-sysv3
+ svr3)
+ os=sysv3
;;
- -sysvr4)
- os=-sysv4
+ sysvr4)
+ os=sysv4
;;
- # This must come after -sysvr4.
- -sysv*)
+ # This must come after sysvr4.
+ sysv*)
;;
- -ose*)
- os=-ose
+ ose*)
+ os=ose
;;
- -es1800*)
- os=-ose
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
;;
- -xenix)
- os=-xenix
+ zvmoe)
+ os=zvmoe
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
+ dicos*)
+ os=dicos
;;
- -aros*)
- os=-aros
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $basic_machine in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
;;
- -zvmoe)
- os=-zvmoe
+ nacl*)
;;
- -dicos*)
- os=-dicos
+ ios)
;;
- -nacl*)
+ none)
;;
- -ios)
- ;;
- -none)
+ *-eabi)
;;
*)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1
;;
esac
@@ -1556,176 +1543,179 @@ else
case $basic_machine in
score-*)
- os=-elf
+ os=elf
;;
spu-*)
- os=-elf
+ os=elf
;;
*-acorn)
- os=-riscix1.2
+ os=riscix1.2
;;
arm*-rebel)
- os=-linux
+ os=linux
;;
arm*-semi)
- os=-aout
+ os=aout
;;
c4x-* | tic4x-*)
- os=-coff
+ os=coff
;;
c8051-*)
- os=-elf
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
;;
hexagon-*)
- os=-elf
+ os=elf
;;
tic54x-*)
- os=-coff
+ os=coff
;;
tic55x-*)
- os=-coff
+ os=coff
;;
tic6x-*)
- os=-coff
+ os=coff
;;
# This must come before the *-dec entry.
pdp10-*)
- os=-tops20
+ os=tops20
;;
pdp11-*)
- os=-none
+ os=none
;;
*-dec | vax-*)
- os=-ultrix4.2
+ os=ultrix4.2
;;
m68*-apollo)
- os=-domain
+ os=domain
;;
i386-sun)
- os=-sunos4.0.2
+ os=sunos4.0.2
;;
m68000-sun)
- os=-sunos3
+ os=sunos3
;;
m68*-cisco)
- os=-aout
+ os=aout
;;
mep-*)
- os=-elf
+ os=elf
;;
mips*-cisco)
- os=-elf
+ os=elf
;;
mips*-*)
- os=-elf
+ os=elf
;;
or32-*)
- os=-coff
+ os=coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
+ os=sysv3
;;
sparc-* | *-sun)
- os=-sunos4.1.1
+ os=sunos4.1.1
+ ;;
+ pru-*)
+ os=elf
;;
*-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
+ os=beos
;;
*-ibm)
- os=-aix
+ os=aix
;;
*-knuth)
- os=-mmixware
+ os=mmixware
;;
*-wec)
- os=-proelf
+ os=proelf
;;
*-winbond)
- os=-proelf
+ os=proelf
;;
*-oki)
- os=-proelf
+ os=proelf
;;
*-hp)
- os=-hpux
+ os=hpux
;;
*-hitachi)
- os=-hiux
+ os=hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
+ os=sysv
;;
*-cbm)
- os=-amigaos
+ os=amigaos
;;
*-dg)
- os=-dgux
+ os=dgux
;;
*-dolphin)
- os=-sysv3
+ os=sysv3
;;
m68k-ccur)
- os=-rtu
+ os=rtu
;;
m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
+ os=luna
;;
*-next)
- os=-nextstep3
+ os=nextstep
+ ;;
+ *-sequent)
+ os=ptx
+ ;;
+ *-crds)
+ os=unos
+ ;;
+ *-ns)
+ os=genix
+ ;;
+ i370-*)
+ os=mvs
;;
*-gould)
- os=-sysv
+ os=sysv
;;
*-highlevel)
- os=-bsd
+ os=bsd
;;
*-encore)
- os=-bsd
+ os=bsd
;;
*-sgi)
- os=-irix
+ os=irix
;;
*-siemens)
- os=-sysv4
+ os=sysv4
;;
*-masscomp)
- os=-rtu
+ os=rtu
;;
f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
+ os=uxpv
;;
*-rom68k)
- os=-coff
+ os=coff
;;
*-*bug)
- os=-coff
+ os=coff
;;
*-apple)
- os=-macos
+ os=macos
;;
*-atari*)
- os=-mint
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
;;
*)
- os=-none
+ os=none
;;
esac
fi
@@ -1736,79 +1726,82 @@ vendor=unknown
case $basic_machine in
*-unknown)
case $os in
- -riscix*)
+ riscix*)
vendor=acorn
;;
- -sunos*)
+ sunos*)
vendor=sun
;;
- -cnk*|-aix*)
+ cnk*|-aix*)
vendor=ibm
;;
- -beos*)
+ beos*)
vendor=be
;;
- -hpux*)
+ hpux*)
vendor=hp
;;
- -mpeix*)
+ mpeix*)
vendor=hp
;;
- -hiux*)
+ hiux*)
vendor=hitachi
;;
- -unos*)
+ unos*)
vendor=crds
;;
- -dgux*)
+ dgux*)
vendor=dg
;;
- -luna*)
+ luna*)
vendor=omron
;;
- -genix*)
+ genix*)
vendor=ns
;;
- -mvs* | -opened*)
+ clix*)
+ vendor=intergraph
+ ;;
+ mvs* | opened*)
vendor=ibm
;;
- -os400*)
+ os400*)
vendor=ibm
;;
- -ptx*)
+ ptx*)
vendor=sequent
;;
- -tpf*)
+ tpf*)
vendor=ibm
;;
- -vxsim* | -vxworks* | -windiss*)
+ vxsim* | vxworks* | windiss*)
vendor=wrs
;;
- -aux*)
+ aux*)
vendor=apple
;;
- -hms*)
+ hms*)
vendor=hitachi
;;
- -mpw* | -macos*)
+ mpw* | macos*)
vendor=apple
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
vendor=atari
;;
- -vos*)
+ vos*)
vendor=stratus
;;
esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
;;
esac
-echo $basic_machine$os
+echo "$basic_machine-$os"
exit
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/configure b/configure
index 2d0963bbe..5db527014 100755
--- a/configure
+++ b/configure
@@ -7191,7 +7191,9 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
# extrasub-{build,host,target} not because there is any reason to split
# the substitutions up that way, but only to remain below the limit of
# 99 commands in a script, for HP-UX sed.
-# Do not nest @if/@endif pairs, because configure will not warn you at all.
+
+# Do not nest @if/@endif or @unless/@endunless pairs, because
+# configure will not warn you at all.
case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
yes:yes:*\ gold\ *:*,c++,*) ;;
@@ -7210,8 +7212,10 @@ for module in ${build_configdirs} ; do
extrasub_build="$extrasub_build
/^@if build-$module\$/d
/^@endif build-$module\$/d
+/^@unless build-$module\$/,/^@endunless build-$module\$/d
/^@if build-$module-$bootstrap_suffix\$/d
-/^@endif build-$module-$bootstrap_suffix\$/d"
+/^@endif build-$module-$bootstrap_suffix\$/d
+/^@unless build-$module-$bootstrap_suffix\$/,/^@endunless build-$module-$bootstrap_suffix\$/d"
done
extrasub_host=
for module in ${configdirs} ; do
@@ -7230,8 +7234,10 @@ for module in ${configdirs} ; do
extrasub_host="$extrasub_host
/^@if $module\$/d
/^@endif $module\$/d
+/^@unless $module\$/,/^@endunless $module\$/d
/^@if $module-$host_bootstrap_suffix\$/d
-/^@endif $module-$host_bootstrap_suffix\$/d"
+/^@endif $module-$host_bootstrap_suffix\$/d
+/^@unless $module-$host_bootstrap_suffix\$/,/^@endunless $module-$host_bootstrap_suffix\$/d"
done
extrasub_target=
for module in ${target_configdirs} ; do
@@ -7250,13 +7256,17 @@ for module in ${target_configdirs} ; do
extrasub_target="$extrasub_target
/^@if target-$module\$/d
/^@endif target-$module\$/d
+/^@unless target-$module\$/,/^@endunless target-$module\$/d
/^@if target-$module-$target_bootstrap_suffix\$/d
-/^@endif target-$module-$target_bootstrap_suffix\$/d"
+/^@endif target-$module-$target_bootstrap_suffix\$/d
+/^@unless target-$module-$target_bootstrap_suffix\$/,/^@endunless target-$module-$target_bootstrap_suffix\$/d"
done
# Do the final fixup along with target modules.
extrasub_target="$extrasub_target
-/^@if /,/^@endif /d"
+/^@if /,/^@endif /d
+/^@unless /d
+/^@endunless /d"
# Create the serialization dependencies. This uses a temporary file.
diff --git a/configure.ac b/configure.ac
index 3cb95d69d..cf856e567 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2787,7 +2787,9 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
# extrasub-{build,host,target} not because there is any reason to split
# the substitutions up that way, but only to remain below the limit of
# 99 commands in a script, for HP-UX sed.
-# Do not nest @if/@endif pairs, because configure will not warn you at all.
+
+# Do not nest @if/@endif or @unless/@endunless pairs, because
+# configure will not warn you at all.
case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
yes:yes:*\ gold\ *:*,c++,*) ;;
@@ -2806,8 +2808,10 @@ for module in ${build_configdirs} ; do
extrasub_build="$extrasub_build
/^@if build-$module\$/d
/^@endif build-$module\$/d
+/^@unless build-$module\$/,/^@endunless build-$module\$/d
/^@if build-$module-$bootstrap_suffix\$/d
-/^@endif build-$module-$bootstrap_suffix\$/d"
+/^@endif build-$module-$bootstrap_suffix\$/d
+/^@unless build-$module-$bootstrap_suffix\$/,/^@endunless build-$module-$bootstrap_suffix\$/d"
done
extrasub_host=
for module in ${configdirs} ; do
@@ -2826,8 +2830,10 @@ for module in ${configdirs} ; do
extrasub_host="$extrasub_host
/^@if $module\$/d
/^@endif $module\$/d
+/^@unless $module\$/,/^@endunless $module\$/d
/^@if $module-$host_bootstrap_suffix\$/d
-/^@endif $module-$host_bootstrap_suffix\$/d"
+/^@endif $module-$host_bootstrap_suffix\$/d
+/^@unless $module-$host_bootstrap_suffix\$/,/^@endunless $module-$host_bootstrap_suffix\$/d"
done
extrasub_target=
for module in ${target_configdirs} ; do
@@ -2846,13 +2852,17 @@ for module in ${target_configdirs} ; do
extrasub_target="$extrasub_target
/^@if target-$module\$/d
/^@endif target-$module\$/d
+/^@unless target-$module\$/,/^@endunless target-$module\$/d
/^@if target-$module-$target_bootstrap_suffix\$/d
-/^@endif target-$module-$target_bootstrap_suffix\$/d"
+/^@endif target-$module-$target_bootstrap_suffix\$/d
+/^@unless target-$module-$target_bootstrap_suffix\$/,/^@endunless target-$module-$target_bootstrap_suffix\$/d"
done
# Do the final fixup along with target modules.
extrasub_target="$extrasub_target
-/^@if /,/^@endif /d"
+/^@if /,/^@endif /d
+/^@unless /d
+/^@endunless /d"
# Create the serialization dependencies. This uses a temporary file.
diff --git a/libgloss/Makefile.in b/libgloss/Makefile.in
index 4528d58f5..2f9964050 100644
--- a/libgloss/Makefile.in
+++ b/libgloss/Makefile.in
@@ -181,6 +181,16 @@ install-info:
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
$(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do
+install-html:
+ rootpre=`pwd`/; export rootpre; \
+ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
+ $(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do
+
+install-pdf:
+ rootpre=`pwd`/; export rootpre; \
+ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
+ $(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do
+
clean-info:
force:
diff --git a/libgloss/aarch64/_exit.c b/libgloss/aarch64/_exit.c
index 1a6b01532..16564bbda 100644
--- a/libgloss/aarch64/_exit.c
+++ b/libgloss/aarch64/_exit.c
@@ -26,7 +26,7 @@
#include <_ansi.h>
#include "svc.h"
-void _exit _PARAMS ((int));
+void _exit (int);
__attribute__ ((noreturn)) void
_exit (int status)
diff --git a/libgloss/aarch64/_kill.c b/libgloss/aarch64/_kill.c
index 1d42371f0..8109ace12 100644
--- a/libgloss/aarch64/_kill.c
+++ b/libgloss/aarch64/_kill.c
@@ -28,7 +28,7 @@
#include
#include "svc.h"
-int _kill _PARAMS ((int, int));
+int _kill (int, int);
int
_kill (int pid, int sig)
diff --git a/libgloss/aarch64/cpu-init/rdimon-aem-el3.S b/libgloss/aarch64/cpu-init/rdimon-aem-el3.S
index 41db8f90c..e00f0b2c8 100644
--- a/libgloss/aarch64/cpu-init/rdimon-aem-el3.S
+++ b/libgloss/aarch64/cpu-init/rdimon-aem-el3.S
@@ -145,6 +145,33 @@ _flat_map:
dsb sy
msr sctlr_el3, x0
isb
+
+ /* Determine if SVE is available. */
+ mrs x0, id_aa64pfr0_el1
+ tbz x0, 32, .Lnosve
+
+ /* set up CPTR_EL3.TZ to 1. */
+ mrs x0, cptr_el3
+
+ /* TZ is bit 8 of CPTR_EL3. */
+ orr x0, x0, #0x100
+ msr cptr_el3, x0
+ isb
+
+ /* set up vector lenght in ZCR_EL3 (4 LSB). */
+ mov x2, #0xF
+
+ /* Try to set the maximum value supported by the architecture (2048).
+ SVE Arch.
+
+ "If this field is set to a value that is not supported by the
+ implementation then reading the register must return the highest
+ supported vector length that is less than the value written." */
+ mrs x1, s3_6_c1_c2_0 /* mrs x1, zcr_el3. */
+ bfi x1, x2, 0, 4
+ msr s3_6_c1_c2_0, x1 /* msr zcr_el3, x1. */
+ isb
+.Lnosve:
ret
.data
@@ -157,12 +184,16 @@ ttb:
.align 2
.global FUNCTION (_cpu_init_hook)
.type FUNCTION (_cpu_init_hook), %function
+ .cfi_sections .debug_frame
FUNCTION (_cpu_init_hook):
- sub sp, sp, #16
- str x30, [sp, xzr]
+ .cfi_startproc
+ str x30, [sp, -16]!
+ .cfi_def_cfa_offset 16
+ .cfi_offset 30, -16
bl _init_vectors
bl _flat_map
- ldr x30, [sp, xzr]
- add sp, sp, #16
+ ldr x30, [sp], 16
+ .cfi_restore 30
ret
+ .cfi_endproc
.size FUNCTION (_cpu_init_hook), .-FUNCTION (_cpu_init_hook)
diff --git a/libgloss/aarch64/crt0.S b/libgloss/aarch64/crt0.S
index 4ad435e03..f831be12e 100644
--- a/libgloss/aarch64/crt0.S
+++ b/libgloss/aarch64/crt0.S
@@ -101,33 +101,45 @@
exposed here in the HeapInfo Angel call. */
ldr x0, .LC0 /* point at returned values */
ldr x1, [x0, #8] /* get heap_limit */
-#else
- /* Set up the stack pointer to a fixed value. */
- ldr x1, .Lstack
+
+ /* Set __heap_limit. */
+#ifdef __ILP32__
+ /* Sanity check on the __heap_limit. */
+ tst x1, #0xffffffff00000000
+ bne .Linsanepar
#endif
+ cmp x1, xzr
+ beq .LC4
+ adrp x2, __heap_limit
+ add x2, x2, #:lo12:__heap_limit
+ str x1, [x2]
+.LC4:
+
+ ldr x1, [x0] /* get heap_base */
#ifdef __ILP32__
/* Sanity check on the heap base. */
- ldr x0, [x0] /* get heap_base */
- tst x0, #0xffffffff00000000
- beq 1f
- /* Exit with 1 if the heap base is not within the 32-bit address
- space. */
- mov x0, ADP_Stopped_ApplicationExit & 0xff
- movk x0, ADP_Stopped_ApplicationExit >> 16, lsl #16
- adrp x1, HeapBase /* Reuse to construct the parameter block. */
- add x1, x1, #:lo12:HeapBase
- str x0, [x1]
- mov x0, 1
- str x0, [x1, #8]
- mov w0, #AngelSVC_Reason_ReportException
- AngelSVCAsm AngelSVC
-1:
- /* For the sake of safety, set the stack base to the top end of
- the 32-bit address space if the returned value from the
- Angel API call is larger than or equal to 4 GiB. */
tst x1, #0xffffffff00000000
- csinv w1, w1, wzr, eq
+ bne .Linsanepar
#endif
+ cmp x1, xzr
+ bne .LC5
+ /* If the heap base value [x0, #0] is 0 then the heap base is actually
+ at the end of program data (i.e. __end__) */
+ ldr x1, .LC3
+ str x1, [x0, #0]
+.LC5:
+ ldr x1, [x0, #16] /* get stack_base */
+
+#ifdef __ILP32__
+ /* Sanity check on the stack_base. */
+ tst x1, #0xffffffff00000000
+ bne .Linsanepar
+#endif
+ cmp x1, xzr
+ bne .LC6
+#endif
+ ldr x1, .Lstack /* Set up the stack pointer to a fixed value */
+.LC6:
/* Ensure quad-word stack alignment. */
and x0, x1, #~15
@@ -233,6 +245,22 @@
b FUNCTION (exit) /* Cannot return. */
+#if defined (ARM_RDI_MONITOR) && defined (__ILP32__)
+.Linsanepar:
+ /* Exit with 1 if the parameter is not within the 32-bit address
+ space. */
+ mov x1, ADP_Stopped_ApplicationExit & 0xff
+ movk x1, ADP_Stopped_ApplicationExit >> 16, lsl #16
+ adrp x0, HeapBase /* Reuse to construct the parameter block. */
+ add x0, x0, #:lo12:HeapBase
+ str x1, [x0]
+ mov x1, 1
+ str x1, [x0, #8]
+ mov w1, #AngelSVC_Reason_ReportException
+ AngelSVCAsm AngelSVC
+ b .
+#endif
+
/* Function initializing exception vector table, flatmap, etc.
Declared as weak symbol so that user can override this definition
by linking in their own version of the function. */
@@ -244,12 +272,13 @@ FUNCTION (_cpu_init_hook):
#ifdef ARM_RDI_MONITOR
.LC0:
GEN_DWORD HeapBase
-#else
+.LC3:
+ GEN_DWORD __end__
+#endif
.Lstack:
GEN_DWORD __stack
-
.weak __stack
-#endif
+
.LC1:
GEN_DWORD __bss_start__
.LC2:
diff --git a/libgloss/aarch64/svc.h b/libgloss/aarch64/svc.h
index 60bd00fca..2c3da1317 100644
--- a/libgloss/aarch64/svc.h
+++ b/libgloss/aarch64/svc.h
@@ -72,9 +72,9 @@
#define SH_EXT_STDOUT_STDERR_BITNUM 0x1
#if !defined (__ASSEMBLER__)
-extern int _get_semihosting_exts _PARAMS ((char*, int, int));
-extern int _has_ext_exit_extended _PARAMS ((void));
-extern int _has_ext_stdout_stderr _PARAMS ((void));
+extern int _get_semihosting_exts (char*, int, int);
+extern int _has_ext_exit_extended (void);
+extern int _has_ext_stdout_stderr (void);
#endif
#if defined(ARM_RDI_MONITOR) && !defined(__ASSEMBLER__)
diff --git a/libgloss/aarch64/syscalls.c b/libgloss/aarch64/syscalls.c
index af206a1d4..7343cc61f 100644
--- a/libgloss/aarch64/syscalls.c
+++ b/libgloss/aarch64/syscalls.c
@@ -47,37 +47,37 @@
(param_block_t)(unsigned long) (PTR)
/* Forward prototypes. */
-int _system _PARAMS ((const char *));
-int _rename _PARAMS ((const char *, const char *));
-int _isatty _PARAMS ((int));
-clock_t _times _PARAMS ((struct tms *));
-int _gettimeofday _PARAMS ((struct timeval *, void *));
-int _unlink _PARAMS ((const char *));
-int _link _PARAMS ((void));
-int _stat _PARAMS ((const char *, struct stat *));
-int _fstat _PARAMS ((int, struct stat *));
-int _swistat _PARAMS ((int fd, struct stat * st));
-caddr_t _sbrk _PARAMS ((int));
-int _getpid _PARAMS ((int));
-int _close _PARAMS ((int));
-clock_t _clock _PARAMS ((void));
-int _swiclose _PARAMS ((int));
-int _open _PARAMS ((const char *, int, ...));
-int _swiopen _PARAMS ((const char *, int));
-int _write _PARAMS ((int, char *, int));
-int _swiwrite _PARAMS ((int, char *, int));
-int _lseek _PARAMS ((int, int, int));
-int _swilseek _PARAMS ((int, int, int));
-int _read _PARAMS ((int, char *, int));
-int _swiread _PARAMS ((int, char *, int));
-void initialise_monitor_handles _PARAMS ((void));
+int _system (const char *);
+int _rename (const char *, const char *);
+int _isatty (int);
+clock_t _times (struct tms *);
+int _gettimeofday (struct timeval *, void *);
+int _unlink (const char *);
+int _link (void);
+int _stat (const char *, struct stat *);
+int _fstat (int, struct stat *);
+int _swistat (int fd, struct stat * st);
+void * _sbrk (ptrdiff_t);
+pid_t _getpid (void);
+int _close (int);
+clock_t _clock (void);
+int _swiclose (int);
+int _open (const char *, int, ...);
+int _swiopen (const char *, int);
+int _write (int, const char *, size_t);
+int _swiwrite (int, const char *, size_t);
+off_t _lseek (int, off_t, int);
+off_t _swilseek (int, off_t, int);
+int _read (int, void *, size_t);
+int _swiread (int, void *, size_t);
+void initialise_monitor_handles (void);
-static int checkerror _PARAMS ((int));
-static int error _PARAMS ((int));
-static int get_errno _PARAMS ((void));
+static int checkerror (int);
+static int error (int);
+static int get_errno (void);
/* Semihosting utilities. */
-static void initialise_semihosting_exts _PARAMS ((void));
+static void initialise_semihosting_exts (void);
/* Struct used to keep track of the file position, just so we
can implement fseek(fh,x,SEEK_CUR). */
@@ -108,8 +108,8 @@ struct fdent
static struct fdent openfiles[MAX_OPEN_FILES];
-static struct fdent *findslot _PARAMS ((int));
-static int newslot _PARAMS ((void));
+static struct fdent *findslot (int);
+static int newslot (void);
/* Register name faking - works in collusion with the linker. */
#ifdef __ILP32__
@@ -120,7 +120,7 @@ register char * stack_ptr asm ("sp");
/* following is copied from libc/stdio/local.h to check std streams */
-extern void _EXFUN (__sinit, (struct _reent *));
+extern void __sinit (struct _reent *);
#define CHECK_INIT(ptr) \
do \
{ \
@@ -349,7 +349,7 @@ checkerror (int result)
len, is the length in bytes to read.
Returns the number of bytes *not* written. */
int
-_swiread (int fh, char *ptr, int len)
+_swiread (int fh, void *ptr, size_t len)
{
param_block_t block[3];
@@ -364,7 +364,7 @@ _swiread (int fh, char *ptr, int len)
Translates the return of _swiread into
bytes read. */
int
-_read (int fd, char *ptr, int len)
+_read (int fd, void *ptr, size_t len)
{
int res;
struct fdent *pfd;
@@ -389,8 +389,8 @@ _read (int fd, char *ptr, int len)
}
/* fd, is a user file descriptor. */
-int
-_swilseek (int fd, int ptr, int dir)
+off_t
+_swilseek (int fd, off_t ptr, int dir)
{
int res;
struct fdent *pfd;
@@ -449,7 +449,8 @@ _swilseek (int fd, int ptr, int dir)
return -1;
}
-_lseek (int fd, int ptr, int dir)
+off_t
+_lseek (int fd, off_t ptr, int dir)
{
return _swilseek (fd, ptr, dir);
}
@@ -457,7 +458,7 @@ _lseek (int fd, int ptr, int dir)
/* fh, is a valid internal file handle.
Returns the number of bytes *not* written. */
int
-_swiwrite (int fh, char *ptr, int len)
+_swiwrite (int fh, const char *ptr, size_t len)
{
param_block_t block[3];
@@ -470,7 +471,7 @@ _swiwrite (int fh, char *ptr, int len)
/* fd, is a user file descriptor. */
int
-_write (int fd, char *ptr, int len)
+_write (int fd, const char *ptr, size_t len)
{
int res;
struct fdent *pfd;
@@ -620,13 +621,16 @@ _close (int fd)
}
int __attribute__((weak))
-_getpid (int n __attribute__ ((unused)))
+_getpid (void)
{
return 1;
}
-caddr_t
-_sbrk (int incr)
+/* Heap limit returned from SYS_HEAPINFO Angel semihost call. */
+ulong __heap_limit __attribute__ ((aligned (8))) = 0xcafedead;
+
+void *
+_sbrk (ptrdiff_t incr)
{
extern char end asm ("end"); /* Defined by the linker. */
static char *heap_end;
@@ -637,7 +641,9 @@ _sbrk (int incr)
prev_heap_end = heap_end;
- if (heap_end + incr > stack_ptr)
+ if ((heap_end + incr > stack_ptr)
+ /* Honour heap limit if it's valid. */
+ || ((__heap_limit != 0xcafedead) && (heap_end + incr > (char *)__heap_limit)))
{
/* Some of the libstdc++-v3 tests rely upon detecting
out of memory errors, so do not abort here. */
diff --git a/libgloss/arm/_exit.c b/libgloss/arm/_exit.c
index ed0087637..180541ece 100644
--- a/libgloss/arm/_exit.c
+++ b/libgloss/arm/_exit.c
@@ -1,15 +1,16 @@
#include <_ansi.h>
+#include "swi.h"
-int _kill _PARAMS ((int, int));
-void _exit _PARAMS ((int));
+int _kill_shared (int, int, int) __attribute__((__noreturn__));
+void _exit (int);
void
_exit (int status)
{
- /* There is only one SWI for both _exit and _kill. For _exit, call
- the SWI with the second argument set to -1, an invalid value for
- signum, so that the SWI handler can distinguish the two calls.
- Note: The RDI implementation of _kill throws away both its
- arguments. */
- _kill (status, -1);
+ /* The same SWI is used for both _exit and _kill.
+ For _exit, call the SWI with "reason" set to ADP_Stopped_ApplicationExit
+ to mark a standard exit.
+ Note: The RDI implementation of _kill_shared throws away all its
+ arguments and all implementations ignore the first argument. */
+ _kill_shared (-1, status, ADP_Stopped_ApplicationExit);
}
diff --git a/libgloss/arm/_kill.c b/libgloss/arm/_kill.c
index 8871d3c36..69f985653 100644
--- a/libgloss/arm/_kill.c
+++ b/libgloss/arm/_kill.c
@@ -2,16 +2,27 @@
#include
#include "swi.h"
-int _kill _PARAMS ((int, int));
+int _kill_shared (int, int, int) __attribute__((__noreturn__));
+int _kill (int, int);
int
_kill (int pid, int sig)
+{
+ if (sig == SIGABRT)
+ _kill_shared (pid, sig, ADP_Stopped_RunTimeError);
+ else
+ _kill_shared (pid, sig, ADP_Stopped_ApplicationExit);
+}
+
+int
+_kill_shared (int pid, int sig, int reason)
{
(void) pid; (void) sig;
#ifdef ARM_RDI_MONITOR
/* Note: The pid argument is thrown away. */
int block[2];
block[1] = sig;
+ block[0] = reason;
int insn;
#if SEMIHOST_V2
@@ -25,22 +36,16 @@ _kill (int pid, int sig)
insn = AngelSWI_Reason_ReportException;
}
- switch (sig)
- {
- case SIGABRT:
- {
- block[0] = ADP_Stopped_RunTimeError;
- break;
- }
- default:
- {
- block[0] = ADP_Stopped_ApplicationExit;
- break;
- }
- }
+#if SEMIHOST_V2
+if (_has_ext_exit_extended ())
+ do_AngelSWI (insn, block);
+else
+#endif
+ do_AngelSWI (insn, (void*)block[0]);
- return do_AngelSWI (insn, block);
#else
asm ("swi %a0" :: "i" (SWI_Exit));
#endif
+
+ __builtin_unreachable();
}
diff --git a/libgloss/arm/linux-crt0.c b/libgloss/arm/linux-crt0.c
index 878ece765..6b2d62a9b 100644
--- a/libgloss/arm/linux-crt0.c
+++ b/libgloss/arm/linux-crt0.c
@@ -10,6 +10,8 @@
#include
#include "arm.h"
+/* forward declaration */
+int main(int argc, char *argv[], char *env[]);
static int _main(int argc, char *argv[]) __attribute__((noreturn));
#if __thumb__ && !defined(PREFER_THUMB)
diff --git a/libgloss/arm/swi.h b/libgloss/arm/swi.h
index 72cb838dc..67eb36b3f 100644
--- a/libgloss/arm/swi.h
+++ b/libgloss/arm/swi.h
@@ -96,9 +96,9 @@
#define SH_EXT_STDOUT_STDERR_BITNUM 0x1
#if !defined (__ASSEMBLER__)
-extern int _get_semihosting_exts _PARAMS ((char*, int, int));
-extern int _has_ext_exit_extended _PARAMS ((void));
-extern int _has_ext_stdout_stderr _PARAMS ((void));
+extern int _get_semihosting_exts (char*, int, int);
+extern int _has_ext_exit_extended (void);
+extern int _has_ext_stdout_stderr (void);
#endif
#if defined(ARM_RDI_MONITOR) && !defined(__ASSEMBLER__)
diff --git a/libgloss/arm/syscalls.c b/libgloss/arm/syscalls.c
index 80713680b..dacd1a9d3 100644
--- a/libgloss/arm/syscalls.c
+++ b/libgloss/arm/syscalls.c
@@ -18,37 +18,37 @@
#include "swi.h"
/* Forward prototypes. */
-int _system _PARAMS ((const char *));
-int _rename _PARAMS ((const char *, const char *));
-int _isatty _PARAMS ((int));
-clock_t _times _PARAMS ((struct tms *));
-int _gettimeofday _PARAMS ((struct timeval *, void *));
-int _unlink _PARAMS ((const char *));
-int _link _PARAMS ((void));
-int _stat _PARAMS ((const char *, struct stat *));
-int _fstat _PARAMS ((int, struct stat *));
-int _swistat _PARAMS ((int fd, struct stat * st));
-caddr_t _sbrk _PARAMS ((int));
-int _getpid _PARAMS ((int));
-int _close _PARAMS ((int));
-clock_t _clock _PARAMS ((void));
-int _swiclose _PARAMS ((int));
-int _open _PARAMS ((const char *, int, ...));
-int _swiopen _PARAMS ((const char *, int));
-int _write _PARAMS ((int, char *, int));
-int _swiwrite _PARAMS ((int, char *, int));
-int _lseek _PARAMS ((int, int, int));
-int _swilseek _PARAMS ((int, int, int));
-int _read _PARAMS ((int, char *, int));
-int _swiread _PARAMS ((int, char *, int));
-void initialise_monitor_handles _PARAMS ((void));
+int _system (const char *);
+int _rename (const char *, const char *);
+int _isatty (int);
+clock_t _times (struct tms *);
+int _gettimeofday (struct timeval *, void *);
+int _unlink (const char *);
+int _link (const char *, const char *);
+int _stat (const char *, struct stat *);
+int _fstat (int, struct stat *);
+int _swistat (int fd, struct stat * st);
+void * _sbrk (ptrdiff_t);
+pid_t _getpid (void);
+int _close (int);
+clock_t _clock (void);
+int _swiclose (int);
+int _open (const char *, int, ...);
+int _swiopen (const char *, int);
+int _write (int, const void *, size_t);
+int _swiwrite (int, const void *, size_t);
+_off_t _lseek (int, _off_t, int);
+_off_t _swilseek (int, _off_t, int);
+int _read (int, void *, size_t);
+int _swiread (int, void *, size_t);
+void initialise_monitor_handles (void);
-static int checkerror _PARAMS ((int));
-static int error _PARAMS ((int));
-static int get_errno _PARAMS ((void));
+static int checkerror (int);
+static int error (int);
+static int get_errno (void);
/* Semihosting utilities. */
-static void initialise_semihosting_exts _PARAMS ((void));
+static void initialise_semihosting_exts (void);
/* Struct used to keep track of the file position, just so we
can implement fseek(fh,x,SEEK_CUR). */
@@ -77,15 +77,15 @@ struct fdent
static struct fdent openfiles [MAX_OPEN_FILES];
-static struct fdent* findslot _PARAMS ((int));
-static int newslot _PARAMS ((void));
+static struct fdent* findslot (int);
+static int newslot (void);
/* Register name faking - works in collusion with the linker. */
register char * stack_ptr asm ("sp");
/* following is copied from libc/stdio/local.h to check std streams */
-extern void _EXFUN(__sinit,(struct _reent *));
+extern void __sinit (struct _reent *);
#define CHECK_INIT(ptr) \
do \
{ \
@@ -323,7 +323,7 @@ get_errno (void)
#ifdef ARM_RDI_MONITOR
return do_AngelSWI (AngelSWI_Reason_Errno, NULL);
#else
- register r0 asm("r0");
+ register int r0 asm("r0");
asm ("swi %a1" : "=r"(r0) : "i" (SWI_GetErrno));
return r0;
#endif
@@ -352,24 +352,24 @@ checkerror (int result)
Returns the number of bytes *not* written. */
int
_swiread (int fh,
- char * ptr,
- int len)
+ void * ptr,
+ size_t len)
{
#ifdef ARM_RDI_MONITOR
int block[3];
block[0] = fh;
block[1] = (int) ptr;
- block[2] = len;
+ block[2] = (int) len;
return checkerror (do_AngelSWI (AngelSWI_Reason_Read, block));
#else
- register r0 asm("r0");
- register r1 asm("r1");
- register r2 asm("r2");
+ register int r0 asm("r0");
+ register int r1 asm("r1");
+ register int r2 asm("r2");
r0 = fh;
- r1 = (int)ptr;
- r2 = len;
+ r1 = (int) ptr;
+ r2 = (int) len;
asm ("swi %a4"
: "=r" (r0)
: "0"(r0), "r"(r1), "r"(r2), "i"(SWI_Read));
@@ -382,8 +382,8 @@ _swiread (int fh,
bytes read. */
int __attribute__((weak))
_read (int fd,
- char * ptr,
- int len)
+ void * ptr,
+ size_t len)
{
int res;
struct fdent *pfd;
@@ -408,12 +408,12 @@ _read (int fd,
}
/* fd, is a user file descriptor. */
-int
+off_t
_swilseek (int fd,
- int ptr,
+ off_t ptr,
int dir)
{
- int res;
+ off_t res;
struct fdent *pfd;
/* Valid file descriptor? */
@@ -461,7 +461,7 @@ _swilseek (int fd,
/* This code only does absolute seeks. */
block[0] = pfd->handle;
- block[1] = ptr;
+ block[1] = (int) ptr;
res = checkerror (do_AngelSWI (AngelSWI_Reason_Seek, block));
#else
if (dir == SEEK_END)
@@ -493,8 +493,9 @@ _swilseek (int fd,
return -1;
}
+off_t
_lseek (int fd,
- int ptr,
+ off_t ptr,
int dir)
{
return _swilseek (fd, ptr, dir);
@@ -505,21 +506,21 @@ _lseek (int fd,
int
_swiwrite (
int fh,
- char * ptr,
- int len)
+ const void * ptr,
+ size_t len)
{
#ifdef ARM_RDI_MONITOR
int block[3];
block[0] = fh;
block[1] = (int) ptr;
- block[2] = len;
+ block[2] = (int) len;
return checkerror (do_AngelSWI (AngelSWI_Reason_Write, block));
#else
- register r0 asm("r0");
- register r1 asm("r1");
- register r2 asm("r2");
+ register int r0 asm("r0");
+ register int r1 asm("r1");
+ register int r2 asm("r2");
r0 = fh;
r1 = (int)ptr;
r2 = len;
@@ -533,8 +534,8 @@ _swiwrite (
/* fd, is a user file descriptor. */
int __attribute__((weak))
_write (int fd,
- char * ptr,
- int len)
+ const void * ptr,
+ size_t len)
{
int res;
struct fdent *pfd;
@@ -653,7 +654,7 @@ _swiclose (int fh)
#ifdef ARM_RDI_MONITOR
return checkerror (do_AngelSWI (AngelSWI_Reason_Close, &fh));
#else
- register r0 asm("r0");
+ register int r0 asm("r0");
r0 = fh;
asm ("swi %a2"
: "=r"(r0)
@@ -694,17 +695,17 @@ _close (int fd)
return res;
}
-int __attribute__((weak))
-_getpid (int n __attribute__ ((unused)))
+pid_t __attribute__((weak))
+_getpid (void)
{
- return 1;
+ return (pid_t)1;
}
/* Heap limit returned from SYS_HEAPINFO Angel semihost call. */
uint __heap_limit = 0xcafedead;
-caddr_t __attribute__((weak))
-_sbrk (int incr)
+void * __attribute__((weak))
+_sbrk (ptrdiff_t incr)
{
extern char end asm ("end"); /* Defined by the linker. */
static char * heap_end;
@@ -717,7 +718,7 @@ _sbrk (int incr)
if ((heap_end + incr > stack_ptr)
/* Honour heap limit if it's valid. */
- || (__heap_limit != 0xcafedead && heap_end + incr > __heap_limit))
+ || (__heap_limit != 0xcafedead && heap_end + incr > (char *)__heap_limit))
{
/* Some of the libstdc++-v3 tests rely upon detecting
out of memory errors, so do not abort here. */
@@ -729,13 +730,13 @@ _sbrk (int incr)
abort ();
#else
errno = ENOMEM;
- return (caddr_t) -1;
+ return (void *) -1;
#endif
}
heap_end += incr;
- return (caddr_t) prev_heap_end;
+ return (void *) prev_heap_end;
}
int
@@ -795,7 +796,7 @@ _stat (const char *fname, struct stat *st)
}
int __attribute__((weak))
-_link (void)
+_link (const char *__path1 __attribute__ ((unused)), const char *__path2 __attribute__ ((unused)))
{
errno = ENOSYS;
return -1;
@@ -811,7 +812,7 @@ _unlink (const char *path)
block[1] = strlen(path);
res = do_AngelSWI (AngelSWI_Reason_Remove, block);
#else
- register r0 asm("r0");
+ register int r0 asm("r0");
r0 = (int)path;
asm ("swi %a2"
: "=r"(r0)
@@ -900,7 +901,7 @@ _isatty (int fd)
#ifdef ARM_RDI_MONITOR
tty = do_AngelSWI (AngelSWI_Reason_IsTTY, &pfd->handle);
#else
- register r0 asm("r0");
+ register int r0 asm("r0");
r0 = pfd->handle;
asm ("swi %a2"
: "=r" (r0)
@@ -941,7 +942,7 @@ _system (const char *s)
}
return e;
#else
- register r0 asm("r0");
+ register int r0 asm("r0");
r0 = (int)s;
asm ("swi %a2"
: "=r" (r0)
@@ -961,8 +962,8 @@ _rename (const char * oldpath, const char * newpath)
block[3] = strlen(newpath);
return checkerror (do_AngelSWI (AngelSWI_Reason_Rename, block)) ? -1 : 0;
#else
- register r0 asm("r0");
- register r1 asm("r1");
+ register int r0 asm("r0");
+ register int r1 asm("r1");
r0 = (int)oldpath;
r1 = (int)newpath;
asm ("swi %a3"
diff --git a/libgloss/bfin/_exit.c b/libgloss/bfin/_exit.c
index d7fb9e033..e55cf0849 100644
--- a/libgloss/bfin/_exit.c
+++ b/libgloss/bfin/_exit.c
@@ -16,9 +16,8 @@
#include <_ansi.h>
-_VOID
-_DEFUN (_exit, (rc),
- int rc)
+void
+_exit (int rc)
{
while (1)
asm volatile ("EXCPT 0;");
diff --git a/libgloss/close.c b/libgloss/close.c
index 7aafcea46..48156aa35 100644
--- a/libgloss/close.c
+++ b/libgloss/close.c
@@ -18,8 +18,7 @@
* close -- We don't need to do anything, but pretend we did.
*/
int
-_DEFUN (close ,(fd),
- int fd)
+close (int fd)
{
return (0);
}
diff --git a/libgloss/configure b/libgloss/configure
index aa6f8f834..1a4033dce 100755
--- a/libgloss/configure
+++ b/libgloss/configure
@@ -710,6 +710,7 @@ spu
tic6x
iq2000
or1k
+nios2
libnosys'
# Initialize some variables set by options.
@@ -2585,6 +2586,10 @@ case "${target}" in
or1k-*-* | or1knd-*-* )
subdirs="$subdirs or1k"
+ ;;
+ nios2-*-*)
+ subdirs="$subdirs nios2"
+
;;
esac
diff --git a/libgloss/configure.in b/libgloss/configure.in
index 6da164352..41843eed1 100644
--- a/libgloss/configure.in
+++ b/libgloss/configure.in
@@ -176,6 +176,9 @@ case "${target}" in
or1k-*-* | or1knd-*-* )
AC_CONFIG_SUBDIRS([or1k])
;;
+ nios2-*-*)
+ AC_CONFIG_SUBDIRS([nios2])
+ ;;
esac
dnl For now, don't bother configuring testsuite
diff --git a/libgloss/cr16/fstat.c b/libgloss/cr16/fstat.c
index 637f87db5..781b2a208 100644
--- a/libgloss/cr16/fstat.c
+++ b/libgloss/cr16/fstat.c
@@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_fstat, (fd, buf),
- int fd _AND
+_fstat (int fd,
struct stat *buf)
{
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */
diff --git a/libgloss/cr16/getpid.c b/libgloss/cr16/getpid.c
index d254c9b0d..efe190098 100644
--- a/libgloss/cr16/getpid.c
+++ b/libgloss/cr16/getpid.c
@@ -19,8 +19,7 @@
* getpid -- only one process, so just return 1.
*/
int
-_DEFUN (_getpid, (),
- )
+_getpid (void)
{
return __MYPID;
}
diff --git a/libgloss/cr16/isatty.c b/libgloss/cr16/isatty.c
index 1cb32e5c7..fa3cd038c 100644
--- a/libgloss/cr16/isatty.c
+++ b/libgloss/cr16/isatty.c
@@ -17,11 +17,10 @@
/*
* isatty -- returns 1 if connected to a terminal device,
* returns 0 if not. Since we're hooked up to a
- * serial port, we'll say yes _AND return a 1.
+ * serial port, we'll say yes and return a 1.
*/
int
-_DEFUN (_isatty, (fd),
- int fd)
+_isatty (int fd)
{
return (1);
}
diff --git a/libgloss/cr16/kill.c b/libgloss/cr16/kill.c
index b37584400..f51ddb5f5 100644
--- a/libgloss/cr16/kill.c
+++ b/libgloss/cr16/kill.c
@@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__));
* kill -- go out via exit...
*/
int
-_DEFUN (_kill, (pid, sig),
- int pid _AND
+_kill (int pid,
int sig)
{
if(pid == __MYPID)
diff --git a/libgloss/cr16/putnum.c b/libgloss/cr16/putnum.c
index 3317bbf0a..af7232205 100644
--- a/libgloss/cr16/putnum.c
+++ b/libgloss/cr16/putnum.c
@@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex
*/
void
-_DEFUN (putnum, (num),
- unsigned int num)
+putnum (unsigned int num)
{
char buf[9];
int cnt;
diff --git a/libgloss/cr16/stat.c b/libgloss/cr16/stat.c
index f1769cdac..3900a1bce 100644
--- a/libgloss/cr16/stat.c
+++ b/libgloss/cr16/stat.c
@@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_stat, (path, buf),
- const char *path _AND
+_stat (const char *path,
struct stat *buf)
{
errno = EIO;
diff --git a/libgloss/cris/gensyscalls b/libgloss/cris/gensyscalls
index b885a20cb..3e2f9af8c 100644
--- a/libgloss/cris/gensyscalls
+++ b/libgloss/cris/gensyscalls
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005 Axis Communications.
+# Copyright (C) 2005, 2018 Axis Communications.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -93,8 +93,16 @@ cat > gettod.c <
#include
int
-_gettimeofday (struct timeval *tp, void *tzp
-${r}gettimeofday (tp, tzp))
+_gettimeofday (struct timeval *tp, void *tzp)
+{
+ struct kernel_timeval kt;
+ int retval = _Sys_gettimeofday(&kt, tzp);
+ if (retval == 0)
+ {
+ tp->tv_sec = kt.tv_sec;
+ tp->tv_usec = kt.tv_usec;
+ }
+ R (retval)
EOF
cat > isatty.c <st_mode = S_IFCHR; /* Always pretend to be a tty */
diff --git a/libgloss/crx/getpid.c b/libgloss/crx/getpid.c
index 3c1a7b8b8..912ca18a5 100644
--- a/libgloss/crx/getpid.c
+++ b/libgloss/crx/getpid.c
@@ -19,8 +19,7 @@
* getpid -- only one process, so just return 1.
*/
int
-_DEFUN (getpid, (),
- )
+getpid (void)
{
return __MYPID;
}
diff --git a/libgloss/crx/isatty.c b/libgloss/crx/isatty.c
index 927d75497..c0039a59e 100644
--- a/libgloss/crx/isatty.c
+++ b/libgloss/crx/isatty.c
@@ -17,11 +17,10 @@
/*
* isatty -- returns 1 if connected to a terminal device,
* returns 0 if not. Since we're hooked up to a
- * serial port, we'll say yes _AND return a 1.
+ * serial port, we'll say yes and return a 1.
*/
int
-_DEFUN (isatty, (fd),
- int fd)
+isatty (int fd)
{
return (1);
}
diff --git a/libgloss/crx/kill.c b/libgloss/crx/kill.c
index 3ed228fd2..98cd3c40e 100644
--- a/libgloss/crx/kill.c
+++ b/libgloss/crx/kill.c
@@ -19,8 +19,7 @@
* kill -- go out via exit...
*/
int
-_DEFUN (kill, (pid, sig),
- int pid _AND
+kill (int pid,
int sig)
{
if(pid == __MYPID)
diff --git a/libgloss/crx/putnum.c b/libgloss/crx/putnum.c
index 3317bbf0a..af7232205 100644
--- a/libgloss/crx/putnum.c
+++ b/libgloss/crx/putnum.c
@@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex
*/
void
-_DEFUN (putnum, (num),
- unsigned int num)
+putnum (unsigned int num)
{
char buf[9];
int cnt;
diff --git a/libgloss/crx/stat.c b/libgloss/crx/stat.c
index 6ffef821b..497ef83c0 100644
--- a/libgloss/crx/stat.c
+++ b/libgloss/crx/stat.c
@@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (stat, (path, buf),
- const char *path _AND
+stat (const char *path,
struct stat *buf)
{
errno = EIO;
diff --git a/libgloss/doc/Makefile.in b/libgloss/doc/Makefile.in
index 07fb1e135..53d037049 100644
--- a/libgloss/doc/Makefile.in
+++ b/libgloss/doc/Makefile.in
@@ -22,6 +22,8 @@ datarootdir = @datarootdir@
mandir = @mandir@
man1dir = $(mandir)/man1
infodir = @infodir@
+htmldir = @htmldir@
+pdfdir = @pdfdir@
MAKEINFO = makeinfo
TEXI2DVI = TEXINPUTS=$(TEXIDIR):$(srcdir):$$TEXINPUTS texi2dvi
@@ -69,7 +71,7 @@ porting.html: $(srcdir)/porting.texi $(srcdir)/porting.texi
porting.ps: porting.dvi
dvips -f porting.dvi > porting.ps
-
+
# different targets for -ms, -mm, -me
# Try to use a recent texi2roff. v2 was put on prep in jan91.
# If you want an index, see texi2roff doc for postprocessing
@@ -146,6 +148,23 @@ install-info: info
$(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i ; \
done
+install-pdf: pdf
+ for i in *.pdf ; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(pdfdir)/$$i ; \
+ done
+
+install-html: html
+ for i in *.html ; do \
+ if [ -d $$i ]; then \
+ mkdir -p $(DESTDIR)$(htmldir)/$$i ; \
+ for j in $$i/*.html ; do \
+ $(INSTALL_DATA) $$j $(DESTDIR)$(htmldir)/$$j ; \
+ done \
+ else \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i ; \
+ fi ; \
+ done
+
clean-info:
-rm -rf *.info*
diff --git a/libgloss/epiphany/_isatty.c b/libgloss/epiphany/_isatty.c
index 9ec5060f9..cfb1bf6e4 100644
--- a/libgloss/epiphany/_isatty.c
+++ b/libgloss/epiphany/_isatty.c
@@ -20,7 +20,7 @@
#include
int
-_DEFUN(_isatty, (fd), int fd)
+_isatty (int fd)
{
struct stat buf;
diff --git a/libgloss/frv/fstat.c b/libgloss/frv/fstat.c
index 756f7b261..99f0abfd6 100644
--- a/libgloss/frv/fstat.c
+++ b/libgloss/frv/fstat.c
@@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_fstat, (fd, buf),
- int fd _AND
+_fstat (int fd,
struct stat *buf)
{
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */
diff --git a/libgloss/frv/getpid.c b/libgloss/frv/getpid.c
index e6d568207..1809a2dde 100644
--- a/libgloss/frv/getpid.c
+++ b/libgloss/frv/getpid.c
@@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1.
*/
int
-_DEFUN (_getpid, (),
- )
+_getpid (void)
{
return __MYPID;
}
diff --git a/libgloss/frv/isatty.c b/libgloss/frv/isatty.c
index b021b4ff8..65c02b7d6 100644
--- a/libgloss/frv/isatty.c
+++ b/libgloss/frv/isatty.c
@@ -17,11 +17,10 @@
/*
* isatty -- returns 1 if connected to a terminal device,
* returns 0 if not. Since we're hooked up to a
- * serial port, we'll say yes _AND return a 1.
+ * serial port, we'll say yes and return a 1.
*/
int
-_DEFUN (_isatty, (fd),
- int fd)
+_isatty (int fd)
{
return (1);
}
diff --git a/libgloss/frv/kill.c b/libgloss/frv/kill.c
index 7c365fd06..3be632ead 100644
--- a/libgloss/frv/kill.c
+++ b/libgloss/frv/kill.c
@@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__));
* kill -- go out via exit...
*/
int
-_DEFUN (_kill, (pid, sig),
- int pid _AND
+_kill (int pid,
int sig)
{
if(pid == __MYPID)
diff --git a/libgloss/frv/print.c b/libgloss/frv/print.c
index 8c8be847a..3dc3d0fe8 100644
--- a/libgloss/frv/print.c
+++ b/libgloss/frv/print.c
@@ -18,8 +18,7 @@
* print -- do a raw print of a string
*/
void
-_DEFUN (_print, (ptr),
-char *ptr)
+_print (char *ptr)
{
while (*ptr) {
outbyte (*ptr++);
diff --git a/libgloss/frv/putnum.c b/libgloss/frv/putnum.c
index c7fa12114..a07315e13 100644
--- a/libgloss/frv/putnum.c
+++ b/libgloss/frv/putnum.c
@@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex
*/
void
-_DEFUN (_putnum, (num),
- unsigned int num)
+_putnum (unsigned int num)
{
char buf[9];
int cnt;
diff --git a/libgloss/frv/sim-time.c b/libgloss/frv/sim-time.c
index c4746b482..7a6af4acb 100644
--- a/libgloss/frv/sim-time.c
+++ b/libgloss/frv/sim-time.c
@@ -38,8 +38,7 @@ extern time_t _sim_time (void) __asm__("_sim_time");
* time -- return current time in seconds.
*/
time_t
-_DEFUN (time, time (t),
- time_t *t)
+time (time_t *t)
{
time_t ret = _sim_time ();
@@ -53,8 +52,7 @@ _DEFUN (time, time (t),
* _times -- no clock, so return an error.
*/
int
-_DEFUN (_times, _times (buf),
- struct tms *buf)
+_times (struct tms *buf)
{
errno = EINVAL;
return (-1);
@@ -65,8 +63,7 @@ _DEFUN (_times, _times (buf),
* microseconds.
*/
int
-_DEFUN (_gettimeofday, _gettimeofday (tv, tz),
- struct timeval *tv _AND
+_gettimeofday (struct timeval *tv,
void *tzvp)
{
struct timezone *tz = tzvp;
diff --git a/libgloss/frv/stat.c b/libgloss/frv/stat.c
index 094ab4875..b471f542c 100644
--- a/libgloss/frv/stat.c
+++ b/libgloss/frv/stat.c
@@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_stat, (path, buf),
- const char *path _AND
+_stat (const char *path,
struct stat *buf)
{
errno = EIO;
diff --git a/libgloss/fstat.c b/libgloss/fstat.c
index 8082d6395..c9d14d103 100644
--- a/libgloss/fstat.c
+++ b/libgloss/fstat.c
@@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (fstat, (fd, buf),
- int fd _AND
+fstat (int fd,
struct stat *buf)
{
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */
diff --git a/libgloss/ft32/fstat.c b/libgloss/ft32/fstat.c
index 77058b2d1..517d13442 100644
--- a/libgloss/ft32/fstat.c
+++ b/libgloss/ft32/fstat.c
@@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_fstat, (fd, buf),
- int fd _AND
+_fstat (int fd,
struct stat *buf)
{
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */
diff --git a/libgloss/ft32/getpid.c b/libgloss/ft32/getpid.c
index 75bba424a..435d0933f 100644
--- a/libgloss/ft32/getpid.c
+++ b/libgloss/ft32/getpid.c
@@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1.
*/
int
-_DEFUN (_getpid, (),
- )
+_getpid (void)
{
return __MYPID;
}
diff --git a/libgloss/ft32/isatty.c b/libgloss/ft32/isatty.c
index 449410ebe..def8ff01c 100644
--- a/libgloss/ft32/isatty.c
+++ b/libgloss/ft32/isatty.c
@@ -17,11 +17,10 @@
/*
* isatty -- returns 1 if connected to a terminal device,
* returns 0 if not. Since we're hooked up to a
- * serial port, we'll say yes _AND return a 1.
+ * serial port, we'll say yes and return a 1.
*/
int
-_DEFUN (_isatty, (fd),
- int fd)
+_isatty (int fd)
{
return (1);
}
diff --git a/libgloss/ft32/kill.c b/libgloss/ft32/kill.c
index 765b03e78..06ec59c61 100644
--- a/libgloss/ft32/kill.c
+++ b/libgloss/ft32/kill.c
@@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__));
* kill -- go out via exit...
*/
int
-_DEFUN (_kill, (pid, sig),
- int pid _AND
+_kill (int pid,
int sig)
{
if(pid == __MYPID)
diff --git a/libgloss/ft32/sim-lseek.S b/libgloss/ft32/sim-lseek.S
index 2dfde1625..488edf3df 100644
--- a/libgloss/ft32/sim-lseek.S
+++ b/libgloss/ft32/sim-lseek.S
@@ -22,9 +22,8 @@
* an error.
*/
off_t
-_DEFUN (_lseek, (fd, offset, whence),
- int fd _AND
- off_t offset _AND
+_lseek (int fd,
+ off_t offset,
int whence)
{
errno = ESPIPE;
diff --git a/libgloss/ft32/sim-lseek.c b/libgloss/ft32/sim-lseek.c
index 297de2b8a..d35e08272 100644
--- a/libgloss/ft32/sim-lseek.c
+++ b/libgloss/ft32/sim-lseek.c
@@ -22,9 +22,8 @@
* an error.
*/
off_t
-_DEFUN (_lseek, (fd, offset, whence),
- int fd _AND
- off_t offset _AND
+_lseek (int fd,
+ off_t offset,
int whence)
{
/* errno = ESPIPE; */
diff --git a/libgloss/ft32/sim-time.c b/libgloss/ft32/sim-time.c
index 25e72a1f4..9d2993b88 100644
--- a/libgloss/ft32/sim-time.c
+++ b/libgloss/ft32/sim-time.c
@@ -21,8 +21,7 @@
* _times -- no clock, so return an error.
*/
int
-_DEFUN (_times, _times (buf),
- struct tms *buf)
+_times (struct tms *buf)
{
errno = EINVAL;
return (-1);
@@ -33,8 +32,7 @@ _DEFUN (_times, _times (buf),
* microseconds.
*/
int
-_DEFUN (_gettimeofday, _gettimeofday (tv, tz),
- struct timeval *tv _AND
+_gettimeofday (struct timeval *tv,
void *tzvp)
{
struct timezone *tz = tzvp;
diff --git a/libgloss/ft32/stat.c b/libgloss/ft32/stat.c
index 580e2ca6e..df7ef39ee 100644
--- a/libgloss/ft32/stat.c
+++ b/libgloss/ft32/stat.c
@@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_stat, (path, buf),
- const char *path _AND
+_stat (const char *path,
struct stat *buf)
{
errno = EIO;
diff --git a/libgloss/getpid.c b/libgloss/getpid.c
index 07f7f9279..9814fd539 100644
--- a/libgloss/getpid.c
+++ b/libgloss/getpid.c
@@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1.
*/
int
-_DEFUN (getpid, (),
- )
+getpid (void)
{
return __MYPID;
}
diff --git a/libgloss/isatty.c b/libgloss/isatty.c
index 2d66cd652..2b54861ea 100644
--- a/libgloss/isatty.c
+++ b/libgloss/isatty.c
@@ -17,11 +17,10 @@
/*
* isatty -- returns 1 if connected to a terminal device,
* returns 0 if not. Since we're hooked up to a
- * serial port, we'll say yes _AND return a 1.
+ * serial port, we'll say yes, return a 1.
*/
int
-_DEFUN (isatty, (fd),
- int fd)
+isatty (int fd)
{
return (1);
}
diff --git a/libgloss/kill.c b/libgloss/kill.c
index afc1257cf..a0eaee75b 100644
--- a/libgloss/kill.c
+++ b/libgloss/kill.c
@@ -18,8 +18,7 @@
* kill -- go out via exit...
*/
int
-_DEFUN (kill, (pid, sig),
- int pid _AND
+kill (int pid,
int sig)
{
if(pid == __MYPID)
diff --git a/libgloss/libnosys/_exit.c b/libgloss/libnosys/_exit.c
index 3fdf7f081..731dea7f0 100644
--- a/libgloss/libnosys/_exit.c
+++ b/libgloss/libnosys/_exit.c
@@ -5,9 +5,8 @@
#include <_ansi.h>
#include <_syslist.h>
-_VOID
-_DEFUN (_exit, (rc),
- int rc)
+void
+_exit (int rc)
{
/* Default stub just causes a divide by 0 exception. */
int x = rc / INT_MAX;
diff --git a/libgloss/libnosys/chown.c b/libgloss/libnosys/chown.c
index 67f98d59d..faea82be8 100644
--- a/libgloss/libnosys/chown.c
+++ b/libgloss/libnosys/chown.c
@@ -12,9 +12,8 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_chown, (path, owner, group),
- const char *path _AND
- uid_t owner _AND
+_chown (const char *path,
+ uid_t owner,
gid_t group)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/close.c b/libgloss/libnosys/close.c
index b759b86ee..8dc3e8b6a 100644
--- a/libgloss/libnosys/close.c
+++ b/libgloss/libnosys/close.c
@@ -11,8 +11,7 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_close, (fildes),
- int fildes)
+_close (int fildes)
{
errno = ENOSYS;
return -1;
diff --git a/libgloss/libnosys/configure b/libgloss/libnosys/configure
index fbe7db764..7c23c7a0a 100755
--- a/libgloss/libnosys/configure
+++ b/libgloss/libnosys/configure
@@ -2009,6 +2009,8 @@ case "${target}" in
;;
a29k-amd-udi)
;;
+ aarch64*-*-*)
+ ;;
arc-*-*)
;;
arm*-*-*)
@@ -2031,6 +2033,8 @@ case "${target}" in
;;
mn10?00-*-*)
;;
+ riscv*-*-*)
+ ;;
powerpcle-*-pe)
;;
sh*-*-*)
diff --git a/libgloss/libnosys/configure.in b/libgloss/libnosys/configure.in
index 1d4846b17..890821740 100644
--- a/libgloss/libnosys/configure.in
+++ b/libgloss/libnosys/configure.in
@@ -43,6 +43,8 @@ case "${target}" in
;;
a29k-amd-udi)
;;
+ aarch64*-*-*)
+ ;;
arc-*-*)
;;
arm*-*-*)
@@ -65,6 +67,8 @@ case "${target}" in
;;
mn10?00-*-*)
;;
+ riscv*-*-*)
+ ;;
powerpcle-*-pe)
;;
sh*-*-*)
diff --git a/libgloss/libnosys/execve.c b/libgloss/libnosys/execve.c
index 01743fff9..950a43c75 100644
--- a/libgloss/libnosys/execve.c
+++ b/libgloss/libnosys/execve.c
@@ -11,9 +11,8 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_execve, (name, argv, env),
- char *name _AND
- char **argv _AND
+_execve (char *name,
+ char **argv,
char **env)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/fork.c b/libgloss/libnosys/fork.c
index f5795cb49..c4724a3f0 100644
--- a/libgloss/libnosys/fork.c
+++ b/libgloss/libnosys/fork.c
@@ -11,8 +11,7 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_fork, (),
- _NOARGS)
+_fork (void)
{
errno = ENOSYS;
return -1;
diff --git a/libgloss/libnosys/fstat.c b/libgloss/libnosys/fstat.c
index 4e18d4216..c85b9f209 100644
--- a/libgloss/libnosys/fstat.c
+++ b/libgloss/libnosys/fstat.c
@@ -13,8 +13,7 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_fstat, (fildes, st),
- int fildes _AND
+_fstat (int fildes,
struct stat *st)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/getpid.c b/libgloss/libnosys/getpid.c
index 0ea19238e..f8d451e8b 100644
--- a/libgloss/libnosys/getpid.c
+++ b/libgloss/libnosys/getpid.c
@@ -11,8 +11,7 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_getpid, (),
- _NOARGS)
+_getpid (void)
{
errno = ENOSYS;
return -1;
diff --git a/libgloss/libnosys/gettod.c b/libgloss/libnosys/gettod.c
index 4d42b4b42..2b5354e72 100644
--- a/libgloss/libnosys/gettod.c
+++ b/libgloss/libnosys/gettod.c
@@ -15,8 +15,7 @@ extern int errno;
struct timeval;
int
-_DEFUN (_gettimeofday, (ptimeval, ptimezone),
- struct timeval *ptimeval _AND
+_gettimeofday (struct timeval *ptimeval,
void *ptimezone)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/isatty.c b/libgloss/libnosys/isatty.c
index d93e17702..a175bf992 100644
--- a/libgloss/libnosys/isatty.c
+++ b/libgloss/libnosys/isatty.c
@@ -11,8 +11,7 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_isatty, (file),
- int file)
+_isatty (int file)
{
errno = ENOSYS;
return 0;
diff --git a/libgloss/libnosys/kill.c b/libgloss/libnosys/kill.c
index f1d12c646..27c4f8cf6 100644
--- a/libgloss/libnosys/kill.c
+++ b/libgloss/libnosys/kill.c
@@ -11,8 +11,7 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_kill, (pid, sig),
- int pid _AND
+_kill (int pid,
int sig)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/link.c b/libgloss/libnosys/link.c
index 35881cf7f..0bae1ef8e 100644
--- a/libgloss/libnosys/link.c
+++ b/libgloss/libnosys/link.c
@@ -11,8 +11,7 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_link, (existing, new),
- char *existing _AND
+_link (char *existing,
char *new)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/lseek.c b/libgloss/libnosys/lseek.c
index 0aa89e272..fcc7be411 100644
--- a/libgloss/libnosys/lseek.c
+++ b/libgloss/libnosys/lseek.c
@@ -11,9 +11,8 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_lseek, (file, ptr, dir),
- int file _AND
- int ptr _AND
+_lseek (int file,
+ int ptr,
int dir)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/open.c b/libgloss/libnosys/open.c
index 2c8a6ceb9..0c864a5ba 100644
--- a/libgloss/libnosys/open.c
+++ b/libgloss/libnosys/open.c
@@ -11,9 +11,8 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_open, (file, flags, mode),
- char *file _AND
- int flags _AND
+_open (char *file,
+ int flags,
int mode)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/read.c b/libgloss/libnosys/read.c
index 1a2819c08..cfc281297 100644
--- a/libgloss/libnosys/read.c
+++ b/libgloss/libnosys/read.c
@@ -11,9 +11,8 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_read, (file, ptr, len),
- int file _AND
- char *ptr _AND
+_read (int file,
+ char *ptr,
int len)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/readlink.c b/libgloss/libnosys/readlink.c
index 7df253c40..014c956f9 100644
--- a/libgloss/libnosys/readlink.c
+++ b/libgloss/libnosys/readlink.c
@@ -12,9 +12,8 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_readlink, (path, buf, bufsize),
- const char *path _AND
- char *buf _AND
+_readlink (const char *path,
+ char *buf,
size_t bufsize)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/stat.c b/libgloss/libnosys/stat.c
index 7c3463798..734f67289 100644
--- a/libgloss/libnosys/stat.c
+++ b/libgloss/libnosys/stat.c
@@ -13,8 +13,7 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_stat, (file, st),
- const char *file _AND
+_stat (const char *file,
struct stat *st)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/symlink.c b/libgloss/libnosys/symlink.c
index d9e29f2e4..bebfbba52 100644
--- a/libgloss/libnosys/symlink.c
+++ b/libgloss/libnosys/symlink.c
@@ -11,8 +11,7 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_symlink, (path1, path2),
- const char *path1 _AND
+_symlink (const char *path1,
const char *path2)
{
errno = ENOSYS;
diff --git a/libgloss/libnosys/times.c b/libgloss/libnosys/times.c
index f205e50f5..908cd8d12 100644
--- a/libgloss/libnosys/times.c
+++ b/libgloss/libnosys/times.c
@@ -12,8 +12,7 @@ extern int errno;
#include "warning.h"
clock_t
-_DEFUN (_times, (buf),
- struct tms *buf)
+_times (struct tms *buf)
{
errno = ENOSYS;
return -1;
diff --git a/libgloss/libnosys/unlink.c b/libgloss/libnosys/unlink.c
index c543709e4..3414bf82c 100644
--- a/libgloss/libnosys/unlink.c
+++ b/libgloss/libnosys/unlink.c
@@ -11,8 +11,7 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_unlink, (name),
- char *name)
+_unlink (char *name)
{
errno = ENOSYS;
return -1;
diff --git a/libgloss/libnosys/wait.c b/libgloss/libnosys/wait.c
index 2a785be1f..029dcbcd4 100644
--- a/libgloss/libnosys/wait.c
+++ b/libgloss/libnosys/wait.c
@@ -11,8 +11,7 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_wait, (status),
- int *status)
+_wait (int *status)
{
errno = ENOSYS;
return -1;
diff --git a/libgloss/libnosys/write.c b/libgloss/libnosys/write.c
index 0136d74ce..33d727bbf 100644
--- a/libgloss/libnosys/write.c
+++ b/libgloss/libnosys/write.c
@@ -11,9 +11,8 @@ extern int errno;
#include "warning.h"
int
-_DEFUN (_write, (file, ptr, len),
- int file _AND
- char *ptr _AND
+_write (int file,
+ char *ptr,
int len)
{
errno = ENOSYS;
diff --git a/libgloss/lm32/isatty.c b/libgloss/lm32/isatty.c
index 69833fa07..d90b4df08 100644
--- a/libgloss/lm32/isatty.c
+++ b/libgloss/lm32/isatty.c
@@ -33,8 +33,7 @@
* other files are not.
*/
int
-_DEFUN (_isatty, (fd),
- int fd)
+_isatty (int fd)
{
if ((fd == 0) || (fd == 1) || (fd == 2))
return 1;
diff --git a/libgloss/lseek.c b/libgloss/lseek.c
index 1df36f55e..2fde60d8d 100644
--- a/libgloss/lseek.c
+++ b/libgloss/lseek.c
@@ -20,9 +20,8 @@
* lseek -- Since a serial port is non-seekable, we return an error.
*/
off_t
-_DEFUN (lseek, (fd, offset, whence),
- int fd _AND
- off_t offset _AND
+lseek (int fd,
+ off_t offset,
int whence)
{
errno = ESPIPE;
diff --git a/libgloss/m68k/idp-inbyte.c b/libgloss/m68k/idp-inbyte.c
index 41db57fc9..c9c403cad 100644
--- a/libgloss/m68k/idp-inbyte.c
+++ b/libgloss/m68k/idp-inbyte.c
@@ -32,7 +32,7 @@
* from channel A
*/
char
-_DEFUN_VOID (inbyte)
+inbyte (void)
{
while ((READREG (DUART_SRA) & 0x01) == 0x00)
;
diff --git a/libgloss/m68k/idp-outbyte.c b/libgloss/m68k/idp-outbyte.c
index a95dc0c53..761d679f7 100644
--- a/libgloss/m68k/idp-outbyte.c
+++ b/libgloss/m68k/idp-outbyte.c
@@ -32,8 +32,7 @@
* to channel A.
*/
static void
-_DEFUN (raw_outbyte, (byte),
- char byte)
+raw_outbyte (char byte)
{
/* First, wait for the UART to finish clocking out the last
character we sent, if any. Then, give it the next character to
@@ -64,8 +63,7 @@ _DEFUN (raw_outbyte, (byte),
* latter we put in libidp.a, which is selected by idp.ld.
*/
void
-_DEFUN (outbyte, (byte),
- char byte)
+outbyte (char byte)
{
#ifdef GDB_MONITOR_OUTPUT
raw_outbyte (0x0f);
diff --git a/libgloss/m68k/mc68ec.c b/libgloss/m68k/mc68ec.c
index d5ee9b5fe..76e737fe7 100644
--- a/libgloss/m68k/mc68ec.c
+++ b/libgloss/m68k/mc68ec.c
@@ -25,8 +25,7 @@
* prompt. It can be restarted from there.
*/
void
-_DEFUN (_exit, (status),
- int_status)
+_exit (int_status)
{
/* Use `i' constraint to get proper immediate-operand syntax for
target assembler configuration. */
@@ -38,8 +37,7 @@ _DEFUN (_exit, (status),
* use the timer, but I'm waiting for docs. (sigh)
*/
void
-_DEFUN (delay, (num),
- int num)
+delay (int num)
{
while (num--)
{
diff --git a/libgloss/m68k/mvme-stub.c b/libgloss/m68k/mvme-stub.c
index fbc4c61b5..fcf7e7bf0 100644
--- a/libgloss/m68k/mvme-stub.c
+++ b/libgloss/m68k/mvme-stub.c
@@ -133,7 +133,7 @@ ExceptionHook exceptionHook; /* hook variable for errors/exceptions */
/* FORWARD DECLARATIONS */
/************************/
/** static void initializeRemcomErrorFrame PARAMS ((void)); **/
-static void _DEFUN_VOID (initializeRemcomErrorFrame);
+static void initializeRemcomErrorFrame (void);
/************************************************************************/
/* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
@@ -203,9 +203,9 @@ jmp_buf remcomEnv;
#define BREAKPOINT() asm(" trap #1");
-extern void _DEFUN_VOID (return_to_super);
-extern void _DEFUN_VOID (return_to_user);
-extern void _DEFUN_VOID (_catchException);
+extern void return_to_super (void);
+extern void return_to_user (void);
+extern void _catchException (void);
void _returnFromException( Frame *frame )
{
diff --git a/libgloss/mcore/close.c b/libgloss/mcore/close.c
index b94cb602a..0a9f81141 100644
--- a/libgloss/mcore/close.c
+++ b/libgloss/mcore/close.c
@@ -18,8 +18,7 @@
* close -- We don't need to do anything, but pretend we did.
*/
int
-_DEFUN (_close ,(fd),
- int fd)
+_close (int fd)
{
return (0);
}
diff --git a/libgloss/mcore/cmb-exit.c b/libgloss/mcore/cmb-exit.c
index 0e1de85f3..84703eb0d 100644
--- a/libgloss/mcore/cmb-exit.c
+++ b/libgloss/mcore/cmb-exit.c
@@ -18,8 +18,7 @@
* _exit -- Just cause a breakpoint so user can see why we exited.
*/
void
-_DEFUN (_exit, (val),
- int val)
+_exit (int val)
{
while (1) {
asm("bkpt");
diff --git a/libgloss/mcore/cmb-inbyte.c b/libgloss/mcore/cmb-inbyte.c
index 0b0b8f5d8..9bfbbde81 100644
--- a/libgloss/mcore/cmb-inbyte.c
+++ b/libgloss/mcore/cmb-inbyte.c
@@ -15,8 +15,7 @@
#include <_ansi.h>
int
-_DEFUN (inbyte, (),
- _NOARGS)
+inbyte (void)
{
return -1;
diff --git a/libgloss/mcore/cmb-outbyte.c b/libgloss/mcore/cmb-outbyte.c
index ea2aaef8b..ea31cc5af 100644
--- a/libgloss/mcore/cmb-outbyte.c
+++ b/libgloss/mcore/cmb-outbyte.c
@@ -33,8 +33,7 @@
* outbyte -- send a byte to the UART.
*/
void
-_DEFUN (outbyte, (ch),
- char ch)
+outbyte (char ch)
{
while (!(*SRREG & TRDY))
;
diff --git a/libgloss/mcore/fstat.c b/libgloss/mcore/fstat.c
index 02054641b..671f56ad9 100644
--- a/libgloss/mcore/fstat.c
+++ b/libgloss/mcore/fstat.c
@@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_fstat, (fd, buf),
- int fd _AND
+_fstat (int fd,
struct stat *buf)
{
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */
diff --git a/libgloss/mcore/getpid.c b/libgloss/mcore/getpid.c
index eee2ac030..cc9e85749 100644
--- a/libgloss/mcore/getpid.c
+++ b/libgloss/mcore/getpid.c
@@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1.
*/
int
-_DEFUN (_getpid, (),
- )
+_getpid (void)
{
return __MYPID;
}
diff --git a/libgloss/mcore/kill.c b/libgloss/mcore/kill.c
index 43a359760..833fe89d7 100644
--- a/libgloss/mcore/kill.c
+++ b/libgloss/mcore/kill.c
@@ -18,8 +18,7 @@
* kill -- go out via exit...
*/
int
-_DEFUN (_kill, (pid, sig),
- int pid _AND
+_kill (int pid,
int sig)
{
if(pid == __MYPID)
diff --git a/libgloss/mcore/lseek.c b/libgloss/mcore/lseek.c
index 0f236fe64..dc419c753 100644
--- a/libgloss/mcore/lseek.c
+++ b/libgloss/mcore/lseek.c
@@ -20,9 +20,8 @@
* lseek -- Since a serial port is non-seekable, we return an error.
*/
off_t
-_DEFUN (_lseek, (fd, offset, whence),
- int fd _AND
- off_t offset _AND
+_lseek (int fd,
+ off_t offset,
int whence)
{
errno = ESPIPE;
diff --git a/libgloss/mcore/open.c b/libgloss/mcore/open.c
index a9e99597f..fdc1b3081 100644
--- a/libgloss/mcore/open.c
+++ b/libgloss/mcore/open.c
@@ -20,9 +20,8 @@
* we return an error.
*/
int
-_DEFUN (_open, (buf, flags, mode),
- const char *buf _AND
- int flags _AND
+_open (const char *buf,
+ int flags,
int mode)
{
errno = EIO;
diff --git a/libgloss/mcore/print.c b/libgloss/mcore/print.c
index d0d2bcef7..f5d0dba20 100644
--- a/libgloss/mcore/print.c
+++ b/libgloss/mcore/print.c
@@ -18,8 +18,7 @@
* print -- do a raw print of a string
*/
void
-_DEFUN (_print, (ptr),
-char *ptr)
+_print (char *ptr)
{
while (*ptr) {
outbyte (*ptr++);
diff --git a/libgloss/mcore/putnum.c b/libgloss/mcore/putnum.c
index 2e37c0993..10e298b95 100644
--- a/libgloss/mcore/putnum.c
+++ b/libgloss/mcore/putnum.c
@@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex
*/
void
-_DEFUN (_putnum, (num),
- unsigned int num)
+_putnum (unsigned int num)
{
char buf[9];
int cnt;
diff --git a/libgloss/mcore/raise.c b/libgloss/mcore/raise.c
index 6657aa649..e39207792 100644
--- a/libgloss/mcore/raise.c
+++ b/libgloss/mcore/raise.c
@@ -15,8 +15,7 @@
#include "glue.h"
int
-_DEFUN (_raise, (sig),
- int sig)
+_raise (int sig)
{
return _kill (_getpid (), sig);
}
diff --git a/libgloss/mcore/read.c b/libgloss/mcore/read.c
index 499426d1b..d7c5670b0 100644
--- a/libgloss/mcore/read.c
+++ b/libgloss/mcore/read.c
@@ -14,16 +14,15 @@
*/
#include "glue.h"
-extern char _DEFUN_VOID (inbyte);
+extern char inbyte (void);
/*
* read -- read bytes from the serial port. Ignore fd, since
* we only have stdin.
*/
int
-_DEFUN (_read, (fd, buf, nbytes),
- int fd _AND
- char *buf _AND
+_read (int fd,
+ char *buf,
int nbytes)
{
int i = 0;
diff --git a/libgloss/mcore/stat.c b/libgloss/mcore/stat.c
index 401a6b50d..1e16e0e53 100644
--- a/libgloss/mcore/stat.c
+++ b/libgloss/mcore/stat.c
@@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_stat, (path, buf),
- const char *path _AND
+_stat (const char *path,
struct stat *buf)
{
errno = EIO;
diff --git a/libgloss/mcore/unlink.c b/libgloss/mcore/unlink.c
index 16dda14f2..9cbcfc53c 100644
--- a/libgloss/mcore/unlink.c
+++ b/libgloss/mcore/unlink.c
@@ -20,8 +20,7 @@
* we just return an error.
*/
int
-_DEFUN (_unlink, (path),
- char * path)
+_unlink (char * path)
{
errno = EIO;
return (-1);
diff --git a/libgloss/mcore/write.c b/libgloss/mcore/write.c
index 7f39fd1bb..8b50fe274 100644
--- a/libgloss/mcore/write.c
+++ b/libgloss/mcore/write.c
@@ -14,7 +14,7 @@
*/
#include "glue.h"
-extern int _EXFUN (outbyte, (char x));
+extern int outbyte (char x);
/*
* write -- write bytes to the serial port. Ignore fd, since
@@ -22,9 +22,8 @@ extern int _EXFUN (outbyte, (char x));
* open will only return an error.
*/
int
-_DEFUN (_write, (fd, buf, nbytes),
- int fd _AND
- char *buf _AND
+_write (int fd,
+ char *buf,
int nbytes)
{
int i;
diff --git a/libgloss/microblaze/_hw_exception_handler.S b/libgloss/microblaze/_hw_exception_handler.S
index bb729ca33..47df945c4 100644
--- a/libgloss/microblaze/_hw_exception_handler.S
+++ b/libgloss/microblaze/_hw_exception_handler.S
@@ -30,7 +30,8 @@
*/
.text
- .globl _hw_exception_handler # HW Exception Handler Label
+ .weakext _hw_exception_handler # HW Exception Handler Label
+ .type _hw_exception_handler, %function
.align 2
_hw_exception_handler:
diff --git a/libgloss/microblaze/_interrupt_handler.S b/libgloss/microblaze/_interrupt_handler.S
index 844c7d01b..5bb7329cc 100644
--- a/libgloss/microblaze/_interrupt_handler.S
+++ b/libgloss/microblaze/_interrupt_handler.S
@@ -30,7 +30,8 @@
*/
.text
- .globl _interrupt_handler # Interrupt Handler Label
+ .weakext _interrupt_handler # Interrupt Handler Label
+ .type _interrupt_handler, %function
.align 2
_interrupt_handler:
diff --git a/libgloss/moxie/fstat.c b/libgloss/moxie/fstat.c
index 6464a861b..78dd9328e 100644
--- a/libgloss/moxie/fstat.c
+++ b/libgloss/moxie/fstat.c
@@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_fstat, (fd, buf),
- int fd _AND
+_fstat (int fd,
struct stat *buf)
{
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */
diff --git a/libgloss/moxie/getpid.c b/libgloss/moxie/getpid.c
index 957eee746..93704ceb9 100644
--- a/libgloss/moxie/getpid.c
+++ b/libgloss/moxie/getpid.c
@@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1.
*/
int
-_DEFUN (_getpid, (),
- )
+_getpid (void)
{
return __MYPID;
}
diff --git a/libgloss/moxie/isatty.c b/libgloss/moxie/isatty.c
index 14cb9c42c..f986aa725 100644
--- a/libgloss/moxie/isatty.c
+++ b/libgloss/moxie/isatty.c
@@ -17,11 +17,10 @@
/*
* isatty -- returns 1 if connected to a terminal device,
* returns 0 if not. Since we're hooked up to a
- * serial port, we'll say yes _AND return a 1.
+ * serial port, we'll say yes and return a 1.
*/
int
-_DEFUN (_isatty, (fd),
- int fd)
+_isatty (int fd)
{
return (1);
}
diff --git a/libgloss/moxie/kill.c b/libgloss/moxie/kill.c
index 257c491e0..623f158f4 100644
--- a/libgloss/moxie/kill.c
+++ b/libgloss/moxie/kill.c
@@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__));
* kill -- go out via exit...
*/
int
-_DEFUN (_kill, (pid, sig),
- int pid _AND
+_kill (int pid,
int sig)
{
if(pid == __MYPID)
diff --git a/libgloss/moxie/print.c b/libgloss/moxie/print.c
index a20743ac6..1857258cd 100644
--- a/libgloss/moxie/print.c
+++ b/libgloss/moxie/print.c
@@ -18,8 +18,7 @@
* print -- do a raw print of a string
*/
void
-_DEFUN (_print, (ptr),
-char *ptr)
+_print (char *ptr)
{
while (*ptr) {
outbyte (*ptr++);
diff --git a/libgloss/moxie/putnum.c b/libgloss/moxie/putnum.c
index f5bac1f2b..0f7e89453 100644
--- a/libgloss/moxie/putnum.c
+++ b/libgloss/moxie/putnum.c
@@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex
*/
void
-_DEFUN (_putnum, (num),
- unsigned int num)
+_putnum (unsigned int num)
{
char buf[9];
int cnt;
diff --git a/libgloss/moxie/qemu-time.c b/libgloss/moxie/qemu-time.c
index 4b0920994..0049c24ee 100644
--- a/libgloss/moxie/qemu-time.c
+++ b/libgloss/moxie/qemu-time.c
@@ -40,8 +40,7 @@
* _times -- FIXME
*/
int
-_DEFUN (_times, _times (buf),
- struct tms *buf)
+_times (struct tms *buf)
{
errno = EINVAL;
return (-1);
@@ -70,8 +69,7 @@ rtc_write (unsigned char reg, unsigned char val)
* time -- return current time in seconds.
*/
time_t
-_DEFUN (time, time (t),
- time_t *t)
+time (time_t *t)
{
struct tm tm;
time_t ret;
@@ -100,8 +98,7 @@ _DEFUN (time, time (t),
* return the microseconds.
*/
int
-_DEFUN (_gettimeofday, _gettimeofday (tv, tz),
- struct timeval *tv _AND
+_gettimeofday (struct timeval *tv,
void *tzvp)
{
struct timezone *tz = tzvp;
diff --git a/libgloss/moxie/sim-lseek.S b/libgloss/moxie/sim-lseek.S
index 1c799f872..86fb67504 100644
--- a/libgloss/moxie/sim-lseek.S
+++ b/libgloss/moxie/sim-lseek.S
@@ -22,9 +22,8 @@
* an error.
*/
off_t
-_DEFUN (_lseek, (fd, offset, whence),
- int fd _AND
- off_t offset _AND
+_lseek (int fd,
+ off_t offset,
int whence)
{
errno = ESPIPE;
diff --git a/libgloss/moxie/sim-lseek.c b/libgloss/moxie/sim-lseek.c
index 8e7ee50e9..dacd769af 100644
--- a/libgloss/moxie/sim-lseek.c
+++ b/libgloss/moxie/sim-lseek.c
@@ -22,9 +22,8 @@
* an error.
*/
off_t
-_DEFUN (_lseek, (fd, offset, whence),
- int fd _AND
- off_t offset _AND
+_lseek (int fd,
+ off_t offset,
int whence)
{
/* errno = ESPIPE; */
diff --git a/libgloss/moxie/sim-time.c b/libgloss/moxie/sim-time.c
index 3e9fafb4b..53793bfe1 100644
--- a/libgloss/moxie/sim-time.c
+++ b/libgloss/moxie/sim-time.c
@@ -37,8 +37,7 @@ extern time_t _sim_time (void) __asm__("_sim_time");
* time -- return current time in seconds.
*/
time_t
-_DEFUN (time, time (t),
- time_t *t)
+time (time_t *t)
{
time_t ret = _sim_time ();
@@ -52,8 +51,7 @@ _DEFUN (time, time (t),
* _times -- no clock, so return an error.
*/
int
-_DEFUN (_times, _times (buf),
- struct tms *buf)
+_times (struct tms *buf)
{
errno = EINVAL;
return (-1);
@@ -64,8 +62,7 @@ _DEFUN (_times, _times (buf),
* microseconds.
*/
int
-_DEFUN (_gettimeofday, _gettimeofday (tv, tz),
- struct timeval *tv _AND
+_gettimeofday (struct timeval *tv,
void *tzvp)
{
struct timezone *tz = tzvp;
diff --git a/libgloss/moxie/stat.c b/libgloss/moxie/stat.c
index 0d7511ae6..c80e8d347 100644
--- a/libgloss/moxie/stat.c
+++ b/libgloss/moxie/stat.c
@@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_stat, (path, buf),
- const char *path _AND
+_stat (const char *path,
struct stat *buf)
{
errno = EIO;
diff --git a/libgloss/multi-build.in b/libgloss/multi-build.in
index 1403eb35e..52aeeec26 100644
--- a/libgloss/multi-build.in
+++ b/libgloss/multi-build.in
@@ -17,9 +17,9 @@ multi-do:
destpre=`echo $${rootpre}/$${dir}`/; export destpre; \
if ! test -d $${destpre} ; then \
mkdir -p $${destpre}; \
- cp config.status $${destpre}; \
cd $${destpre}; \
- $(SHELL) config.status; \
+ config_cmd=`../config.status --config | sed -re "s:--srcdir=([^/]):--srcdir=../\1:"`; \
+ $(SHELL) -c "$(SHELL) $${srcrootpre}/configure $${config_cmd}";\
sed -e "s:^MULTIDIRS[[:space:]]*+=.*$$:MULTIDIRS = :" \
-e "s:^MULTILIBNAME[[:space:]]*=.*$$:MULTILIBNAME = MULTIDIR_$${dir}_NAME:" \
-e "s:^MULTI_FLAGS_FOR_TARGET[[:space:]]*=.*$$:MULTI_FLAGS_FOR_TARGET = MULTIDIR_$${dir}_FLAGS:" \
diff --git a/libgloss/nios2/Makefile.in b/libgloss/nios2/Makefile.in
new file mode 100644
index 000000000..fd7e79f70
--- /dev/null
+++ b/libgloss/nios2/Makefile.in
@@ -0,0 +1,118 @@
+# Copyright (c) 1995, 1996, 2001 Cygnus Support -*- mode:makefile -*-
+# Copyright (c) 2018, Mentor Graphics
+#
+# The authors hereby grant permission to use, copy, modify, distribute,
+# and license this software and its documentation for any purpose, provided
+# that existing copyright notices are retained in all copies and that this
+# notice is included verbatim in any distributions. No written agreement,
+# license, or royalty fee is required for any of the authorized uses.
+# Modifications to this software may be copyrighted by their authors
+# and need not follow the licensing terms described here, provided that
+# the new terms are clearly indicated on the first page of each file where
+# they apply.
+#
+
+DESTDIR =
+VPATH = @srcdir@
+srcdir = @srcdir@
+objdir = .
+srcroot = $(srcdir)/../..
+objroot = $(objdir)/../..
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+host_alias = @host_alias@
+target_alias = @target_alias@
+program_transform_name = @program_transform_name@
+
+bindir = @bindir@
+libdir = @libdir@
+tooldir = $(exec_prefix)/$(target_alias)
+
+# Multilib support variables.
+# TOP is used instead of MULTI{BUILD,SRC}TOP.
+MULTIDIRS =
+MULTISUBDIR =
+MULTIDO = true
+MULTICLEAN = true
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+SHELL = /bin/sh
+
+CC = @CC@
+
+AS = @AS@
+AR = @AR@
+LD = @LD@
+RANLIB = @RANLIB@
+AR_FLAGS = qv
+
+OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
+ then echo ${objroot}/../binutils/objdump ; \
+ else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
+OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
+ then echo ${objroot}/../binutils/objcopy ; \
+ else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
+
+# Linker scripts.
+
+BSP_SCRIPTS= qemu-hosted.ld
+
+# Semihosting library.
+
+HOSTED_BSP= libnios2.a
+HOSTED_OBJS= io-gdb.o io-exit.o \
+ io-close.o io-fstat.o \
+ io-gettimeofday.o io-isatty.o io-lseek.o \
+ io-open.o io-read.o io-rename.o \
+ io-stat.o io-system.o io-time.o \
+ io-unlink.o io-write.o \
+ sbrk.o kill.o getpid.o
+
+# Host specific makefile fragment comes in here.
+@host_makefile_frag@
+
+all :: ${HOSTED_BSP}
+
+# Build semihosting library.
+crt0.o: crt0.S
+ $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -c $< -o $@
+io-nios2.o: io-nios2.S
+ $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -c $< -o $@
+$(HOSTED_OBJS): %.o: %.c io.h
+ $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -DHOSTED=1 $(INCLUDES) -c $< -o $@
+$(HOSTED_BSP): crt0.o io-nios2.o $(HOSTED_OBJS) $(OTHER_OBJS)
+ ${AR} ${ARFLAGS} $@ $^
+ ${RANLIB} $@
+
+
+.PHONY: install info dvi doc install-info clean-info
+install::
+ $(INSTALL_DATA) $(HOSTED_BSP) \
+ $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}
+ for x in ${BSP_SCRIPTS}; do\
+ ${INSTALL_DATA} ${srcdir}/$${x} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \
+ done
+
+# target specific makefile fragment comes in here.
+@target_makefile_frag@
+
+clean mostlyclean:
+ rm -f a.out core *.i *~ *.a *.o *-test *.srec *.dis *.x *.map
+
+distclean maintainer-clean realclean: clean
+ rm -f Makefile config.cache config.log config.status
+
+info dvi doc:
+install-info:
+clean-info:
+
+Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_makefile_frag_path@
+ $(SHELL) config.status
+
+config.status: configure
+ $(SHELL) config.status --recheck
diff --git a/libgloss/nios2/aclocal.m4 b/libgloss/nios2/aclocal.m4
new file mode 100644
index 000000000..b6cdfaeb8
--- /dev/null
+++ b/libgloss/nios2/aclocal.m4
@@ -0,0 +1,344 @@
+# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+m4_include([../acinclude.m4])
diff --git a/libgloss/nios2/configure b/libgloss/nios2/configure
new file mode 100755
index 000000000..7b64f8fca
--- /dev/null
+++ b/libgloss/nios2/configure
@@ -0,0 +1,3850 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 &1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+PACKAGE_URL=
+
+ac_unique_file="crt0.S"
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+target_makefile_frag_path
+host_makefile_frag_path
+CCASFLAGS
+CCAS
+RANLIB
+LD
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+am__leading_dot
+CC
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files='host_makefile_frag
+target_makefile_frag'
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+fi
+
+if test "$srcdir" = "." ; then
+ if test "${with_target_subdir}" != "." ; then
+ libgloss_topdir="${with_multisrctop}../../.."
+ else
+ libgloss_topdir="${with_multisrctop}../.."
+ fi
+else
+ libgloss_topdir="${srcdir}/../.."
+fi
+ac_aux_dir=
+for ac_dir in $libgloss_topdir "$srcdir"/$libgloss_topdir; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in $libgloss_topdir \"$srcdir\"/$libgloss_topdir" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+AS=${AS-as}
+
+AR=${AR-ar}
+
+LD=${LD-ld}
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+host_makefile_frag=${srcdir}/../config/default.mh
+target_makefile_frag=${srcdir}/../config/default.mt
+
+host_makefile_frag_path=$host_makefile_frag
+
+
+target_makefile_frag_path=$target_makefile_frag
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+srcdir=${srcdir}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${ac_configure_args} --enable-multilib"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libgloss_topdir=${libgloss_topdir}
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then
+ ac_cs_awk_getline=:
+ ac_cs_awk_pipe_init=
+ ac_cs_awk_read_file='
+ while ((getline aline < (F[key])) > 0)
+ print(aline)
+ close(F[key])'
+ ac_cs_awk_pipe_fini=
+else
+ ac_cs_awk_getline=false
+ ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
+ ac_cs_awk_read_file='
+ print "|#_!!_#|"
+ print "cat " F[key] " &&"
+ '$ac_cs_awk_pipe_init
+ # The final `:' finishes the AND list.
+ ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
+fi
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+# Create commands to substitute file output variables.
+{
+ echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
+ echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
+ echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
+ echo "_ACAWK" &&
+ echo "_ACEOF"
+} >conf$$files.sh &&
+. ./conf$$files.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+rm -f conf$$files.sh
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' >$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+ \$ac_cs_awk_pipe_init
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+ if (nfields == 3 && !substed) {
+ key = field[2]
+ if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
+ \$ac_cs_awk_read_file
+ next
+ }
+ }
+ print line
+}
+\$ac_cs_awk_pipe_fini
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
+if $ac_cs_awk_getline; then
+ $AWK -f "$ac_tmp/subs.awk"
+else
+ $AWK -f "$ac_tmp/subs.awk" | $SHELL
+fi \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ "Makefile":F) . ${libgloss_topdir}/config-ml.in ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/libgloss/nios2/configure.in b/libgloss/nios2/configure.in
new file mode 100644
index 000000000..fb187b7fd
--- /dev/null
+++ b/libgloss/nios2/configure.in
@@ -0,0 +1,58 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ(2.59)
+AC_INIT(crt0.S)
+
+if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+fi
+
+if test "$srcdir" = "." ; then
+ if test "${with_target_subdir}" != "." ; then
+ libgloss_topdir="${with_multisrctop}../../.."
+ else
+ libgloss_topdir="${with_multisrctop}../.."
+ fi
+else
+ libgloss_topdir="${srcdir}/../.."
+fi
+AC_CONFIG_AUX_DIR($libgloss_topdir)
+
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+
+AC_PROG_INSTALL
+
+LIB_AC_PROG_CC
+AS=${AS-as}
+AC_SUBST(AS)
+AR=${AR-ar}
+AC_SUBST(AR)
+LD=${LD-ld}
+AC_SUBST(LD)
+AC_PROG_RANLIB
+LIB_AM_PROG_AS
+
+host_makefile_frag=${srcdir}/../config/default.mh
+target_makefile_frag=${srcdir}/../config/default.mt
+
+dnl We have to assign the same value to other variables because autoconf
+dnl doesn't provide a mechanism to substitute a replacement keyword with
+dnl arbitrary data or pathnames.
+dnl
+host_makefile_frag_path=$host_makefile_frag
+AC_SUBST(host_makefile_frag_path)
+AC_SUBST_FILE(host_makefile_frag)
+target_makefile_frag_path=$target_makefile_frag
+AC_SUBST(target_makefile_frag_path)
+AC_SUBST_FILE(target_makefile_frag)
+
+AC_CONFIG_FILES(Makefile,
+. ${libgloss_topdir}/config-ml.in,
+srcdir=${srcdir}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${ac_configure_args} --enable-multilib"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libgloss_topdir=${libgloss_topdir}
+)
+AC_OUTPUT
diff --git a/libgloss/nios2/crt0.S b/libgloss/nios2/crt0.S
new file mode 100644
index 000000000..77eacb30a
--- /dev/null
+++ b/libgloss/nios2/crt0.S
@@ -0,0 +1,140 @@
+/* crt0.S -- startup code for Nios II QEMU generic-nommu board emulation.
+
+ Copyright (c) 2018 Mentor Graphics
+
+ The authors hereby grant permission to use, copy, modify, distribute,
+ and license this software and its documentation for any purpose, provided
+ that existing copyright notices are retained in all copies and that this
+ notice is included verbatim in any distributions. No written agreement,
+ license, or royalty fee is required for any of the authorized uses.
+ Modifications to this software may be copyrighted by their authors
+ and need not follow the licensing terms described here, provided that
+ the new terms are clearly indicated on the first page of each file where
+ they apply.
+
+ Parts of this file were derived from code written by Altera Corporation
+ and distributed under the following license:
+
+ Copyright (c) 2006 Altera Corporation, San Jose, California, USA.
+ All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ This agreement shall be governed in all respects by the laws of the State
+ of California and by the laws of the United States of America.
+*/
+
+/* Cache sizes. */
+
+#define NIOS2_ICACHE_LINE_SIZE 32
+#define NIOS2_ICACHE_SIZE 32768
+#define NIOS2_DCACHE_LINE_SIZE 32
+#define NIOS2_DCACHE_SIZE 32768
+
+/* External symbols. */
+ .globl __stack
+ .globl __gp
+ .globl __bss_start
+ .globl __bss_end
+ .weak exit
+
+/* Processor reset code lives at the base of RAM. At reset, only the cache
+ line that contains the reset vector is initialized; the reset code has
+ to fit in this cache line and initialize the remainder of the instruction
+ cache. */
+
+ .section .text.entry, "ax"
+ .align 5
+ .set noat
+
+ .globl __reset
+ .type __reset, @function
+__reset:
+
+ /* Initialize the icache. */
+ movui r2, NIOS2_ICACHE_SIZE
+0:
+ initi r2
+ addi r2, r2, -NIOS2_ICACHE_LINE_SIZE
+ bgt r2, zero, 0b
+1:
+ /* Jump to the __start entry point. */
+ movhi r1, %hi(__start)
+ ori r1, r1, %lo(__start)
+ jmp r1
+
+ .size __reset, . - __reset
+
+
+/* __start is the ELF entry point. */
+
+ .section .text.start, "ax"
+ .align 4
+ .globl __start
+ .type __start, @function
+
+__start:
+
+ /* Initialize the data cache. */
+ movui r2, NIOS2_DCACHE_SIZE
+0:
+ initd 0(r2)
+ addi r2, r2, -NIOS2_DCACHE_LINE_SIZE
+ bgt r2, zero, 0b
+1:
+
+ /* Initialize the stack pointer. */
+ movhi sp, %hi(__stack)
+ ori sp, sp, %lo(__stack)
+
+ /* Initialize the GP. */
+ movhi gp, %hi(_gp)
+ ori gp, gp, %lo(_gp)
+
+ /* Clear BSS. */
+ movhi r2, %hi(__bss_start)
+ ori r2, r2, %lo(__bss_start)
+ movhi r3, %hi(__bss_end)
+ ori r3, r3, %lo(__bss_end)
+ beq r2, r3, 1f
+0:
+ stw zero, (r2)
+ addi r2, r2, 4
+ bltu r2, r3, 0b
+1:
+
+ /* Run initializers. */
+ call __libc_init_array
+
+ /* Call the C entry point. */
+ mov r4, zero /* argc */
+ mov r5, zero /* argv */
+ call main
+
+ /* If main returns, call exit if it is defined. */
+ movhi r3, %hi(exit)
+ ori r3, r3, %lo(exit)
+ beq r3, zero, 2f
+ mov r4, r2 /* exit status from main */
+ callr r3
+
+ /* Otherwise sit in busy loop. */
+2:
+ br 2b
+ .size __start, . - __start
diff --git a/libgloss/nios2/getpid.c b/libgloss/nios2/getpid.c
new file mode 100644
index 000000000..d0ffbbad6
--- /dev/null
+++ b/libgloss/nios2/getpid.c
@@ -0,0 +1,22 @@
+/*
+ * kill.c
+ *
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+/* Minimal implementation of getpid for a target system without processes. */
+int
+getpid ()
+{
+ return 1;
+}
diff --git a/libgloss/nios2/io-close.c b/libgloss/nios2/io-close.c
new file mode 100644
index 000000000..676fbba18
--- /dev/null
+++ b/libgloss/nios2/io-close.c
@@ -0,0 +1,43 @@
+/*
+ * io-close.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#define IO close
+#include "io.h"
+
+/*
+ * close -- close a file descriptor.
+ * input parameters:
+ * 0 : file descriptor
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+int close (int fd)
+{
+#if HOSTED
+ gdb_parambuf_t parameters;
+ parameters[0] = (uint32_t) fd;
+ __io_hosted (HOSTED_CLOSE, parameters);
+ errno = __hosted_from_gdb_errno (parameters[1]);
+ return parameters[0];
+#else
+ return 0;
+#endif
+}
diff --git a/libgloss/nios2/io-exit.c b/libgloss/nios2/io-exit.c
new file mode 100644
index 000000000..e9801c4be
--- /dev/null
+++ b/libgloss/nios2/io-exit.c
@@ -0,0 +1,30 @@
+/*
+ * io-exit.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#if HOSTED
+#include "io.h"
+
+/*
+ * _exit -- Exit from the application.
+ */
+
+void __attribute__ ((noreturn)) _exit (int code)
+{
+ while (1)
+ __io_hosted (HOSTED_EXIT, (void *)code);
+}
+#endif
diff --git a/libgloss/nios2/io-fstat.c b/libgloss/nios2/io-fstat.c
new file mode 100644
index 000000000..113ef8ea6
--- /dev/null
+++ b/libgloss/nios2/io-fstat.c
@@ -0,0 +1,50 @@
+/*
+ * io-fstat.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#include
+#include
+#define IO fstat
+#include "io.h"
+
+/*
+ * fstat -- get file information
+ * input parameters:
+ * 0 : file descriptor
+ * 1 : stat buf ptr
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+int fstat (int fd, struct stat *buf)
+{
+#if HOSTED
+ gdb_parambuf_t parameters;
+ struct gdb_stat gbuf;
+ parameters[0] = (uint32_t) fd;
+ parameters[1] = (uint32_t) &gbuf;
+ __io_hosted (HOSTED_FSTAT, parameters);
+ __hosted_from_gdb_stat (&gbuf, buf);
+ errno = __hosted_from_gdb_errno (parameters[1]);
+ return parameters[0];
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
diff --git a/libgloss/nios2/io-gdb.c b/libgloss/nios2/io-gdb.c
new file mode 100644
index 000000000..ee585595a
--- /dev/null
+++ b/libgloss/nios2/io-gdb.c
@@ -0,0 +1,152 @@
+/*
+ * hosted io support for GDB's remote fileio protocol
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "io.h"
+#include
+#include
+#include
+
+gdb_mode_t
+__hosted_to_gdb_mode_t (mode_t m)
+{
+ gdb_mode_t result = 0;
+ if (m & S_IFREG)
+ result |= GDB_S_IFREG;
+ if (m & S_IFDIR)
+ result |= GDB_S_IFDIR;
+ if (m & S_IRUSR)
+ result |= GDB_S_IRUSR;
+ if (m & S_IWUSR)
+ result |= GDB_S_IWUSR;
+ if (m & S_IXUSR)
+ result |= GDB_S_IXUSR;
+ if (m & S_IRGRP)
+ result |= GDB_S_IRGRP;
+ if (m & S_IWGRP)
+ result |= GDB_S_IWGRP;
+ if (m & S_IXGRP)
+ result |= GDB_S_IXGRP;
+ if (m & S_IROTH)
+ result |= GDB_S_IROTH;
+ if (m & S_IWOTH)
+ result |= GDB_S_IWOTH;
+ if (m & S_IXOTH)
+ result |= GDB_S_IXOTH;
+ return result;
+}
+
+int32_t
+__hosted_to_gdb_open_flags (int f)
+{
+ int32_t result = 0;
+ if (f & O_RDONLY)
+ result |= GDB_O_RDONLY;
+ if (f & O_WRONLY)
+ result |= GDB_O_WRONLY;
+ if (f & O_RDWR)
+ result |= GDB_O_RDWR;
+ if (f & O_APPEND)
+ result |= GDB_O_APPEND;
+ if (f & O_CREAT)
+ result |= GDB_O_CREAT;
+ if (f & O_TRUNC)
+ result |= GDB_O_TRUNC;
+ if (f & O_EXCL)
+ result |= GDB_O_EXCL;
+ return result;
+}
+
+int32_t
+__hosted_to_gdb_lseek_flags (int f)
+{
+ if (f == SEEK_CUR)
+ return GDB_SEEK_CUR;
+ else if (f == SEEK_END)
+ return GDB_SEEK_END;
+ else
+ return GDB_SEEK_SET;
+}
+
+/* The GDB remote protocol documentation specifies that integer fields
+ within structures are stored in big-endian byte order. On little-endian
+ targets, we have to byte-swap the values to match the target. */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define SWAP32(n) __builtin_bswap32 (n)
+#define SWAP64(n) __builtin_bswap64 (n)
+#else
+#define SWAP32(n) (n)
+#define SWAP64(n) (n)
+#endif /* __BYTE_ORDER__ */
+
+void
+__hosted_from_gdb_stat (const struct gdb_stat *gs,
+ struct stat *s)
+{
+ s->st_dev = SWAP32 (gs->st_dev);
+ s->st_ino = SWAP32 (gs->st_ino);
+ s->st_mode = SWAP32 (gs->st_mode);
+ s->st_nlink = SWAP32 (gs->st_nlink);
+ s->st_uid = SWAP32 (gs->st_uid);
+ s->st_gid = SWAP32 (gs->st_gid);
+ s->st_rdev = SWAP32 (gs->st_rdev);
+ s->st_size = SWAP64 (gs->st_size);
+ s->st_blksize = SWAP64 (gs->st_blksize);
+ s->st_blocks = SWAP64 (gs->st_blocks);
+ s->st_atime = SWAP32 (gs->st_atime);
+ s->st_mtime = SWAP32 (gs->st_mtime);
+ s->st_ctime = SWAP32 (gs->st_ctime);
+}
+
+void
+__hosted_from_gdb_timeval (const struct gdb_timeval *gt,
+ struct timeval *t)
+{
+ t->tv_sec = SWAP32 (gt->tv_sec);
+ t->tv_usec = SWAP64 (gt->tv_usec);
+}
+
+int
+__hosted_from_gdb_errno (int32_t err)
+{
+ switch (err)
+ {
+ case 0: return 0;
+ case GDB_EPERM: return EPERM;
+ case GDB_ENOENT: return ENOENT;
+ case GDB_EINTR: return EINTR;
+ case GDB_EBADF: return EBADF;
+ case GDB_EACCES: return EACCES;
+ case GDB_EFAULT: return EFAULT;
+ case GDB_EBUSY: return EBUSY;
+ case GDB_EEXIST: return EEXIST;
+ case GDB_ENODEV: return ENODEV;
+ case GDB_ENOTDIR: return ENOTDIR;
+ case GDB_EISDIR: return EISDIR;
+ case GDB_EINVAL: return EINVAL;
+ case GDB_ENFILE: return ENFILE;
+ case GDB_EMFILE: return EMFILE;
+ case GDB_EFBIG: return EFBIG;
+ case GDB_ENOSPC: return ENOSPC;
+ case GDB_ESPIPE: return ESPIPE;
+ case GDB_EROFS: return EROFS;
+ case GDB_ENAMETOOLONG: return ENAMETOOLONG;
+ case GDB_EUNKNOWN:
+ default:
+ return EIO;
+ }
+}
+
diff --git a/libgloss/nios2/io-gettimeofday.c b/libgloss/nios2/io-gettimeofday.c
new file mode 100644
index 000000000..1f5750e17
--- /dev/null
+++ b/libgloss/nios2/io-gettimeofday.c
@@ -0,0 +1,54 @@
+/*
+ * io-gettimeofday.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#define IO gettimeofday
+#include "io.h"
+
+/*
+ * gettimeofday -- get the current time
+ * input parameters:
+ * 0 : timeval ptr
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+int gettimeofday (struct timeval *tv, void *tzvp)
+{
+#if HOSTED
+ gdb_parambuf_t parameters;
+ struct gdb_timeval gtv;
+ struct timezone *tz = tzvp;
+ if (!tv)
+ return 0;
+ if (tz)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ parameters[0] = (uint32_t) >v;
+ __io_hosted (HOSTED_GETTIMEOFDAY, parameters);
+ __hosted_from_gdb_timeval (>v, tv);
+ errno = __hosted_from_gdb_errno (parameters[1]);
+ return parameters[0];
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
diff --git a/libgloss/nios2/io-isatty.c b/libgloss/nios2/io-isatty.c
new file mode 100644
index 000000000..ae33f084a
--- /dev/null
+++ b/libgloss/nios2/io-isatty.c
@@ -0,0 +1,43 @@
+/*
+ * io-isatty.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#define IO isatty
+#include "io.h"
+
+/*
+ * isatty -- check if fd is a terminal
+ * input parameters:
+ * 0 : file descriptor
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+int isatty (int fd)
+{
+#if HOSTED
+ gdb_parambuf_t parameters;
+ parameters[0] = (uint32_t) fd;
+ __io_hosted (HOSTED_ISATTY, parameters);
+ errno = __hosted_from_gdb_errno (parameters[1]);
+ return parameters[0];
+#else
+ return 1;
+#endif
+}
diff --git a/libgloss/nios2/io-lseek.c b/libgloss/nios2/io-lseek.c
new file mode 100644
index 000000000..bfc23c1bc
--- /dev/null
+++ b/libgloss/nios2/io-lseek.c
@@ -0,0 +1,52 @@
+/*
+ * io-lseek.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#include
+#define IO lseek
+#include "io.h"
+
+/*
+ * lseek -- reposition a file descriptor
+ * input parameters:
+ * 0 : file descriptor
+ * 1 : high word of offset
+ * 2 : low word of offset
+ * 3 : seek flag
+ * output parameters:
+ * 0 : high word of result
+ * 1 : low word of result
+ * 2 : errno
+ */
+
+off_t lseek (int fd, off_t offset, int whence)
+{
+#if HOSTED
+ gdb_parambuf_t parameters;
+ parameters[0] = (uint32_t) fd;
+ parameters[1] = (uint32_t) ((offset >> 32) & 0xffffffff);
+ parameters[2] = (uint32_t) (offset & 0xffffffff);
+ parameters[3] = __hosted_to_gdb_lseek_flags (whence);
+ __io_hosted (HOSTED_LSEEK, parameters);
+ errno = __hosted_from_gdb_errno (parameters[2]);
+ return ((uint64_t)parameters[0] << 32) | ((uint64_t)parameters[1]);
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
diff --git a/libgloss/nios2/io-nios2.S b/libgloss/nios2/io-nios2.S
new file mode 100644
index 000000000..0b818a8fd
--- /dev/null
+++ b/libgloss/nios2/io-nios2.S
@@ -0,0 +1,31 @@
+/*
+ * Low-level semihosting primitive for csky.
+ *
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+/* Implement
+ void __io_hosted (int func, void *args);
+ by causing a break 1. The break handler can find the two parameters in
+ r4 and r5 per the normal C calling convention. */
+
+ .text
+ .align 2
+ .global __io_hosted
+ .type _io_hosted, @function
+
+__io_hosted:
+ break 1
+ ret
+
+ .size __io_hosted, .-__io_hosted
diff --git a/libgloss/nios2/io-open.c b/libgloss/nios2/io-open.c
new file mode 100644
index 000000000..885c6465c
--- /dev/null
+++ b/libgloss/nios2/io-open.c
@@ -0,0 +1,62 @@
+/*
+ * io-open.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#define IO open
+#include "io.h"
+
+/*
+ * open -- Open a file.
+ * input parameters:
+ * 0 : fname ptr
+ * 1 : fname length
+ * 2 : flags
+ * 3 : mode
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+int open (const char *fname, int flags, ...)
+{
+#if HOSTED
+ gdb_parambuf_t parameters;
+ parameters[0] = (uint32_t) fname;
+ parameters[1] = strlen (fname) + 1;
+ parameters[2] = __hosted_to_gdb_open_flags (flags);
+ if (flags & O_CREAT)
+ {
+ va_list ap;
+ va_start (ap, flags);
+ parameters[3] = __hosted_to_gdb_mode_t (va_arg (ap, mode_t));
+ va_end (ap);
+ }
+ else
+ parameters[3] = 0;
+ __io_hosted (HOSTED_OPEN, parameters);
+ errno = __hosted_from_gdb_errno (parameters[1]);
+ return parameters[0];
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
diff --git a/libgloss/nios2/io-read.c b/libgloss/nios2/io-read.c
new file mode 100644
index 000000000..91c475edb
--- /dev/null
+++ b/libgloss/nios2/io-read.c
@@ -0,0 +1,48 @@
+/*
+ * io-read.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#define IO read
+#include "io.h"
+
+/*
+ * read -- read from a file descriptor
+ * input parameters:
+ * 0 : file descriptor
+ * 1 : buf ptr
+ * 2 : count
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+ssize_t read (int fd, void *buf, size_t count)
+{
+#if HOSTED
+ gdb_parambuf_t parameters;
+ parameters[0] = (uint32_t) fd;
+ parameters[1] = (uint32_t) buf;
+ parameters[2] = (uint32_t) count;
+ __io_hosted (HOSTED_READ, parameters);
+ errno = __hosted_from_gdb_errno (parameters[1]);
+ return parameters[0];
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
diff --git a/libgloss/nios2/io-rename.c b/libgloss/nios2/io-rename.c
new file mode 100644
index 000000000..1a6cbebe7
--- /dev/null
+++ b/libgloss/nios2/io-rename.c
@@ -0,0 +1,51 @@
+/*
+ * io-rename.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#include
+#define IO rename
+#include "io.h"
+
+/*
+ * rename -- rename a file
+ * input parameters:
+ * 0 : oldname ptr
+ * 1 : oldname length
+ * 2 : newname ptr
+ * 3 : newname length
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+int _rename (const char *oldpath, const char *newpath)
+{
+#if HOSTED
+ gdb_parambuf_t parameters;
+ parameters[0] = (uint32_t) oldpath;
+ parameters[1] = (uint32_t) strlen (oldpath) + 1;
+ parameters[2] = (uint32_t) newpath;
+ parameters[3] = (uint32_t) strlen (newpath) + 1;
+ __io_hosted (HOSTED_RENAME, parameters);
+ errno = __hosted_from_gdb_errno (parameters[1]);
+ return parameters[0];
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
diff --git a/libgloss/nios2/io-stat.c b/libgloss/nios2/io-stat.c
new file mode 100644
index 000000000..3ba6f6672
--- /dev/null
+++ b/libgloss/nios2/io-stat.c
@@ -0,0 +1,54 @@
+/*
+ * io-stat.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#define IO stat
+#include "io.h"
+
+/*
+ * stat -- get file information
+ * input parameters:
+ * 0 : filename ptr
+ * 1 : filename length
+ * 2 : stat buf ptr
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+
+int stat (const char *__restrict filename, struct stat *__restrict buf)
+{
+#if HOSTED
+ gdb_parambuf_t parameters;
+ struct gdb_stat gbuf;
+ parameters[0] = (uint32_t) filename;
+ parameters[1] = (uint32_t) strlen (filename) + 1;
+ parameters[2] = (uint32_t) &gbuf;
+ __io_hosted (HOSTED_STAT, parameters);
+ __hosted_from_gdb_stat (&gbuf, buf);
+ errno = __hosted_from_gdb_errno (parameters[1]);
+ return parameters[0];
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
diff --git a/libgloss/nios2/io-system.c b/libgloss/nios2/io-system.c
new file mode 100644
index 000000000..bb7c59085
--- /dev/null
+++ b/libgloss/nios2/io-system.c
@@ -0,0 +1,64 @@
+/*
+ * io-system.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#include
+#include
+#define IO _system
+#include "io.h"
+
+/*
+ * system: execute command on (remote) host
+ * input parameters:
+ * 0 : command ptr
+ * 1 : command length
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+int _system (const char *command)
+{
+#if HOSTED
+ int e;
+ gdb_parambuf_t parameters;
+
+ parameters[0] = (uint32_t) command;
+ parameters[1] = command ? (uint32_t) strlen (command) + 1 : 0;
+ __io_hosted (HOSTED_SYSTEM, parameters);
+ errno = __hosted_from_gdb_errno (parameters[1]);
+ e = parameters[0];
+ if (e >= 0 && command)
+ {
+ /* We have to convert e, an exit status to the encoded status of
+ the command. To avoid hard coding the exit status, we simply
+ loop until we find the right position. */
+ int exit_code;
+
+ for (exit_code = e; e && WEXITSTATUS (e) != exit_code; e <<= 1)
+ continue;
+ }
+
+ return e;
+#else
+ if (!command)
+ return 0;
+ errno = ENOSYS;
+ return -1;
+#endif
+}
diff --git a/libgloss/nios2/io-time.c b/libgloss/nios2/io-time.c
new file mode 100644
index 000000000..03707c614
--- /dev/null
+++ b/libgloss/nios2/io-time.c
@@ -0,0 +1,46 @@
+/*
+ * io-time.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#define IO time
+#include "io.h"
+
+/*
+ * time -- get the current time
+ * input parameters:
+ * 0 : timeval ptr
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+time_t time (time_t *t)
+{
+#if HOSTED
+ struct timeval tv;
+
+ if (gettimeofday (&tv, NULL))
+ return -1;
+ if (t)
+ *t = tv.tv_sec;
+ return tv.tv_sec;
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
diff --git a/libgloss/nios2/io-unlink.c b/libgloss/nios2/io-unlink.c
new file mode 100644
index 000000000..b6ac92108
--- /dev/null
+++ b/libgloss/nios2/io-unlink.c
@@ -0,0 +1,47 @@
+/*
+ * io-unlink.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#include
+#define IO unlink
+#include "io.h"
+
+/*
+ * unlink -- unlink (delete) a file
+ * input parameters:
+ * 0 : filename ptr
+ * 1 : filename length
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+int unlink (const char *path)
+{
+#if HOSTED
+ gdb_parambuf_t parameters;
+ parameters[0] = (uint32_t) path;
+ parameters[1] = (uint32_t) strlen (path) + 1;
+ __io_hosted (HOSTED_UNLINK, parameters);
+ errno = __hosted_from_gdb_errno (parameters[1]);
+ return parameters[0];
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
diff --git a/libgloss/nios2/io-write.c b/libgloss/nios2/io-write.c
new file mode 100644
index 000000000..f26268cdf
--- /dev/null
+++ b/libgloss/nios2/io-write.c
@@ -0,0 +1,48 @@
+/*
+ * io-write.c --
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+#include
+#define IO write
+#include "io.h"
+
+/*
+ * write -- write to a file descriptor
+ * input parameters:
+ * 0 : file descriptor
+ * 1 : buf ptr
+ * 2 : count
+ * output parameters:
+ * 0 : result
+ * 1 : errno
+ */
+
+ssize_t write (int fd, const void *buf, size_t count)
+{
+#if HOSTED
+ gdb_parambuf_t parameters;
+ parameters[0] = (uint32_t) fd;
+ parameters[1] = (uint32_t) buf;
+ parameters[2] = (uint32_t) count;
+ __io_hosted (HOSTED_WRITE, parameters);
+ errno = __hosted_from_gdb_errno (parameters[1]);
+ return parameters[0];
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
diff --git a/libgloss/nios2/io.h b/libgloss/nios2/io.h
new file mode 100644
index 000000000..e11843516
--- /dev/null
+++ b/libgloss/nios2/io.h
@@ -0,0 +1,154 @@
+/*
+ * hosted & unhosted io support.
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#if HOSTED
+#include
+#include
+#include
+#include
+
+#define HOSTED_EXIT 0
+#define HOSTED_INIT_SIM 1
+#define HOSTED_OPEN 2
+#define HOSTED_CLOSE 3
+#define HOSTED_READ 4
+#define HOSTED_WRITE 5
+#define HOSTED_LSEEK 6
+#define HOSTED_RENAME 7
+#define HOSTED_UNLINK 8
+#define HOSTED_STAT 9
+#define HOSTED_FSTAT 10
+#define HOSTED_GETTIMEOFDAY 11
+#define HOSTED_ISATTY 12
+#define HOSTED_SYSTEM 13
+
+/* This function is provided by the board's BSP, because the precise
+ mechanism of informing gdb is board specific. */
+extern void __io_hosted (int func, void *args);
+
+/* Protocol specific representation of datatypes, as specified in D.9.11
+ * of the GDB manual. The values here are stored in big-endian order. */
+
+typedef uint32_t gdb_mode_t;
+typedef uint32_t gdb_time_t;
+
+struct gdb_stat {
+ uint32_t st_dev; /* device */
+ uint32_t st_ino; /* inode */
+ gdb_mode_t st_mode; /* protection */
+ uint32_t st_nlink; /* number of hard links */
+ uint32_t st_uid; /* user ID of owner */
+ uint32_t st_gid; /* group ID of owner */
+ uint32_t st_rdev; /* device type (if inode device) */
+ uint64_t st_size; /* total size, in bytes */
+ uint64_t st_blksize; /* blocksize for filesystem I/O */
+ uint64_t st_blocks; /* number of blocks allocated */
+ gdb_time_t st_atime; /* time of last access */
+ gdb_time_t st_mtime; /* time of last modification */
+ gdb_time_t st_ctime; /* time of last change */
+};
+
+struct gdb_timeval {
+ gdb_time_t tv_sec; /* second */
+ uint64_t tv_usec; /* microsecond */
+};
+
+
+/* Parameters are passed between the library and the debugging stub
+ * in a fixed-size buffer.
+ */
+
+typedef uint32_t gdb_parambuf_t[4];
+
+/* open flags */
+
+#define GDB_O_RDONLY 0x0
+#define GDB_O_WRONLY 0x1
+#define GDB_O_RDWR 0x2
+#define GDB_O_APPEND 0x8
+#define GDB_O_CREAT 0x200
+#define GDB_O_TRUNC 0x400
+#define GDB_O_EXCL 0x800
+
+/* mode_t values */
+
+#define GDB_S_IFREG 0100000
+#define GDB_S_IFDIR 040000
+#define GDB_S_IRUSR 0400
+#define GDB_S_IWUSR 0200
+#define GDB_S_IXUSR 0100
+#define GDB_S_IRGRP 040
+#define GDB_S_IWGRP 020
+#define GDB_S_IXGRP 010
+#define GDB_S_IROTH 04
+#define GDB_S_IWOTH 02
+#define GDB_S_IXOTH 01
+
+/* errno values */
+
+#define GDB_EPERM 1
+#define GDB_ENOENT 2
+#define GDB_EINTR 4
+#define GDB_EBADF 9
+#define GDB_EACCES 13
+#define GDB_EFAULT 14
+#define GDB_EBUSY 16
+#define GDB_EEXIST 17
+#define GDB_ENODEV 19
+#define GDB_ENOTDIR 20
+#define GDB_EISDIR 21
+#define GDB_EINVAL 22
+#define GDB_ENFILE 23
+#define GDB_EMFILE 24
+#define GDB_EFBIG 27
+#define GDB_ENOSPC 28
+#define GDB_ESPIPE 29
+#define GDB_EROFS 30
+#define GDB_ENAMETOOLONG 91
+#define GDB_EUNKNOWN 9999
+
+/* lseek flags */
+
+#define GDB_SEEK_SET 0
+#define GDB_SEEK_CUR 1
+#define GDB_SEEK_END 2
+
+
+/* conversion functions */
+
+extern gdb_mode_t __hosted_to_gdb_mode_t (mode_t m);
+extern int32_t __hosted_to_gdb_open_flags (int f);
+extern int32_t __hosted_to_gdb_lseek_flags (int f);
+
+extern void __hosted_from_gdb_stat (const struct gdb_stat *gs,
+ struct stat *s);
+extern void __hosted_from_gdb_timeval (const struct gdb_timeval *gt,
+ struct timeval *t);
+extern int __hosted_from_gdb_errno (int32_t err);
+
+#else
+#ifdef IO
+#define IO_NAME_(IO) __hosted_##IO
+#define IO_NAME(IO) IO_NAME_(IO)
+#define IO_STRING_(IO) #IO
+#define IO_STRING(IO) IO_STRING_(IO)
+/* Emit an object that causes a gnu linker warning. */
+static const char IO_NAME (IO) []
+__attribute__ ((section (".gnu.warning"), used)) =
+"IO function '" IO_STRING (IO) "' used";
+#endif
+#endif
diff --git a/libgloss/nios2/kill.c b/libgloss/nios2/kill.c
new file mode 100644
index 000000000..972b59962
--- /dev/null
+++ b/libgloss/nios2/kill.c
@@ -0,0 +1,27 @@
+/*
+ * kill.c
+ *
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+/* Minimal implementation of kill for a target system without processes. */
+
+extern void _exit (int);
+
+int
+kill (int pid, int sig)
+{
+ if (pid == 1)
+ _exit (sig);
+ return 0;
+}
diff --git a/libgloss/nios2/qemu-hosted.ld b/libgloss/nios2/qemu-hosted.ld
new file mode 100644
index 000000000..28a38b159
--- /dev/null
+++ b/libgloss/nios2/qemu-hosted.ld
@@ -0,0 +1,210 @@
+/* qemu-hosted.ld -- Linker script for QEMU generic-nommu board emulation.
+
+ Copyright (c) 2018 Mentor Graphics
+
+ The authors hereby grant permission to use, copy, modify, distribute,
+ and license this software and its documentation for any purpose, provided
+ that existing copyright notices are retained in all copies and that this
+ notice is included verbatim in any distributions. No written agreement,
+ license, or royalty fee is required for any of the authorized uses.
+ Modifications to this software may be copyrighted by their authors
+ and need not follow the licensing terms described here, provided that
+ the new terms are clearly indicated on the first page of each file where
+ they apply.
+
+ Parts of this file were derived from code written by Altera Corporation
+ and distributed under the following license:
+
+ Copyright (c) 2008
+ Altera Corporation, San Jose, California, USA.
+ All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ This agreement shall be governed in all respects by the laws of the State
+ of California and by the laws of the United States of America.
+
+*/
+
+ENTRY(__start)
+SEARCH_DIR(.)
+GROUP(-lgcc -lc -lnios2)
+
+MEMORY
+{
+ rom (rx) : ORIGIN = 0x0, LENGTH = 64M
+ ram (rwx) : ORIGIN = 0x10000000, LENGTH = 128M
+ tlbmiss (rwx) : ORIGIN = 0x7fff400, LENGTH = 1K
+ descriptor (rwx) : ORIGIN = 0x8002000, LENGTH = 8K
+}
+
+/* Force the linker to search for these symbols from
+ the start of the link process. */
+EXTERN(__reset)
+EXTERN(__start)
+EXTERN(main __stack __heap_start __heap_end __heap_end)
+
+/* Where to put the stack and heap. Allocate 1M heap space. */
+PROVIDE(__heap_start = _end);
+PROVIDE(__heap_end = _end + 100000);
+PROVIDE(__stack = 0x18000000);
+
+/* Force exit to be picked up in a hosted environment. */
+EXTERN(exit atexit)
+
+/* Ensure that newlib runs the finalizers. */
+__libc_fini = _fini;
+
+SECTIONS
+{
+ .text :
+ {
+ _ftext = .;
+ *(.text.entry)
+ *(.text.start)
+ *(.text .text.* .gnu.linkonce.t.*)
+
+ . = ALIGN(0x4);
+ KEEP (*crtbegin.o(.jcr))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .jcr))
+ KEEP (*crtend.o(.jcr))
+
+ . = ALIGN(0x4);
+ *(.gcc_except_table .gcc_except_table.*)
+ *(.gnu_extab .gnu_extab.*)
+ } > ram
+ .eh_frame_hdr : ALIGN (4)
+ {
+ KEEP (*(.eh_frame_hdr))
+ *(.eh_frame_entry .eh_frame_entry.*)
+ } > ram
+ .eh_frame : ALIGN (4)
+ {
+ KEEP (*(.eh_frame)) *(.eh_frame.*)
+ } > ram
+ .note.gnu.build-id : ALIGN (4)
+ {
+ KEEP (*(.note.gnu.build-id))
+ } > ram
+ .rodata : ALIGN (4)
+ {
+ *(.rodata .rodata.* .gnu.linkonce.r.*)
+
+ . = ALIGN(4);
+ KEEP(*(.init))
+
+ . = ALIGN(4);
+ __preinit_array_start = .;
+ KEEP (*(.preinit_array))
+ __preinit_array_end = .;
+
+ . = ALIGN(4);
+ __init_array_start = .;
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ __init_array_end = .;
+
+ . = ALIGN(4);
+ KEEP(*(.fini))
+
+ . = ALIGN(4);
+ __fini_array_start = .;
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ __fini_array_end = .;
+
+ . = ALIGN(0x4);
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*crtend.o(.ctors))
+
+ . = ALIGN(0x4);
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*crtend.o(.dtors))
+
+ *(.lit)
+
+ . = ALIGN (8);
+ _etext = .;
+ } > ram
+
+ .data : ALIGN (8)
+ {
+ *(.shdata)
+ *(.data .data.* .gnu.linkonce.d.*)
+ . = ALIGN(8);
+ _gp = ABSOLUTE(. + 0x8000);
+ *(.got.plt) *(.got)
+ *(.lit8)
+ *(.lit4)
+ *(.sdata .sdata.* .gnu.linkonce.s.*)
+ . = ALIGN (8);
+ *(.ram)
+ . = ALIGN (8);
+ _edata = .;
+ } > ram
+ .bss : ALIGN (8)
+ {
+ __bss_start = ABSOLUTE(.);
+ *(.sbss .sbss.* .gnu.linkonce.sb.*)
+ *(.scommon)
+ *(.bss .bss.* .gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN (8);
+ __bss_end = ABSOLUTE(.);
+ _end = .;
+ __end = .;
+ } > ram
+
+ .stab 0 (NOLOAD) : { *(.stab) }
+ .stabstr 0 (NOLOAD) : { *(.stabstr) }
+ /* DWARF debug sections.
+ * Symbols in the DWARF debugging sections are relative to
+ * the beginning of the section so we begin them at 0.
+ */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* DWARF 2.1 */
+ .debug_ranges 0 : { *(.debug_ranges) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+
+ .debug_alt_sim_info 0 : { *(.debug_alt_sim_info) }
+}
diff --git a/libgloss/nios2/sbrk.c b/libgloss/nios2/sbrk.c
new file mode 100644
index 000000000..1b309eca5
--- /dev/null
+++ b/libgloss/nios2/sbrk.c
@@ -0,0 +1,42 @@
+/*
+ * sbrk.c
+ *
+ * Copyright (c) 2018 Mentor Graphics
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include
+/*
+ * sbrk -- changes heap size size. Get nbytes more
+ * RAM. We just increment a pointer in what's
+ * left of memory on the board.
+ */
+
+/* Provided by the linker script. */
+extern char __heap_start[] __attribute__ ((aligned (8)));
+extern char __heap_end[] __attribute__ ((aligned (8)));
+
+void *
+sbrk (int nbytes)
+{
+ static char *heap = __heap_start;
+ char *base = heap;
+ char *new_heap = heap + nbytes;
+
+ if (nbytes < 0 || new_heap > __heap_end)
+ {
+ errno = ENOMEM;
+ return (void *)-1;
+ }
+ heap = new_heap;
+ return base;
+}
diff --git a/libgloss/open.c b/libgloss/open.c
index 468b11cd1..a0eb1717b 100644
--- a/libgloss/open.c
+++ b/libgloss/open.c
@@ -20,9 +20,8 @@
* we return an error.
*/
int
-_DEFUN (open, (buf, flags, mode),
- const char *buf _AND
- int flags _AND
+open (const char *buf,
+ int flags,
int mode)
{
errno = EIO;
diff --git a/libgloss/print.c b/libgloss/print.c
index 8f78ff2af..76d543b67 100644
--- a/libgloss/print.c
+++ b/libgloss/print.c
@@ -18,8 +18,7 @@
* print -- do a raw print of a string
*/
void
-_DEFUN (print, (ptr),
-char *ptr)
+print (char *ptr)
{
while (*ptr) {
outbyte (*ptr++);
diff --git a/libgloss/putnum.c b/libgloss/putnum.c
index 842e10f07..c368c4136 100644
--- a/libgloss/putnum.c
+++ b/libgloss/putnum.c
@@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex
*/
void
-_DEFUN (putnum, (num),
- unsigned int num)
+putnum (unsigned int num)
{
char buf[9];
int cnt;
diff --git a/libgloss/read.c b/libgloss/read.c
index 419a8ed64..24108ce0d 100644
--- a/libgloss/read.c
+++ b/libgloss/read.c
@@ -14,16 +14,15 @@
*/
#include "glue.h"
-extern char _DEFUN_VOID (inbyte);
+extern char inbyte (void);
/*
* read -- read bytes from the serial port. Ignore fd, since
* we only have stdin.
*/
int
-_DEFUN (read, (fd, buf, nbytes),
- int fd _AND
- char *buf _AND
+read (int fd,
+ char *buf,
int nbytes)
{
int i = 0;
diff --git a/libgloss/riscv/Makefile.in b/libgloss/riscv/Makefile.in
index 2f03f4402..579dd9554 100644
--- a/libgloss/riscv/Makefile.in
+++ b/libgloss/riscv/Makefile.in
@@ -6,7 +6,42 @@ gloss_hdrs = \
machine/syscall.h \
gloss_srcs = \
- syscalls.c \
+ nanosleep.c \
+ sys_access.c \
+ sys_chdir.c \
+ sys_chmod.c \
+ sys_chown.c \
+ sys_close.c \
+ sys_conv_stat.c \
+ sys_execve.c \
+ sys_exit.c \
+ sys_faccessat.c \
+ sys_fork.c \
+ sys_fstatat.c \
+ sys_fstat.c \
+ sys_ftime.c \
+ sys_getcwd.c \
+ sys_getpid.c \
+ sys_gettimeofday.c \
+ sys_isatty.c \
+ sys_kill.c \
+ sys_link.c \
+ sys_lseek.c \
+ sys_lstat.c \
+ sys_openat.c \
+ sys_open.c \
+ sys_read.c \
+ sys_sbrk.c \
+ sys_stat.c \
+ sys_sysconf.c \
+ sys_times.c \
+ sys_unlink.c \
+ sys_utime.c \
+ sys_wait.c \
+ sys_write.c
+
+gloss_specs = \
+ nano.specs sim.specs
# Extra files
@@ -85,10 +120,20 @@ gloss_c_deps = $(patsubst %.c, %.d, $(notdir $(gloss_c_srcs)))
$(gloss_c_objs) : %.o : %.c
$(COMPILE) -c $<
-objs += $(gloss_c_objs)
+gloss_objs += $(gloss_c_objs)
deps += $(gloss_c_deps)
junk += $(gloss_c_deps) $(gloss_c_objs)
+sim_c_objs = $(patsubst %.c, sim-%.o, $(notdir $(gloss_c_srcs)))
+sim_c_deps = $(patsubst %.c, sim-%.d, $(notdir $(gloss_c_srcs)))
+
+$(sim_c_objs): sim-%.o : %.c
+ $(COMPILE) -c -DUSING_SIM_SPECS -o $@ $<
+
+sim_objs += $(sim_c_objs)
+deps += $(sim_c_deps)
+junk += $(sim_c_deps) $(sim_c_objs)
+
#-------------------------------------------------------------------------
# Build Object Files from Assembly Source
#-------------------------------------------------------------------------
@@ -98,25 +143,49 @@ gloss_asm_objs = $(patsubst %.S, %.o, $(notdir $(gloss_asm_srcs)))
gloss_asm_deps = $(patsubst %.S, %.d, $(notdir $(gloss_asm_srcs)))
$(gloss_asm_objs) : %.o : %.S
- $(COMPILE) -c $<
+ $(COMPILE) -c -o $@ $<
-objs += $(gloss_asm_objs)
+gloss_objs += $(gloss_asm_objs)
deps += $(gloss_asm_deps)
junk += $(gloss_asm_deps) $(gloss_asm_objs)
+sim_asm_objs = $(patsubst %.S, sim-%.o, $(notdir $(gloss_asm_srcs)))
+sim_asm_deps = $(patsubst %.S, sim-%.d, $(notdir $(gloss_asm_srcs)))
+
+$(sim_asm_objs) : sim-%.o : %.S
+ $(COMPILE) -c -DUSING_SIM_SPECS -o $@ $<
+
+sim_objs += $(sim_asm_objs)
+deps += $(sim_asm_deps)
+junk += $(sim_asm_deps) $(sim_asm_objs)
+
#-------------------------------------------------------------------------
# Build libgloss.a
#-------------------------------------------------------------------------
gloss_lib = libgloss.a
-$(gloss_lib) : $(objs)
+$(gloss_lib) : $(gloss_objs)
$(AR) rcv $@ $^
$(RANLIB) $@
-junk += $(gloss_libs)
+junk += $(gloss_lib)
install_hdrs += $(gloss_hdrs)
install_libs += $(gloss_lib)
+install_specs += $(gloss_specs)
+
+#-------------------------------------------------------------------------
+# Build libsim.a
+#-------------------------------------------------------------------------
+
+sim_lib = libsim.a
+$(sim_lib) : $(sim_objs)
+ $(AR) rcv $@ $^
+ $(RANLIB) $@
+
+junk += $(sim_lib)
+
+install_libs += $(sim_lib)
#-------------------------------------------------------------------------
# Build crt0.o
@@ -159,7 +228,13 @@ install-libs : $(install_libs)
$(INSTALL_DATA) $$file $(install_libs_dir)/$$file; \
done
-install : install-hdrs install-libs
+install-specs : $(install_specs)
+ test -d $(install_libs_dir) || mkdir -p $(install_libs_dir)
+ for file in $^; do \
+ $(INSTALL_DATA) $$file $(install_libs_dir)/; \
+ done
+
+install : install-hdrs install-libs install-specs
.PHONY : install install-hdrs install-libs
#-------------------------------------------------------------------------
diff --git a/libgloss/riscv/crt0.S b/libgloss/riscv/crt0.S
index 35195690c..588becfae 100644
--- a/libgloss/riscv/crt0.S
+++ b/libgloss/riscv/crt0.S
@@ -2,7 +2,7 @@
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
- of the BSD License. This program is distributed in the hope that
+ of the FreeBSD License. This program is distributed in the hope that
it will be useful, but WITHOUT ANY WARRANTY expressed or implied,
including the implied warranties of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. A copy of this license is available at
@@ -41,14 +41,3 @@ _start:
call main
tail exit
.size _start, .-_start
-
- .global _init
- .type _init, @function
- .global _fini
- .type _fini, @function
-_init:
-_fini:
- # These don't have to do anything since we use init_array/fini_array.
- ret
- .size _init, .-_init
- .size _fini, .-_fini
diff --git a/libgloss/riscv/internal_syscall.h b/libgloss/riscv/internal_syscall.h
new file mode 100644
index 000000000..e5d559496
--- /dev/null
+++ b/libgloss/riscv/internal_syscall.h
@@ -0,0 +1,57 @@
+/* Copyright (c) 2017 SiFive Inc. All rights reserved.
+
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the FreeBSD License. This program is distributed in the hope that
+ it will be useful, but WITHOUT ANY WARRANTY expressed or implied,
+ including the implied warranties of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. A copy of this license is available at
+ http://www.opensource.org/licenses.
+*/
+
+#ifndef _INTERNAL_SYSCALL_H
+#define _INTERNAL_SYSCALL_H
+
+#include
+
+static inline long
+__syscall_error(long a0)
+{
+ errno = -a0;
+ return -1;
+}
+
+static inline long
+__internal_syscall(long n, long _a0, long _a1, long _a2, long _a3, long _a4, long _a5)
+{
+ register long a0 asm("a0") = _a0;
+ register long a1 asm("a1") = _a1;
+ register long a2 asm("a2") = _a2;
+ register long a3 asm("a3") = _a3;
+ register long a4 asm("a4") = _a4;
+ register long a5 asm("a5") = _a5;
+
+#ifdef __riscv_32e
+ register long syscall_id asm("t0") = n;
+#else
+ register long syscall_id asm("a7") = n;
+#endif
+
+ asm volatile ("scall"
+ : "+r"(a0) : "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(a5), "r"(syscall_id));
+
+ return a0;
+}
+
+static inline long
+syscall_errno(long n, long _a0, long _a1, long _a2, long _a3, long _a4, long _a5)
+{
+ long a0 = __internal_syscall (n, _a0, _a1, _a2, _a3, _a4, _a5);
+
+ if (a0 < 0)
+ return __syscall_error (a0);
+ else
+ return a0;
+}
+
+#endif
diff --git a/libgloss/riscv/kernel_stat.h b/libgloss/riscv/kernel_stat.h
new file mode 100644
index 000000000..d07bac544
--- /dev/null
+++ b/libgloss/riscv/kernel_stat.h
@@ -0,0 +1,39 @@
+/* Copyright (c) 2017 SiFive Inc. All rights reserved.
+
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the FreeBSD License. This program is distributed in the hope that
+ it will be useful, but WITHOUT ANY WARRANTY expressed or implied,
+ including the implied warranties of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. A copy of this license is available at
+ http://www.opensource.org/licenses.
+*/
+
+#ifndef _RISCV_KERNEL_STAT_H
+#define _RISCV_KERNEL_STAT_H
+
+#include
+#include
+
+struct kernel_stat
+{
+ unsigned long long st_dev;
+ unsigned long long st_ino;
+ unsigned int st_mode;
+ unsigned int st_nlink;
+ unsigned int st_uid;
+ unsigned int st_gid;
+ unsigned long long st_rdev;
+ unsigned long long __pad1;
+ long long st_size;
+ int st_blksize;
+ int __pad2;
+ long long st_blocks;
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
+ int __glibc_reserved[2];
+};
+
+void _conv_stat (struct stat *, struct kernel_stat *);
+#endif /* _RISCV_KERNEL_STAT_H */
diff --git a/libgloss/riscv/machine/syscall.h b/libgloss/riscv/machine/syscall.h
index 424bd906a..5cd15b848 100644
--- a/libgloss/riscv/machine/syscall.h
+++ b/libgloss/riscv/machine/syscall.h
@@ -2,7 +2,7 @@
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
- of the BSD License. This program is distributed in the hope that
+ of the FreeBSD License. This program is distributed in the hope that
it will be useful, but WITHOUT ANY WARRANTY expressed or implied,
including the implied warranties of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. A copy of this license is available at
@@ -54,29 +54,4 @@
#define SYS_time 1062
#define SYS_getmainvars 2011
-extern long __syscall_error(long);
-
-static inline long
-__internal_syscall(long n, long _a0, long _a1, long _a2, long _a3)
-{
- register long a0 asm("a0") = _a0;
- register long a1 asm("a1") = _a1;
- register long a2 asm("a2") = _a2;
- register long a3 asm("a3") = _a3;
-
-#ifdef __riscv_32e
- register long syscall_id asm("t0") = n;
-#else
- register long syscall_id asm("a7") = n;
-#endif
-
- asm volatile ("scall"
- : "+r"(a0) : "r"(a1), "r"(a2), "r"(a3), "r"(syscall_id));
-
- if (a0 < 0)
- return __syscall_error (a0);
- else
- return a0;
-}
-
#endif
diff --git a/libgloss/riscv/nano.specs b/libgloss/riscv/nano.specs
new file mode 100644
index 000000000..89fd23176
--- /dev/null
+++ b/libgloss/riscv/nano.specs
@@ -0,0 +1,23 @@
+%rename link nano_link
+%rename link_gcc_c_sequence nano_link_gcc_c_sequence
+%rename cpp nano_cpp
+
+*cpp:
+-isystem =/include/newlib-nano %(nano_cpp)
+
+*nano_libc:
+-lc_nano
+
+*nano_libgloss:
+%{specs=nosys.specs:-lnosys} %{!specs=nosys.specs:-lgloss_nano}
+
+*link_gcc_c_sequence:
+%(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) --end-group
+
+*link:
+%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano)
+
+*lib:
+%{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}}
+
+# ??? Maybe put --gc-sections option in here?
diff --git a/libgloss/riscv/nanosleep.c b/libgloss/riscv/nanosleep.c
new file mode 100644
index 000000000..1a247109c
--- /dev/null
+++ b/libgloss/riscv/nanosleep.c
@@ -0,0 +1,12 @@
+#include
+#include
+
+int
+nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
+{
+ unsigned long current_time, end_time;
+ asm ("rdtime %0" : "+r" (current_time));
+ end_time = current_time + rqtp->tv_sec * 1000000000ULL + rqtp->tv_nsec;
+ while (current_time <= end_time) asm ("rdtime %0" : "+r" (current_time));
+ return 0;
+}
diff --git a/libgloss/riscv/sim.specs b/libgloss/riscv/sim.specs
new file mode 100644
index 000000000..31fde6906
--- /dev/null
+++ b/libgloss/riscv/sim.specs
@@ -0,0 +1,10 @@
+# Spec file for gdb simulator.
+
+%rename lib sim_lib
+%rename link sim_link
+
+*lib:
+--start-group -lc -lsim --end-group
+
+*link:
+%(sim_link) %:replace-outfile(-lgloss -lsim)
diff --git a/libgloss/riscv/sys_access.c b/libgloss/riscv/sys_access.c
new file mode 100644
index 000000000..ef446d29b
--- /dev/null
+++ b/libgloss/riscv/sys_access.c
@@ -0,0 +1,9 @@
+#include
+#include "internal_syscall.h"
+
+/* Permissions of a file (by name). */
+int
+_access(const char *file, int mode)
+{
+ return syscall_errno (SYS_access, file, mode, 0, 0, 0, 0);
+}
diff --git a/libgloss/riscv/sys_chdir.c b/libgloss/riscv/sys_chdir.c
new file mode 100644
index 000000000..0b2b0f53d
--- /dev/null
+++ b/libgloss/riscv/sys_chdir.c
@@ -0,0 +1,8 @@
+#include
+
+/* Stub. */
+int
+_chdir(const char *path)
+{
+ return -1;
+}
diff --git a/libgloss/riscv/sys_chmod.c b/libgloss/riscv/sys_chmod.c
new file mode 100644
index 000000000..2c11e1d03
--- /dev/null
+++ b/libgloss/riscv/sys_chmod.c
@@ -0,0 +1,9 @@
+#include
+#include
+
+/* Stub. */
+int
+_chmod(const char *path, mode_t mode)
+{
+ return -1;
+}
diff --git a/libgloss/riscv/sys_chown.c b/libgloss/riscv/sys_chown.c
new file mode 100644
index 000000000..8faddffe2
--- /dev/null
+++ b/libgloss/riscv/sys_chown.c
@@ -0,0 +1,8 @@
+#include
+#include
+
+/* Stub. */
+int _chown(const char *path, uid_t owner, gid_t group)
+{
+ return -1;
+}
diff --git a/libgloss/riscv/sys_close.c b/libgloss/riscv/sys_close.c
new file mode 100644
index 000000000..80b10c66a
--- /dev/null
+++ b/libgloss/riscv/sys_close.c
@@ -0,0 +1,9 @@
+#include
+#include "internal_syscall.h"
+
+/* Close a file. */
+int
+_close(int file)
+{
+ return syscall_errno (SYS_close, file, 0, 0, 0, 0, 0);
+}
diff --git a/libgloss/riscv/sys_conv_stat.c b/libgloss/riscv/sys_conv_stat.c
new file mode 100644
index 000000000..73c6a8672
--- /dev/null
+++ b/libgloss/riscv/sys_conv_stat.c
@@ -0,0 +1,21 @@
+#include
+#include "kernel_stat.h"
+
+/* Convert linux's stat64 sturct to newlib's stat. */
+void
+_conv_stat (struct stat *st, struct kernel_stat *kst)
+{
+ st->st_dev = kst->st_dev;
+ st->st_ino = kst->st_ino;
+ st->st_mode = kst->st_mode;
+ st->st_nlink = kst->st_nlink;
+ st->st_uid = kst->st_uid;
+ st->st_gid = kst->st_gid;
+ st->st_rdev = kst->st_rdev;
+ st->st_size = kst->st_size;
+ st->st_blocks = kst->st_blocks;
+ st->st_blksize = kst->st_blksize;
+ st->st_atime = kst->st_atim.tv_sec;
+ st->st_mtime = kst->st_mtim.tv_sec;
+ st->st_ctime = kst->st_ctim.tv_sec;
+}
diff --git a/libgloss/riscv/sys_execve.c b/libgloss/riscv/sys_execve.c
new file mode 100644
index 000000000..d6447373e
--- /dev/null
+++ b/libgloss/riscv/sys_execve.c
@@ -0,0 +1,11 @@
+#include
+#include "internal_syscall.h"
+
+/* Transfer control to a new process. Minimal implementation for a
+ system without processes from newlib documentation. */
+int
+_execve(const char *name, char *const argv[], char *const env[])
+{
+ errno = ENOMEM;
+ return -1;
+}
diff --git a/libgloss/riscv/sys_exit.c b/libgloss/riscv/sys_exit.c
new file mode 100644
index 000000000..03e1c34e8
--- /dev/null
+++ b/libgloss/riscv/sys_exit.c
@@ -0,0 +1,10 @@
+#include
+#include "internal_syscall.h"
+
+/* Exit a program without cleaning up files. */
+void
+_exit(int exit_status)
+{
+ syscall_errno (SYS_exit, exit_status, 0, 0, 0, 0, 0);
+ while (1);
+}
diff --git a/libgloss/riscv/sys_faccessat.c b/libgloss/riscv/sys_faccessat.c
new file mode 100644
index 000000000..e966a4a78
--- /dev/null
+++ b/libgloss/riscv/sys_faccessat.c
@@ -0,0 +1,8 @@
+#include
+#include "internal_syscall.h"
+
+/* Permissions of a file (by name) in a given directory. */
+int _faccessat(int dirfd, const char *file, int mode, int flags)
+{
+ return syscall_errno (SYS_faccessat, dirfd, file, mode, flags, 0, 0);
+}
diff --git a/libgloss/riscv/sys_fork.c b/libgloss/riscv/sys_fork.c
new file mode 100644
index 000000000..8ace14096
--- /dev/null
+++ b/libgloss/riscv/sys_fork.c
@@ -0,0 +1,10 @@
+#include
+#include "internal_syscall.h"
+
+/* Create a new process. Minimal implementation for a system without
+ processes from newlib documentation. */
+int _fork()
+{
+ errno = EAGAIN;
+ return -1;
+}
diff --git a/libgloss/riscv/sys_fstat.c b/libgloss/riscv/sys_fstat.c
new file mode 100644
index 000000000..13a0bca2f
--- /dev/null
+++ b/libgloss/riscv/sys_fstat.c
@@ -0,0 +1,15 @@
+#include
+#include "kernel_stat.h"
+#include "internal_syscall.h"
+
+/* Status of an open file. The sys/stat.h header file required is
+ distributed in the include subdirectory for this C library. */
+
+int
+_fstat(int file, struct stat *st)
+{
+ struct kernel_stat kst;
+ int rv = syscall_errno (SYS_fstat, file, &kst, 0, 0, 0, 0);
+ _conv_stat (st, &kst);
+ return rv;
+}
diff --git a/libgloss/riscv/sys_fstatat.c b/libgloss/riscv/sys_fstatat.c
new file mode 100644
index 000000000..0e4ea42d0
--- /dev/null
+++ b/libgloss/riscv/sys_fstatat.c
@@ -0,0 +1,14 @@
+#include
+#include "kernel_stat.h"
+#include "internal_syscall.h"
+
+/* Status of an open file. The sys/stat.h header file required is
+ distributed in the include subdirectory for this C library. */
+int
+_fstatat(int dirfd, const char *file, struct stat *st, int flags)
+{
+ struct kernel_stat kst;
+ int rv = syscall_errno (SYS_fstatat, dirfd, file, &kst, flags, 0, 0);
+ _conv_stat (st, &kst);
+ return rv;
+}
diff --git a/libgloss/riscv/sys_ftime.c b/libgloss/riscv/sys_ftime.c
new file mode 100644
index 000000000..5705592be
--- /dev/null
+++ b/libgloss/riscv/sys_ftime.c
@@ -0,0 +1,10 @@
+#include
+#include
+
+/* Get the current time. Only relatively correct. */
+int
+_ftime(struct timeb *tp)
+{
+ tp->time = tp->millitm = 0;
+ return 0;
+}
diff --git a/libgloss/riscv/sys_getcwd.c b/libgloss/riscv/sys_getcwd.c
new file mode 100644
index 000000000..b0fb205d7
--- /dev/null
+++ b/libgloss/riscv/sys_getcwd.c
@@ -0,0 +1,9 @@
+#include
+#include
+
+/* Stub. */
+char *
+_getcwd(char *buf, size_t size)
+{
+ return NULL;
+}
diff --git a/libgloss/riscv/sys_getpid.c b/libgloss/riscv/sys_getpid.c
new file mode 100644
index 000000000..2aa072177
--- /dev/null
+++ b/libgloss/riscv/sys_getpid.c
@@ -0,0 +1,11 @@
+#include
+
+/* Get process id. This is sometimes used to generate strings unlikely
+ to conflict with other processes. Minimal implementation for a
+ system without processes just returns 1. */
+
+int
+_getpid()
+{
+ return 1;
+}
diff --git a/libgloss/riscv/sys_gettimeofday.c b/libgloss/riscv/sys_gettimeofday.c
new file mode 100644
index 000000000..457dcbcc7
--- /dev/null
+++ b/libgloss/riscv/sys_gettimeofday.c
@@ -0,0 +1,10 @@
+#include
+#include
+#include "internal_syscall.h"
+
+/* Get the current time. Only relatively correct. */
+int
+_gettimeofday(struct timeval *tp, void *tzp)
+{
+ return syscall_errno (SYS_gettimeofday, tp, 0, 0, 0, 0, 0);
+}
diff --git a/libgloss/riscv/sys_isatty.c b/libgloss/riscv/sys_isatty.c
new file mode 100644
index 000000000..8857f4828
--- /dev/null
+++ b/libgloss/riscv/sys_isatty.c
@@ -0,0 +1,17 @@
+#include
+#include
+#include "internal_syscall.h"
+
+extern int _fstat(int file, struct stat *st);
+
+/* Query whether output stream is a terminal. For consistency with the
+ other minimal implementations, which only support output to stdout,
+ this minimal implementation is suggested by the newlib docs. */
+
+int
+_isatty(int file)
+{
+ struct stat s;
+ int ret = _fstat (file, &s);
+ return ret == -1 ? 0 : !!(s.st_mode & S_IFCHR);
+}
diff --git a/libgloss/riscv/sys_kill.c b/libgloss/riscv/sys_kill.c
new file mode 100644
index 000000000..cf7f224ef
--- /dev/null
+++ b/libgloss/riscv/sys_kill.c
@@ -0,0 +1,11 @@
+#include
+#include "internal_syscall.h"
+
+/* Send a signal. Minimal implementation for a system without processes
+ just causes an error. */
+int
+_kill(int pid, int sig)
+{
+ errno = EINVAL;
+ return -1;
+}
diff --git a/libgloss/riscv/sys_link.c b/libgloss/riscv/sys_link.c
new file mode 100644
index 000000000..eaeb22b25
--- /dev/null
+++ b/libgloss/riscv/sys_link.c
@@ -0,0 +1,8 @@
+#include
+#include "internal_syscall.h"
+
+/* Establish a new name for an existing file. */
+int _link(const char *old_name, const char *new_name)
+{
+ return syscall_errno (SYS_link, old_name, new_name, 0, 0, 0, 0);
+}
diff --git a/libgloss/riscv/sys_lseek.c b/libgloss/riscv/sys_lseek.c
new file mode 100644
index 000000000..7486a3a3e
--- /dev/null
+++ b/libgloss/riscv/sys_lseek.c
@@ -0,0 +1,10 @@
+#include
+#include
+#include "internal_syscall.h"
+
+/* Set position in a file. */
+off_t
+_lseek(int file, off_t ptr, int dir)
+{
+ return syscall_errno (SYS_lseek, file, ptr, dir, 0, 0, 0);
+}
diff --git a/libgloss/riscv/sys_lstat.c b/libgloss/riscv/sys_lstat.c
new file mode 100644
index 000000000..2eeabcce3
--- /dev/null
+++ b/libgloss/riscv/sys_lstat.c
@@ -0,0 +1,13 @@
+#include
+#include
+#include "internal_syscall.h"
+#include "kernel_stat.h"
+
+/* Status of a link (by name). */
+int _lstat(const char *file, struct stat *st)
+{
+ struct kernel_stat kst;
+ int rv = syscall_errno (SYS_lstat, file, &kst, 0, 0, 0, 0);
+ _conv_stat (st, &kst);
+ return rv;
+}
diff --git a/libgloss/riscv/sys_open.c b/libgloss/riscv/sys_open.c
new file mode 100644
index 000000000..4fd5d672f
--- /dev/null
+++ b/libgloss/riscv/sys_open.c
@@ -0,0 +1,9 @@
+#include
+#include "internal_syscall.h"
+
+/* Open a file. */
+int
+_open(const char *name, int flags, int mode)
+{
+ return syscall_errno (SYS_open, name, flags, mode, 0, 0, 0);
+}
diff --git a/libgloss/riscv/sys_openat.c b/libgloss/riscv/sys_openat.c
new file mode 100644
index 000000000..cf429b7b2
--- /dev/null
+++ b/libgloss/riscv/sys_openat.c
@@ -0,0 +1,8 @@
+#include
+#include "internal_syscall.h"
+
+/* Open file relative to given directory. */
+int _openat(int dirfd, const char *name, int flags, int mode)
+{
+ return syscall_errno (SYS_openat, dirfd, name, flags, mode, 0, 0);
+}
diff --git a/libgloss/riscv/sys_read.c b/libgloss/riscv/sys_read.c
new file mode 100644
index 000000000..7367e2643
--- /dev/null
+++ b/libgloss/riscv/sys_read.c
@@ -0,0 +1,9 @@
+#include
+#include
+#include "internal_syscall.h"
+
+/* Read from a file. */
+ssize_t _read(int file, void *ptr, size_t len)
+{
+ return syscall_errno (SYS_read, file, ptr, len, 0, 0, 0);
+}
diff --git a/libgloss/riscv/sys_sbrk.c b/libgloss/riscv/sys_sbrk.c
new file mode 100644
index 000000000..f91c2c506
--- /dev/null
+++ b/libgloss/riscv/sys_sbrk.c
@@ -0,0 +1,56 @@
+#ifdef USING_SIM_SPECS
+
+// Gdb simulator requires that sbrk be implemented without a syscall.
+extern char _end[]; /* _end is set in the linker command file */
+char *heap_ptr;
+
+/*
+ * sbrk -- changes heap size size. Get nbytes more
+ * RAM. We just increment a pointer in what's
+ * left of memory on the board.
+ */
+char *
+_sbrk (nbytes)
+ int nbytes;
+{
+ char *base;
+
+ if (!heap_ptr)
+ heap_ptr = (char *)&_end;
+ base = heap_ptr;
+ heap_ptr += nbytes;
+
+ return base;
+}
+
+#else
+
+// QEMU uses a syscall.
+#include
+#include
+#include "internal_syscall.h"
+
+/* Increase program data space. As malloc and related functions depend
+ on this, it is useful to have a working implementation. The following
+ is suggested by the newlib docs and suffices for a standalone
+ system. */
+void *
+_sbrk(ptrdiff_t incr)
+{
+ static unsigned long heap_end;
+
+ if (heap_end == 0)
+ {
+ long brk = __internal_syscall (SYS_brk, 0, 0, 0, 0, 0, 0);
+ if (brk == -1)
+ return (void *)__syscall_error (-ENOMEM);
+ heap_end = brk;
+ }
+
+ if (__internal_syscall (SYS_brk, heap_end + incr, 0, 0, 0, 0, 0) != heap_end + incr)
+ return (void *)__syscall_error (-ENOMEM);
+
+ heap_end += incr;
+ return (void *)(heap_end - incr);
+}
+#endif
diff --git a/libgloss/riscv/sys_stat.c b/libgloss/riscv/sys_stat.c
new file mode 100644
index 000000000..a193b10ad
--- /dev/null
+++ b/libgloss/riscv/sys_stat.c
@@ -0,0 +1,14 @@
+#include
+#include "kernel_stat.h"
+#include "internal_syscall.h"
+
+/* Status of a file (by name). */
+
+int
+_stat(const char *file, struct stat *st)
+{
+ struct kernel_stat kst;
+ int rv = syscall_errno (SYS_stat, file, &kst, 0, 0, 0, 0);
+ _conv_stat (st, &kst);
+ return rv;
+}
diff --git a/libgloss/riscv/sys_sysconf.c b/libgloss/riscv/sys_sysconf.c
new file mode 100644
index 000000000..dffdebab9
--- /dev/null
+++ b/libgloss/riscv/sys_sysconf.c
@@ -0,0 +1,17 @@
+#include
+#include
+#include
+
+/* Get configurable system variables. */
+
+long
+_sysconf(int name)
+{
+ switch (name)
+ {
+ case _SC_CLK_TCK:
+ return CLOCKS_PER_SEC;
+ }
+
+ return -1;
+}
diff --git a/libgloss/riscv/sys_times.c b/libgloss/riscv/sys_times.c
new file mode 100644
index 000000000..fc8133ade
--- /dev/null
+++ b/libgloss/riscv/sys_times.c
@@ -0,0 +1,37 @@
+#include
+#include
+#include
+#include
+#include "internal_syscall.h"
+
+extern int _gettimeofday(struct timeval *, void *);
+
+/* Timing information for current process. From
+ newlib/libc/include/sys/times.h the tms struct fields are as follows:
+
+ - clock_t tms_utime : user clock ticks
+ - clock_t tms_stime : system clock ticks
+ - clock_t tms_cutime : children's user clock ticks
+ - clock_t tms_cstime : children's system clock ticks
+
+ Since maven does not currently support processes we set both of the
+ children's times to zero. Eventually we might want to separately
+ account for user vs system time, but for now we just return the total
+ number of cycles since starting the program. */
+clock_t
+_times(struct tms *buf)
+{
+ // when called for the first time, initialize t0
+ static struct timeval t0;
+ if (t0.tv_sec == 0 && t0.tv_usec == 0)
+ _gettimeofday (&t0, 0);
+
+ struct timeval t;
+ _gettimeofday (&t, 0);
+
+ long long utime = (t.tv_sec - t0.tv_sec) * 1000000 + (t.tv_usec - t0.tv_usec);
+ buf->tms_utime = utime * CLOCKS_PER_SEC / 1000000;
+ buf->tms_stime = buf->tms_cstime = buf->tms_cutime = 0;
+
+ return buf->tms_utime;
+}
diff --git a/libgloss/riscv/sys_unlink.c b/libgloss/riscv/sys_unlink.c
new file mode 100644
index 000000000..b55fe1ec2
--- /dev/null
+++ b/libgloss/riscv/sys_unlink.c
@@ -0,0 +1,9 @@
+#include
+#include "internal_syscall.h"
+
+/* Remove a file's directory entry. */
+int
+_unlink(const char *name)
+{
+ return syscall_errno (SYS_unlink, name, 0, 0, 0, 0, 0);
+}
diff --git a/libgloss/riscv/sys_utime.c b/libgloss/riscv/sys_utime.c
new file mode 100644
index 000000000..c03a968e4
--- /dev/null
+++ b/libgloss/riscv/sys_utime.c
@@ -0,0 +1,8 @@
+#include
+
+/* Stub. */
+int
+_utime(const char *path, const struct utimbuf *times)
+{
+ return -1;
+}
diff --git a/libgloss/riscv/sys_wait.c b/libgloss/riscv/sys_wait.c
new file mode 100644
index 000000000..25bf44800
--- /dev/null
+++ b/libgloss/riscv/sys_wait.c
@@ -0,0 +1,10 @@
+#include
+#include
+
+/* Wait for a child process. Minimal implementation for a system without
+ processes just causes an error. */
+int _wait(int *status)
+{
+ errno = ECHILD;
+ return -1;
+}
diff --git a/libgloss/riscv/sys_write.c b/libgloss/riscv/sys_write.c
new file mode 100644
index 000000000..b972734e2
--- /dev/null
+++ b/libgloss/riscv/sys_write.c
@@ -0,0 +1,10 @@
+#include
+#include
+#include "internal_syscall.h"
+
+/* Write to a file. */
+ssize_t
+_write(int file, const void *ptr, size_t len)
+{
+ return syscall_errno (SYS_write, file, ptr, len, 0, 0, 0);
+}
diff --git a/libgloss/riscv/syscalls.c b/libgloss/riscv/syscalls.c
deleted file mode 100644
index d86bd8980..000000000
--- a/libgloss/riscv/syscalls.c
+++ /dev/null
@@ -1,419 +0,0 @@
-/* Copyright (c) 2017 SiFive Inc. All rights reserved.
-
- This copyrighted material is made available to anyone wishing to use,
- modify, copy, or redistribute it subject to the terms and conditions
- of the BSD License. This program is distributed in the hope that
- it will be useful, but WITHOUT ANY WARRANTY expressed or implied,
- including the implied warranties of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. A copy of this license is available at
- http://www.opensource.org/licenses.
-
- ========================================================================
- syscalls.c : Newlib operating system interface
- ========================================================================
- This is the maven implementation of the narrow newlib operating
- system interface. It is based on the minimum stubs in the newlib
- documentation, the error stubs in libnosys, and the previous scale
- implementation. Please do not include any additional system calls or
- other functions in this file. Additional header and source files
- should be in the machine subdirectory.
-
- Here is a list of the functions which make up the operating system
- interface. The file management instructions execute syscall assembly
- instructions so that a proxy kernel (or the simulator) can marshal up
- the request to the host machine. The process management functions are
- mainly just stubs since for now maven only supports a single process.
-
- - File management functions
- + open : (v) open file
- + lseek : (v) set position in file
- + read : (v) read from file
- + write : (v) write to file
- + fstat : (z) status of an open file
- + stat : (z) status of a file by name
- + close : (z) close a file
- + link : (z) rename a file
- + unlink : (z) remote file's directory entry
-
- - Process management functions
- + execve : (z) transfer control to new proc
- + fork : (z) create a new process
- + getpid : (v) get process id
- + kill : (z) send signal to child process
- + wait : (z) wait for a child process
-
- - Misc functions
- + isatty : (v) query whether output stream is a terminal
- + times : (z) timing information for current process
- + sbrk : (v) increase program data space
- + _exit : (-) exit program without cleaning up files
-
- There are two types of system calls. Those which return a value when
- everything is okay (marked with (v) in above list) and those which
- return a zero when everything is okay (marked with (z) in above
- list). On an error (ie. when the error flag is 1) the return value is
- always an errno which should correspond to the numbers in
- newlib/libc/include/sys/errno.h
-
- See the newlib documentation for more information
- http://sourceware.org/newlib/libc.html#Syscalls
-*/
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#define syscall_errno(n, a, b, c, d) \
- __internal_syscall(n, (long)(a), (long)(b), (long)(c), (long)(d))
-
-long
-__syscall_error(long a0)
-{
- errno = -a0;
- return -1;
-}
-
-/* Open a file. */
-int
-_open(const char *name, int flags, int mode)
-{
- return syscall_errno (SYS_open, name, flags, mode, 0);
-}
-
-/* Open file relative to given directory. */
-int
-_openat(int dirfd, const char *name, int flags, int mode)
-{
- return syscall_errno (SYS_openat, dirfd, name, flags, mode);
-}
-
-/* Set position in a file. */
-off_t
-_lseek(int file, off_t ptr, int dir)
-{
- return syscall_errno (SYS_lseek, file, ptr, dir, 0);
-}
-
-/* Read from a file. */
-ssize_t
-_read(int file, void *ptr, size_t len)
-{
- return syscall_errno (SYS_read, file, ptr, len, 0);
-}
-
-/* Write to a file. */
-ssize_t
-_write(int file, const void *ptr, size_t len)
-{
- return syscall_errno (SYS_write, file, ptr, len, 0);
-}
-
-struct kernel_stat
-{
- unsigned long long st_dev;
- unsigned long long st_ino;
- unsigned int st_mode;
- unsigned int st_nlink;
- unsigned int st_uid;
- unsigned int st_gid;
- unsigned long long st_rdev;
- unsigned long long __pad1;
- long long st_size;
- int st_blksize;
- int __pad2;
- long long st_blocks;
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
- int __glibc_reserved[2];
-};
-
-/* Convert linux's stat64 sturct to newlib's stat. */
-static void
-conv_stat (struct stat *st, struct kernel_stat *kst)
-{
- st->st_dev = kst->st_dev;
- st->st_ino = kst->st_ino;
- st->st_mode = kst->st_mode;
- st->st_nlink = kst->st_nlink;
- st->st_uid = kst->st_uid;
- st->st_gid = kst->st_gid;
- st->st_rdev = kst->st_rdev;
- st->st_size = kst->st_size;
- st->st_blocks = kst->st_blocks;
- st->st_blksize = kst->st_blksize;
- st->st_atime = kst->st_atim.tv_sec;
- st->st_mtime = kst->st_mtim.tv_sec;
- st->st_ctime = kst->st_ctim.tv_sec;
-}
-
-/* Status of an open file. The sys/stat.h header file required is
- distributed in the include subdirectory for this C library. */
-int
-_fstat(int file, struct stat *st)
-{
- struct kernel_stat kst;
- int rv = syscall_errno (SYS_fstat, file, &kst, 0, 0);
- conv_stat (st, &kst);
- return rv;
-}
-
-/* Status of a file (by name). */
-int
-_stat(const char *file, struct stat *st)
-{
- struct kernel_stat kst;
- int rv = syscall_errno (SYS_stat, file, &kst, 0, 0);
- conv_stat (st, &kst);
- return rv;
-}
-
-/* Status of a link (by name). */
-int
-_lstat(const char *file, struct stat *st)
-{
- struct kernel_stat kst;
- int rv = syscall_errno (SYS_lstat, file, &kst, 0, 0);
- conv_stat (st, &kst);
- return rv;
-}
-
-/* Status of a file (by name) in a given directory. */
-int
-_fstatat(int dirfd, const char *file, struct stat *st, int flags)
-{
- struct kernel_stat kst;
- int rv = syscall_errno (SYS_fstatat, dirfd, file, &kst, flags);
- conv_stat (st, &kst);
- return rv;
-}
-
-/* Permissions of a file (by name). */
-int
-_access(const char *file, int mode)
-{
- return syscall_errno (SYS_access, file, mode, 0, 0);
-}
-
-/* Permissions of a file (by name) in a given directory. */
-int
-_faccessat(int dirfd, const char *file, int mode, int flags)
-{
- return syscall_errno (SYS_faccessat, dirfd, file, mode, flags);
-}
-
-/* Close a file. */
-int
-_close(int file)
-{
- return syscall_errno (SYS_close, file, 0, 0, 0);
-}
-
-/* Establish a new name for an existing file. */
-int
-_link(const char *old_name, const char *new_name)
-{
- return syscall_errno (SYS_link, old_name, new_name, 0, 0);
-}
-
-/* Remove a file's directory entry. */
-int
-_unlink(const char *name)
-{
- return syscall_errno (SYS_unlink, name, 0, 0, 0);
-}
-
-/* Transfer control to a new process. Minimal implementation for a
- system without processes from newlib documentation. */
-int
-_execve(const char *name, char *const argv[], char *const env[])
-{
- errno = ENOMEM;
- return -1;
-}
-
-/* Create a new process. Minimal implementation for a system without
- processes from newlib documentation. */
-
-int
-_fork()
-{
- errno = EAGAIN;
- return -1;
-}
-
-/* Get process id. This is sometimes used to generate strings unlikely
- to conflict with other processes. Minimal implementation for a
- system without processes just returns 1. */
-
-int
-_getpid()
-{
- return 1;
-}
-
-/* Send a signal. Minimal implementation for a system without processes
- just causes an error. */
-
-int
-_kill(int pid, int sig)
-{
- errno = EINVAL;
- return -1;
-}
-
-/* Wait for a child process. Minimal implementation for a system without
- processes just causes an error. */
-
-int
-_wait(int *status)
-{
- errno = ECHILD;
- return -1;
-}
-
-/* Query whether output stream is a terminal. For consistency with the
- other minimal implementations, which only support output to stdout,
- this minimal implementation is suggested by the newlib docs. */
-
-int
-_isatty(int file)
-{
- struct stat s;
- int ret = _fstat (file, &s);
- return ret == -1 ? -1 : !!(s.st_mode & S_IFCHR);
-}
-
-/* Get the current time. Only relatively correct. */
-
-int
-_gettimeofday(struct timeval *tp, void *tz)
-{
- return syscall_errno (SYS_gettimeofday, tp, 0, 0, 0);
-}
-
-/* Timing information for current process. From
- newlib/libc/include/sys/times.h the tms struct fields are as follows:
-
- - clock_t tms_utime : user clock ticks
- - clock_t tms_stime : system clock ticks
- - clock_t tms_cutime : children's user clock ticks
- - clock_t tms_cstime : children's system clock ticks
-
- Since maven does not currently support processes we set both of the
- children's times to zero. Eventually we might want to separately
- account for user vs system time, but for now we just return the total
- number of cycles since starting the program. */
-clock_t
-_times(struct tms *buf)
-{
- // when called for the first time, initialize t0
- static struct timeval t0;
- if(t0.tv_sec == 0)
- _gettimeofday (&t0,0);
-
- struct timeval t;
- _gettimeofday (&t, 0);
-
- long long utime = (t.tv_sec - t0.tv_sec) * 1000000 + (t.tv_usec - t0.tv_usec);
- buf->tms_utime = utime * CLOCKS_PER_SEC / 1000000;
- buf->tms_stime = buf->tms_cstime = buf->tms_cutime = 0;
-
- return -1;
-}
-
-/* Get the current time. Only relatively correct. */
-int
-_ftime(struct timeb *tp)
-{
- tp->time = tp->millitm = 0;
- return 0;
-}
-
-/* Stub. */
-int
-_utime(const char *path, const struct utimbuf *times)
-{
- return -1;
-}
-
-/* Stub. */
-int
-_chown(const char *path, uid_t owner, gid_t group)
-{
- return -1;
-}
-
-/* Stub. */
-int
-_chmod(const char *path, mode_t mode)
-{
- return -1;
-}
-
-/* Stub. */
-int
-_chdir(const char *path)
-{
- return -1;
-}
-
-/* Stub. */
-char *
-_getcwd(char *buf, size_t size)
-{
- return NULL;
-}
-
-/* Get configurable system variables. */
-
-long
-_sysconf(int name)
-{
- switch (name)
- {
- case _SC_CLK_TCK:
- return CLOCKS_PER_SEC;
- }
-
- return -1;
-}
-
-/* Increase program data space. As malloc and related functions depend
- on this, it is useful to have a working implementation. The following
- is suggested by the newlib docs and suffices for a standalone
- system. */
-void *
-_sbrk(ptrdiff_t incr)
-{
- static unsigned long heap_end;
-
- if (heap_end == 0)
- {
- long brk = syscall_errno (SYS_brk, 0, 0, 0, 0);
- if (brk == -1)
- return (void *)-1;
- heap_end = brk;
- }
-
- if (syscall_errno (SYS_brk, heap_end + incr, 0, 0, 0) != heap_end + incr)
- return (void *)-1;
-
- heap_end += incr;
- return (void *)(heap_end - incr);
-}
-
-/* Exit a program without cleaning up files. */
-
-void
-_exit(int exit_status)
-{
- syscall_errno (SYS_exit, exit_status, 0, 0, 0);
- while (1);
-}
diff --git a/libgloss/sparc_leon/asm-leon/clock.h b/libgloss/sparc_leon/asm-leon/clock.h
index 189e942e1..7e33ae4d0 100644
--- a/libgloss/sparc_leon/asm-leon/clock.h
+++ b/libgloss/sparc_leon/asm-leon/clock.h
@@ -30,8 +30,8 @@
#include
#ifndef __ASSEMBLER__
-int _EXFUN (gettimeofday, (struct timeval * __p, void *__tz));
-int _EXFUN (settimeofday, (const struct timeval *, const struct timezone *));
+int gettimeofday (struct timeval * __p, void *__tz);
+int settimeofday (const struct timeval *, const struct timezone *);
void do_gettimeofday (struct timeval *tv);
#endif
diff --git a/libgloss/sparc_leon/console_dbg.c b/libgloss/sparc_leon/console_dbg.c
index 57c258fb4..f4bfc5c27 100644
--- a/libgloss/sparc_leon/console_dbg.c
+++ b/libgloss/sparc_leon/console_dbg.c
@@ -25,11 +25,7 @@
#include
#include
-#ifdef _HAVE_STDC
#include
-#else
-#include
-#endif
#include
#include
diff --git a/libgloss/spu/getpid.c b/libgloss/spu/getpid.c
index ff2d82028..89361720f 100644
--- a/libgloss/spu/getpid.c
+++ b/libgloss/spu/getpid.c
@@ -31,7 +31,7 @@ Author: Andreas Neukoetter (ti95neuk@de.ibm.com)
*/
int
-getpid ()
+getpid (void)
{
return (1);
}
diff --git a/libgloss/stat.c b/libgloss/stat.c
index ebb7de3f5..4d6312830 100644
--- a/libgloss/stat.c
+++ b/libgloss/stat.c
@@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (stat, (path, buf),
- const char *path _AND
+stat (const char *path,
struct stat *buf)
{
errno = EIO;
diff --git a/libgloss/tic6x/getpid.c b/libgloss/tic6x/getpid.c
index 3c1a7b8b8..912ca18a5 100644
--- a/libgloss/tic6x/getpid.c
+++ b/libgloss/tic6x/getpid.c
@@ -19,8 +19,7 @@
* getpid -- only one process, so just return 1.
*/
int
-_DEFUN (getpid, (),
- )
+getpid (void)
{
return __MYPID;
}
diff --git a/libgloss/tic6x/kill.c b/libgloss/tic6x/kill.c
index 3ed228fd2..98cd3c40e 100644
--- a/libgloss/tic6x/kill.c
+++ b/libgloss/tic6x/kill.c
@@ -19,8 +19,7 @@
* kill -- go out via exit...
*/
int
-_DEFUN (kill, (pid, sig),
- int pid _AND
+kill (int pid,
int sig)
{
if(pid == __MYPID)
diff --git a/libgloss/unlink.c b/libgloss/unlink.c
index 15ea7e8a9..76c1a4fef 100644
--- a/libgloss/unlink.c
+++ b/libgloss/unlink.c
@@ -20,8 +20,7 @@
* we just return an error.
*/
int
-_DEFUN (unlink, (path),
- char * path)
+unlink (char * path)
{
errno = EIO;
return (-1);
diff --git a/libgloss/write.c b/libgloss/write.c
index 292a68e53..28b7ea37a 100644
--- a/libgloss/write.c
+++ b/libgloss/write.c
@@ -14,7 +14,7 @@
*/
#include "glue.h"
-extern int _EXFUN (outbyte, (char x));
+extern int outbyte (char x);
/*
* write -- write bytes to the serial port. Ignore fd, since
@@ -22,9 +22,8 @@ extern int _EXFUN (outbyte, (char x));
* open will only return an error.
*/
int
-_DEFUN (write, (fd, buf, nbytes),
- int fd _AND
- char *buf _AND
+write (int fd,
+ char *buf,
int nbytes)
{
int i;
diff --git a/libgloss/xc16x/misc.c b/libgloss/xc16x/misc.c
index 786db36dd..d96550129 100644
--- a/libgloss/xc16x/misc.c
+++ b/libgloss/xc16x/misc.c
@@ -17,21 +17,19 @@
/* _raise(), getpid(), and kill() are required by abort().
getpid/kill are prefixed with '_' because of MISSING_SYSCALL_NAMES. */
-int _DEFUN(_raise,(sig),
- int sig)
+int _raise (int sig)
{
errno = ENOSYS;
return -1;
}
-int _DEFUN(_getpid,(),)
+int _getpid (void)
{
errno = ENOSYS;
return -1;
}
-int _DEFUN(_kill,(pid, sig),
- int pid _AND
+int _kill (int pid,
int sig)
{
errno = ENOSYS;
diff --git a/libgloss/xstormy16/close.c b/libgloss/xstormy16/close.c
index 5fcfbf576..2b50e6432 100644
--- a/libgloss/xstormy16/close.c
+++ b/libgloss/xstormy16/close.c
@@ -18,8 +18,7 @@
* close -- We don't need to do anything, but pretend we did.
*/
int
-_DEFUN (_close ,(fd),
- int fd)
+_close (int fd)
{
return (0);
}
diff --git a/libgloss/xstormy16/fstat.c b/libgloss/xstormy16/fstat.c
index 982d578cb..b962036f3 100644
--- a/libgloss/xstormy16/fstat.c
+++ b/libgloss/xstormy16/fstat.c
@@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_fstat, (fd, buf),
- int fd _AND
+_fstat (int fd,
struct stat *buf)
{
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */
diff --git a/libgloss/xstormy16/getpid.c b/libgloss/xstormy16/getpid.c
index 0f081a11d..e49fde4a0 100644
--- a/libgloss/xstormy16/getpid.c
+++ b/libgloss/xstormy16/getpid.c
@@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1.
*/
int
-_DEFUN (_getpid, (),
- )
+_getpid (void)
{
return __MYPID;
}
diff --git a/libgloss/xstormy16/isatty.c b/libgloss/xstormy16/isatty.c
index e3c32051a..f7d8fa098 100644
--- a/libgloss/xstormy16/isatty.c
+++ b/libgloss/xstormy16/isatty.c
@@ -17,11 +17,10 @@
/*
* isatty -- returns 1 if connected to a terminal device,
* returns 0 if not. Since we're hooked up to a
- * serial port, we'll say yes _AND return a 1.
+ * serial port, we'll say yes and return a 1.
*/
int
-_DEFUN (_isatty, (fd),
- int fd)
+_isatty (int fd)
{
return (1);
}
diff --git a/libgloss/xstormy16/kill.c b/libgloss/xstormy16/kill.c
index 0bbc0141a..f5ccd2191 100644
--- a/libgloss/xstormy16/kill.c
+++ b/libgloss/xstormy16/kill.c
@@ -18,8 +18,7 @@
* kill -- go out via exit...
*/
int
-_DEFUN (_kill, (pid, sig),
- int pid _AND
+_kill (int pid,
int sig)
{
if(pid == __MYPID)
diff --git a/libgloss/xstormy16/lseek.c b/libgloss/xstormy16/lseek.c
index 640a96ea0..c00665723 100644
--- a/libgloss/xstormy16/lseek.c
+++ b/libgloss/xstormy16/lseek.c
@@ -20,9 +20,8 @@
* lseek -- Since a serial port is non-seekable, we return an error.
*/
off_t
-_DEFUN (_lseek, (fd, offset, whence),
- int fd _AND
- off_t offset _AND
+_lseek (int fd,
+ off_t offset,
int whence)
{
errno = ESPIPE;
diff --git a/libgloss/xstormy16/open.c b/libgloss/xstormy16/open.c
index a2c318e1a..f96484c7b 100644
--- a/libgloss/xstormy16/open.c
+++ b/libgloss/xstormy16/open.c
@@ -20,9 +20,8 @@
* we return an error.
*/
int
-_DEFUN (_open, (buf, flags, mode),
- const char *buf _AND
- int flags _AND
+_open (const char *buf,
+ int flags,
int mode)
{
errno = EIO;
diff --git a/libgloss/xstormy16/stat.c b/libgloss/xstormy16/stat.c
index c766a341c..7d089edfa 100644
--- a/libgloss/xstormy16/stat.c
+++ b/libgloss/xstormy16/stat.c
@@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error.
*/
int
-_DEFUN (_stat, (path, buf),
- const char *path _AND
+_stat (const char *path,
struct stat *buf)
{
errno = EIO;
diff --git a/libgloss/xstormy16/unlink.c b/libgloss/xstormy16/unlink.c
index 1c56663ea..10180ac9b 100644
--- a/libgloss/xstormy16/unlink.c
+++ b/libgloss/xstormy16/unlink.c
@@ -20,8 +20,7 @@
* we just return an error.
*/
int
-_DEFUN (_unlink, (path),
- char * path)
+_unlink (char * path)
{
errno = EIO;
return (-1);
diff --git a/newlib/HOWTO b/newlib/HOWTO
index c5754e5b8..bb49e79dd 100644
--- a/newlib/HOWTO
+++ b/newlib/HOWTO
@@ -47,14 +47,8 @@ but these, however, should be carefully limited and be given alternates for
when a non-printed manual is produced--such as when info pages are produced.
For an example of this kind of usage, see libm/common/s_logb.c.
- Please note that most files with documentation contain both an
-ANSI_SYNOPSIS and a TRAD_SYNOPSIS section. The TRAD_SYNOPSIS section gets
-deleted (since at least 2000) by makedoc, so when working on files these
-can safely be deleted and if you're making a new file, there is no need
-to add the TRAD_SYNOPSIS section.
-
If writing a new function that requires documentation, the required
-sections are FUNCTION, INDEX, ANSI_SYNOPSIS (or SYNOPSIS), DESCRIPTION, RETURNS,
+sections are FUNCTION, INDEX, SYNOPSIS, DESCRIPTION, RETURNS,
and PORTABILITY. BUGS and SEEALSO should be added as appropriate.
Source files which contain documentation are processed into ".def"
diff --git a/newlib/MAINTAINERS b/newlib/MAINTAINERS
index 1ebf74316..48cd0375f 100644
--- a/newlib/MAINTAINERS
+++ b/newlib/MAINTAINERS
@@ -5,8 +5,8 @@
The official maintainers of newlib:
-Jeff Johnston jjohnstn@redhat.com
Corinna Vinschen corinna@vinschen.de
+Jeff Johnston jjohnstn@redhat.com
Various Domain Maintainers
@@ -36,14 +36,12 @@ well as cpu-specific portions of the build system, without approval.
arm Nick Clifton nickc@redhat.com
Richard Earnshaw richard.earnshaw@arm.com
-m32c port DJ Delorie dj@redhat.com
mn10300 Nick Clifton nickc@redhat.com
moxie Anthony Green green@moxielogic.com
-rl78 DJ Delorie dj@redhat.com
+risc-v Kito Cheng kito.cheng@gmail.com
aarch64 Richard Earnshaw richard.earnshaw@arm.com
Marcus Shawcroft marcus.shawcroft@arm.com
-msp430 DJ Delorie dj@redhat.com
- Nick Clifton nickc@redhat.com
+msp430 Nick Clifton nickc@redhat.com
OS Port Maintainers (OS alphabetical order)
@@ -59,7 +57,7 @@ These are users with general write privileges after getting approval:
Anthony Green green@moxielogic.com
DJ Delorie dj@redhat.com
-Jim Wilson wilson@specifixinc.com
+Jim Wilson jimw@sifive.com
Nick Clifton nickc@redhat.com
Eric Blake eblake@redhat.com
Will Newton will.newton@linaro.org
diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index effa2adba..809d49238 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -324,6 +324,10 @@ endif
for i in $(srcdir)/libc/include/rpc/*.h; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/rpc/`basename $$i`; \
done; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/ssp; \
+ for i in $(srcdir)/libc/include/ssp/*.h; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/ssp/`basename $$i`; \
+ done; \
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \
for i in $(srcdir)/libc/include/sys/*.h; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
@@ -378,6 +382,15 @@ endif
done ; \
else true; fi
+# Generate Unicode data tables for libc/string/wcwidth and libc/ctype/??w*
+unidata:
+ cd $(srcdir)/libc/string; ./mkunidata
+ cd $(srcdir)/libc/ctype; ./mkunidata
+
+unidate-download:
+ cd $(srcdir)/libc/string; ./mkunidata -u
+ cd $(srcdir)/libc/ctype; ./mkunidata -u
+
# Force makedoc to be built before building info files.
info-recursive: doc/makedoc
dvi-recursive: doc/makedoc
diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index 7756e7066..c3ee2908f 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -1071,6 +1071,10 @@ install-data-local: install-toollibLIBRARIES
for i in $(srcdir)/libc/include/rpc/*.h; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/rpc/`basename $$i`; \
done; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/ssp; \
+ for i in $(srcdir)/libc/include/ssp/*.h; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/ssp/`basename $$i`; \
+ done; \
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \
for i in $(srcdir)/libc/include/sys/*.h; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
@@ -1125,6 +1129,15 @@ install-data-local: install-toollibLIBRARIES
done ; \
else true; fi
+# Generate Unicode data tables for libc/string/wcwidth and libc/ctype/??w*
+unidata:
+ cd $(srcdir)/libc/string; ./mkunidata
+ cd $(srcdir)/libc/ctype; ./mkunidata
+
+unidate-download:
+ cd $(srcdir)/libc/string; ./mkunidata -u
+ cd $(srcdir)/libc/ctype; ./mkunidata -u
+
# Force makedoc to be built before building info files.
info-recursive: doc/makedoc
dvi-recursive: doc/makedoc
diff --git a/newlib/Makefile.shared b/newlib/Makefile.shared
index c9ce5f468..f1152fc62 100644
--- a/newlib/Makefile.shared
+++ b/newlib/Makefile.shared
@@ -14,8 +14,8 @@ SUFFIXES = .def .xml
CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
+ $(CHEW) < $< > $*.def || ( rm $*.def && false )
+ @touch stmp-def
TARGETDOC ?= ../tmp.texi
@@ -39,4 +39,4 @@ docbook: $(DOCBOOK_OUT_FILES)
${top_srcdir}/../doc/chapter-texi2docbook.py <$(srcdir)/$${chapter%.xml}.tex >../$$chapter ; \
done
-CLEANFILES = $(CHEWOUT_FILES) $(CHEWOUT_FILES:.def=.ref) $(DOCBOOK_OUT_FILES)
+CLEANFILES = $(CHEWOUT_FILES) $(DOCBOOK_OUT_FILES)
diff --git a/newlib/NEWS b/newlib/NEWS
index e10042dd3..57b36ea89 100644
--- a/newlib/NEWS
+++ b/newlib/NEWS
@@ -1,3 +1,16 @@
+*** Major changes in newlib version 3.0.0:
+
+- K&R support removed in code and docs
+- 64-bit time_t support
+- riscv platform support added
+- new expf, exp2f, logf, and powf implementations
+- unification of lock object names
+- locking routine retargetting at link time
+- new long double complex math routines
+- various ARM optimizations
+- various POSIX/BSD additions
+- further feature test macros overhaul
+
*** Major changes in newlib version 2.5.0:
- memory.h added
diff --git a/newlib/README b/newlib/README
index 78f4de846..e793d57ce 100644
--- a/newlib/README
+++ b/newlib/README
@@ -1,9 +1,12 @@
- README for newlib-2.5.0 release
+ README for newlib-3.0.0 release
(mostly cribbed from the README in the gdb-4.13 release)
This is `newlib', a simple ANSI C library, math library, and collection
of board support packages.
+Prior to the 3.0.0 release, newlib supported both ANSI and K&R-style
+compilers. As of 3.0.0, K&R is no longer supported.
+
The newlib and libgloss subdirectories are a collection of software from
several sources, each with their own copyright and license. See the file
COPYING.NEWLIB for details. The rest of the release tree is under either
@@ -17,8 +20,8 @@ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Unpacking and Installation -- quick overview
==========================
-When you unpack the newlib-2.5.0.tar.gz file, you'll find a directory
-called `newlib-2.5.0', which contains:
+When you unpack the newlib-3.0.0.tar.gz file, you'll find a directory
+called `newlib-3.0.0', which contains:
COPYING config/ install-sh* mpw-configure
COPYING.LIB config-ml.in libgloss/ mpw-install
@@ -94,13 +97,13 @@ directory. If the path to `configure' would be the same as the
argument to `--srcdir', you can leave out the `--srcdir' option; it
will be assumed.)
- For example, with version 2.5.0, you can build NEWLIB in a separate
+ For example, with version 3.0.0, you can build NEWLIB in a separate
directory for a Sun 4 cross m68k-aout environment like this:
- cd newlib-2.5.0
+ cd newlib-3.0.0
mkdir ../newlib-m68k-aout
cd ../newlib-m68k-aout
- ../newlib-2.5.0/configure --host=sun4 --target=m68k-aout
+ ../newlib-3.0.0/configure --host=sun4 --target=m68k-aout
make
When `configure' builds a configuration using a remote source
@@ -116,8 +119,8 @@ called `configure' (or one of its subdirectories).
The `Makefile' that `configure' generates in each source directory
also runs recursively. If you type `make' in a source directory such
-as `newlib-2.5.0' (or in a separate configured directory configured with
-`--srcdir=PATH/newlib-2.5.0'), you will build all the required libraries.
+as `newlib-3.0.0' (or in a separate configured directory configured with
+`--srcdir=PATH/newlib-3.0.0'), you will build all the required libraries.
When you have multiple hosts or targets configured in separate
directories, you can run `make' on them in parallel (for example, if
@@ -343,6 +346,12 @@ One feature can be enabled by specifying `--enable-FEATURE=yes' or
disables the optimization and saves size of text and stack.
Enabled by default.
+`--enable-newlib-long-time_t'
+ Define time_t to long. On platforms with a 32-bit long type, this gives
+ raise to the year 2038 problem. The default type for time_t is a signed
+ 64-bit integer on most systems.
+ Disabled by default.
+
`--enable-multilib'
Build many library versions.
Enabled by default.
@@ -595,7 +604,7 @@ Reporting Bugs
The correct address for reporting bugs found in NEWLIB is
"newlib@sourceware.org". Please email all bug reports to that
-address. Please include the NEWLIB version number (e.g., newlib-2.5.0),
+address. Please include the NEWLIB version number (e.g., newlib-3.0.0),
and how you configured it (e.g., "sun4 host and m68k-aout target").
Since NEWLIB supports many different configurations, it is important
that you be precise about this.
diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4
index 2b0dd5822..19dfe0864 100644
--- a/newlib/acinclude.m4
+++ b/newlib/acinclude.m4
@@ -1,8 +1,8 @@
dnl This provides configure definitions used by all the newlib
dnl configure.in files.
-AC_DEFUN([DEF_NEWLIB_MAJOR_VERSION],m4_define([NEWLIB_MAJOR_VERSION],[2]))
-AC_DEFUN([DEF_NEWLIB_MINOR_VERSION],m4_define([NEWLIB_MINOR_VERSION],[5]))
+AC_DEFUN([DEF_NEWLIB_MAJOR_VERSION],m4_define([NEWLIB_MAJOR_VERSION],[3]))
+AC_DEFUN([DEF_NEWLIB_MINOR_VERSION],m4_define([NEWLIB_MINOR_VERSION],[0]))
AC_DEFUN([DEF_NEWLIB_PATCHLEVEL_VERSION],m4_define([NEWLIB_PATCHLEVEL_VERSION],[0]))
AC_DEFUN([DEF_NEWLIB_VERSION],m4_define([NEWLIB_VERSION],[NEWLIB_MAJOR_VERSION.NEWLIB_MINOR_VERSION.NEWLIB_PATCHLEVEL_VERSION]))
@@ -92,6 +92,16 @@ AC_ARG_ENABLE(newlib-supplied-syscalls,
AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
+dnl Support --disable-newlib-fno-builtin
+AC_ARG_ENABLE(newlib-fno-builtin,
+[ --disable-newlib-fno-builtin disable -fno-builtin flag to allow compiler to use builtin library functions],
+[case "${enableval}" in
+ yes) newlib_fno_builtin=yes ;;
+ no) newlib_fno_builtin=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for newlib-fno-builtin option) ;;
+ esac], [newlib_fno_builtin=])dnl
+
+
dnl We may get other options which we don't document:
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
@@ -202,8 +212,6 @@ fi
. [$]{newlib_basedir}/configure.host
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
NEWLIB_CFLAGS=${newlib_cflags}
AC_SUBST(NEWLIB_CFLAGS)
@@ -221,6 +229,11 @@ AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
+# Emit any target-specific warnings.
+if test "x${newlib_msg_warn}" != "x"; then
+ AC_MSG_WARN([${newlib_msg_warn}])
+fi
+
# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
# use oext, which is set in configure.host based on the target platform.
OBJEXT=${oext}
diff --git a/newlib/configure b/newlib/configure
index b2f0b3340..192a0b37a 100755
--- a/newlib/configure
+++ b/newlib/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.5.0.
+# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.5.0'
-PACKAGE_STRING='newlib 2.5.0'
+PACKAGE_VERSION='3.0.0'
+PACKAGE_STRING='newlib 3.0.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -804,6 +804,7 @@ enable_newlib_unbuf_stream_opt
enable_lite_exit
enable_newlib_nano_formatted_io
enable_newlib_retargetable_locking
+enable_newlib_long_time_t
enable_multilib
enable_target_optspace
enable_malloc_debugging
@@ -812,6 +813,7 @@ enable_newlib_iconv
enable_newlib_elix_level
enable_newlib_io_float
enable_newlib_supplied_syscalls
+enable_newlib_fno_builtin
enable_dependency_tracking
enable_maintainer_mode
enable_shared
@@ -1377,7 +1379,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.5.0 to adapt to many kinds of systems.
+\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1447,7 +1449,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.5.0:";;
+ short | recursive ) echo "Configuration of newlib 3.0.0:";;
esac
cat <<\_ACEOF
@@ -1477,6 +1479,7 @@ Optional Features:
--enable-lite-exit enable light weight exit
--enable-newlib-nano-formatted-io Use nano version formatted IO
--enable-newlib-retargetable-locking Allow locking routines to be retargeted at link time
+ --enable-newlib-long-time_t define time_t to long
--enable-multilib build many library versions (default)
--enable-target-optspace optimize for space
--enable-malloc-debugging indicate malloc debugging requested
@@ -1485,6 +1488,7 @@ Optional Features:
--enable-newlib-elix-level supply desired elix library level (1-4)
--disable-newlib-io-float disable printf/scanf family float support
--disable-newlib-supplied-syscalls disable newlib from supplying syscalls
+ --disable-newlib-fno-builtin disable -fno-builtin flag to allow compiler to use builtin library functions
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-maintainer-mode enable make rules and dependencies not useful
@@ -1580,7 +1584,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.5.0
+newlib configure 3.0.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1858,7 +1862,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.5.0, which was
+It was created by newlib $as_me 3.0.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2501,6 +2505,19 @@ else
fi
+# Check whether --enable-newlib-long-time_t was given.
+if test "${enable_newlib_long_time_t+set}" = set; then :
+ enableval=$enable_newlib_long_time_t; if test "${newlib_long_time_t+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_long_time_t=yes ;;
+ no) newlib_long_time_t=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-long-time_t option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_long_time_t=no
+fi
+
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -3155,6 +3172,18 @@ else
fi
+# Check whether --enable-newlib-fno-builtin was given.
+if test "${enable_newlib_fno_builtin+set}" = set; then :
+ enableval=$enable_newlib_fno_builtin; case "${enableval}" in
+ yes) newlib_fno_builtin=yes ;;
+ no) newlib_fno_builtin=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-fno-builtin option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_fno_builtin=
+fi
+
+
test -z "${with_target_subdir}" && with_target_subdir=.
@@ -3193,7 +3222,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.5.0'
+ VERSION='3.0.0'
# Some tools Automake needs.
@@ -4001,8 +4030,6 @@ fi
. ${newlib_basedir}/configure.host
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
NEWLIB_CFLAGS=${newlib_cflags}
@@ -4062,6 +4089,12 @@ else
fi
+# Emit any target-specific warnings.
+if test "x${newlib_msg_warn}" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${newlib_msg_warn}" >&5
+$as_echo "$as_me: WARNING: ${newlib_msg_warn}" >&2;}
+fi
+
# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
# use oext, which is set in configure.host based on the target platform.
OBJEXT=${oext}
@@ -11807,7 +11840,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11810 "configure"
+#line 11843 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11913,7 +11946,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11916 "configure"
+#line 11949 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12391,13 +12424,13 @@ _ACEOF
fi
-$as_echo "#define _NEWLIB_VERSION \"2.5.0\"" >>confdefs.h
+$as_echo "#define _NEWLIB_VERSION \"3.0.0\"" >>confdefs.h
-$as_echo "#define __NEWLIB__ 2" >>confdefs.h
+$as_echo "#define __NEWLIB__ 3" >>confdefs.h
-$as_echo "#define __NEWLIB_MINOR__ 5" >>confdefs.h
+$as_echo "#define __NEWLIB_MINOR__ 0" >>confdefs.h
$as_echo "#define __NEWLIB_PATCHLEVEL__ 0" >>confdefs.h
@@ -12496,6 +12529,13 @@ _ACEOF
fi
+if test "${newlib_long_time_t}" = "yes"; then
+cat >>confdefs.h <<_ACEOF
+#define _WANT_USE_LONG_TIME_T 1
+_ACEOF
+
+fi
+
if test "x${iconv_encodings}" != "x" \
|| test "x${iconv_to_encodings}" != "x" \
@@ -13323,7 +13363,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.5.0, which was
+This file was extended by newlib $as_me 3.0.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13389,7 +13429,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.5.0
+newlib config.status 3.0.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/configure.host b/newlib/configure.host
index e5aeef4c6..cba2c7080 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -27,6 +27,8 @@
# newlib_io_c99_formats --enable-newlib-io-c99-formats ("yes", "no", "")
# newlib_io_long_long --enable-newlib-io-long-long ("yes", "no", "")
# newlib_io_long_double --enable-newlib-io-long-double ("yes", "no", "")
+# newlib_global_stdio_streams --enable-global-stdio-streams ("yes", "no, "")
+# newlib_fno_builtin --disable-newlib-fno-builtin ("yes", "no, "")
# It sets the following shell variables:
# newlib_cflags Special CFLAGS to use when building
@@ -46,6 +48,7 @@
# crt1_dir directory where crt1 object is found
# have_crt0 "yes"/"no" if crt0 is/isn't provided.
# "" if crt0 is provided when sys_dir is set
+# have_init_fini have init/fini ("yes" or "no", set to "yes" by default)
# noinclude list of include files to not install
newlib_cflags=
@@ -64,6 +67,7 @@ mach_add_setjmp=
crt1=
crt1_dir=
have_crt0=
+have_init_fini=yes
use_libtool=no
have_sys_mach_dir=no
default_newlib_io_c99_formats=no
@@ -75,6 +79,7 @@ default_newlib_nano_malloc=no
aext=a
oext=o
lpfx="lib_a-"
+newlib_msg_warn=
case "${target_optspace}:${host}" in
yes:*)
@@ -87,6 +92,19 @@ case "${target_optspace}:${host}" in
;;
esac
+case "${newlib_fno_builtin}:${host}" in
+ yes:*)
+ newlib_cflags="${newlib_cflags} -fno-builtin"
+ ;;
+ no:*)
+ newlib_cflags="${newlib_cflags}"
+ ;;
+ *:*)
+ # For now, all targets default to using -fno-builtin until tested without
+ newlib_cflags="${newlib_cflags} -fno-builtin"
+ ;;
+esac
+
# Get the source directories to use for the CPU type.
# machine_dir should supply CPU dependent routines, such as setjmp.
# newlib_cflags is passed to gcc when compiling.
@@ -117,6 +135,12 @@ case "${host_cpu}" in
machine_dir=cr16
;;
cris | crisv32)
+ # The size of the (kernel_)time_t passed from or to a
+ # simulator or a Linux kernel is mandated by the
+ # gettimeofday and time system calls and fixed to 32 bits, the
+ # size of a long. Instead of churning as 64 bits what is anyway
+ # 32 bits, it makes more sense to default to long.
+ test -z "${enable_newlib_long_time_t}" && newlib_long_time_t=yes
machine_dir=cris
;;
crx*)
@@ -249,8 +273,13 @@ case "${host_cpu}" in
nios2*)
machine_dir=nios2
;;
+ nvptx*)
+ machine_dir=nvptx
+ newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED"
+ ;;
or1k*|or1knd*)
machine_dir=or1k
+ have_init_fini=no
;;
powerpc*)
machine_dir=powerpc
@@ -258,8 +287,9 @@ case "${host_cpu}" in
riscv*)
libm_machine_dir=riscv
machine_dir=riscv
- newlib_cflags="${newlib_cflags}"
+ newlib_cflags="${newlib_cflags} -DHAVE_NANOSLEEP"
default_newlib_atexit_dynamic_alloc="no"
+ have_init_fini=no
;;
rl78)
machine_dir=rl78
@@ -416,7 +446,11 @@ case "${host}" in
sys_dir=a29khif
signal_dir=
;;
+ aarch64*-*-*)
+ newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
+ ;;
arm*-*-*)
+ newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
sys_dir=arm
if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
have_crt0="no"
@@ -593,7 +627,7 @@ case "${host}" in
default_newlib_io_long_double="yes"
default_newlib_io_pos_args="yes"
CC="${CC} -I${cygwin_srcdir}/include"
- newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DSIGNAL_PROVIDED -D_COMPILING_NEWLIB -DHAVE_BLKSIZE -DHAVE_FCNTL -DMALLOC_PROVIDED"
+ newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DGETREENT_PROVIDED -DSIGNAL_PROVIDED -D_COMPILING_NEWLIB -DHAVE_BLKSIZE -DHAVE_FCNTL -DMALLOC_PROVIDED"
syscall_dir=syscalls
;;
*-*-jehanne*)
@@ -621,12 +655,11 @@ case "${host}" in
*-*-rtems*)
default_newlib_io_long_long="yes"
default_newlib_io_c99_formats="yes"
+ newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
- newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC"
+newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DGETREENT_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC"
# turn off unsupported items in posix directory
newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN"
- # turn off using cli/sti in i386 setjmp/longjmp
- newlib_cflags="${newlib_cflags} -D_I386MACH_ALLOW_HW_INTERRUPTS"
;;
# VxWorks supplies its own version of malloc, and the newlib one
# doesn't work because VxWorks does not have sbrk.
@@ -932,6 +965,25 @@ if [ "x${xdr_dir}" = "x" ]; then
noinclude="${noinclude} rpc/types.h rpc/xdr.h"
fi
+# Have init/finit if not explicitly specified otherwise
+if [ "x${have_init_fini}" != "xno" ]; then
+ newlib_cflags="${newlib_cflags} -DHAVE_INIT_FINI"
+fi
+
if test -z "${have_crt0}" && test -n "${sys_dir}"; then
have_crt0="yes"
fi
+
+# Target-specific defaults
+case "${host_cpu}" in
+ nvptx*)
+ if [ "x${newlib_elix_level}" = "x0" ]; then
+ newlib_elix_level=1;
+ elif [ "x${newlib_elix_level}" != "x1" ]; then
+ newlib_msg_warn="nvptx does not support elix level > 1";
+ fi
+ if [[ -z ${newlib_global_stdio_streams} ]]; then
+ newlib_global_stdio_streams="yes";
+ fi
+ ;;
+esac
diff --git a/newlib/configure.in b/newlib/configure.in
index 5b86ee800..adce036bf 100644
--- a/newlib/configure.in
+++ b/newlib/configure.in
@@ -238,6 +238,17 @@ AC_ARG_ENABLE(newlib-retargetable-locking,
*) AC_MSG_ERROR(bad value ${enableval} for newlib-retargetable-locking) ;;
esac],[newlib_retargetable_locking=no])
+dnl Support --enable-newlib-long-time_t
+AC_ARG_ENABLE(newlib-long-time_t,
+[ --enable-newlib-long-time_t define time_t to long],
+[if test "${newlib_long_time_t+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_long_time_t=yes ;;
+ no) newlib_long_time_t=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for newlib-long-time_t option) ;;
+ esac
+ fi], [newlib_long_time_t=no])dnl
+
NEWLIB_CONFIGURE(.)
dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
@@ -486,6 +497,10 @@ if test "${newlib_retargetable_locking}" = "yes"; then
AC_DEFINE_UNQUOTED(_RETARGETABLE_LOCKING)
fi
+if test "${newlib_long_time_t}" = "yes"; then
+AC_DEFINE_UNQUOTED(_WANT_USE_LONG_TIME_T)
+fi
+
dnl
dnl Parse --enable-newlib-iconv-encodings option argument
dnl
diff --git a/newlib/doc/ansidecl.h b/newlib/doc/ansidecl.h
deleted file mode 100644
index 1c7708fd5..000000000
--- a/newlib/doc/ansidecl.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* ANSI and traditional C compatability macros
- Copyright 1991 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-/* ANSI and traditional C compatibility macros
-
- Some ANSI environments are "broken" in the sense that __STDC__ cannot be
- relied upon to have it's intended meaning. Therefore we must use our own
- concoction: _HAVE_STDC. Always use _HAVE_STDC instead of __STDC__ in newlib
- sources!
-
- ANSI C is assumed if _HAVE_STDC is #defined.
-
- Macro ANSI C definition Traditional C definition
- ----- ---- - ---------- ----------- - ----------
- PTR `void *' `char *'
- LONG_DOUBLE `long double' `double'
- CONST `const' `'
- VOLATILE `volatile' `'
- SIGNED `signed' `'
- PTRCONST `void *const' `char *'
-
- DEFUN(name, arglist, args)
-
- Defines function NAME.
-
- ARGLIST lists the arguments, separated by commas and enclosed in
- parentheses. ARGLIST becomes the argument list in traditional C.
-
- ARGS list the arguments with their types. It becomes a prototype in
- ANSI C, and the type declarations in traditional C. Arguments should
- be separated with `AND'. For functions with a variable number of
- arguments, the last thing listed should be `DOTS'.
-
- DEFUN_VOID(name)
-
- Defines a function NAME, which takes no arguments.
-
- EXFUN(name, prototype)
-
- Is used in an external function declaration.
- In ANSI C it is `NAMEPROTOTYPE' (so PROTOTYPE should be enclosed in
- parentheses). In traditional C it is `NAME()'.
- For a function that takes no arguments, PROTOTYPE should be `(NOARGS)'.
-
- For example:
- extern int EXFUN(printf, (CONST char *format DOTS));
- int DEFUN(fprintf, (stream, format),
- FILE *stream AND CONST char *format DOTS) { ... }
- void DEFUN_VOID(abort) { ... }
-*/
-
-#ifndef _ANSIDECL_H
-
-#define _ANSIDECL_H 1
-
-
-/* Every source file includes this file,
- so they will all get the switch for lint. */
-/* LINTLIBRARY */
-
-
-#ifdef _HAVE_STDC
-
-#define PTR void *
-#define PTRCONST void *CONST
-#define LONG_DOUBLE long double
-
-#define AND ,
-#define NOARGS void
-#define CONST const
-#define VOLATILE volatile
-#define SIGNED signed
-#define DOTS , ...
-
-#define EXFUN(name, proto) name proto
-#define DEFUN(name, arglist, args) name(args)
-#define DEFUN_VOID(name) name(NOARGS)
-
-#else /* Not ANSI C. */
-
-#define PTR char *
-#define PTRCONST PTR
-#define LONG_DOUBLE double
-
-#define AND ;
-#define NOARGS
-#define CONST
-#define VOLATILE
-#define SIGNED
-#define DOTS
-
-#define const
-
-#define EXFUN(name, proto) name()
-#define DEFUN(name, arglist, args) name arglist args;
-#define DEFUN_VOID(name) name()
-
-#endif /* ANSI C. */
-
-
-#endif /* ansidecl.h */
diff --git a/newlib/doc/configure b/newlib/doc/configure
index d51547b04..f288e6a5c 100755
--- a/newlib/doc/configure
+++ b/newlib/doc/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.5.0.
+# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.5.0'
-PACKAGE_STRING='newlib 2.5.0'
+PACKAGE_VERSION='3.0.0'
+PACKAGE_STRING='newlib 3.0.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1241,7 +1241,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.5.0 to adapt to many kinds of systems.
+\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1311,7 +1311,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.5.0:";;
+ short | recursive ) echo "Configuration of newlib 3.0.0:";;
esac
cat <<\_ACEOF
@@ -1402,7 +1402,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.5.0
+newlib configure 3.0.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.5.0, which was
+It was created by newlib $as_me 3.0.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2529,7 +2529,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.5.0'
+ VERSION='3.0.0'
# Some tools Automake needs.
@@ -3398,6 +3398,12 @@ else
fi
+# Emit any target-specific warnings.
+if test "x${newlib_msg_warn}" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${newlib_msg_warn}" >&5
+$as_echo "$as_me: WARNING: ${newlib_msg_warn}" >&2;}
+fi
+
# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
# use oext, which is set in configure.host based on the target platform.
OBJEXT=${oext}
@@ -4045,7 +4051,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.5.0, which was
+This file was extended by newlib $as_me 3.0.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4102,7 +4108,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.5.0
+newlib config.status 3.0.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/doc/doc.str b/newlib/doc/doc.str
index 3fc1006f8..b0bfc9ea4 100644
--- a/newlib/doc/doc.str
+++ b/newlib/doc/doc.str
@@ -17,9 +17,10 @@
: QUICKREF
skip_past_newline
- get_stuff_in_command
- "&&~&&~&&\cr\tablerule\n"
- quickref
+ ;
+
+: MATHREF
+ skip_past_newline
;
: EXAMPLE
@@ -61,25 +62,12 @@
indent
catstr
"@end example\n" catstr
-
- ;
-
-: OLDTRAD_SYNOPSIS
- skip_past_newline
- "@strong{Traditional Synopsis}\n" catstr
- "@example\n" catstr
- get_stuff_in_command
- do_fancy_stuff
- nokill_bogus_lines
- indent
- catstr
- "@end example\n" catstr
-
+ "ANSI_SYNOPSIS is deprecated, use SYNOPSIS instead" warn
;
: TRAD_SYNOPSIS
skip_past_newline
-
+ "TRAD_SYNOPSIS is obsolete and ignored" warn
;
: INDEX
@@ -153,6 +141,9 @@
: SEEALSO
"@strong{See Also}@*\n" catstr subhead ;
+: NOTES
+ "@strong{Notes}@*\n" catstr subhead ;
+
: INTERNAL_FUNCTION
;
diff --git a/newlib/doc/makedoc.c b/newlib/doc/makedoc.c
index 96362f782..36a14e535 100644
--- a/newlib/doc/makedoc.c
+++ b/newlib/doc/makedoc.c
@@ -35,7 +35,6 @@ There is no
-#include "ansidecl.h"
#include
#include
#include
@@ -67,25 +66,23 @@ typedef struct buffer
-static void DEFUN(init_string_with_size,(buffer, size),
- string_type *buffer AND
- unsigned int size )
+static void
+init_string_with_size (string_type *buffer, unsigned int size)
{
buffer->write_idx = 0;
buffer->size = size;
buffer->ptr = malloc(size);
}
-static void DEFUN(init_string,(buffer),
- string_type *buffer)
+static void
+init_string (string_type *buffer)
{
init_string_with_size(buffer, DEF_SIZE);
}
-static int DEFUN(find, (str, what),
- string_type *str AND
- char *what)
+static int
+find (string_type *str, char *what)
{
unsigned int i;
char *p;
@@ -101,30 +98,28 @@ static int DEFUN(find, (str, what),
}
-static void DEFUN(write_buffer,(buffer),
- string_type *buffer)
+static void
+write_buffer (string_type *buffer)
{
fwrite(buffer->ptr, buffer->write_idx, 1, stdout);
}
-static void DEFUN(delete_string,(buffer),
- string_type *buffer)
+static void
+delete_string (string_type *buffer)
{
free(buffer->ptr);
}
-static char *DEFUN(addr, (buffer, idx),
- string_type *buffer AND
- unsigned int idx)
+static char *
+addr (string_type *buffer, unsigned int idx)
{
return buffer->ptr + idx;
}
-static char DEFUN(at,(buffer, pos),
- string_type *buffer AND
- unsigned int pos)
+static char
+at (string_type *buffer, unsigned int pos)
{
if ( pos >= buffer->write_idx)
{
@@ -133,9 +128,8 @@ static char DEFUN(at,(buffer, pos),
return buffer->ptr[pos];
}
-static void DEFUN(catchar,(buffer, ch),
- string_type *buffer AND
- char ch)
+static void
+catchar (string_type *buffer, char ch)
{
if (buffer->write_idx == buffer->size)
{
@@ -147,9 +141,8 @@ static void DEFUN(catchar,(buffer, ch),
}
-static void DEFUN(overwrite_string,(dst, src),
- string_type *dst AND
- string_type *src)
+static void
+overwrite_string (string_type *dst, string_type *src)
{
free(dst->ptr);
dst->size = src->size;
@@ -157,9 +150,8 @@ static void DEFUN(overwrite_string,(dst, src),
dst->ptr = src->ptr;
}
-static void DEFUN(catstr,(dst, src),
- string_type *dst AND
- string_type *src)
+static void
+catstr (string_type *dst, string_type *src)
{
unsigned int i;
for (i = 0; i < src->write_idx; i++)
@@ -169,9 +161,8 @@ static void DEFUN(catstr,(dst, src),
}
-static void DEFUN(cattext,(buffer, string),
- string_type *buffer AND
- char *string)
+static void
+cattext (string_type *buffer, char *string)
{
while (*string)
@@ -181,10 +172,8 @@ static void DEFUN(cattext,(buffer, string),
}
}
-static void DEFUN(catbuf,(buffer, buf, len),
- string_type *buffer AND
- char *buf AND
- unsigned int len)
+static void
+catbuf (string_type *buffer, char *buf, unsigned int len)
{
while (len--)
@@ -197,9 +186,7 @@ static void DEFUN(catbuf,(buffer, buf, len),
static unsigned int
-DEFUN(skip_white_and_stars,(src, idx),
- string_type *src AND
- unsigned int idx)
+skip_white_and_stars (string_type *src, unsigned int idx)
{
while (isspace(at(src,idx))
|| (at(src,idx) == '*' && at(src,idx +1) !='/'))
@@ -216,7 +203,7 @@ string_type *tos;
unsigned int idx = 0; /* Pos in input buffer */
string_type *ptr; /* and the buffer */
-typedef void (*stinst_type)(NOARGS);
+typedef void (*stinst_type)(void);
stinst_type *pc;
stinst_type sstack[STACK];
stinst_type *ssp = &sstack[0];
@@ -238,10 +225,10 @@ struct dict_struct
};
typedef struct dict_struct dict_type;
-#define WORD(x) static void x(NOARGS)
+#define WORD(x) static void x(void)
-static void DEFUN(exec,(word),
- dict_type *word)
+static void
+exec (dict_type *word)
{
pc = word->code;
while (*pc)
@@ -299,9 +286,7 @@ WORD(push_text)
*/
static void
-DEFUN(remove_noncomments,(src,dst),
- string_type *src AND
- string_type *dst)
+remove_noncomments (string_type *src, string_type *dst)
{
unsigned int idx = 0;
@@ -354,7 +339,7 @@ DEFUN(remove_noncomments,(src,dst),
*/
static void
-DEFUN_VOID(exfunstuff)
+exfunstuff (void)
{
unsigned int openp;
unsigned int fname;
@@ -444,52 +429,6 @@ WORD(translatecomments)
}
-/* find something like
- QUICKREF
- memchar ansi pure
-
- into
- merge with words on tos and output them to stderror
-
-*/
-WORD(quickref)
-{
- string_type *nos = tos-1;
- unsigned int nosscan = 0;
- unsigned int idx = 0;
-
- while (at(tos, idx))
- {
- if (at(tos,idx) == '~')
- {
- /* Skip the whitespace */
- while (at(nos, nosscan) == ' ')
- nosscan++;
-
- /* Sub the next word from the nos*/
- while (at(nos, nosscan) != ' ' &&
- at(nos, nosscan) != 0)
- {
- fprintf(stderr, "%c", at(nos, nosscan));
- nosscan++;
- }
- }
-
- else
- {
- fprintf(stderr,"%c", at(tos, idx));
-
- }
- idx++;
- }
-
- delete_string(tos);
- delete_string(nos);
- tos-=2;
- pc++;
-
-}
-
#if 0
/* turn everything not starting with a . into a comment */
@@ -528,7 +467,7 @@ WORD(manglecomments)
/* Mod tos so that only lines with leading dots remain */
static void
-DEFUN_VOID(outputdots)
+outputdots (void)
{
unsigned int idx = 0;
string_type out;
@@ -772,9 +711,7 @@ WORD(do_fancy_stuff)
}
/* A command is all upper case,and alone on a line */
static int
-DEFUN( iscommand,(ptr, idx),
- string_type *ptr AND
- unsigned int idx)
+iscommand (string_type *ptr, unsigned int idx)
{
unsigned int len = 0;
@@ -803,10 +740,7 @@ DEFUN( iscommand,(ptr, idx),
unsigned int
-DEFUN(copy_past_newline,(ptr, idx, dst),
- string_type *ptr AND
- unsigned int idx AND
- string_type *dst)
+copy_past_newline (string_type *ptr, unsigned int idx, string_type *dst)
{
while (at(ptr, idx) && at(ptr, idx) != '\n')
{
@@ -1065,10 +999,19 @@ WORD(maybecatstr)
}
+/* write tos to stderr */
+WORD(warn)
+{
+ fputs("Warning: ", stderr);
+ fwrite(tos->ptr, tos->write_idx, 1, stderr);
+ fputc('\n', stderr);
+ delete_string(tos);
+ tos--;
+ pc++;
+}
+
char *
-DEFUN(nextword,(string, word),
- char *string AND
- char **word)
+nextword (char *string, char **word)
{
char *word_start;
int idx;
@@ -1144,8 +1087,7 @@ DEFUN(nextword,(string, word),
}
dict_type *root;
dict_type *
-DEFUN(lookup_word,(word),
- char *word)
+lookup_word (char *word)
{
dict_type *ptr = root;
while (ptr) {
@@ -1159,9 +1101,11 @@ DEFUN(lookup_word,(word),
}
-static void DEFUN_VOID(perform)
+static int
+perform (void)
{
tos = stack;
+ int errors = 0;
while (at(ptr, idx)) {
/* It's worth looking through the command list */
@@ -1186,6 +1130,7 @@ static void DEFUN_VOID(perform)
else
{
fprintf(stderr,"warning, %s is not recognised\n", next);
+ errors++;
skip_past_newline();
}
@@ -1193,11 +1138,11 @@ static void DEFUN_VOID(perform)
else skip_past_newline();
}
+ return errors;
}
dict_type *
-DEFUN(newentry,(word),
- char *word)
+newentry (char *word)
{
dict_type *new = (dict_type *)malloc(sizeof(dict_type));
new->word = word;
@@ -1212,9 +1157,7 @@ DEFUN(newentry,(word),
unsigned int
-DEFUN(add_to_definition,(entry, word),
- dict_type *entry AND
- stinst_type word)
+add_to_definition (dict_type *entry, stinst_type word)
{
if (entry->code_end == entry->code_length)
{
@@ -1235,9 +1178,7 @@ return entry->code_end++;
void
-DEFUN(add_intrinsic,(name, func),
- char *name AND
- void (*func)(NOARGS))
+add_intrinsic (char *name, void (*func)(void))
{
dict_type *new = newentry(name);
add_to_definition(new, func);
@@ -1245,8 +1186,7 @@ DEFUN(add_intrinsic,(name, func),
}
void
-DEFUN(add_var,(name),
- char *name)
+add_var (char *name)
{
dict_type *new = newentry(name);
add_to_definition(new, push_number);
@@ -1259,13 +1199,13 @@ DEFUN(add_var,(name),
int
-DEFUN(compile, (string),
- char *string)
-
+compile (char *string)
{
int ret=0;
/* add words to the dictionary */
char *word;
+ dict_type *lookup;
+
string = nextword(string, &word);
while (string && *string && word[0])
{
@@ -1317,11 +1257,13 @@ DEFUN(compile, (string),
/* Got a number, embedd the magic push number
function */
add_to_definition(ptr, push_number);
- add_to_definition(ptr, atol(word));
+ add_to_definition(ptr, (stinst_type)atol(word));
break;
default:
add_to_definition(ptr, call);
- add_to_definition(ptr, lookup_word(word));
+ lookup = lookup_word(word);
+ if (!lookup) ret++;
+ add_to_definition(ptr, (stinst_type)lookup);
}
string = nextword(string, &word);
@@ -1340,7 +1282,8 @@ return(ret);
}
-static void DEFUN_VOID(bang)
+static void
+bang (void)
{
*(uintptr_t *)((isp[0])) = isp[-1];
isp-=2;
@@ -1363,9 +1306,8 @@ WORD(hello)
-static void DEFUN(read_in, (str, file),
- string_type *str AND
- FILE *file)
+static void
+read_in (string_type *str, FILE *file)
{
char buff[10000];
unsigned int r;
@@ -1383,19 +1325,19 @@ static void DEFUN(read_in, (str, file),
#if 0
-static void DEFUN_VOID(usage)
+static void
+usage (void)
{
fprintf(stderr,"usage: -[i|v] -f macrofile file\n");
exit(33);
}
#endif
-int DEFUN(main,(ac,av),
-int ac AND
-char *av[])
+int
+main (int ac, char *av[])
{
unsigned int i;
-
+ int status = 0;
string_type buffer;
string_type pptr;
@@ -1428,9 +1370,9 @@ char *av[])
add_intrinsic("translatecomments", translatecomments );
add_intrinsic("kill_bogus_lines", kill_bogus_lines);
add_intrinsic("indent", indent);
- add_intrinsic("quickref", quickref);
add_intrinsic("internalmode", internalmode);
-
+ add_intrinsic("warn", warn);
+
/* Put a nl at the start */
catchar(&buffer,'\n');
@@ -1457,7 +1399,7 @@ char *av[])
read_in(&b, f);
if( compile(b.ptr) ) { fclose(f); exit(1); }
- perform();
+ status = perform();
fclose(f);
}
else if (av[i][1] == 'i')
@@ -1472,8 +1414,5 @@ char *av[])
}
write_buffer(stack+0);
- return 0;
+ return status;
}
-
-
-
diff --git a/newlib/iconvdata/configure b/newlib/iconvdata/configure
index e520005ad..b5db63cd7 100755
--- a/newlib/iconvdata/configure
+++ b/newlib/iconvdata/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.5.0.
+# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.5.0'
-PACKAGE_STRING='newlib 2.5.0'
+PACKAGE_VERSION='3.0.0'
+PACKAGE_STRING='newlib 3.0.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1322,7 +1322,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.5.0 to adapt to many kinds of systems.
+\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1392,7 +1392,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.5.0:";;
+ short | recursive ) echo "Configuration of newlib 3.0.0:";;
esac
cat <<\_ACEOF
@@ -1503,7 +1503,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.5.0
+newlib configure 3.0.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1781,7 +1781,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.5.0, which was
+It was created by newlib $as_me 3.0.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2853,7 +2853,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.5.0'
+ VERSION='3.0.0'
# Some tools Automake needs.
@@ -3722,6 +3722,12 @@ else
fi
+# Emit any target-specific warnings.
+if test "x${newlib_msg_warn}" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${newlib_msg_warn}" >&5
+$as_echo "$as_me: WARNING: ${newlib_msg_warn}" >&2;}
+fi
+
# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
# use oext, which is set in configure.host based on the target platform.
OBJEXT=${oext}
@@ -11425,7 +11431,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11428 "configure"
+#line 11434 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11531,7 +11537,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11534 "configure"
+#line 11540 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12378,7 +12384,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.5.0, which was
+This file was extended by newlib $as_me 3.0.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12435,7 +12441,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.5.0
+newlib config.status 3.0.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/Makefile.am b/newlib/libc/Makefile.am
index 6e97bca52..e27ff5cf1 100644
--- a/newlib/libc/Makefile.am
+++ b/newlib/libc/Makefile.am
@@ -42,7 +42,7 @@ endif
# Do not change the order without considering the doc impact.
SUBDIRS = argz stdlib ctype search $(STDIO_SUBDIR) $(STDIO64_SUBDIR) string $(SIGNAL_SUBDIR) time locale sys reent \
$(extra_dir) errno misc machine $(UNIX_SUBDIR) $(POSIX_SUBDIR) $(SYSCALLS_SUBDIR) $(NEWLIB_ICONV_DIRS) \
- $(XDR_SUBDIR) .
+ $(XDR_SUBDIR) ssp .
noinst_DATA = $(CRT0)
@@ -64,6 +64,7 @@ SUBLIBS = \
$(LIBC_EXTRA_LIB) \
errno/liberrno.$(aext) \
misc/libmisc.$(aext) \
+ ssp/libssp.$(aext) \
$(LIBC_UNIX_LIB) \
$(LIBC_POSIX_LIB) \
$(LIBC_SYSCALL_LIB) \
@@ -87,6 +88,7 @@ SUBLIBS = \
$(LIBC_EXTRA_LIB) \
errno/lib.$(aext) \
misc/lib.$(aext) \
+ ssp/lib.$(aext) \
$(LIBC_UNIX_LIB) \
$(LIBC_POSIX_LIB) \
$(LIBC_SYSCALL_LIB) \
diff --git a/newlib/libc/Makefile.in b/newlib/libc/Makefile.in
index a597c1d92..c3de3f600 100644
--- a/newlib/libc/Makefile.in
+++ b/newlib/libc/Makefile.in
@@ -90,9 +90,10 @@ am__DEPENDENCIES_1 =
@USE_LIBTOOL_FALSE@ time/lib.$(aext) locale/lib.$(aext) \
@USE_LIBTOOL_FALSE@ reent/lib.$(aext) $(am__DEPENDENCIES_1) \
@USE_LIBTOOL_FALSE@ errno/lib.$(aext) misc/lib.$(aext) \
+@USE_LIBTOOL_FALSE@ ssp/lib.$(aext) $(am__DEPENDENCIES_1) \
@USE_LIBTOOL_FALSE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-@USE_LIBTOOL_FALSE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
-@USE_LIBTOOL_FALSE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+@USE_LIBTOOL_FALSE@ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+@USE_LIBTOOL_FALSE@ $(am__DEPENDENCIES_1)
@USE_LIBTOOL_TRUE@am__DEPENDENCIES_3 = argz/libargz.$(aext) \
@USE_LIBTOOL_TRUE@ stdlib/libstdlib.$(aext) \
@USE_LIBTOOL_TRUE@ ctype/libctype.$(aext) \
@@ -104,9 +105,9 @@ am__DEPENDENCIES_1 =
@USE_LIBTOOL_TRUE@ locale/liblocale.$(aext) \
@USE_LIBTOOL_TRUE@ reent/libreent.$(aext) $(am__DEPENDENCIES_1) \
@USE_LIBTOOL_TRUE@ errno/liberrno.$(aext) misc/libmisc.$(aext) \
+@USE_LIBTOOL_TRUE@ ssp/libssp.$(aext) $(am__DEPENDENCIES_1) \
@USE_LIBTOOL_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-@USE_LIBTOOL_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-@USE_LIBTOOL_TRUE@ $(am__DEPENDENCIES_1)
+@USE_LIBTOOL_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libc_la_OBJECTS =
libc_la_OBJECTS = $(am_libc_la_OBJECTS)
libc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@@ -191,7 +192,7 @@ ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = argz stdlib ctype search stdio stdio64 string signal \
time locale sys reent @extra_dir@ errno misc machine unix \
- posix syscalls iconv xdr .
+ posix syscalls iconv xdr ssp .
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
@@ -353,7 +354,7 @@ AUTOMAKE_OPTIONS = cygnus
# Do not change the order without considering the doc impact.
SUBDIRS = argz stdlib ctype search $(STDIO_SUBDIR) $(STDIO64_SUBDIR) string $(SIGNAL_SUBDIR) time locale sys reent \
$(extra_dir) errno misc machine $(UNIX_SUBDIR) $(POSIX_SUBDIR) $(SYSCALLS_SUBDIR) $(NEWLIB_ICONV_DIRS) \
- $(XDR_SUBDIR) .
+ $(XDR_SUBDIR) ssp .
noinst_DATA = $(CRT0)
@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libc.la
@@ -373,6 +374,7 @@ noinst_DATA = $(CRT0)
@USE_LIBTOOL_FALSE@ $(LIBC_EXTRA_LIB) \
@USE_LIBTOOL_FALSE@ errno/lib.$(aext) \
@USE_LIBTOOL_FALSE@ misc/lib.$(aext) \
+@USE_LIBTOOL_FALSE@ ssp/lib.$(aext) \
@USE_LIBTOOL_FALSE@ $(LIBC_UNIX_LIB) \
@USE_LIBTOOL_FALSE@ $(LIBC_POSIX_LIB) \
@USE_LIBTOOL_FALSE@ $(LIBC_SYSCALL_LIB) \
@@ -396,6 +398,7 @@ noinst_DATA = $(CRT0)
@USE_LIBTOOL_TRUE@ $(LIBC_EXTRA_LIB) \
@USE_LIBTOOL_TRUE@ errno/liberrno.$(aext) \
@USE_LIBTOOL_TRUE@ misc/libmisc.$(aext) \
+@USE_LIBTOOL_TRUE@ ssp/libssp.$(aext) \
@USE_LIBTOOL_TRUE@ $(LIBC_UNIX_LIB) \
@USE_LIBTOOL_TRUE@ $(LIBC_POSIX_LIB) \
@USE_LIBTOOL_TRUE@ $(LIBC_SYSCALL_LIB) \
diff --git a/newlib/libc/argz/Makefile.in b/newlib/libc/argz/Makefile.in
index a129dc0fc..e18a2d117 100644
--- a/newlib/libc/argz/Makefile.in
+++ b/newlib/libc/argz/Makefile.in
@@ -319,7 +319,7 @@ CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
DOCBOOK_CHEW = ${top_srcdir}/../doc/makedocbook.py
DOCBOOK_OUT_FILES = $(CHEWOUT_FILES:.def=.xml)
DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml)
-CLEANFILES = $(CHEWOUT_FILES) $(CHEWOUT_FILES:.def=.ref) $(DOCBOOK_OUT_FILES)
+CLEANFILES = $(CHEWOUT_FILES) $(DOCBOOK_OUT_FILES)
all: all-am
.SUFFIXES:
@@ -694,8 +694,8 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
done
.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
+ $(CHEW) < $< > $*.def || ( rm $*.def && false )
+ @touch stmp-def
TARGETDOC ?= ../tmp.texi
diff --git a/newlib/libc/argz/argz_add.c b/newlib/libc/argz/argz_add.c
index 1c3b17025..a1a8d3d0e 100644
--- a/newlib/libc/argz/argz_add.c
+++ b/newlib/libc/argz/argz_add.c
@@ -11,9 +11,8 @@
#include
error_t
-_DEFUN (argz_add, (argz, argz_len, str),
- char **argz _AND
- size_t *argz_len _AND
+argz_add (char **argz,
+ size_t *argz_len,
const char *str)
{
int len_to_add = 0;
diff --git a/newlib/libc/argz/argz_add_sep.c b/newlib/libc/argz/argz_add_sep.c
index 7dfbb4d6e..f2964e672 100644
--- a/newlib/libc/argz/argz_add_sep.c
+++ b/newlib/libc/argz/argz_add_sep.c
@@ -11,10 +11,9 @@
#include
error_t
-_DEFUN (argz_add_sep, (argz, argz_len, str, sep),
- char **argz _AND
- size_t *argz_len _AND
- const char *str _AND
+argz_add_sep (char **argz,
+ size_t *argz_len,
+ const char *str,
int sep)
{
char *str_argz = 0;
diff --git a/newlib/libc/argz/argz_append.c b/newlib/libc/argz/argz_append.c
index c6c3dbee9..de0cc82ce 100644
--- a/newlib/libc/argz/argz_append.c
+++ b/newlib/libc/argz/argz_append.c
@@ -11,10 +11,9 @@
#include
error_t
-_DEFUN (argz_append, (argz, argz_len, buf, buf_len),
- char **argz _AND
- size_t *argz_len _AND
- const char *buf _AND
+argz_append (char **argz,
+ size_t *argz_len,
+ const char *buf,
size_t buf_len)
{
if (buf_len)
diff --git a/newlib/libc/argz/argz_count.c b/newlib/libc/argz/argz_count.c
index 4761275df..4c0007ce2 100644
--- a/newlib/libc/argz/argz_count.c
+++ b/newlib/libc/argz/argz_count.c
@@ -10,8 +10,7 @@
#include
size_t
-_DEFUN (argz_count, (argz, argz_len),
- const char *argz _AND
+argz_count (const char *argz,
size_t argz_len)
{
int i;
diff --git a/newlib/libc/argz/argz_create.c b/newlib/libc/argz/argz_create.c
index 9d7b2f13d..4ab622d28 100644
--- a/newlib/libc/argz/argz_create.c
+++ b/newlib/libc/argz/argz_create.c
@@ -11,9 +11,8 @@
#include
error_t
-_DEFUN (argz_create, (argv, argz, argz_len),
- char *const argv[] _AND
- char **argz _AND
+argz_create (char *const argv[],
+ char **argz,
size_t *argz_len)
{
int argc = 0;
diff --git a/newlib/libc/argz/argz_create_sep.c b/newlib/libc/argz/argz_create_sep.c
index 38866e1d5..bf578e6bb 100644
--- a/newlib/libc/argz/argz_create_sep.c
+++ b/newlib/libc/argz/argz_create_sep.c
@@ -11,10 +11,9 @@
#include
error_t
-_DEFUN (argz_create_sep, (string, sep, argz, argz_len),
- const char *string _AND
- int sep _AND
- char **argz _AND
+argz_create_sep (const char *string,
+ int sep,
+ char **argz,
size_t *argz_len)
{
int len = 0;
diff --git a/newlib/libc/argz/argz_delete.c b/newlib/libc/argz/argz_delete.c
index aa94f6d7a..aa1fe4c75 100644
--- a/newlib/libc/argz/argz_delete.c
+++ b/newlib/libc/argz/argz_delete.c
@@ -11,9 +11,8 @@
#include
error_t
-_DEFUN (argz_delete, (argz, argz_len, entry),
- char **argz _AND
- size_t *argz_len _AND
+argz_delete (char **argz,
+ size_t *argz_len,
char *entry)
{
int len = 0;
diff --git a/newlib/libc/argz/argz_extract.c b/newlib/libc/argz/argz_extract.c
index a819f3953..e97b76905 100644
--- a/newlib/libc/argz/argz_extract.c
+++ b/newlib/libc/argz/argz_extract.c
@@ -9,9 +9,8 @@
#include
void
-_DEFUN (argz_extract, (argz, argz_len, argv),
- char *argz _AND
- size_t argz_len _AND
+argz_extract (char *argz,
+ size_t argz_len,
char **argv)
{
size_t i = 0;
diff --git a/newlib/libc/argz/argz_insert.c b/newlib/libc/argz/argz_insert.c
index d0a32eca9..abdfeb0ea 100644
--- a/newlib/libc/argz/argz_insert.c
+++ b/newlib/libc/argz/argz_insert.c
@@ -13,10 +13,9 @@
#include
error_t
-_DEFUN (argz_insert, (argz, argz_len, before, entry),
- char **argz _AND
- size_t *argz_len _AND
- char *before _AND
+argz_insert (char **argz,
+ size_t *argz_len,
+ char *before,
const char *entry)
{
int len = 0;
diff --git a/newlib/libc/argz/argz_next.c b/newlib/libc/argz/argz_next.c
index 94852f538..0d6f21d70 100644
--- a/newlib/libc/argz/argz_next.c
+++ b/newlib/libc/argz/argz_next.c
@@ -11,9 +11,8 @@
#include
char *
-_DEFUN (argz_next, (argz, argz_len, entry),
- char *argz _AND
- size_t argz_len _AND
+argz_next (char *argz,
+ size_t argz_len,
const char *entry)
{
if (entry)
diff --git a/newlib/libc/argz/argz_replace.c b/newlib/libc/argz/argz_replace.c
index b274f91b6..f2e0d52b7 100644
--- a/newlib/libc/argz/argz_replace.c
+++ b/newlib/libc/argz/argz_replace.c
@@ -13,11 +13,10 @@
#include "buf_findstr.h"
error_t
-_DEFUN (argz_replace, (argz, argz_len, str, with, replace_count),
- char **argz _AND
- size_t *argz_len _AND
- const char *str _AND
- const char *with _AND
+argz_replace (char **argz,
+ size_t *argz_len,
+ const char *str,
+ const char *with,
unsigned *replace_count)
{
const int str_len = strlen(str);
diff --git a/newlib/libc/argz/argz_stringify.c b/newlib/libc/argz/argz_stringify.c
index be5f2cf45..98f6c9bc2 100644
--- a/newlib/libc/argz/argz_stringify.c
+++ b/newlib/libc/argz/argz_stringify.c
@@ -10,9 +10,8 @@
#include
void
-_DEFUN (argz_stringify, (argz, argz_len, sep),
- char *argz _AND
- size_t argz_len _AND
+argz_stringify (char *argz,
+ size_t argz_len,
int sep)
{
size_t i;
diff --git a/newlib/libc/argz/envz_add.c b/newlib/libc/argz/envz_add.c
index 3e91a5867..60ecf17bc 100644
--- a/newlib/libc/argz/envz_add.c
+++ b/newlib/libc/argz/envz_add.c
@@ -12,10 +12,9 @@
#include
error_t
-_DEFUN (envz_add, (envz, envz_len, name, value),
- char **envz _AND
- size_t *envz_len _AND
- const char *name _AND
+envz_add (char **envz,
+ size_t *envz_len,
+ const char *name,
const char *value)
{
char *concat = NULL;
diff --git a/newlib/libc/argz/envz_entry.c b/newlib/libc/argz/envz_entry.c
index 3d1986ba7..869c332ad 100644
--- a/newlib/libc/argz/envz_entry.c
+++ b/newlib/libc/argz/envz_entry.c
@@ -13,9 +13,8 @@
#include "buf_findstr.h"
char *
-_DEFUN (envz_entry, (envz, envz_len, name),
- const char *envz _AND
- size_t envz_len _AND
+envz_entry (const char *envz,
+ size_t envz_len,
const char *name)
{
char *buf_ptr = (char *)envz;
diff --git a/newlib/libc/argz/envz_get.c b/newlib/libc/argz/envz_get.c
index b4f7c2806..9863642c7 100644
--- a/newlib/libc/argz/envz_get.c
+++ b/newlib/libc/argz/envz_get.c
@@ -13,9 +13,8 @@
#include "buf_findstr.h"
char *
-_DEFUN (envz_get, (envz, envz_len, name),
- const char *envz _AND
- size_t envz_len _AND
+envz_get (const char *envz,
+ size_t envz_len,
const char *name)
{
char *buf_ptr = (char *)envz;
diff --git a/newlib/libc/argz/envz_merge.c b/newlib/libc/argz/envz_merge.c
index 8a26bc3c3..3be7c1fbc 100644
--- a/newlib/libc/argz/envz_merge.c
+++ b/newlib/libc/argz/envz_merge.c
@@ -12,11 +12,10 @@
#include
error_t
-_DEFUN (envz_merge, (envz, envz_len, envz2, envz2_len, override),
- char **envz _AND
- size_t *envz_len _AND
- const char *envz2 _AND
- size_t envz2_len _AND
+envz_merge (char **envz,
+ size_t *envz_len,
+ const char *envz2,
+ size_t envz2_len,
int override)
{
char *entry = NULL;
diff --git a/newlib/libc/argz/envz_remove.c b/newlib/libc/argz/envz_remove.c
index 1882297f0..8fc9e8f16 100644
--- a/newlib/libc/argz/envz_remove.c
+++ b/newlib/libc/argz/envz_remove.c
@@ -12,9 +12,8 @@
#include
void
-_DEFUN (envz_remove, (envz, envz_len, name),
- char **envz _AND
- size_t *envz_len _AND
+envz_remove (char **envz,
+ size_t *envz_len,
const char *name)
{
char *entry = NULL;
diff --git a/newlib/libc/argz/envz_strip.c b/newlib/libc/argz/envz_strip.c
index e1c461091..8efa5cbb5 100644
--- a/newlib/libc/argz/envz_strip.c
+++ b/newlib/libc/argz/envz_strip.c
@@ -12,8 +12,7 @@
#include
void
-_DEFUN (envz_strip, (envz, envz_len),
- char **envz _AND
+envz_strip (char **envz,
size_t *envz_len)
{
char *entry = 0;
diff --git a/newlib/libc/configure b/newlib/libc/configure
index dabe44fd9..add8f679c 100755
--- a/newlib/libc/configure
+++ b/newlib/libc/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.5.0.
+# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.5.0'
-PACKAGE_STRING='newlib 2.5.0'
+PACKAGE_VERSION='3.0.0'
+PACKAGE_STRING='newlib 3.0.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -808,6 +808,7 @@ enable_newlib_iconv
enable_newlib_elix_level
enable_newlib_io_float
enable_newlib_supplied_syscalls
+enable_newlib_fno_builtin
enable_dependency_tracking
enable_maintainer_mode
enable_shared
@@ -1370,7 +1371,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.5.0 to adapt to many kinds of systems.
+\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1440,7 +1441,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.5.0:";;
+ short | recursive ) echo "Configuration of newlib 3.0.0:";;
esac
cat <<\_ACEOF
@@ -1460,6 +1461,7 @@ Optional Features:
--enable-newlib-elix-level supply desired elix library level (1-4)
--disable-newlib-io-float disable printf/scanf family float support
--disable-newlib-supplied-syscalls disable newlib from supplying syscalls
+ --disable-newlib-fno-builtin disable -fno-builtin flag to allow compiler to use builtin library functions
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-maintainer-mode enable make rules and dependencies not useful
@@ -1555,7 +1557,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.5.0
+newlib configure 3.0.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1833,7 +1835,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.5.0, which was
+It was created by newlib $as_me 3.0.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2930,6 +2932,18 @@ else
fi
+# Check whether --enable-newlib-fno-builtin was given.
+if test "${enable_newlib_fno_builtin+set}" = set; then :
+ enableval=$enable_newlib_fno_builtin; case "${enableval}" in
+ yes) newlib_fno_builtin=yes ;;
+ no) newlib_fno_builtin=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-fno-builtin option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_fno_builtin=
+fi
+
+
test -z "${with_target_subdir}" && with_target_subdir=.
@@ -2968,7 +2982,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.5.0'
+ VERSION='3.0.0'
# Some tools Automake needs.
@@ -3776,8 +3790,6 @@ fi
. ${newlib_basedir}/configure.host
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
NEWLIB_CFLAGS=${newlib_cflags}
@@ -3837,6 +3849,12 @@ else
fi
+# Emit any target-specific warnings.
+if test "x${newlib_msg_warn}" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${newlib_msg_warn}" >&5
+$as_echo "$as_me: WARNING: ${newlib_msg_warn}" >&2;}
+fi
+
# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
# use oext, which is set in configure.host based on the target platform.
OBJEXT=${oext}
@@ -11549,7 +11567,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11552 "configure"
+#line 11570 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11655,7 +11673,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11658 "configure"
+#line 11676 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12121,7 +12139,7 @@ fi
-ac_config_files="$ac_config_files Makefile argz/Makefile ctype/Makefile errno/Makefile locale/Makefile misc/Makefile reent/Makefile search/Makefile stdio/Makefile stdio64/Makefile stdlib/Makefile string/Makefile time/Makefile posix/Makefile signal/Makefile syscalls/Makefile unix/Makefile iconv/Makefile iconv/ces/Makefile iconv/ccs/Makefile iconv/ccs/binary/Makefile iconv/lib/Makefile xdr/Makefile"
+ac_config_files="$ac_config_files Makefile argz/Makefile ctype/Makefile errno/Makefile locale/Makefile misc/Makefile reent/Makefile search/Makefile stdio/Makefile stdio64/Makefile stdlib/Makefile string/Makefile time/Makefile posix/Makefile signal/Makefile syscalls/Makefile unix/Makefile iconv/Makefile iconv/ces/Makefile iconv/ccs/Makefile iconv/ccs/binary/Makefile iconv/lib/Makefile ssp/Makefile xdr/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -12777,7 +12795,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.5.0, which was
+This file was extended by newlib $as_me 3.0.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12834,7 +12852,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.5.0
+newlib config.status 3.0.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -13240,6 +13258,7 @@ do
"iconv/ccs/Makefile") CONFIG_FILES="$CONFIG_FILES iconv/ccs/Makefile" ;;
"iconv/ccs/binary/Makefile") CONFIG_FILES="$CONFIG_FILES iconv/ccs/binary/Makefile" ;;
"iconv/lib/Makefile") CONFIG_FILES="$CONFIG_FILES iconv/lib/Makefile" ;;
+ "ssp/Makefile") CONFIG_FILES="$CONFIG_FILES ssp/Makefile" ;;
"xdr/Makefile") CONFIG_FILES="$CONFIG_FILES xdr/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
diff --git a/newlib/libc/configure.in b/newlib/libc/configure.in
index ac25a3933..d3b10a500 100644
--- a/newlib/libc/configure.in
+++ b/newlib/libc/configure.in
@@ -219,5 +219,5 @@ fi
AC_SUBST(LIBC_MACHINE_LIB)
AC_SUBST(machine_dir)
-AC_CONFIG_FILES([Makefile argz/Makefile ctype/Makefile errno/Makefile locale/Makefile misc/Makefile reent/Makefile search/Makefile stdio/Makefile stdio64/Makefile stdlib/Makefile string/Makefile time/Makefile posix/Makefile signal/Makefile syscalls/Makefile unix/Makefile iconv/Makefile iconv/ces/Makefile iconv/ccs/Makefile iconv/ccs/binary/Makefile iconv/lib/Makefile xdr/Makefile])
+AC_CONFIG_FILES([Makefile argz/Makefile ctype/Makefile errno/Makefile locale/Makefile misc/Makefile reent/Makefile search/Makefile stdio/Makefile stdio64/Makefile stdlib/Makefile string/Makefile time/Makefile posix/Makefile signal/Makefile syscalls/Makefile unix/Makefile iconv/Makefile iconv/ces/Makefile iconv/ccs/Makefile iconv/ccs/binary/Makefile iconv/lib/Makefile ssp/Makefile xdr/Makefile])
AC_OUTPUT
diff --git a/newlib/libc/ctype/Makefile.am b/newlib/libc/ctype/Makefile.am
index 898693571..fa6a70d3a 100644
--- a/newlib/libc/ctype/Makefile.am
+++ b/newlib/libc/ctype/Makefile.am
@@ -24,6 +24,7 @@ if ELIX_LEVEL_1
ELIX_SOURCES =
else
ELIX_SOURCES = \
+ categories.c \
isalnum_l.c \
isalpha_l.c \
isascii.c \
diff --git a/newlib/libc/ctype/Makefile.in b/newlib/libc/ctype/Makefile.in
index f883e1c99..5ad351da0 100644
--- a/newlib/libc/ctype/Makefile.in
+++ b/newlib/libc/ctype/Makefile.in
@@ -79,7 +79,8 @@ am__objects_1 = lib_a-ctype_.$(OBJEXT) lib_a-isalnum.$(OBJEXT) \
lib_a-ispunct.$(OBJEXT) lib_a-isspace.$(OBJEXT) \
lib_a-isxdigit.$(OBJEXT) lib_a-tolower.$(OBJEXT) \
lib_a-toupper.$(OBJEXT)
-@ELIX_LEVEL_1_FALSE@am__objects_2 = lib_a-isalnum_l.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@am__objects_2 = lib_a-categories.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@ lib_a-isalnum_l.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-isalpha_l.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-isascii.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-isascii_l.$(OBJEXT) \
@@ -142,25 +143,25 @@ libctype_la_LIBADD =
am__objects_3 = ctype_.lo isalnum.lo isalpha.lo iscntrl.lo isdigit.lo \
islower.lo isupper.lo isprint.lo ispunct.lo isspace.lo \
isxdigit.lo tolower.lo toupper.lo
-@ELIX_LEVEL_1_FALSE@am__objects_4 = isalnum_l.lo isalpha_l.lo \
-@ELIX_LEVEL_1_FALSE@ isascii.lo isascii_l.lo isblank.lo \
-@ELIX_LEVEL_1_FALSE@ isblank_l.lo iscntrl_l.lo isdigit_l.lo \
-@ELIX_LEVEL_1_FALSE@ islower_l.lo isupper_l.lo isprint_l.lo \
-@ELIX_LEVEL_1_FALSE@ ispunct_l.lo isspace_l.lo iswalnum.lo \
-@ELIX_LEVEL_1_FALSE@ iswalnum_l.lo iswalpha.lo iswalpha_l.lo \
-@ELIX_LEVEL_1_FALSE@ iswblank.lo iswblank_l.lo iswcntrl.lo \
-@ELIX_LEVEL_1_FALSE@ iswcntrl_l.lo iswctype.lo iswctype_l.lo \
-@ELIX_LEVEL_1_FALSE@ iswdigit.lo iswdigit_l.lo iswgraph.lo \
-@ELIX_LEVEL_1_FALSE@ iswgraph_l.lo iswlower.lo iswlower_l.lo \
-@ELIX_LEVEL_1_FALSE@ iswprint.lo iswprint_l.lo iswpunct.lo \
-@ELIX_LEVEL_1_FALSE@ iswpunct_l.lo iswspace.lo iswspace_l.lo \
-@ELIX_LEVEL_1_FALSE@ iswupper.lo iswupper_l.lo iswxdigit.lo \
-@ELIX_LEVEL_1_FALSE@ iswxdigit_l.lo isxdigit_l.lo jp2uc.lo \
-@ELIX_LEVEL_1_FALSE@ toascii.lo toascii_l.lo tolower_l.lo \
-@ELIX_LEVEL_1_FALSE@ toupper_l.lo towctrans.lo towctrans_l.lo \
-@ELIX_LEVEL_1_FALSE@ towlower.lo towlower_l.lo towupper.lo \
-@ELIX_LEVEL_1_FALSE@ towupper_l.lo wctrans.lo wctrans_l.lo \
-@ELIX_LEVEL_1_FALSE@ wctype.lo wctype_l.lo
+@ELIX_LEVEL_1_FALSE@am__objects_4 = categories.lo isalnum_l.lo \
+@ELIX_LEVEL_1_FALSE@ isalpha_l.lo isascii.lo isascii_l.lo \
+@ELIX_LEVEL_1_FALSE@ isblank.lo isblank_l.lo iscntrl_l.lo \
+@ELIX_LEVEL_1_FALSE@ isdigit_l.lo islower_l.lo isupper_l.lo \
+@ELIX_LEVEL_1_FALSE@ isprint_l.lo ispunct_l.lo isspace_l.lo \
+@ELIX_LEVEL_1_FALSE@ iswalnum.lo iswalnum_l.lo iswalpha.lo \
+@ELIX_LEVEL_1_FALSE@ iswalpha_l.lo iswblank.lo iswblank_l.lo \
+@ELIX_LEVEL_1_FALSE@ iswcntrl.lo iswcntrl_l.lo iswctype.lo \
+@ELIX_LEVEL_1_FALSE@ iswctype_l.lo iswdigit.lo iswdigit_l.lo \
+@ELIX_LEVEL_1_FALSE@ iswgraph.lo iswgraph_l.lo iswlower.lo \
+@ELIX_LEVEL_1_FALSE@ iswlower_l.lo iswprint.lo iswprint_l.lo \
+@ELIX_LEVEL_1_FALSE@ iswpunct.lo iswpunct_l.lo iswspace.lo \
+@ELIX_LEVEL_1_FALSE@ iswspace_l.lo iswupper.lo iswupper_l.lo \
+@ELIX_LEVEL_1_FALSE@ iswxdigit.lo iswxdigit_l.lo isxdigit_l.lo \
+@ELIX_LEVEL_1_FALSE@ jp2uc.lo toascii.lo toascii_l.lo \
+@ELIX_LEVEL_1_FALSE@ tolower_l.lo toupper_l.lo towctrans.lo \
+@ELIX_LEVEL_1_FALSE@ towctrans_l.lo towlower.lo towlower_l.lo \
+@ELIX_LEVEL_1_FALSE@ towupper.lo towupper_l.lo wctrans.lo \
+@ELIX_LEVEL_1_FALSE@ wctrans_l.lo wctype.lo wctype_l.lo
@USE_LIBTOOL_TRUE@am_libctype_la_OBJECTS = $(am__objects_3) \
@USE_LIBTOOL_TRUE@ $(am__objects_4)
libctype_la_OBJECTS = $(am_libctype_la_OBJECTS)
@@ -351,6 +352,7 @@ GENERAL_SOURCES = \
toupper.c
@ELIX_LEVEL_1_FALSE@ELIX_SOURCES = \
+@ELIX_LEVEL_1_FALSE@ categories.c \
@ELIX_LEVEL_1_FALSE@ isalnum_l.c \
@ELIX_LEVEL_1_FALSE@ isalpha_l.c \
@ELIX_LEVEL_1_FALSE@ isascii.c \
@@ -425,7 +427,7 @@ CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
DOCBOOK_CHEW = ${top_srcdir}/../doc/makedocbook.py
DOCBOOK_OUT_FILES = $(CHEWOUT_FILES:.def=.xml)
DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml)
-CLEANFILES = $(CHEWOUT_FILES) $(CHEWOUT_FILES:.def=.ref) $(DOCBOOK_OUT_FILES)
+CLEANFILES = $(CHEWOUT_FILES) $(DOCBOOK_OUT_FILES)
CHEWOUT_FILES = \
isalnum.def \
isalpha.def \
@@ -609,6 +611,12 @@ lib_a-toupper.o: toupper.c
lib_a-toupper.obj: toupper.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-toupper.obj `if test -f 'toupper.c'; then $(CYGPATH_W) 'toupper.c'; else $(CYGPATH_W) '$(srcdir)/toupper.c'; fi`
+lib_a-categories.o: categories.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-categories.o `test -f 'categories.c' || echo '$(srcdir)/'`categories.c
+
+lib_a-categories.obj: categories.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-categories.obj `if test -f 'categories.c'; then $(CYGPATH_W) 'categories.c'; else $(CYGPATH_W) '$(srcdir)/categories.c'; fi`
+
lib_a-isalnum_l.o: isalnum_l.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isalnum_l.o `test -f 'isalnum_l.c' || echo '$(srcdir)/'`isalnum_l.c
@@ -1124,8 +1132,8 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
done
.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
+ $(CHEW) < $< > $*.def || ( rm $*.def && false )
+ @touch stmp-def
TARGETDOC ?= ../tmp.texi
diff --git a/newlib/libc/ctype/caseconv.t b/newlib/libc/ctype/caseconv.t
new file mode 100644
index 000000000..5e132d3e1
--- /dev/null
+++ b/newlib/libc/ctype/caseconv.t
@@ -0,0 +1,304 @@
+ {0x0041, 25, TOLO, 32},
+ {0x0061, 25, TOUP, -32},
+ {0x00B5, 0, TOUP, 743},
+ {0x00C0, 22, TOLO, 32},
+ {0x00D8, 6, TOLO, 32},
+ {0x00E0, 22, TOUP, -32},
+ {0x00F8, 6, TOUP, -32},
+ {0x00FF, 0, TOUP, 121},
+ {0x0100, 47, TO1, EVENCAP},
+ {0x0130, 0, TOLO, -199},
+ {0x0131, 0, TOUP, -232},
+ {0x0132, 5, TO1, EVENCAP},
+ {0x0139, 15, TO1, ODDCAP},
+ {0x014A, 45, TO1, EVENCAP},
+ {0x0178, 0, TOLO, -121},
+ {0x0179, 5, TO1, ODDCAP},
+ {0x017F, 0, TOUP, -300},
+ {0x0180, 0, TOUP, 195},
+ {0x0181, 0, TOLO, 210},
+ {0x0182, 3, TO1, EVENCAP},
+ {0x0186, 0, TOLO, 206},
+ {0x0187, 1, TO1, ODDCAP},
+ {0x0189, 1, TOLO, 205},
+ {0x018B, 1, TO1, ODDCAP},
+ {0x018E, 0, TOLO, 79},
+ {0x018F, 0, TOLO, 202},
+ {0x0190, 0, TOLO, 203},
+ {0x0191, 1, TO1, ODDCAP},
+ {0x0193, 0, TOLO, 205},
+ {0x0194, 0, TOLO, 207},
+ {0x0195, 0, TOUP, 97},
+ {0x0196, 0, TOLO, 211},
+ {0x0197, 0, TOLO, 209},
+ {0x0198, 1, TO1, EVENCAP},
+ {0x019A, 0, TOUP, 163},
+ {0x019C, 0, TOLO, 211},
+ {0x019D, 0, TOLO, 213},
+ {0x019E, 0, TOUP, 130},
+ {0x019F, 0, TOLO, 214},
+ {0x01A0, 5, TO1, EVENCAP},
+ {0x01A6, 0, TOLO, 218},
+ {0x01A7, 1, TO1, ODDCAP},
+ {0x01A9, 0, TOLO, 218},
+ {0x01AC, 1, TO1, EVENCAP},
+ {0x01AE, 0, TOLO, 218},
+ {0x01AF, 1, TO1, ODDCAP},
+ {0x01B1, 1, TOLO, 217},
+ {0x01B3, 3, TO1, ODDCAP},
+ {0x01B7, 0, TOLO, 219},
+ {0x01B8, 1, TO1, EVENCAP},
+ {0x01BC, 1, TO1, EVENCAP},
+ {0x01BF, 0, TOUP, 56},
+ {0x01C4, 0, TOLO, 2},
+ {0x01C5, 0, TOBOTH, 0},
+ {0x01C6, 0, TOUP, -2},
+ {0x01C7, 0, TOLO, 2},
+ {0x01C8, 0, TOBOTH, 0},
+ {0x01C9, 0, TOUP, -2},
+ {0x01CA, 0, TOLO, 2},
+ {0x01CB, 0, TOBOTH, 0},
+ {0x01CC, 0, TOUP, -2},
+ {0x01CD, 15, TO1, ODDCAP},
+ {0x01DD, 0, TOUP, -79},
+ {0x01DE, 17, TO1, EVENCAP},
+ {0x01F1, 0, TOLO, 2},
+ {0x01F2, 0, TOBOTH, 0},
+ {0x01F3, 0, TOUP, -2},
+ {0x01F4, 1, TO1, EVENCAP},
+ {0x01F6, 0, TOLO, -97},
+ {0x01F7, 0, TOLO, -56},
+ {0x01F8, 39, TO1, EVENCAP},
+ {0x0220, 0, TOLO, -130},
+ {0x0222, 17, TO1, EVENCAP},
+ {0x023A, 0, TOLO, 10795},
+ {0x023B, 1, TO1, ODDCAP},
+ {0x023D, 0, TOLO, -163},
+ {0x023E, 0, TOLO, 10792},
+ {0x023F, 1, TOUP, 10815},
+ {0x0241, 1, TO1, ODDCAP},
+ {0x0243, 0, TOLO, -195},
+ {0x0244, 0, TOLO, 69},
+ {0x0245, 0, TOLO, 71},
+ {0x0246, 9, TO1, EVENCAP},
+ {0x0250, 0, TOUP, 10783},
+ {0x0251, 0, TOUP, 10780},
+ {0x0252, 0, TOUP, 10782},
+ {0x0253, 0, TOUP, -210},
+ {0x0254, 0, TOUP, -206},
+ {0x0256, 1, TOUP, -205},
+ {0x0259, 0, TOUP, -202},
+ {0x025B, 0, TOUP, -203},
+ {0x025C, 0, TOUP, 42319},
+ {0x0260, 0, TOUP, -205},
+ {0x0261, 0, TOUP, 42315},
+ {0x0263, 0, TOUP, -207},
+ {0x0265, 0, TOUP, 42280},
+ {0x0266, 0, TOUP, 42308},
+ {0x0268, 0, TOUP, -209},
+ {0x0269, 0, TOUP, -211},
+ {0x026A, 0, TOUP, 42308},
+ {0x026B, 0, TOUP, 10743},
+ {0x026C, 0, TOUP, 42305},
+ {0x026F, 0, TOUP, -211},
+ {0x0271, 0, TOUP, 10749},
+ {0x0272, 0, TOUP, -213},
+ {0x0275, 0, TOUP, -214},
+ {0x027D, 0, TOUP, 10727},
+ {0x0280, 0, TOUP, -218},
+ {0x0283, 0, TOUP, -218},
+ {0x0287, 0, TOUP, 42282},
+ {0x0288, 0, TOUP, -218},
+ {0x0289, 0, TOUP, -69},
+ {0x028A, 1, TOUP, -217},
+ {0x028C, 0, TOUP, -71},
+ {0x0292, 0, TOUP, -219},
+ {0x029D, 0, TOUP, 42261},
+ {0x029E, 0, TOUP, 42258},
+ {0x0345, 0, TOUP, 84},
+ {0x0370, 3, TO1, EVENCAP},
+ {0x0376, 1, TO1, EVENCAP},
+ {0x037B, 2, TOUP, 130},
+ {0x037F, 0, TOLO, 116},
+ {0x0386, 0, TOLO, 38},
+ {0x0388, 2, TOLO, 37},
+ {0x038C, 0, TOLO, 64},
+ {0x038E, 1, TOLO, 63},
+ {0x0391, 16, TOLO, 32},
+ {0x03A3, 8, TOLO, 32},
+ {0x03AC, 0, TOUP, -38},
+ {0x03AD, 2, TOUP, -37},
+ {0x03B1, 16, TOUP, -32},
+ {0x03C2, 0, TOUP, -31},
+ {0x03C3, 8, TOUP, -32},
+ {0x03CC, 0, TOUP, -64},
+ {0x03CD, 1, TOUP, -63},
+ {0x03CF, 0, TOLO, 8},
+ {0x03D0, 0, TOUP, -62},
+ {0x03D1, 0, TOUP, -57},
+ {0x03D5, 0, TOUP, -47},
+ {0x03D6, 0, TOUP, -54},
+ {0x03D7, 0, TOUP, -8},
+ {0x03D8, 23, TO1, EVENCAP},
+ {0x03F0, 0, TOUP, -86},
+ {0x03F1, 0, TOUP, -80},
+ {0x03F2, 0, TOUP, 7},
+ {0x03F3, 0, TOUP, -116},
+ {0x03F4, 0, TOLO, -60},
+ {0x03F5, 0, TOUP, -96},
+ {0x03F7, 1, TO1, ODDCAP},
+ {0x03F9, 0, TOLO, -7},
+ {0x03FA, 1, TO1, EVENCAP},
+ {0x03FD, 2, TOLO, -130},
+ {0x0400, 15, TOLO, 80},
+ {0x0410, 31, TOLO, 32},
+ {0x0430, 31, TOUP, -32},
+ {0x0450, 15, TOUP, -80},
+ {0x0460, 33, TO1, EVENCAP},
+ {0x048A, 53, TO1, EVENCAP},
+ {0x04C0, 0, TOLO, 15},
+ {0x04C1, 13, TO1, ODDCAP},
+ {0x04CF, 0, TOUP, -15},
+ {0x04D0, 95, TO1, EVENCAP},
+ {0x0531, 37, TOLO, 48},
+ {0x0561, 37, TOUP, -48},
+ {0x10A0, 37, TOLO, 7264},
+ {0x10C7, 0, TOLO, 7264},
+ {0x10CD, 0, TOLO, 7264},
+ {0x13A0, 79, TOLO, 38864},
+ {0x13F0, 5, TOLO, 8},
+ {0x13F8, 5, TOUP, -8},
+ {0x1C80, 0, TOUP, -6254},
+ {0x1C81, 0, TOUP, -6253},
+ {0x1C82, 0, TOUP, -6244},
+ {0x1C83, 1, TOUP, -6242},
+ {0x1C85, 0, TOUP, -6243},
+ {0x1C86, 0, TOUP, -6236},
+ {0x1C87, 0, TOUP, -6181},
+ {0x1C88, 0, TOUP, 35266},
+ {0x1D79, 0, TOUP, 35332},
+ {0x1D7D, 0, TOUP, 3814},
+ {0x1E00, 149, TO1, EVENCAP},
+ {0x1E9B, 0, TOUP, -59},
+ {0x1E9E, 0, TOLO, -7615},
+ {0x1EA0, 95, TO1, EVENCAP},
+ {0x1F00, 7, TOUP, 8},
+ {0x1F08, 7, TOLO, -8},
+ {0x1F10, 5, TOUP, 8},
+ {0x1F18, 5, TOLO, -8},
+ {0x1F20, 7, TOUP, 8},
+ {0x1F28, 7, TOLO, -8},
+ {0x1F30, 7, TOUP, 8},
+ {0x1F38, 7, TOLO, -8},
+ {0x1F40, 5, TOUP, 8},
+ {0x1F48, 5, TOLO, -8},
+ {0x1F51, 0, TOUP, 8},
+ {0x1F53, 0, TOUP, 8},
+ {0x1F55, 0, TOUP, 8},
+ {0x1F57, 0, TOUP, 8},
+ {0x1F59, 0, TOLO, -8},
+ {0x1F5B, 0, TOLO, -8},
+ {0x1F5D, 0, TOLO, -8},
+ {0x1F5F, 0, TOLO, -8},
+ {0x1F60, 7, TOUP, 8},
+ {0x1F68, 7, TOLO, -8},
+ {0x1F70, 1, TOUP, 74},
+ {0x1F72, 3, TOUP, 86},
+ {0x1F76, 1, TOUP, 100},
+ {0x1F78, 1, TOUP, 128},
+ {0x1F7A, 1, TOUP, 112},
+ {0x1F7C, 1, TOUP, 126},
+ {0x1F80, 7, TOUP, 8},
+ {0x1F88, 7, TOLO, -8},
+ {0x1F90, 7, TOUP, 8},
+ {0x1F98, 7, TOLO, -8},
+ {0x1FA0, 7, TOUP, 8},
+ {0x1FA8, 7, TOLO, -8},
+ {0x1FB0, 1, TOUP, 8},
+ {0x1FB3, 0, TOUP, 9},
+ {0x1FB8, 1, TOLO, -8},
+ {0x1FBA, 1, TOLO, -74},
+ {0x1FBC, 0, TOLO, -9},
+ {0x1FBE, 0, TOUP, -7205},
+ {0x1FC3, 0, TOUP, 9},
+ {0x1FC8, 3, TOLO, -86},
+ {0x1FCC, 0, TOLO, -9},
+ {0x1FD0, 1, TOUP, 8},
+ {0x1FD8, 1, TOLO, -8},
+ {0x1FDA, 1, TOLO, -100},
+ {0x1FE0, 1, TOUP, 8},
+ {0x1FE5, 0, TOUP, 7},
+ {0x1FE8, 1, TOLO, -8},
+ {0x1FEA, 1, TOLO, -112},
+ {0x1FEC, 0, TOLO, -7},
+ {0x1FF3, 0, TOUP, 9},
+ {0x1FF8, 1, TOLO, -128},
+ {0x1FFA, 1, TOLO, -126},
+ {0x1FFC, 0, TOLO, -9},
+ {0x2126, 0, TOLO, -7517},
+ {0x212A, 0, TOLO, -8383},
+ {0x212B, 0, TOLO, -8262},
+ {0x2132, 0, TOLO, 28},
+ {0x214E, 0, TOUP, -28},
+ {0x2160, 15, TOLO, 16},
+ {0x2170, 15, TOUP, -16},
+ {0x2183, 1, TO1, ODDCAP},
+ {0x24B6, 25, TOLO, 26},
+ {0x24D0, 25, TOUP, -26},
+ {0x2C00, 46, TOLO, 48},
+ {0x2C30, 46, TOUP, -48},
+ {0x2C60, 1, TO1, EVENCAP},
+ {0x2C62, 0, TOLO, -10743},
+ {0x2C63, 0, TOLO, -3814},
+ {0x2C64, 0, TOLO, -10727},
+ {0x2C65, 0, TOUP, -10795},
+ {0x2C66, 0, TOUP, -10792},
+ {0x2C67, 5, TO1, ODDCAP},
+ {0x2C6D, 0, TOLO, -10780},
+ {0x2C6E, 0, TOLO, -10749},
+ {0x2C6F, 0, TOLO, -10783},
+ {0x2C70, 0, TOLO, -10782},
+ {0x2C72, 1, TO1, EVENCAP},
+ {0x2C75, 1, TO1, ODDCAP},
+ {0x2C7E, 1, TOLO, -10815},
+ {0x2C80, 99, TO1, EVENCAP},
+ {0x2CEB, 3, TO1, ODDCAP},
+ {0x2CF2, 1, TO1, EVENCAP},
+ {0x2D00, 37, TOUP, -7264},
+ {0x2D27, 0, TOUP, -7264},
+ {0x2D2D, 0, TOUP, -7264},
+ {0xA640, 45, TO1, EVENCAP},
+ {0xA680, 27, TO1, EVENCAP},
+ {0xA722, 13, TO1, EVENCAP},
+ {0xA732, 61, TO1, EVENCAP},
+ {0xA779, 3, TO1, ODDCAP},
+ {0xA77D, 0, TOLO, -35332},
+ {0xA77E, 9, TO1, EVENCAP},
+ {0xA78B, 1, TO1, ODDCAP},
+ {0xA78D, 0, TOLO, -42280},
+ {0xA790, 3, TO1, EVENCAP},
+ {0xA796, 19, TO1, EVENCAP},
+ {0xA7AA, 0, TOLO, -42308},
+ {0xA7AB, 0, TOLO, -42319},
+ {0xA7AC, 0, TOLO, -42315},
+ {0xA7AD, 0, TOLO, -42305},
+ {0xA7AE, 0, TOLO, -42308},
+ {0xA7B0, 0, TOLO, -42258},
+ {0xA7B1, 0, TOLO, -42282},
+ {0xA7B2, 0, TOLO, -42261},
+ {0xA7B3, 0, TOLO, 928},
+ {0xA7B4, 3, TO1, EVENCAP},
+ {0xAB53, 0, TOUP, -928},
+ {0xAB70, 79, TOUP, -38864},
+ {0xFF21, 25, TOLO, 32},
+ {0xFF41, 25, TOUP, -32},
+ {0x10400, 39, TOLO, 40},
+ {0x10428, 39, TOUP, -40},
+ {0x104B0, 35, TOLO, 40},
+ {0x104D8, 35, TOUP, -40},
+ {0x10C80, 50, TOLO, 64},
+ {0x10CC0, 50, TOUP, -64},
+ {0x118A0, 31, TOLO, 32},
+ {0x118C0, 31, TOUP, -32},
+ {0x1E900, 33, TOLO, 34},
+ {0x1E922, 33, TOUP, -34},
diff --git a/newlib/libc/ctype/categories.c b/newlib/libc/ctype/categories.c
new file mode 100644
index 000000000..85328ef2e
--- /dev/null
+++ b/newlib/libc/ctype/categories.c
@@ -0,0 +1,40 @@
+#include
+#include
+#include "categories.h"
+
+struct _category {
+ enum category cat: 8;
+ uint_least32_t first: 24;
+ uint_least16_t delta;
+} __attribute__((packed));
+
+static const struct _category categories[] = {
+#include "categories.t"
+};
+
+static enum category
+bisearch_cat(wint_t ucs, const struct _category *table, int max)
+{
+ int min = 0;
+ int mid;
+
+ if (ucs < table[0].first || ucs > table[max].first + table[max].delta)
+ return 0;
+ while (max >= min)
+ {
+ mid = (min + max) / 2;
+ if (ucs > table[mid].first + table[mid].delta)
+ min = mid + 1;
+ else if (ucs < table[mid].first)
+ max = mid - 1;
+ else
+ return table[mid].cat;
+ }
+ return -1;
+}
+
+enum category category(wint_t ucs)
+{
+ return bisearch_cat(ucs, categories,
+ sizeof(categories) / sizeof(*categories) - 1);
+}
diff --git a/newlib/libc/ctype/categories.cat b/newlib/libc/ctype/categories.cat
new file mode 100644
index 000000000..cade60a6a
--- /dev/null
+++ b/newlib/libc/ctype/categories.cat
@@ -0,0 +1,29 @@
+ CAT_Cc,
+ CAT_Cf,
+ CAT_Cs,
+ CAT_LC,
+ CAT_Ll,
+ CAT_Lm,
+ CAT_Lo,
+ CAT_Lt,
+ CAT_Lu,
+ CAT_Mc,
+ CAT_Me,
+ CAT_Mn,
+ CAT_Nd,
+ CAT_Nl,
+ CAT_No,
+ CAT_Pc,
+ CAT_Pd,
+ CAT_Pe,
+ CAT_Pf,
+ CAT_Pi,
+ CAT_Po,
+ CAT_Ps,
+ CAT_Sc,
+ CAT_Sk,
+ CAT_Sm,
+ CAT_So,
+ CAT_Zl,
+ CAT_Zp,
+ CAT_Zs,
diff --git a/newlib/libc/ctype/categories.h b/newlib/libc/ctype/categories.h
new file mode 100644
index 000000000..271038e61
--- /dev/null
+++ b/newlib/libc/ctype/categories.h
@@ -0,0 +1,7 @@
+/* category data */
+
+enum category {
+#include "categories.cat"
+};
+
+extern enum category category(wint_t ucs);
diff --git a/newlib/libc/ctype/categories.t b/newlib/libc/ctype/categories.t
new file mode 100644
index 000000000..670457713
--- /dev/null
+++ b/newlib/libc/ctype/categories.t
@@ -0,0 +1,2074 @@
+ {CAT_Cc, 0x0000, 31},
+ {CAT_Zs, 0x0020, 0},
+ {CAT_Po, 0x0021, 2},
+ {CAT_Sc, 0x0024, 0},
+ {CAT_Po, 0x0025, 2},
+ {CAT_Ps, 0x0028, 0},
+ {CAT_Pe, 0x0029, 0},
+ {CAT_Po, 0x002A, 0},
+ {CAT_Sm, 0x002B, 0},
+ {CAT_Po, 0x002C, 0},
+ {CAT_Pd, 0x002D, 0},
+ {CAT_Po, 0x002E, 1},
+ {CAT_Nd, 0x0030, 9},
+ {CAT_Po, 0x003A, 1},
+ {CAT_Sm, 0x003C, 2},
+ {CAT_Po, 0x003F, 1},
+ {CAT_LC, 0x0041, 25},
+ {CAT_Ps, 0x005B, 0},
+ {CAT_Po, 0x005C, 0},
+ {CAT_Pe, 0x005D, 0},
+ {CAT_Sk, 0x005E, 0},
+ {CAT_Pc, 0x005F, 0},
+ {CAT_Sk, 0x0060, 0},
+ {CAT_LC, 0x0061, 25},
+ {CAT_Ps, 0x007B, 0},
+ {CAT_Sm, 0x007C, 0},
+ {CAT_Pe, 0x007D, 0},
+ {CAT_Sm, 0x007E, 0},
+ {CAT_Cc, 0x007F, 32},
+ {CAT_Zs, 0x00A0, 0},
+ {CAT_Po, 0x00A1, 0},
+ {CAT_Sc, 0x00A2, 3},
+ {CAT_So, 0x00A6, 0},
+ {CAT_Po, 0x00A7, 0},
+ {CAT_Sk, 0x00A8, 0},
+ {CAT_So, 0x00A9, 0},
+ {CAT_Lo, 0x00AA, 0},
+ {CAT_Pi, 0x00AB, 0},
+ {CAT_Sm, 0x00AC, 0},
+ {CAT_Cf, 0x00AD, 0},
+ {CAT_So, 0x00AE, 0},
+ {CAT_Sk, 0x00AF, 0},
+ {CAT_So, 0x00B0, 0},
+ {CAT_Sm, 0x00B1, 0},
+ {CAT_No, 0x00B2, 1},
+ {CAT_Sk, 0x00B4, 0},
+ {CAT_LC, 0x00B5, 0},
+ {CAT_Po, 0x00B6, 1},
+ {CAT_Sk, 0x00B8, 0},
+ {CAT_No, 0x00B9, 0},
+ {CAT_Lo, 0x00BA, 0},
+ {CAT_Pf, 0x00BB, 0},
+ {CAT_No, 0x00BC, 2},
+ {CAT_Po, 0x00BF, 0},
+ {CAT_LC, 0x00C0, 22},
+ {CAT_Sm, 0x00D7, 0},
+ {CAT_LC, 0x00D8, 6},
+ {CAT_Ll, 0x00DF, 0},
+ {CAT_LC, 0x00E0, 22},
+ {CAT_Sm, 0x00F7, 0},
+ {CAT_LC, 0x00F8, 63},
+ {CAT_Ll, 0x0138, 0},
+ {CAT_LC, 0x0139, 15},
+ {CAT_Ll, 0x0149, 0},
+ {CAT_LC, 0x014A, 66},
+ {CAT_Ll, 0x018D, 0},
+ {CAT_LC, 0x018E, 12},
+ {CAT_Ll, 0x019B, 0},
+ {CAT_LC, 0x019C, 13},
+ {CAT_Ll, 0x01AA, 1},
+ {CAT_LC, 0x01AC, 13},
+ {CAT_Ll, 0x01BA, 0},
+ {CAT_Lo, 0x01BB, 0},
+ {CAT_LC, 0x01BC, 1},
+ {CAT_Ll, 0x01BE, 0},
+ {CAT_LC, 0x01BF, 0},
+ {CAT_Lo, 0x01C0, 3},
+ {CAT_LC, 0x01C4, 0},
+ {CAT_Lt, 0x01C5, 0},
+ {CAT_LC, 0x01C6, 1},
+ {CAT_Lt, 0x01C8, 0},
+ {CAT_LC, 0x01C9, 1},
+ {CAT_Lt, 0x01CB, 0},
+ {CAT_LC, 0x01CC, 35},
+ {CAT_Ll, 0x01F0, 0},
+ {CAT_LC, 0x01F1, 0},
+ {CAT_Lt, 0x01F2, 0},
+ {CAT_LC, 0x01F3, 45},
+ {CAT_Ll, 0x0221, 0},
+ {CAT_LC, 0x0222, 17},
+ {CAT_Ll, 0x0234, 5},
+ {CAT_LC, 0x023A, 26},
+ {CAT_Ll, 0x0255, 0},
+ {CAT_LC, 0x0256, 1},
+ {CAT_Ll, 0x0258, 0},
+ {CAT_LC, 0x0259, 0},
+ {CAT_Ll, 0x025A, 0},
+ {CAT_LC, 0x025B, 1},
+ {CAT_Ll, 0x025D, 2},
+ {CAT_LC, 0x0260, 1},
+ {CAT_Ll, 0x0262, 0},
+ {CAT_LC, 0x0263, 0},
+ {CAT_Ll, 0x0264, 0},
+ {CAT_LC, 0x0265, 1},
+ {CAT_Ll, 0x0267, 0},
+ {CAT_LC, 0x0268, 4},
+ {CAT_Ll, 0x026D, 1},
+ {CAT_LC, 0x026F, 0},
+ {CAT_Ll, 0x0270, 0},
+ {CAT_LC, 0x0271, 1},
+ {CAT_Ll, 0x0273, 1},
+ {CAT_LC, 0x0275, 0},
+ {CAT_Ll, 0x0276, 6},
+ {CAT_LC, 0x027D, 0},
+ {CAT_Ll, 0x027E, 1},
+ {CAT_LC, 0x0280, 0},
+ {CAT_Ll, 0x0281, 1},
+ {CAT_LC, 0x0283, 0},
+ {CAT_Ll, 0x0284, 2},
+ {CAT_LC, 0x0287, 5},
+ {CAT_Ll, 0x028D, 4},
+ {CAT_LC, 0x0292, 0},
+ {CAT_Ll, 0x0293, 0},
+ {CAT_Lo, 0x0294, 0},
+ {CAT_Ll, 0x0295, 7},
+ {CAT_LC, 0x029D, 1},
+ {CAT_Ll, 0x029F, 16},
+ {CAT_Lm, 0x02B0, 17},
+ {CAT_Sk, 0x02C2, 3},
+ {CAT_Lm, 0x02C6, 11},
+ {CAT_Sk, 0x02D2, 13},
+ {CAT_Lm, 0x02E0, 4},
+ {CAT_Sk, 0x02E5, 6},
+ {CAT_Lm, 0x02EC, 0},
+ {CAT_Sk, 0x02ED, 0},
+ {CAT_Lm, 0x02EE, 0},
+ {CAT_Sk, 0x02EF, 16},
+ {CAT_Mn, 0x0300, 111},
+ {CAT_LC, 0x0370, 3},
+ {CAT_Lm, 0x0374, 0},
+ {CAT_Sk, 0x0375, 0},
+ {CAT_LC, 0x0376, 1},
+ {CAT_Lm, 0x037A, 0},
+ {CAT_LC, 0x037B, 2},
+ {CAT_Po, 0x037E, 0},
+ {CAT_LC, 0x037F, 0},
+ {CAT_Sk, 0x0384, 1},
+ {CAT_LC, 0x0386, 0},
+ {CAT_Po, 0x0387, 0},
+ {CAT_LC, 0x0388, 2},
+ {CAT_LC, 0x038C, 0},
+ {CAT_LC, 0x038E, 1},
+ {CAT_Ll, 0x0390, 0},
+ {CAT_LC, 0x0391, 16},
+ {CAT_LC, 0x03A3, 12},
+ {CAT_Ll, 0x03B0, 0},
+ {CAT_LC, 0x03B1, 32},
+ {CAT_Lu, 0x03D2, 2},
+ {CAT_LC, 0x03D5, 32},
+ {CAT_Sm, 0x03F6, 0},
+ {CAT_LC, 0x03F7, 4},
+ {CAT_Ll, 0x03FC, 0},
+ {CAT_LC, 0x03FD, 132},
+ {CAT_So, 0x0482, 0},
+ {CAT_Mn, 0x0483, 4},
+ {CAT_Me, 0x0488, 1},
+ {CAT_LC, 0x048A, 165},
+ {CAT_LC, 0x0531, 37},
+ {CAT_Lm, 0x0559, 0},
+ {CAT_Po, 0x055A, 5},
+ {CAT_LC, 0x0561, 37},
+ {CAT_Ll, 0x0587, 0},
+ {CAT_Po, 0x0589, 0},
+ {CAT_Pd, 0x058A, 0},
+ {CAT_So, 0x058D, 1},
+ {CAT_Sc, 0x058F, 0},
+ {CAT_Mn, 0x0591, 44},
+ {CAT_Pd, 0x05BE, 0},
+ {CAT_Mn, 0x05BF, 0},
+ {CAT_Po, 0x05C0, 0},
+ {CAT_Mn, 0x05C1, 1},
+ {CAT_Po, 0x05C3, 0},
+ {CAT_Mn, 0x05C4, 1},
+ {CAT_Po, 0x05C6, 0},
+ {CAT_Mn, 0x05C7, 0},
+ {CAT_Lo, 0x05D0, 26},
+ {CAT_Lo, 0x05F0, 2},
+ {CAT_Po, 0x05F3, 1},
+ {CAT_Cf, 0x0600, 5},
+ {CAT_Sm, 0x0606, 2},
+ {CAT_Po, 0x0609, 1},
+ {CAT_Sc, 0x060B, 0},
+ {CAT_Po, 0x060C, 1},
+ {CAT_So, 0x060E, 1},
+ {CAT_Mn, 0x0610, 10},
+ {CAT_Po, 0x061B, 0},
+ {CAT_Cf, 0x061C, 0},
+ {CAT_Po, 0x061E, 1},
+ {CAT_Lo, 0x0620, 31},
+ {CAT_Lm, 0x0640, 0},
+ {CAT_Lo, 0x0641, 9},
+ {CAT_Mn, 0x064B, 20},
+ {CAT_Nd, 0x0660, 9},
+ {CAT_Po, 0x066A, 3},
+ {CAT_Lo, 0x066E, 1},
+ {CAT_Mn, 0x0670, 0},
+ {CAT_Lo, 0x0671, 98},
+ {CAT_Po, 0x06D4, 0},
+ {CAT_Lo, 0x06D5, 0},
+ {CAT_Mn, 0x06D6, 6},
+ {CAT_Cf, 0x06DD, 0},
+ {CAT_So, 0x06DE, 0},
+ {CAT_Mn, 0x06DF, 5},
+ {CAT_Lm, 0x06E5, 1},
+ {CAT_Mn, 0x06E7, 1},
+ {CAT_So, 0x06E9, 0},
+ {CAT_Mn, 0x06EA, 3},
+ {CAT_Lo, 0x06EE, 1},
+ {CAT_Nd, 0x06F0, 9},
+ {CAT_Lo, 0x06FA, 2},
+ {CAT_So, 0x06FD, 1},
+ {CAT_Lo, 0x06FF, 0},
+ {CAT_Po, 0x0700, 13},
+ {CAT_Cf, 0x070F, 0},
+ {CAT_Lo, 0x0710, 0},
+ {CAT_Mn, 0x0711, 0},
+ {CAT_Lo, 0x0712, 29},
+ {CAT_Mn, 0x0730, 26},
+ {CAT_Lo, 0x074D, 88},
+ {CAT_Mn, 0x07A6, 10},
+ {CAT_Lo, 0x07B1, 0},
+ {CAT_Nd, 0x07C0, 9},
+ {CAT_Lo, 0x07CA, 32},
+ {CAT_Mn, 0x07EB, 8},
+ {CAT_Lm, 0x07F4, 1},
+ {CAT_So, 0x07F6, 0},
+ {CAT_Po, 0x07F7, 2},
+ {CAT_Lm, 0x07FA, 0},
+ {CAT_Lo, 0x0800, 21},
+ {CAT_Mn, 0x0816, 3},
+ {CAT_Lm, 0x081A, 0},
+ {CAT_Mn, 0x081B, 8},
+ {CAT_Lm, 0x0824, 0},
+ {CAT_Mn, 0x0825, 2},
+ {CAT_Lm, 0x0828, 0},
+ {CAT_Mn, 0x0829, 4},
+ {CAT_Po, 0x0830, 14},
+ {CAT_Lo, 0x0840, 24},
+ {CAT_Mn, 0x0859, 2},
+ {CAT_Po, 0x085E, 0},
+ {CAT_Lo, 0x0860, 10},
+ {CAT_Lo, 0x08A0, 20},
+ {CAT_Lo, 0x08B6, 7},
+ {CAT_Mn, 0x08D4, 13},
+ {CAT_Cf, 0x08E2, 0},
+ {CAT_Mn, 0x08E3, 31},
+ {CAT_Mc, 0x0903, 0},
+ {CAT_Lo, 0x0904, 53},
+ {CAT_Mn, 0x093A, 0},
+ {CAT_Mc, 0x093B, 0},
+ {CAT_Mn, 0x093C, 0},
+ {CAT_Lo, 0x093D, 0},
+ {CAT_Mc, 0x093E, 2},
+ {CAT_Mn, 0x0941, 7},
+ {CAT_Mc, 0x0949, 3},
+ {CAT_Mn, 0x094D, 0},
+ {CAT_Mc, 0x094E, 1},
+ {CAT_Lo, 0x0950, 0},
+ {CAT_Mn, 0x0951, 6},
+ {CAT_Lo, 0x0958, 9},
+ {CAT_Mn, 0x0962, 1},
+ {CAT_Po, 0x0964, 1},
+ {CAT_Nd, 0x0966, 9},
+ {CAT_Po, 0x0970, 0},
+ {CAT_Lm, 0x0971, 0},
+ {CAT_Lo, 0x0972, 14},
+ {CAT_Mn, 0x0981, 0},
+ {CAT_Mc, 0x0982, 1},
+ {CAT_Lo, 0x0985, 7},
+ {CAT_Lo, 0x098F, 1},
+ {CAT_Lo, 0x0993, 21},
+ {CAT_Lo, 0x09AA, 6},
+ {CAT_Lo, 0x09B2, 0},
+ {CAT_Lo, 0x09B6, 3},
+ {CAT_Mn, 0x09BC, 0},
+ {CAT_Lo, 0x09BD, 0},
+ {CAT_Mc, 0x09BE, 2},
+ {CAT_Mn, 0x09C1, 3},
+ {CAT_Mc, 0x09C7, 1},
+ {CAT_Mc, 0x09CB, 1},
+ {CAT_Mn, 0x09CD, 0},
+ {CAT_Lo, 0x09CE, 0},
+ {CAT_Mc, 0x09D7, 0},
+ {CAT_Lo, 0x09DC, 1},
+ {CAT_Lo, 0x09DF, 2},
+ {CAT_Mn, 0x09E2, 1},
+ {CAT_Nd, 0x09E6, 9},
+ {CAT_Lo, 0x09F0, 1},
+ {CAT_Sc, 0x09F2, 1},
+ {CAT_No, 0x09F4, 5},
+ {CAT_So, 0x09FA, 0},
+ {CAT_Sc, 0x09FB, 0},
+ {CAT_Lo, 0x09FC, 0},
+ {CAT_Po, 0x09FD, 0},
+ {CAT_Mn, 0x0A01, 1},
+ {CAT_Mc, 0x0A03, 0},
+ {CAT_Lo, 0x0A05, 5},
+ {CAT_Lo, 0x0A0F, 1},
+ {CAT_Lo, 0x0A13, 21},
+ {CAT_Lo, 0x0A2A, 6},
+ {CAT_Lo, 0x0A32, 1},
+ {CAT_Lo, 0x0A35, 1},
+ {CAT_Lo, 0x0A38, 1},
+ {CAT_Mn, 0x0A3C, 0},
+ {CAT_Mc, 0x0A3E, 2},
+ {CAT_Mn, 0x0A41, 1},
+ {CAT_Mn, 0x0A47, 1},
+ {CAT_Mn, 0x0A4B, 2},
+ {CAT_Mn, 0x0A51, 0},
+ {CAT_Lo, 0x0A59, 3},
+ {CAT_Lo, 0x0A5E, 0},
+ {CAT_Nd, 0x0A66, 9},
+ {CAT_Mn, 0x0A70, 1},
+ {CAT_Lo, 0x0A72, 2},
+ {CAT_Mn, 0x0A75, 0},
+ {CAT_Mn, 0x0A81, 1},
+ {CAT_Mc, 0x0A83, 0},
+ {CAT_Lo, 0x0A85, 8},
+ {CAT_Lo, 0x0A8F, 2},
+ {CAT_Lo, 0x0A93, 21},
+ {CAT_Lo, 0x0AAA, 6},
+ {CAT_Lo, 0x0AB2, 1},
+ {CAT_Lo, 0x0AB5, 4},
+ {CAT_Mn, 0x0ABC, 0},
+ {CAT_Lo, 0x0ABD, 0},
+ {CAT_Mc, 0x0ABE, 2},
+ {CAT_Mn, 0x0AC1, 4},
+ {CAT_Mn, 0x0AC7, 1},
+ {CAT_Mc, 0x0AC9, 0},
+ {CAT_Mc, 0x0ACB, 1},
+ {CAT_Mn, 0x0ACD, 0},
+ {CAT_Lo, 0x0AD0, 0},
+ {CAT_Lo, 0x0AE0, 1},
+ {CAT_Mn, 0x0AE2, 1},
+ {CAT_Nd, 0x0AE6, 9},
+ {CAT_Po, 0x0AF0, 0},
+ {CAT_Sc, 0x0AF1, 0},
+ {CAT_Lo, 0x0AF9, 0},
+ {CAT_Mn, 0x0AFA, 5},
+ {CAT_Mn, 0x0B01, 0},
+ {CAT_Mc, 0x0B02, 1},
+ {CAT_Lo, 0x0B05, 7},
+ {CAT_Lo, 0x0B0F, 1},
+ {CAT_Lo, 0x0B13, 21},
+ {CAT_Lo, 0x0B2A, 6},
+ {CAT_Lo, 0x0B32, 1},
+ {CAT_Lo, 0x0B35, 4},
+ {CAT_Mn, 0x0B3C, 0},
+ {CAT_Lo, 0x0B3D, 0},
+ {CAT_Mc, 0x0B3E, 0},
+ {CAT_Mn, 0x0B3F, 0},
+ {CAT_Mc, 0x0B40, 0},
+ {CAT_Mn, 0x0B41, 3},
+ {CAT_Mc, 0x0B47, 1},
+ {CAT_Mc, 0x0B4B, 1},
+ {CAT_Mn, 0x0B4D, 0},
+ {CAT_Mn, 0x0B56, 0},
+ {CAT_Mc, 0x0B57, 0},
+ {CAT_Lo, 0x0B5C, 1},
+ {CAT_Lo, 0x0B5F, 2},
+ {CAT_Mn, 0x0B62, 1},
+ {CAT_Nd, 0x0B66, 9},
+ {CAT_So, 0x0B70, 0},
+ {CAT_Lo, 0x0B71, 0},
+ {CAT_No, 0x0B72, 5},
+ {CAT_Mn, 0x0B82, 0},
+ {CAT_Lo, 0x0B83, 0},
+ {CAT_Lo, 0x0B85, 5},
+ {CAT_Lo, 0x0B8E, 2},
+ {CAT_Lo, 0x0B92, 3},
+ {CAT_Lo, 0x0B99, 1},
+ {CAT_Lo, 0x0B9C, 0},
+ {CAT_Lo, 0x0B9E, 1},
+ {CAT_Lo, 0x0BA3, 1},
+ {CAT_Lo, 0x0BA8, 2},
+ {CAT_Lo, 0x0BAE, 11},
+ {CAT_Mc, 0x0BBE, 1},
+ {CAT_Mn, 0x0BC0, 0},
+ {CAT_Mc, 0x0BC1, 1},
+ {CAT_Mc, 0x0BC6, 2},
+ {CAT_Mc, 0x0BCA, 2},
+ {CAT_Mn, 0x0BCD, 0},
+ {CAT_Lo, 0x0BD0, 0},
+ {CAT_Mc, 0x0BD7, 0},
+ {CAT_Nd, 0x0BE6, 9},
+ {CAT_No, 0x0BF0, 2},
+ {CAT_So, 0x0BF3, 5},
+ {CAT_Sc, 0x0BF9, 0},
+ {CAT_So, 0x0BFA, 0},
+ {CAT_Mn, 0x0C00, 0},
+ {CAT_Mc, 0x0C01, 2},
+ {CAT_Lo, 0x0C05, 7},
+ {CAT_Lo, 0x0C0E, 2},
+ {CAT_Lo, 0x0C12, 22},
+ {CAT_Lo, 0x0C2A, 15},
+ {CAT_Lo, 0x0C3D, 0},
+ {CAT_Mn, 0x0C3E, 2},
+ {CAT_Mc, 0x0C41, 3},
+ {CAT_Mn, 0x0C46, 2},
+ {CAT_Mn, 0x0C4A, 3},
+ {CAT_Mn, 0x0C55, 1},
+ {CAT_Lo, 0x0C58, 2},
+ {CAT_Lo, 0x0C60, 1},
+ {CAT_Mn, 0x0C62, 1},
+ {CAT_Nd, 0x0C66, 9},
+ {CAT_No, 0x0C78, 6},
+ {CAT_So, 0x0C7F, 0},
+ {CAT_Lo, 0x0C80, 0},
+ {CAT_Mn, 0x0C81, 0},
+ {CAT_Mc, 0x0C82, 1},
+ {CAT_Lo, 0x0C85, 7},
+ {CAT_Lo, 0x0C8E, 2},
+ {CAT_Lo, 0x0C92, 22},
+ {CAT_Lo, 0x0CAA, 9},
+ {CAT_Lo, 0x0CB5, 4},
+ {CAT_Mn, 0x0CBC, 0},
+ {CAT_Lo, 0x0CBD, 0},
+ {CAT_Mc, 0x0CBE, 0},
+ {CAT_Mn, 0x0CBF, 0},
+ {CAT_Mc, 0x0CC0, 4},
+ {CAT_Mn, 0x0CC6, 0},
+ {CAT_Mc, 0x0CC7, 1},
+ {CAT_Mc, 0x0CCA, 1},
+ {CAT_Mn, 0x0CCC, 1},
+ {CAT_Mc, 0x0CD5, 1},
+ {CAT_Lo, 0x0CDE, 0},
+ {CAT_Lo, 0x0CE0, 1},
+ {CAT_Mn, 0x0CE2, 1},
+ {CAT_Nd, 0x0CE6, 9},
+ {CAT_Lo, 0x0CF1, 1},
+ {CAT_Mn, 0x0D00, 1},
+ {CAT_Mc, 0x0D02, 1},
+ {CAT_Lo, 0x0D05, 7},
+ {CAT_Lo, 0x0D0E, 2},
+ {CAT_Lo, 0x0D12, 40},
+ {CAT_Mn, 0x0D3B, 1},
+ {CAT_Lo, 0x0D3D, 0},
+ {CAT_Mc, 0x0D3E, 2},
+ {CAT_Mn, 0x0D41, 3},
+ {CAT_Mc, 0x0D46, 2},
+ {CAT_Mc, 0x0D4A, 2},
+ {CAT_Mn, 0x0D4D, 0},
+ {CAT_Lo, 0x0D4E, 0},
+ {CAT_So, 0x0D4F, 0},
+ {CAT_Lo, 0x0D54, 2},
+ {CAT_Mc, 0x0D57, 0},
+ {CAT_No, 0x0D58, 6},
+ {CAT_Lo, 0x0D5F, 2},
+ {CAT_Mn, 0x0D62, 1},
+ {CAT_Nd, 0x0D66, 9},
+ {CAT_No, 0x0D70, 8},
+ {CAT_So, 0x0D79, 0},
+ {CAT_Lo, 0x0D7A, 5},
+ {CAT_Mc, 0x0D82, 1},
+ {CAT_Lo, 0x0D85, 17},
+ {CAT_Lo, 0x0D9A, 23},
+ {CAT_Lo, 0x0DB3, 8},
+ {CAT_Lo, 0x0DBD, 0},
+ {CAT_Lo, 0x0DC0, 6},
+ {CAT_Mn, 0x0DCA, 0},
+ {CAT_Mc, 0x0DCF, 2},
+ {CAT_Mn, 0x0DD2, 2},
+ {CAT_Mn, 0x0DD6, 0},
+ {CAT_Mc, 0x0DD8, 7},
+ {CAT_Nd, 0x0DE6, 9},
+ {CAT_Mc, 0x0DF2, 1},
+ {CAT_Po, 0x0DF4, 0},
+ {CAT_Lo, 0x0E01, 47},
+ {CAT_Mn, 0x0E31, 0},
+ {CAT_Lo, 0x0E32, 1},
+ {CAT_Mn, 0x0E34, 6},
+ {CAT_Sc, 0x0E3F, 0},
+ {CAT_Lo, 0x0E40, 5},
+ {CAT_Lm, 0x0E46, 0},
+ {CAT_Mn, 0x0E47, 7},
+ {CAT_Po, 0x0E4F, 0},
+ {CAT_Nd, 0x0E50, 9},
+ {CAT_Po, 0x0E5A, 1},
+ {CAT_Lo, 0x0E81, 1},
+ {CAT_Lo, 0x0E84, 0},
+ {CAT_Lo, 0x0E87, 1},
+ {CAT_Lo, 0x0E8A, 0},
+ {CAT_Lo, 0x0E8D, 0},
+ {CAT_Lo, 0x0E94, 3},
+ {CAT_Lo, 0x0E99, 6},
+ {CAT_Lo, 0x0EA1, 2},
+ {CAT_Lo, 0x0EA5, 0},
+ {CAT_Lo, 0x0EA7, 0},
+ {CAT_Lo, 0x0EAA, 1},
+ {CAT_Lo, 0x0EAD, 3},
+ {CAT_Mn, 0x0EB1, 0},
+ {CAT_Lo, 0x0EB2, 1},
+ {CAT_Mn, 0x0EB4, 5},
+ {CAT_Mn, 0x0EBB, 1},
+ {CAT_Lo, 0x0EBD, 0},
+ {CAT_Lo, 0x0EC0, 4},
+ {CAT_Lm, 0x0EC6, 0},
+ {CAT_Mn, 0x0EC8, 5},
+ {CAT_Nd, 0x0ED0, 9},
+ {CAT_Lo, 0x0EDC, 3},
+ {CAT_Lo, 0x0F00, 0},
+ {CAT_So, 0x0F01, 2},
+ {CAT_Po, 0x0F04, 14},
+ {CAT_So, 0x0F13, 0},
+ {CAT_Po, 0x0F14, 0},
+ {CAT_So, 0x0F15, 2},
+ {CAT_Mn, 0x0F18, 1},
+ {CAT_So, 0x0F1A, 5},
+ {CAT_Nd, 0x0F20, 9},
+ {CAT_No, 0x0F2A, 9},
+ {CAT_So, 0x0F34, 0},
+ {CAT_Mn, 0x0F35, 0},
+ {CAT_So, 0x0F36, 0},
+ {CAT_Mn, 0x0F37, 0},
+ {CAT_So, 0x0F38, 0},
+ {CAT_Mn, 0x0F39, 0},
+ {CAT_Ps, 0x0F3A, 0},
+ {CAT_Pe, 0x0F3B, 0},
+ {CAT_Ps, 0x0F3C, 0},
+ {CAT_Pe, 0x0F3D, 0},
+ {CAT_Mc, 0x0F3E, 1},
+ {CAT_Lo, 0x0F40, 7},
+ {CAT_Lo, 0x0F49, 35},
+ {CAT_Mn, 0x0F71, 13},
+ {CAT_Mc, 0x0F7F, 0},
+ {CAT_Mn, 0x0F80, 4},
+ {CAT_Po, 0x0F85, 0},
+ {CAT_Mn, 0x0F86, 1},
+ {CAT_Lo, 0x0F88, 4},
+ {CAT_Mn, 0x0F8D, 10},
+ {CAT_Mn, 0x0F99, 35},
+ {CAT_So, 0x0FBE, 7},
+ {CAT_Mn, 0x0FC6, 0},
+ {CAT_So, 0x0FC7, 5},
+ {CAT_So, 0x0FCE, 1},
+ {CAT_Po, 0x0FD0, 4},
+ {CAT_So, 0x0FD5, 3},
+ {CAT_Po, 0x0FD9, 1},
+ {CAT_Lo, 0x1000, 42},
+ {CAT_Mc, 0x102B, 1},
+ {CAT_Mn, 0x102D, 3},
+ {CAT_Mc, 0x1031, 0},
+ {CAT_Mn, 0x1032, 5},
+ {CAT_Mc, 0x1038, 0},
+ {CAT_Mn, 0x1039, 1},
+ {CAT_Mc, 0x103B, 1},
+ {CAT_Mn, 0x103D, 1},
+ {CAT_Lo, 0x103F, 0},
+ {CAT_Nd, 0x1040, 9},
+ {CAT_Po, 0x104A, 5},
+ {CAT_Lo, 0x1050, 5},
+ {CAT_Mc, 0x1056, 1},
+ {CAT_Mn, 0x1058, 1},
+ {CAT_Lo, 0x105A, 3},
+ {CAT_Mn, 0x105E, 2},
+ {CAT_Lo, 0x1061, 0},
+ {CAT_Mc, 0x1062, 2},
+ {CAT_Lo, 0x1065, 1},
+ {CAT_Mc, 0x1067, 6},
+ {CAT_Lo, 0x106E, 2},
+ {CAT_Mn, 0x1071, 3},
+ {CAT_Lo, 0x1075, 12},
+ {CAT_Mn, 0x1082, 0},
+ {CAT_Mc, 0x1083, 1},
+ {CAT_Mn, 0x1085, 1},
+ {CAT_Mc, 0x1087, 5},
+ {CAT_Mn, 0x108D, 0},
+ {CAT_Lo, 0x108E, 0},
+ {CAT_Mc, 0x108F, 0},
+ {CAT_Nd, 0x1090, 9},
+ {CAT_Mc, 0x109A, 2},
+ {CAT_Mn, 0x109D, 0},
+ {CAT_So, 0x109E, 1},
+ {CAT_LC, 0x10A0, 37},
+ {CAT_LC, 0x10C7, 0},
+ {CAT_LC, 0x10CD, 0},
+ {CAT_Lo, 0x10D0, 42},
+ {CAT_Po, 0x10FB, 0},
+ {CAT_Lm, 0x10FC, 0},
+ {CAT_Lo, 0x10FD, 331},
+ {CAT_Lo, 0x124A, 3},
+ {CAT_Lo, 0x1250, 6},
+ {CAT_Lo, 0x1258, 0},
+ {CAT_Lo, 0x125A, 3},
+ {CAT_Lo, 0x1260, 40},
+ {CAT_Lo, 0x128A, 3},
+ {CAT_Lo, 0x1290, 32},
+ {CAT_Lo, 0x12B2, 3},
+ {CAT_Lo, 0x12B8, 6},
+ {CAT_Lo, 0x12C0, 0},
+ {CAT_Lo, 0x12C2, 3},
+ {CAT_Lo, 0x12C8, 14},
+ {CAT_Lo, 0x12D8, 56},
+ {CAT_Lo, 0x1312, 3},
+ {CAT_Lo, 0x1318, 66},
+ {CAT_Mn, 0x135D, 2},
+ {CAT_Po, 0x1360, 8},
+ {CAT_No, 0x1369, 19},
+ {CAT_Lo, 0x1380, 15},
+ {CAT_So, 0x1390, 9},
+ {CAT_LC, 0x13A0, 85},
+ {CAT_LC, 0x13F8, 5},
+ {CAT_Pd, 0x1400, 0},
+ {CAT_Lo, 0x1401, 619},
+ {CAT_Po, 0x166D, 1},
+ {CAT_Lo, 0x166F, 16},
+ {CAT_Zs, 0x1680, 0},
+ {CAT_Lo, 0x1681, 25},
+ {CAT_Ps, 0x169B, 0},
+ {CAT_Pe, 0x169C, 0},
+ {CAT_Lo, 0x16A0, 74},
+ {CAT_Po, 0x16EB, 2},
+ {CAT_Nl, 0x16EE, 2},
+ {CAT_Lo, 0x16F1, 7},
+ {CAT_Lo, 0x1700, 12},
+ {CAT_Lo, 0x170E, 3},
+ {CAT_Mn, 0x1712, 2},
+ {CAT_Lo, 0x1720, 17},
+ {CAT_Mn, 0x1732, 2},
+ {CAT_Po, 0x1735, 1},
+ {CAT_Lo, 0x1740, 17},
+ {CAT_Mn, 0x1752, 1},
+ {CAT_Lo, 0x1760, 12},
+ {CAT_Lo, 0x176E, 2},
+ {CAT_Mn, 0x1772, 1},
+ {CAT_Lo, 0x1780, 51},
+ {CAT_Mn, 0x17B4, 1},
+ {CAT_Mc, 0x17B6, 0},
+ {CAT_Mn, 0x17B7, 6},
+ {CAT_Mc, 0x17BE, 7},
+ {CAT_Mn, 0x17C6, 0},
+ {CAT_Mc, 0x17C7, 1},
+ {CAT_Mn, 0x17C9, 10},
+ {CAT_Po, 0x17D4, 2},
+ {CAT_Lm, 0x17D7, 0},
+ {CAT_Po, 0x17D8, 2},
+ {CAT_Sc, 0x17DB, 0},
+ {CAT_Lo, 0x17DC, 0},
+ {CAT_Mn, 0x17DD, 0},
+ {CAT_Nd, 0x17E0, 9},
+ {CAT_No, 0x17F0, 9},
+ {CAT_Po, 0x1800, 5},
+ {CAT_Pd, 0x1806, 0},
+ {CAT_Po, 0x1807, 3},
+ {CAT_Mn, 0x180B, 2},
+ {CAT_Cf, 0x180E, 0},
+ {CAT_Nd, 0x1810, 9},
+ {CAT_Lo, 0x1820, 34},
+ {CAT_Lm, 0x1843, 0},
+ {CAT_Lo, 0x1844, 51},
+ {CAT_Lo, 0x1880, 4},
+ {CAT_Mn, 0x1885, 1},
+ {CAT_Lo, 0x1887, 33},
+ {CAT_Mn, 0x18A9, 0},
+ {CAT_Lo, 0x18AA, 0},
+ {CAT_Lo, 0x18B0, 69},
+ {CAT_Lo, 0x1900, 30},
+ {CAT_Mn, 0x1920, 2},
+ {CAT_Mc, 0x1923, 3},
+ {CAT_Mn, 0x1927, 1},
+ {CAT_Mc, 0x1929, 2},
+ {CAT_Mc, 0x1930, 1},
+ {CAT_Mn, 0x1932, 0},
+ {CAT_Mc, 0x1933, 5},
+ {CAT_Mn, 0x1939, 2},
+ {CAT_So, 0x1940, 0},
+ {CAT_Po, 0x1944, 1},
+ {CAT_Nd, 0x1946, 9},
+ {CAT_Lo, 0x1950, 29},
+ {CAT_Lo, 0x1970, 4},
+ {CAT_Lo, 0x1980, 43},
+ {CAT_Lo, 0x19B0, 25},
+ {CAT_Nd, 0x19D0, 9},
+ {CAT_No, 0x19DA, 0},
+ {CAT_So, 0x19DE, 33},
+ {CAT_Lo, 0x1A00, 22},
+ {CAT_Mn, 0x1A17, 1},
+ {CAT_Mc, 0x1A19, 1},
+ {CAT_Mn, 0x1A1B, 0},
+ {CAT_Po, 0x1A1E, 1},
+ {CAT_Lo, 0x1A20, 52},
+ {CAT_Mc, 0x1A55, 0},
+ {CAT_Mn, 0x1A56, 0},
+ {CAT_Mc, 0x1A57, 0},
+ {CAT_Mn, 0x1A58, 6},
+ {CAT_Mn, 0x1A60, 0},
+ {CAT_Mc, 0x1A61, 0},
+ {CAT_Mn, 0x1A62, 0},
+ {CAT_Mc, 0x1A63, 1},
+ {CAT_Mn, 0x1A65, 7},
+ {CAT_Mc, 0x1A6D, 5},
+ {CAT_Mn, 0x1A73, 9},
+ {CAT_Mn, 0x1A7F, 0},
+ {CAT_Nd, 0x1A80, 9},
+ {CAT_Nd, 0x1A90, 9},
+ {CAT_Po, 0x1AA0, 6},
+ {CAT_Lm, 0x1AA7, 0},
+ {CAT_Po, 0x1AA8, 5},
+ {CAT_Mn, 0x1AB0, 13},
+ {CAT_Me, 0x1ABE, 0},
+ {CAT_Mn, 0x1B00, 3},
+ {CAT_Mc, 0x1B04, 0},
+ {CAT_Lo, 0x1B05, 46},
+ {CAT_Mn, 0x1B34, 0},
+ {CAT_Mc, 0x1B35, 0},
+ {CAT_Mn, 0x1B36, 4},
+ {CAT_Mc, 0x1B3B, 0},
+ {CAT_Mn, 0x1B3C, 0},
+ {CAT_Mc, 0x1B3D, 4},
+ {CAT_Mn, 0x1B42, 0},
+ {CAT_Mc, 0x1B43, 1},
+ {CAT_Lo, 0x1B45, 6},
+ {CAT_Nd, 0x1B50, 9},
+ {CAT_Po, 0x1B5A, 6},
+ {CAT_So, 0x1B61, 9},
+ {CAT_Mn, 0x1B6B, 8},
+ {CAT_So, 0x1B74, 8},
+ {CAT_Mn, 0x1B80, 1},
+ {CAT_Mc, 0x1B82, 0},
+ {CAT_Lo, 0x1B83, 29},
+ {CAT_Mc, 0x1BA1, 0},
+ {CAT_Mn, 0x1BA2, 3},
+ {CAT_Mc, 0x1BA6, 1},
+ {CAT_Mn, 0x1BA8, 1},
+ {CAT_Mc, 0x1BAA, 0},
+ {CAT_Mn, 0x1BAB, 2},
+ {CAT_Lo, 0x1BAE, 1},
+ {CAT_Nd, 0x1BB0, 9},
+ {CAT_Lo, 0x1BBA, 43},
+ {CAT_Mn, 0x1BE6, 0},
+ {CAT_Mc, 0x1BE7, 0},
+ {CAT_Mn, 0x1BE8, 1},
+ {CAT_Mc, 0x1BEA, 2},
+ {CAT_Mn, 0x1BED, 0},
+ {CAT_Mc, 0x1BEE, 0},
+ {CAT_Mn, 0x1BEF, 2},
+ {CAT_Mc, 0x1BF2, 1},
+ {CAT_Po, 0x1BFC, 3},
+ {CAT_Lo, 0x1C00, 35},
+ {CAT_Mc, 0x1C24, 7},
+ {CAT_Mn, 0x1C2C, 7},
+ {CAT_Mc, 0x1C34, 1},
+ {CAT_Mn, 0x1C36, 1},
+ {CAT_Po, 0x1C3B, 4},
+ {CAT_Nd, 0x1C40, 9},
+ {CAT_Lo, 0x1C4D, 2},
+ {CAT_Nd, 0x1C50, 9},
+ {CAT_Lo, 0x1C5A, 29},
+ {CAT_Lm, 0x1C78, 5},
+ {CAT_Po, 0x1C7E, 1},
+ {CAT_LC, 0x1C80, 8},
+ {CAT_Po, 0x1CC0, 7},
+ {CAT_Mn, 0x1CD0, 2},
+ {CAT_Po, 0x1CD3, 0},
+ {CAT_Mn, 0x1CD4, 12},
+ {CAT_Mc, 0x1CE1, 0},
+ {CAT_Mn, 0x1CE2, 6},
+ {CAT_Lo, 0x1CE9, 3},
+ {CAT_Mn, 0x1CED, 0},
+ {CAT_Lo, 0x1CEE, 3},
+ {CAT_Mc, 0x1CF2, 1},
+ {CAT_Mn, 0x1CF4, 0},
+ {CAT_Lo, 0x1CF5, 1},
+ {CAT_Mc, 0x1CF7, 0},
+ {CAT_Mn, 0x1CF8, 1},
+ {CAT_Ll, 0x1D00, 43},
+ {CAT_Lm, 0x1D2C, 62},
+ {CAT_Ll, 0x1D6B, 12},
+ {CAT_Lm, 0x1D78, 0},
+ {CAT_LC, 0x1D79, 0},
+ {CAT_Ll, 0x1D7A, 2},
+ {CAT_LC, 0x1D7D, 0},
+ {CAT_Ll, 0x1D7E, 28},
+ {CAT_Lm, 0x1D9B, 36},
+ {CAT_Mn, 0x1DC0, 57},
+ {CAT_Mn, 0x1DFB, 4},
+ {CAT_LC, 0x1E00, 149},
+ {CAT_Ll, 0x1E96, 4},
+ {CAT_LC, 0x1E9B, 0},
+ {CAT_Ll, 0x1E9C, 1},
+ {CAT_LC, 0x1E9E, 0},
+ {CAT_Ll, 0x1E9F, 0},
+ {CAT_LC, 0x1EA0, 117},
+ {CAT_LC, 0x1F18, 5},
+ {CAT_LC, 0x1F20, 37},
+ {CAT_LC, 0x1F48, 5},
+ {CAT_Ll, 0x1F50, 0},
+ {CAT_LC, 0x1F51, 0},
+ {CAT_Ll, 0x1F52, 0},
+ {CAT_LC, 0x1F53, 0},
+ {CAT_Ll, 0x1F54, 0},
+ {CAT_LC, 0x1F55, 0},
+ {CAT_Ll, 0x1F56, 0},
+ {CAT_LC, 0x1F57, 0},
+ {CAT_LC, 0x1F59, 0},
+ {CAT_LC, 0x1F5B, 0},
+ {CAT_LC, 0x1F5D, 0},
+ {CAT_LC, 0x1F5F, 30},
+ {CAT_LC, 0x1F80, 7},
+ {CAT_Lt, 0x1F88, 7},
+ {CAT_LC, 0x1F90, 7},
+ {CAT_Lt, 0x1F98, 7},
+ {CAT_LC, 0x1FA0, 7},
+ {CAT_Lt, 0x1FA8, 7},
+ {CAT_LC, 0x1FB0, 1},
+ {CAT_Ll, 0x1FB2, 0},
+ {CAT_LC, 0x1FB3, 0},
+ {CAT_Ll, 0x1FB4, 0},
+ {CAT_Ll, 0x1FB6, 1},
+ {CAT_LC, 0x1FB8, 3},
+ {CAT_Lt, 0x1FBC, 0},
+ {CAT_Sk, 0x1FBD, 0},
+ {CAT_LC, 0x1FBE, 0},
+ {CAT_Sk, 0x1FBF, 2},
+ {CAT_Ll, 0x1FC2, 0},
+ {CAT_LC, 0x1FC3, 0},
+ {CAT_Ll, 0x1FC4, 0},
+ {CAT_Ll, 0x1FC6, 1},
+ {CAT_LC, 0x1FC8, 3},
+ {CAT_Lt, 0x1FCC, 0},
+ {CAT_Sk, 0x1FCD, 2},
+ {CAT_LC, 0x1FD0, 1},
+ {CAT_Ll, 0x1FD2, 1},
+ {CAT_Ll, 0x1FD6, 1},
+ {CAT_LC, 0x1FD8, 3},
+ {CAT_Sk, 0x1FDD, 2},
+ {CAT_LC, 0x1FE0, 1},
+ {CAT_Ll, 0x1FE2, 2},
+ {CAT_LC, 0x1FE5, 0},
+ {CAT_Ll, 0x1FE6, 1},
+ {CAT_LC, 0x1FE8, 4},
+ {CAT_Sk, 0x1FED, 2},
+ {CAT_Ll, 0x1FF2, 0},
+ {CAT_LC, 0x1FF3, 0},
+ {CAT_Ll, 0x1FF4, 0},
+ {CAT_Ll, 0x1FF6, 1},
+ {CAT_LC, 0x1FF8, 3},
+ {CAT_Lt, 0x1FFC, 0},
+ {CAT_Sk, 0x1FFD, 1},
+ {CAT_Zs, 0x2000, 10},
+ {CAT_Cf, 0x200B, 4},
+ {CAT_Pd, 0x2010, 5},
+ {CAT_Po, 0x2016, 1},
+ {CAT_Pi, 0x2018, 0},
+ {CAT_Pf, 0x2019, 0},
+ {CAT_Ps, 0x201A, 0},
+ {CAT_Pi, 0x201B, 1},
+ {CAT_Pf, 0x201D, 0},
+ {CAT_Ps, 0x201E, 0},
+ {CAT_Pi, 0x201F, 0},
+ {CAT_Po, 0x2020, 7},
+ {CAT_Zl, 0x2028, 0},
+ {CAT_Zp, 0x2029, 0},
+ {CAT_Cf, 0x202A, 4},
+ {CAT_Zs, 0x202F, 0},
+ {CAT_Po, 0x2030, 8},
+ {CAT_Pi, 0x2039, 0},
+ {CAT_Pf, 0x203A, 0},
+ {CAT_Po, 0x203B, 3},
+ {CAT_Pc, 0x203F, 1},
+ {CAT_Po, 0x2041, 2},
+ {CAT_Sm, 0x2044, 0},
+ {CAT_Ps, 0x2045, 0},
+ {CAT_Pe, 0x2046, 0},
+ {CAT_Po, 0x2047, 10},
+ {CAT_Sm, 0x2052, 0},
+ {CAT_Po, 0x2053, 0},
+ {CAT_Pc, 0x2054, 0},
+ {CAT_Po, 0x2055, 9},
+ {CAT_Zs, 0x205F, 0},
+ {CAT_Cf, 0x2060, 4},
+ {CAT_Cf, 0x2066, 9},
+ {CAT_No, 0x2070, 0},
+ {CAT_Lm, 0x2071, 0},
+ {CAT_No, 0x2074, 5},
+ {CAT_Sm, 0x207A, 2},
+ {CAT_Ps, 0x207D, 0},
+ {CAT_Pe, 0x207E, 0},
+ {CAT_Lm, 0x207F, 0},
+ {CAT_No, 0x2080, 9},
+ {CAT_Sm, 0x208A, 2},
+ {CAT_Ps, 0x208D, 0},
+ {CAT_Pe, 0x208E, 0},
+ {CAT_Lm, 0x2090, 12},
+ {CAT_Sc, 0x20A0, 31},
+ {CAT_Mn, 0x20D0, 12},
+ {CAT_Me, 0x20DD, 3},
+ {CAT_Mn, 0x20E1, 0},
+ {CAT_Me, 0x20E2, 2},
+ {CAT_Mn, 0x20E5, 11},
+ {CAT_So, 0x2100, 1},
+ {CAT_Lu, 0x2102, 0},
+ {CAT_So, 0x2103, 3},
+ {CAT_Lu, 0x2107, 0},
+ {CAT_So, 0x2108, 1},
+ {CAT_Ll, 0x210A, 0},
+ {CAT_Lu, 0x210B, 2},
+ {CAT_Ll, 0x210E, 1},
+ {CAT_Lu, 0x2110, 2},
+ {CAT_Ll, 0x2113, 0},
+ {CAT_So, 0x2114, 0},
+ {CAT_Lu, 0x2115, 0},
+ {CAT_So, 0x2116, 1},
+ {CAT_Sm, 0x2118, 0},
+ {CAT_Lu, 0x2119, 4},
+ {CAT_So, 0x211E, 5},
+ {CAT_Lu, 0x2124, 0},
+ {CAT_So, 0x2125, 0},
+ {CAT_LC, 0x2126, 0},
+ {CAT_So, 0x2127, 0},
+ {CAT_Lu, 0x2128, 0},
+ {CAT_So, 0x2129, 0},
+ {CAT_LC, 0x212A, 1},
+ {CAT_Lu, 0x212C, 1},
+ {CAT_So, 0x212E, 0},
+ {CAT_Ll, 0x212F, 0},
+ {CAT_Lu, 0x2130, 1},
+ {CAT_LC, 0x2132, 0},
+ {CAT_Lu, 0x2133, 0},
+ {CAT_Ll, 0x2134, 0},
+ {CAT_Lo, 0x2135, 3},
+ {CAT_Ll, 0x2139, 0},
+ {CAT_So, 0x213A, 1},
+ {CAT_Ll, 0x213C, 1},
+ {CAT_Lu, 0x213E, 1},
+ {CAT_Sm, 0x2140, 4},
+ {CAT_Lu, 0x2145, 0},
+ {CAT_Ll, 0x2146, 3},
+ {CAT_So, 0x214A, 0},
+ {CAT_Sm, 0x214B, 0},
+ {CAT_So, 0x214C, 1},
+ {CAT_LC, 0x214E, 0},
+ {CAT_So, 0x214F, 0},
+ {CAT_No, 0x2150, 15},
+ {CAT_Nl, 0x2160, 34},
+ {CAT_LC, 0x2183, 1},
+ {CAT_Nl, 0x2185, 3},
+ {CAT_No, 0x2189, 0},
+ {CAT_So, 0x218A, 1},
+ {CAT_Sm, 0x2190, 4},
+ {CAT_So, 0x2195, 4},
+ {CAT_Sm, 0x219A, 1},
+ {CAT_So, 0x219C, 3},
+ {CAT_Sm, 0x21A0, 0},
+ {CAT_So, 0x21A1, 1},
+ {CAT_Sm, 0x21A3, 0},
+ {CAT_So, 0x21A4, 1},
+ {CAT_Sm, 0x21A6, 0},
+ {CAT_So, 0x21A7, 6},
+ {CAT_Sm, 0x21AE, 0},
+ {CAT_So, 0x21AF, 30},
+ {CAT_Sm, 0x21CE, 1},
+ {CAT_So, 0x21D0, 1},
+ {CAT_Sm, 0x21D2, 0},
+ {CAT_So, 0x21D3, 0},
+ {CAT_Sm, 0x21D4, 0},
+ {CAT_So, 0x21D5, 30},
+ {CAT_Sm, 0x21F4, 267},
+ {CAT_So, 0x2300, 7},
+ {CAT_Ps, 0x2308, 0},
+ {CAT_Pe, 0x2309, 0},
+ {CAT_Ps, 0x230A, 0},
+ {CAT_Pe, 0x230B, 0},
+ {CAT_So, 0x230C, 19},
+ {CAT_Sm, 0x2320, 1},
+ {CAT_So, 0x2322, 6},
+ {CAT_Ps, 0x2329, 0},
+ {CAT_Pe, 0x232A, 0},
+ {CAT_So, 0x232B, 80},
+ {CAT_Sm, 0x237C, 0},
+ {CAT_So, 0x237D, 29},
+ {CAT_Sm, 0x239B, 24},
+ {CAT_So, 0x23B4, 39},
+ {CAT_Sm, 0x23DC, 5},
+ {CAT_So, 0x23E2, 68},
+ {CAT_So, 0x2440, 10},
+ {CAT_No, 0x2460, 59},
+ {CAT_So, 0x249C, 77},
+ {CAT_No, 0x24EA, 21},
+ {CAT_So, 0x2500, 182},
+ {CAT_Sm, 0x25B7, 0},
+ {CAT_So, 0x25B8, 8},
+ {CAT_Sm, 0x25C1, 0},
+ {CAT_So, 0x25C2, 53},
+ {CAT_Sm, 0x25F8, 7},
+ {CAT_So, 0x2600, 110},
+ {CAT_Sm, 0x266F, 0},
+ {CAT_So, 0x2670, 247},
+ {CAT_Ps, 0x2768, 0},
+ {CAT_Pe, 0x2769, 0},
+ {CAT_Ps, 0x276A, 0},
+ {CAT_Pe, 0x276B, 0},
+ {CAT_Ps, 0x276C, 0},
+ {CAT_Pe, 0x276D, 0},
+ {CAT_Ps, 0x276E, 0},
+ {CAT_Pe, 0x276F, 0},
+ {CAT_Ps, 0x2770, 0},
+ {CAT_Pe, 0x2771, 0},
+ {CAT_Ps, 0x2772, 0},
+ {CAT_Pe, 0x2773, 0},
+ {CAT_Ps, 0x2774, 0},
+ {CAT_Pe, 0x2775, 0},
+ {CAT_No, 0x2776, 29},
+ {CAT_So, 0x2794, 43},
+ {CAT_Sm, 0x27C0, 4},
+ {CAT_Ps, 0x27C5, 0},
+ {CAT_Pe, 0x27C6, 0},
+ {CAT_Sm, 0x27C7, 30},
+ {CAT_Ps, 0x27E6, 0},
+ {CAT_Pe, 0x27E7, 0},
+ {CAT_Ps, 0x27E8, 0},
+ {CAT_Pe, 0x27E9, 0},
+ {CAT_Ps, 0x27EA, 0},
+ {CAT_Pe, 0x27EB, 0},
+ {CAT_Ps, 0x27EC, 0},
+ {CAT_Pe, 0x27ED, 0},
+ {CAT_Ps, 0x27EE, 0},
+ {CAT_Pe, 0x27EF, 0},
+ {CAT_Sm, 0x27F0, 15},
+ {CAT_So, 0x2800, 255},
+ {CAT_Sm, 0x2900, 130},
+ {CAT_Ps, 0x2983, 0},
+ {CAT_Pe, 0x2984, 0},
+ {CAT_Ps, 0x2985, 0},
+ {CAT_Pe, 0x2986, 0},
+ {CAT_Ps, 0x2987, 0},
+ {CAT_Pe, 0x2988, 0},
+ {CAT_Ps, 0x2989, 0},
+ {CAT_Pe, 0x298A, 0},
+ {CAT_Ps, 0x298B, 0},
+ {CAT_Pe, 0x298C, 0},
+ {CAT_Ps, 0x298D, 0},
+ {CAT_Pe, 0x298E, 0},
+ {CAT_Ps, 0x298F, 0},
+ {CAT_Pe, 0x2990, 0},
+ {CAT_Ps, 0x2991, 0},
+ {CAT_Pe, 0x2992, 0},
+ {CAT_Ps, 0x2993, 0},
+ {CAT_Pe, 0x2994, 0},
+ {CAT_Ps, 0x2995, 0},
+ {CAT_Pe, 0x2996, 0},
+ {CAT_Ps, 0x2997, 0},
+ {CAT_Pe, 0x2998, 0},
+ {CAT_Sm, 0x2999, 62},
+ {CAT_Ps, 0x29D8, 0},
+ {CAT_Pe, 0x29D9, 0},
+ {CAT_Ps, 0x29DA, 0},
+ {CAT_Pe, 0x29DB, 0},
+ {CAT_Sm, 0x29DC, 31},
+ {CAT_Ps, 0x29FC, 0},
+ {CAT_Pe, 0x29FD, 0},
+ {CAT_Sm, 0x29FE, 257},
+ {CAT_So, 0x2B00, 47},
+ {CAT_Sm, 0x2B30, 20},
+ {CAT_So, 0x2B45, 1},
+ {CAT_Sm, 0x2B47, 5},
+ {CAT_So, 0x2B4D, 38},
+ {CAT_So, 0x2B76, 31},
+ {CAT_So, 0x2B98, 33},
+ {CAT_So, 0x2BBD, 11},
+ {CAT_So, 0x2BCA, 8},
+ {CAT_So, 0x2BEC, 3},
+ {CAT_LC, 0x2C00, 46},
+ {CAT_LC, 0x2C30, 46},
+ {CAT_LC, 0x2C60, 16},
+ {CAT_Ll, 0x2C71, 0},
+ {CAT_LC, 0x2C72, 1},
+ {CAT_Ll, 0x2C74, 0},
+ {CAT_LC, 0x2C75, 1},
+ {CAT_Ll, 0x2C77, 4},
+ {CAT_Lm, 0x2C7C, 1},
+ {CAT_LC, 0x2C7E, 101},
+ {CAT_Ll, 0x2CE4, 0},
+ {CAT_So, 0x2CE5, 5},
+ {CAT_LC, 0x2CEB, 3},
+ {CAT_Mn, 0x2CEF, 2},
+ {CAT_LC, 0x2CF2, 1},
+ {CAT_Po, 0x2CF9, 3},
+ {CAT_No, 0x2CFD, 0},
+ {CAT_Po, 0x2CFE, 1},
+ {CAT_LC, 0x2D00, 37},
+ {CAT_LC, 0x2D27, 0},
+ {CAT_LC, 0x2D2D, 0},
+ {CAT_Lo, 0x2D30, 55},
+ {CAT_Lm, 0x2D6F, 0},
+ {CAT_Po, 0x2D70, 0},
+ {CAT_Mn, 0x2D7F, 0},
+ {CAT_Lo, 0x2D80, 22},
+ {CAT_Lo, 0x2DA0, 6},
+ {CAT_Lo, 0x2DA8, 6},
+ {CAT_Lo, 0x2DB0, 6},
+ {CAT_Lo, 0x2DB8, 6},
+ {CAT_Lo, 0x2DC0, 6},
+ {CAT_Lo, 0x2DC8, 6},
+ {CAT_Lo, 0x2DD0, 6},
+ {CAT_Lo, 0x2DD8, 6},
+ {CAT_Mn, 0x2DE0, 31},
+ {CAT_Po, 0x2E00, 1},
+ {CAT_Pi, 0x2E02, 0},
+ {CAT_Pf, 0x2E03, 0},
+ {CAT_Pi, 0x2E04, 0},
+ {CAT_Pf, 0x2E05, 0},
+ {CAT_Po, 0x2E06, 2},
+ {CAT_Pi, 0x2E09, 0},
+ {CAT_Pf, 0x2E0A, 0},
+ {CAT_Po, 0x2E0B, 0},
+ {CAT_Pi, 0x2E0C, 0},
+ {CAT_Pf, 0x2E0D, 0},
+ {CAT_Po, 0x2E0E, 8},
+ {CAT_Pd, 0x2E17, 0},
+ {CAT_Po, 0x2E18, 1},
+ {CAT_Pd, 0x2E1A, 0},
+ {CAT_Po, 0x2E1B, 0},
+ {CAT_Pi, 0x2E1C, 0},
+ {CAT_Pf, 0x2E1D, 0},
+ {CAT_Po, 0x2E1E, 1},
+ {CAT_Pi, 0x2E20, 0},
+ {CAT_Pf, 0x2E21, 0},
+ {CAT_Ps, 0x2E22, 0},
+ {CAT_Pe, 0x2E23, 0},
+ {CAT_Ps, 0x2E24, 0},
+ {CAT_Pe, 0x2E25, 0},
+ {CAT_Ps, 0x2E26, 0},
+ {CAT_Pe, 0x2E27, 0},
+ {CAT_Ps, 0x2E28, 0},
+ {CAT_Pe, 0x2E29, 0},
+ {CAT_Po, 0x2E2A, 4},
+ {CAT_Lm, 0x2E2F, 0},
+ {CAT_Po, 0x2E30, 9},
+ {CAT_Pd, 0x2E3A, 1},
+ {CAT_Po, 0x2E3C, 3},
+ {CAT_Pd, 0x2E40, 0},
+ {CAT_Po, 0x2E41, 0},
+ {CAT_Ps, 0x2E42, 0},
+ {CAT_Po, 0x2E43, 6},
+ {CAT_So, 0x2E80, 25},
+ {CAT_So, 0x2E9B, 88},
+ {CAT_So, 0x2F00, 213},
+ {CAT_So, 0x2FF0, 11},
+ {CAT_Zs, 0x3000, 0},
+ {CAT_Po, 0x3001, 2},
+ {CAT_So, 0x3004, 0},
+ {CAT_Lm, 0x3005, 0},
+ {CAT_Lo, 0x3006, 0},
+ {CAT_Nl, 0x3007, 0},
+ {CAT_Ps, 0x3008, 0},
+ {CAT_Pe, 0x3009, 0},
+ {CAT_Ps, 0x300A, 0},
+ {CAT_Pe, 0x300B, 0},
+ {CAT_Ps, 0x300C, 0},
+ {CAT_Pe, 0x300D, 0},
+ {CAT_Ps, 0x300E, 0},
+ {CAT_Pe, 0x300F, 0},
+ {CAT_Ps, 0x3010, 0},
+ {CAT_Pe, 0x3011, 0},
+ {CAT_So, 0x3012, 1},
+ {CAT_Ps, 0x3014, 0},
+ {CAT_Pe, 0x3015, 0},
+ {CAT_Ps, 0x3016, 0},
+ {CAT_Pe, 0x3017, 0},
+ {CAT_Ps, 0x3018, 0},
+ {CAT_Pe, 0x3019, 0},
+ {CAT_Ps, 0x301A, 0},
+ {CAT_Pe, 0x301B, 0},
+ {CAT_Pd, 0x301C, 0},
+ {CAT_Ps, 0x301D, 0},
+ {CAT_Pe, 0x301E, 1},
+ {CAT_So, 0x3020, 0},
+ {CAT_Nl, 0x3021, 8},
+ {CAT_Mn, 0x302A, 3},
+ {CAT_Mc, 0x302E, 1},
+ {CAT_Pd, 0x3030, 0},
+ {CAT_Lm, 0x3031, 4},
+ {CAT_So, 0x3036, 1},
+ {CAT_Nl, 0x3038, 2},
+ {CAT_Lm, 0x303B, 0},
+ {CAT_Lo, 0x303C, 0},
+ {CAT_Po, 0x303D, 0},
+ {CAT_So, 0x303E, 1},
+ {CAT_Lo, 0x3041, 85},
+ {CAT_Mn, 0x3099, 1},
+ {CAT_Sk, 0x309B, 1},
+ {CAT_Lm, 0x309D, 1},
+ {CAT_Lo, 0x309F, 0},
+ {CAT_Pd, 0x30A0, 0},
+ {CAT_Lo, 0x30A1, 89},
+ {CAT_Po, 0x30FB, 0},
+ {CAT_Lm, 0x30FC, 2},
+ {CAT_Lo, 0x30FF, 0},
+ {CAT_Lo, 0x3105, 41},
+ {CAT_Lo, 0x3131, 93},
+ {CAT_So, 0x3190, 1},
+ {CAT_No, 0x3192, 3},
+ {CAT_So, 0x3196, 9},
+ {CAT_Lo, 0x31A0, 26},
+ {CAT_So, 0x31C0, 35},
+ {CAT_Lo, 0x31F0, 15},
+ {CAT_So, 0x3200, 30},
+ {CAT_No, 0x3220, 9},
+ {CAT_So, 0x322A, 29},
+ {CAT_No, 0x3248, 7},
+ {CAT_So, 0x3250, 0},
+ {CAT_No, 0x3251, 14},
+ {CAT_So, 0x3260, 31},
+ {CAT_No, 0x3280, 9},
+ {CAT_So, 0x328A, 38},
+ {CAT_No, 0x32B1, 14},
+ {CAT_So, 0x32C0, 62},
+ {CAT_So, 0x3300, 255},
+ {CAT_Lo, 0x3400, 6581},
+ {CAT_So, 0x4DC0, 63},
+ {CAT_Lo, 0x4E00, 20970},
+ {CAT_Lo, 0xA000, 20},
+ {CAT_Lm, 0xA015, 0},
+ {CAT_Lo, 0xA016, 1142},
+ {CAT_So, 0xA490, 54},
+ {CAT_Lo, 0xA4D0, 39},
+ {CAT_Lm, 0xA4F8, 5},
+ {CAT_Po, 0xA4FE, 1},
+ {CAT_Lo, 0xA500, 267},
+ {CAT_Lm, 0xA60C, 0},
+ {CAT_Po, 0xA60D, 2},
+ {CAT_Lo, 0xA610, 15},
+ {CAT_Nd, 0xA620, 9},
+ {CAT_Lo, 0xA62A, 1},
+ {CAT_LC, 0xA640, 45},
+ {CAT_Lo, 0xA66E, 0},
+ {CAT_Mn, 0xA66F, 0},
+ {CAT_Me, 0xA670, 2},
+ {CAT_Po, 0xA673, 0},
+ {CAT_Mn, 0xA674, 9},
+ {CAT_Po, 0xA67E, 0},
+ {CAT_Lm, 0xA67F, 0},
+ {CAT_LC, 0xA680, 27},
+ {CAT_Lm, 0xA69C, 1},
+ {CAT_Mn, 0xA69E, 1},
+ {CAT_Lo, 0xA6A0, 69},
+ {CAT_Nl, 0xA6E6, 9},
+ {CAT_Mn, 0xA6F0, 1},
+ {CAT_Po, 0xA6F2, 5},
+ {CAT_Sk, 0xA700, 22},
+ {CAT_Lm, 0xA717, 8},
+ {CAT_Sk, 0xA720, 1},
+ {CAT_LC, 0xA722, 13},
+ {CAT_Ll, 0xA730, 1},
+ {CAT_LC, 0xA732, 61},
+ {CAT_Lm, 0xA770, 0},
+ {CAT_Ll, 0xA771, 7},
+ {CAT_LC, 0xA779, 14},
+ {CAT_Lm, 0xA788, 0},
+ {CAT_Sk, 0xA789, 1},
+ {CAT_LC, 0xA78B, 2},
+ {CAT_Ll, 0xA78E, 0},
+ {CAT_Lo, 0xA78F, 0},
+ {CAT_LC, 0xA790, 3},
+ {CAT_Ll, 0xA794, 1},
+ {CAT_LC, 0xA796, 24},
+ {CAT_LC, 0xA7B0, 7},
+ {CAT_Lo, 0xA7F7, 0},
+ {CAT_Lm, 0xA7F8, 1},
+ {CAT_Ll, 0xA7FA, 0},
+ {CAT_Lo, 0xA7FB, 6},
+ {CAT_Mn, 0xA802, 0},
+ {CAT_Lo, 0xA803, 2},
+ {CAT_Mn, 0xA806, 0},
+ {CAT_Lo, 0xA807, 3},
+ {CAT_Mn, 0xA80B, 0},
+ {CAT_Lo, 0xA80C, 22},
+ {CAT_Mc, 0xA823, 1},
+ {CAT_Mn, 0xA825, 1},
+ {CAT_Mc, 0xA827, 0},
+ {CAT_So, 0xA828, 3},
+ {CAT_No, 0xA830, 5},
+ {CAT_So, 0xA836, 1},
+ {CAT_Sc, 0xA838, 0},
+ {CAT_So, 0xA839, 0},
+ {CAT_Lo, 0xA840, 51},
+ {CAT_Po, 0xA874, 3},
+ {CAT_Mc, 0xA880, 1},
+ {CAT_Lo, 0xA882, 49},
+ {CAT_Mc, 0xA8B4, 15},
+ {CAT_Mn, 0xA8C4, 1},
+ {CAT_Po, 0xA8CE, 1},
+ {CAT_Nd, 0xA8D0, 9},
+ {CAT_Mn, 0xA8E0, 17},
+ {CAT_Lo, 0xA8F2, 5},
+ {CAT_Po, 0xA8F8, 2},
+ {CAT_Lo, 0xA8FB, 0},
+ {CAT_Po, 0xA8FC, 0},
+ {CAT_Lo, 0xA8FD, 0},
+ {CAT_Nd, 0xA900, 9},
+ {CAT_Lo, 0xA90A, 27},
+ {CAT_Mn, 0xA926, 7},
+ {CAT_Po, 0xA92E, 1},
+ {CAT_Lo, 0xA930, 22},
+ {CAT_Mn, 0xA947, 10},
+ {CAT_Mc, 0xA952, 1},
+ {CAT_Po, 0xA95F, 0},
+ {CAT_Lo, 0xA960, 28},
+ {CAT_Mn, 0xA980, 2},
+ {CAT_Mc, 0xA983, 0},
+ {CAT_Lo, 0xA984, 46},
+ {CAT_Mn, 0xA9B3, 0},
+ {CAT_Mc, 0xA9B4, 1},
+ {CAT_Mn, 0xA9B6, 3},
+ {CAT_Mc, 0xA9BA, 1},
+ {CAT_Mn, 0xA9BC, 0},
+ {CAT_Mc, 0xA9BD, 3},
+ {CAT_Po, 0xA9C1, 12},
+ {CAT_Lm, 0xA9CF, 0},
+ {CAT_Nd, 0xA9D0, 9},
+ {CAT_Po, 0xA9DE, 1},
+ {CAT_Lo, 0xA9E0, 4},
+ {CAT_Mn, 0xA9E5, 0},
+ {CAT_Lm, 0xA9E6, 0},
+ {CAT_Lo, 0xA9E7, 8},
+ {CAT_Nd, 0xA9F0, 9},
+ {CAT_Lo, 0xA9FA, 4},
+ {CAT_Lo, 0xAA00, 40},
+ {CAT_Mn, 0xAA29, 5},
+ {CAT_Mc, 0xAA2F, 1},
+ {CAT_Mn, 0xAA31, 1},
+ {CAT_Mc, 0xAA33, 1},
+ {CAT_Mn, 0xAA35, 1},
+ {CAT_Lo, 0xAA40, 2},
+ {CAT_Mn, 0xAA43, 0},
+ {CAT_Lo, 0xAA44, 7},
+ {CAT_Mn, 0xAA4C, 0},
+ {CAT_Mc, 0xAA4D, 0},
+ {CAT_Nd, 0xAA50, 9},
+ {CAT_Po, 0xAA5C, 3},
+ {CAT_Lo, 0xAA60, 15},
+ {CAT_Lm, 0xAA70, 0},
+ {CAT_Lo, 0xAA71, 5},
+ {CAT_So, 0xAA77, 2},
+ {CAT_Lo, 0xAA7A, 0},
+ {CAT_Mc, 0xAA7B, 0},
+ {CAT_Mn, 0xAA7C, 0},
+ {CAT_Mc, 0xAA7D, 0},
+ {CAT_Lo, 0xAA7E, 49},
+ {CAT_Mn, 0xAAB0, 0},
+ {CAT_Lo, 0xAAB1, 0},
+ {CAT_Mn, 0xAAB2, 2},
+ {CAT_Lo, 0xAAB5, 1},
+ {CAT_Mn, 0xAAB7, 1},
+ {CAT_Lo, 0xAAB9, 4},
+ {CAT_Mn, 0xAABE, 1},
+ {CAT_Lo, 0xAAC0, 0},
+ {CAT_Mn, 0xAAC1, 0},
+ {CAT_Lo, 0xAAC2, 0},
+ {CAT_Lo, 0xAADB, 1},
+ {CAT_Lm, 0xAADD, 0},
+ {CAT_Po, 0xAADE, 1},
+ {CAT_Lo, 0xAAE0, 10},
+ {CAT_Mc, 0xAAEB, 0},
+ {CAT_Mn, 0xAAEC, 1},
+ {CAT_Mc, 0xAAEE, 1},
+ {CAT_Po, 0xAAF0, 1},
+ {CAT_Lo, 0xAAF2, 0},
+ {CAT_Lm, 0xAAF3, 1},
+ {CAT_Mc, 0xAAF5, 0},
+ {CAT_Mn, 0xAAF6, 0},
+ {CAT_Lo, 0xAB01, 5},
+ {CAT_Lo, 0xAB09, 5},
+ {CAT_Lo, 0xAB11, 5},
+ {CAT_Lo, 0xAB20, 6},
+ {CAT_Lo, 0xAB28, 6},
+ {CAT_Ll, 0xAB30, 34},
+ {CAT_LC, 0xAB53, 0},
+ {CAT_Ll, 0xAB54, 6},
+ {CAT_Sk, 0xAB5B, 0},
+ {CAT_Lm, 0xAB5C, 3},
+ {CAT_Ll, 0xAB60, 5},
+ {CAT_LC, 0xAB70, 79},
+ {CAT_Lo, 0xABC0, 34},
+ {CAT_Mc, 0xABE3, 1},
+ {CAT_Mn, 0xABE5, 0},
+ {CAT_Mc, 0xABE6, 1},
+ {CAT_Mn, 0xABE8, 0},
+ {CAT_Mc, 0xABE9, 1},
+ {CAT_Po, 0xABEB, 0},
+ {CAT_Mc, 0xABEC, 0},
+ {CAT_Mn, 0xABED, 0},
+ {CAT_Nd, 0xABF0, 9},
+ {CAT_Lo, 0xAC00, 11171},
+ {CAT_Lo, 0xD7B0, 22},
+ {CAT_Lo, 0xD7CB, 48},
+ {CAT_Cs, 0xD800, 2047},
+ {CAT_Lo, 0xF900, 365},
+ {CAT_Lo, 0xFA70, 105},
+ {CAT_Ll, 0xFB00, 6},
+ {CAT_Ll, 0xFB13, 4},
+ {CAT_Lo, 0xFB1D, 0},
+ {CAT_Mn, 0xFB1E, 0},
+ {CAT_Lo, 0xFB1F, 9},
+ {CAT_Sm, 0xFB29, 0},
+ {CAT_Lo, 0xFB2A, 12},
+ {CAT_Lo, 0xFB38, 4},
+ {CAT_Lo, 0xFB3E, 0},
+ {CAT_Lo, 0xFB40, 1},
+ {CAT_Lo, 0xFB43, 1},
+ {CAT_Lo, 0xFB46, 107},
+ {CAT_Sk, 0xFBB2, 15},
+ {CAT_Lo, 0xFBD3, 362},
+ {CAT_Pe, 0xFD3E, 0},
+ {CAT_Ps, 0xFD3F, 0},
+ {CAT_Lo, 0xFD50, 63},
+ {CAT_Lo, 0xFD92, 53},
+ {CAT_Lo, 0xFDF0, 11},
+ {CAT_Sc, 0xFDFC, 0},
+ {CAT_So, 0xFDFD, 0},
+ {CAT_Mn, 0xFE00, 15},
+ {CAT_Po, 0xFE10, 6},
+ {CAT_Ps, 0xFE17, 0},
+ {CAT_Pe, 0xFE18, 0},
+ {CAT_Po, 0xFE19, 0},
+ {CAT_Mn, 0xFE20, 15},
+ {CAT_Po, 0xFE30, 0},
+ {CAT_Pd, 0xFE31, 1},
+ {CAT_Pc, 0xFE33, 1},
+ {CAT_Ps, 0xFE35, 0},
+ {CAT_Pe, 0xFE36, 0},
+ {CAT_Ps, 0xFE37, 0},
+ {CAT_Pe, 0xFE38, 0},
+ {CAT_Ps, 0xFE39, 0},
+ {CAT_Pe, 0xFE3A, 0},
+ {CAT_Ps, 0xFE3B, 0},
+ {CAT_Pe, 0xFE3C, 0},
+ {CAT_Ps, 0xFE3D, 0},
+ {CAT_Pe, 0xFE3E, 0},
+ {CAT_Ps, 0xFE3F, 0},
+ {CAT_Pe, 0xFE40, 0},
+ {CAT_Ps, 0xFE41, 0},
+ {CAT_Pe, 0xFE42, 0},
+ {CAT_Ps, 0xFE43, 0},
+ {CAT_Pe, 0xFE44, 0},
+ {CAT_Po, 0xFE45, 1},
+ {CAT_Ps, 0xFE47, 0},
+ {CAT_Pe, 0xFE48, 0},
+ {CAT_Po, 0xFE49, 3},
+ {CAT_Pc, 0xFE4D, 2},
+ {CAT_Po, 0xFE50, 2},
+ {CAT_Po, 0xFE54, 3},
+ {CAT_Pd, 0xFE58, 0},
+ {CAT_Ps, 0xFE59, 0},
+ {CAT_Pe, 0xFE5A, 0},
+ {CAT_Ps, 0xFE5B, 0},
+ {CAT_Pe, 0xFE5C, 0},
+ {CAT_Ps, 0xFE5D, 0},
+ {CAT_Pe, 0xFE5E, 0},
+ {CAT_Po, 0xFE5F, 2},
+ {CAT_Sm, 0xFE62, 0},
+ {CAT_Pd, 0xFE63, 0},
+ {CAT_Sm, 0xFE64, 2},
+ {CAT_Po, 0xFE68, 0},
+ {CAT_Sc, 0xFE69, 0},
+ {CAT_Po, 0xFE6A, 1},
+ {CAT_Lo, 0xFE70, 4},
+ {CAT_Lo, 0xFE76, 134},
+ {CAT_Cf, 0xFEFF, 0},
+ {CAT_Po, 0xFF01, 2},
+ {CAT_Sc, 0xFF04, 0},
+ {CAT_Po, 0xFF05, 2},
+ {CAT_Ps, 0xFF08, 0},
+ {CAT_Pe, 0xFF09, 0},
+ {CAT_Po, 0xFF0A, 0},
+ {CAT_Sm, 0xFF0B, 0},
+ {CAT_Po, 0xFF0C, 0},
+ {CAT_Pd, 0xFF0D, 0},
+ {CAT_Po, 0xFF0E, 1},
+ {CAT_Nd, 0xFF10, 9},
+ {CAT_Po, 0xFF1A, 1},
+ {CAT_Sm, 0xFF1C, 2},
+ {CAT_Po, 0xFF1F, 1},
+ {CAT_LC, 0xFF21, 25},
+ {CAT_Ps, 0xFF3B, 0},
+ {CAT_Po, 0xFF3C, 0},
+ {CAT_Pe, 0xFF3D, 0},
+ {CAT_Sk, 0xFF3E, 0},
+ {CAT_Pc, 0xFF3F, 0},
+ {CAT_Sk, 0xFF40, 0},
+ {CAT_LC, 0xFF41, 25},
+ {CAT_Ps, 0xFF5B, 0},
+ {CAT_Sm, 0xFF5C, 0},
+ {CAT_Pe, 0xFF5D, 0},
+ {CAT_Sm, 0xFF5E, 0},
+ {CAT_Ps, 0xFF5F, 0},
+ {CAT_Pe, 0xFF60, 0},
+ {CAT_Po, 0xFF61, 0},
+ {CAT_Ps, 0xFF62, 0},
+ {CAT_Pe, 0xFF63, 0},
+ {CAT_Po, 0xFF64, 1},
+ {CAT_Lo, 0xFF66, 9},
+ {CAT_Lm, 0xFF70, 0},
+ {CAT_Lo, 0xFF71, 44},
+ {CAT_Lm, 0xFF9E, 1},
+ {CAT_Lo, 0xFFA0, 30},
+ {CAT_Lo, 0xFFC2, 5},
+ {CAT_Lo, 0xFFCA, 5},
+ {CAT_Lo, 0xFFD2, 5},
+ {CAT_Lo, 0xFFDA, 2},
+ {CAT_Sc, 0xFFE0, 1},
+ {CAT_Sm, 0xFFE2, 0},
+ {CAT_Sk, 0xFFE3, 0},
+ {CAT_So, 0xFFE4, 0},
+ {CAT_Sc, 0xFFE5, 1},
+ {CAT_So, 0xFFE8, 0},
+ {CAT_Sm, 0xFFE9, 3},
+ {CAT_So, 0xFFED, 1},
+ {CAT_Cf, 0xFFF9, 2},
+ {CAT_So, 0xFFFC, 1},
+ {CAT_Lo, 0x10000, 11},
+ {CAT_Lo, 0x1000D, 25},
+ {CAT_Lo, 0x10028, 18},
+ {CAT_Lo, 0x1003C, 1},
+ {CAT_Lo, 0x1003F, 14},
+ {CAT_Lo, 0x10050, 13},
+ {CAT_Lo, 0x10080, 122},
+ {CAT_Po, 0x10100, 2},
+ {CAT_No, 0x10107, 44},
+ {CAT_So, 0x10137, 8},
+ {CAT_Nl, 0x10140, 52},
+ {CAT_No, 0x10175, 3},
+ {CAT_So, 0x10179, 16},
+ {CAT_No, 0x1018A, 1},
+ {CAT_So, 0x1018C, 2},
+ {CAT_So, 0x10190, 11},
+ {CAT_So, 0x101A0, 0},
+ {CAT_So, 0x101D0, 44},
+ {CAT_Mn, 0x101FD, 0},
+ {CAT_Lo, 0x10280, 28},
+ {CAT_Lo, 0x102A0, 48},
+ {CAT_Mn, 0x102E0, 0},
+ {CAT_No, 0x102E1, 26},
+ {CAT_Lo, 0x10300, 31},
+ {CAT_No, 0x10320, 3},
+ {CAT_Lo, 0x1032D, 19},
+ {CAT_Nl, 0x10341, 0},
+ {CAT_Lo, 0x10342, 7},
+ {CAT_Nl, 0x1034A, 0},
+ {CAT_Lo, 0x10350, 37},
+ {CAT_Mn, 0x10376, 4},
+ {CAT_Lo, 0x10380, 29},
+ {CAT_Po, 0x1039F, 0},
+ {CAT_Lo, 0x103A0, 35},
+ {CAT_Lo, 0x103C8, 7},
+ {CAT_Po, 0x103D0, 0},
+ {CAT_Nl, 0x103D1, 4},
+ {CAT_LC, 0x10400, 79},
+ {CAT_Lo, 0x10450, 77},
+ {CAT_Nd, 0x104A0, 9},
+ {CAT_LC, 0x104B0, 35},
+ {CAT_LC, 0x104D8, 35},
+ {CAT_Lo, 0x10500, 39},
+ {CAT_Lo, 0x10530, 51},
+ {CAT_Po, 0x1056F, 0},
+ {CAT_Lo, 0x10600, 310},
+ {CAT_Lo, 0x10740, 21},
+ {CAT_Lo, 0x10760, 7},
+ {CAT_Lo, 0x10800, 5},
+ {CAT_Lo, 0x10808, 0},
+ {CAT_Lo, 0x1080A, 43},
+ {CAT_Lo, 0x10837, 1},
+ {CAT_Lo, 0x1083C, 0},
+ {CAT_Lo, 0x1083F, 22},
+ {CAT_Po, 0x10857, 0},
+ {CAT_No, 0x10858, 7},
+ {CAT_Lo, 0x10860, 22},
+ {CAT_So, 0x10877, 1},
+ {CAT_No, 0x10879, 6},
+ {CAT_Lo, 0x10880, 30},
+ {CAT_No, 0x108A7, 8},
+ {CAT_Lo, 0x108E0, 18},
+ {CAT_Lo, 0x108F4, 1},
+ {CAT_No, 0x108FB, 4},
+ {CAT_Lo, 0x10900, 21},
+ {CAT_No, 0x10916, 5},
+ {CAT_Po, 0x1091F, 0},
+ {CAT_Lo, 0x10920, 25},
+ {CAT_Po, 0x1093F, 0},
+ {CAT_Lo, 0x10980, 55},
+ {CAT_No, 0x109BC, 1},
+ {CAT_Lo, 0x109BE, 1},
+ {CAT_No, 0x109C0, 15},
+ {CAT_No, 0x109D2, 45},
+ {CAT_Lo, 0x10A00, 0},
+ {CAT_Mn, 0x10A01, 2},
+ {CAT_Mn, 0x10A05, 1},
+ {CAT_Mn, 0x10A0C, 3},
+ {CAT_Lo, 0x10A10, 3},
+ {CAT_Lo, 0x10A15, 2},
+ {CAT_Lo, 0x10A19, 26},
+ {CAT_Mn, 0x10A38, 2},
+ {CAT_Mn, 0x10A3F, 0},
+ {CAT_No, 0x10A40, 7},
+ {CAT_Po, 0x10A50, 8},
+ {CAT_Lo, 0x10A60, 28},
+ {CAT_No, 0x10A7D, 1},
+ {CAT_Po, 0x10A7F, 0},
+ {CAT_Lo, 0x10A80, 28},
+ {CAT_No, 0x10A9D, 2},
+ {CAT_Lo, 0x10AC0, 7},
+ {CAT_So, 0x10AC8, 0},
+ {CAT_Lo, 0x10AC9, 27},
+ {CAT_Mn, 0x10AE5, 1},
+ {CAT_No, 0x10AEB, 4},
+ {CAT_Po, 0x10AF0, 6},
+ {CAT_Lo, 0x10B00, 53},
+ {CAT_Po, 0x10B39, 6},
+ {CAT_Lo, 0x10B40, 21},
+ {CAT_No, 0x10B58, 7},
+ {CAT_Lo, 0x10B60, 18},
+ {CAT_No, 0x10B78, 7},
+ {CAT_Lo, 0x10B80, 17},
+ {CAT_Po, 0x10B99, 3},
+ {CAT_No, 0x10BA9, 6},
+ {CAT_Lo, 0x10C00, 72},
+ {CAT_LC, 0x10C80, 50},
+ {CAT_LC, 0x10CC0, 50},
+ {CAT_No, 0x10CFA, 5},
+ {CAT_No, 0x10E60, 30},
+ {CAT_Mc, 0x11000, 0},
+ {CAT_Mn, 0x11001, 0},
+ {CAT_Mc, 0x11002, 0},
+ {CAT_Lo, 0x11003, 52},
+ {CAT_Mn, 0x11038, 14},
+ {CAT_Po, 0x11047, 6},
+ {CAT_No, 0x11052, 19},
+ {CAT_Nd, 0x11066, 9},
+ {CAT_Mn, 0x1107F, 2},
+ {CAT_Mc, 0x11082, 0},
+ {CAT_Lo, 0x11083, 44},
+ {CAT_Mc, 0x110B0, 2},
+ {CAT_Mn, 0x110B3, 3},
+ {CAT_Mc, 0x110B7, 1},
+ {CAT_Mn, 0x110B9, 1},
+ {CAT_Po, 0x110BB, 1},
+ {CAT_Cf, 0x110BD, 0},
+ {CAT_Po, 0x110BE, 3},
+ {CAT_Lo, 0x110D0, 24},
+ {CAT_Nd, 0x110F0, 9},
+ {CAT_Mn, 0x11100, 2},
+ {CAT_Lo, 0x11103, 35},
+ {CAT_Mn, 0x11127, 4},
+ {CAT_Mc, 0x1112C, 0},
+ {CAT_Mn, 0x1112D, 7},
+ {CAT_Nd, 0x11136, 9},
+ {CAT_Po, 0x11140, 3},
+ {CAT_Lo, 0x11150, 34},
+ {CAT_Mn, 0x11173, 0},
+ {CAT_Po, 0x11174, 1},
+ {CAT_Lo, 0x11176, 0},
+ {CAT_Mn, 0x11180, 1},
+ {CAT_Mc, 0x11182, 0},
+ {CAT_Lo, 0x11183, 47},
+ {CAT_Mc, 0x111B3, 2},
+ {CAT_Mn, 0x111B6, 8},
+ {CAT_Mc, 0x111BF, 1},
+ {CAT_Lo, 0x111C1, 3},
+ {CAT_Po, 0x111C5, 4},
+ {CAT_Mn, 0x111CA, 2},
+ {CAT_Po, 0x111CD, 0},
+ {CAT_Nd, 0x111D0, 9},
+ {CAT_Lo, 0x111DA, 0},
+ {CAT_Po, 0x111DB, 0},
+ {CAT_Lo, 0x111DC, 0},
+ {CAT_Po, 0x111DD, 2},
+ {CAT_No, 0x111E1, 19},
+ {CAT_Lo, 0x11200, 17},
+ {CAT_Lo, 0x11213, 24},
+ {CAT_Mc, 0x1122C, 2},
+ {CAT_Mn, 0x1122F, 2},
+ {CAT_Mc, 0x11232, 1},
+ {CAT_Mn, 0x11234, 0},
+ {CAT_Mc, 0x11235, 0},
+ {CAT_Mn, 0x11236, 1},
+ {CAT_Po, 0x11238, 5},
+ {CAT_Mn, 0x1123E, 0},
+ {CAT_Lo, 0x11280, 6},
+ {CAT_Lo, 0x11288, 0},
+ {CAT_Lo, 0x1128A, 3},
+ {CAT_Lo, 0x1128F, 14},
+ {CAT_Lo, 0x1129F, 9},
+ {CAT_Po, 0x112A9, 0},
+ {CAT_Lo, 0x112B0, 46},
+ {CAT_Mn, 0x112DF, 0},
+ {CAT_Mc, 0x112E0, 2},
+ {CAT_Mn, 0x112E3, 7},
+ {CAT_Nd, 0x112F0, 9},
+ {CAT_Mn, 0x11300, 1},
+ {CAT_Mc, 0x11302, 1},
+ {CAT_Lo, 0x11305, 7},
+ {CAT_Lo, 0x1130F, 1},
+ {CAT_Lo, 0x11313, 21},
+ {CAT_Lo, 0x1132A, 6},
+ {CAT_Lo, 0x11332, 1},
+ {CAT_Lo, 0x11335, 4},
+ {CAT_Mn, 0x1133C, 0},
+ {CAT_Lo, 0x1133D, 0},
+ {CAT_Mc, 0x1133E, 1},
+ {CAT_Mn, 0x11340, 0},
+ {CAT_Mc, 0x11341, 3},
+ {CAT_Mc, 0x11347, 1},
+ {CAT_Mc, 0x1134B, 2},
+ {CAT_Lo, 0x11350, 0},
+ {CAT_Mc, 0x11357, 0},
+ {CAT_Lo, 0x1135D, 4},
+ {CAT_Mc, 0x11362, 1},
+ {CAT_Mn, 0x11366, 6},
+ {CAT_Mn, 0x11370, 4},
+ {CAT_Lo, 0x11400, 52},
+ {CAT_Mc, 0x11435, 2},
+ {CAT_Mn, 0x11438, 7},
+ {CAT_Mc, 0x11440, 1},
+ {CAT_Mn, 0x11442, 2},
+ {CAT_Mc, 0x11445, 0},
+ {CAT_Mn, 0x11446, 0},
+ {CAT_Lo, 0x11447, 3},
+ {CAT_Po, 0x1144B, 4},
+ {CAT_Nd, 0x11450, 9},
+ {CAT_Po, 0x1145B, 0},
+ {CAT_Po, 0x1145D, 0},
+ {CAT_Lo, 0x11480, 47},
+ {CAT_Mc, 0x114B0, 2},
+ {CAT_Mn, 0x114B3, 5},
+ {CAT_Mc, 0x114B9, 0},
+ {CAT_Mn, 0x114BA, 0},
+ {CAT_Mc, 0x114BB, 3},
+ {CAT_Mn, 0x114BF, 1},
+ {CAT_Mc, 0x114C1, 0},
+ {CAT_Mn, 0x114C2, 1},
+ {CAT_Lo, 0x114C4, 1},
+ {CAT_Po, 0x114C6, 0},
+ {CAT_Lo, 0x114C7, 0},
+ {CAT_Nd, 0x114D0, 9},
+ {CAT_Lo, 0x11580, 46},
+ {CAT_Mc, 0x115AF, 2},
+ {CAT_Mn, 0x115B2, 3},
+ {CAT_Mc, 0x115B8, 3},
+ {CAT_Mn, 0x115BC, 1},
+ {CAT_Mc, 0x115BE, 0},
+ {CAT_Mn, 0x115BF, 1},
+ {CAT_Po, 0x115C1, 22},
+ {CAT_Lo, 0x115D8, 3},
+ {CAT_Mn, 0x115DC, 1},
+ {CAT_Lo, 0x11600, 47},
+ {CAT_Mc, 0x11630, 2},
+ {CAT_Mn, 0x11633, 7},
+ {CAT_Mc, 0x1163B, 1},
+ {CAT_Mn, 0x1163D, 0},
+ {CAT_Mc, 0x1163E, 0},
+ {CAT_Mn, 0x1163F, 1},
+ {CAT_Po, 0x11641, 2},
+ {CAT_Lo, 0x11644, 0},
+ {CAT_Nd, 0x11650, 9},
+ {CAT_Po, 0x11660, 12},
+ {CAT_Lo, 0x11680, 42},
+ {CAT_Mn, 0x116AB, 0},
+ {CAT_Mc, 0x116AC, 0},
+ {CAT_Mn, 0x116AD, 0},
+ {CAT_Mc, 0x116AE, 1},
+ {CAT_Mn, 0x116B0, 5},
+ {CAT_Mc, 0x116B6, 0},
+ {CAT_Mn, 0x116B7, 0},
+ {CAT_Nd, 0x116C0, 9},
+ {CAT_Lo, 0x11700, 25},
+ {CAT_Mn, 0x1171D, 2},
+ {CAT_Mc, 0x11720, 1},
+ {CAT_Mn, 0x11722, 3},
+ {CAT_Mc, 0x11726, 0},
+ {CAT_Mn, 0x11727, 4},
+ {CAT_Nd, 0x11730, 9},
+ {CAT_No, 0x1173A, 1},
+ {CAT_Po, 0x1173C, 2},
+ {CAT_So, 0x1173F, 0},
+ {CAT_LC, 0x118A0, 63},
+ {CAT_Nd, 0x118E0, 9},
+ {CAT_No, 0x118EA, 8},
+ {CAT_Lo, 0x118FF, 0},
+ {CAT_Lo, 0x11A00, 0},
+ {CAT_Mn, 0x11A01, 5},
+ {CAT_Mc, 0x11A07, 1},
+ {CAT_Mn, 0x11A09, 1},
+ {CAT_Lo, 0x11A0B, 39},
+ {CAT_Mn, 0x11A33, 5},
+ {CAT_Mc, 0x11A39, 0},
+ {CAT_Lo, 0x11A3A, 0},
+ {CAT_Mn, 0x11A3B, 3},
+ {CAT_Po, 0x11A3F, 7},
+ {CAT_Mn, 0x11A47, 0},
+ {CAT_Lo, 0x11A50, 0},
+ {CAT_Mn, 0x11A51, 5},
+ {CAT_Mc, 0x11A57, 1},
+ {CAT_Mn, 0x11A59, 2},
+ {CAT_Lo, 0x11A5C, 39},
+ {CAT_Lo, 0x11A86, 3},
+ {CAT_Mn, 0x11A8A, 12},
+ {CAT_Mc, 0x11A97, 0},
+ {CAT_Mn, 0x11A98, 1},
+ {CAT_Po, 0x11A9A, 2},
+ {CAT_Po, 0x11A9E, 4},
+ {CAT_Lo, 0x11AC0, 56},
+ {CAT_Lo, 0x11C00, 8},
+ {CAT_Lo, 0x11C0A, 36},
+ {CAT_Mc, 0x11C2F, 0},
+ {CAT_Mn, 0x11C30, 6},
+ {CAT_Mn, 0x11C38, 5},
+ {CAT_Mc, 0x11C3E, 0},
+ {CAT_Mn, 0x11C3F, 0},
+ {CAT_Lo, 0x11C40, 0},
+ {CAT_Po, 0x11C41, 4},
+ {CAT_Nd, 0x11C50, 9},
+ {CAT_No, 0x11C5A, 18},
+ {CAT_Po, 0x11C70, 1},
+ {CAT_Lo, 0x11C72, 29},
+ {CAT_Mn, 0x11C92, 21},
+ {CAT_Mc, 0x11CA9, 0},
+ {CAT_Mn, 0x11CAA, 6},
+ {CAT_Mc, 0x11CB1, 0},
+ {CAT_Mn, 0x11CB2, 1},
+ {CAT_Mc, 0x11CB4, 0},
+ {CAT_Mn, 0x11CB5, 1},
+ {CAT_Lo, 0x11D00, 6},
+ {CAT_Lo, 0x11D08, 1},
+ {CAT_Lo, 0x11D0B, 37},
+ {CAT_Mn, 0x11D31, 5},
+ {CAT_Mn, 0x11D3A, 0},
+ {CAT_Mn, 0x11D3C, 1},
+ {CAT_Mn, 0x11D3F, 6},
+ {CAT_Lo, 0x11D46, 0},
+ {CAT_Mn, 0x11D47, 0},
+ {CAT_Nd, 0x11D50, 9},
+ {CAT_Lo, 0x12000, 921},
+ {CAT_Nl, 0x12400, 110},
+ {CAT_Po, 0x12470, 4},
+ {CAT_Lo, 0x12480, 195},
+ {CAT_Lo, 0x13000, 1070},
+ {CAT_Lo, 0x14400, 582},
+ {CAT_Lo, 0x16800, 568},
+ {CAT_Lo, 0x16A40, 30},
+ {CAT_Nd, 0x16A60, 9},
+ {CAT_Po, 0x16A6E, 1},
+ {CAT_Lo, 0x16AD0, 29},
+ {CAT_Mn, 0x16AF0, 4},
+ {CAT_Po, 0x16AF5, 0},
+ {CAT_Lo, 0x16B00, 47},
+ {CAT_Mn, 0x16B30, 6},
+ {CAT_Po, 0x16B37, 4},
+ {CAT_So, 0x16B3C, 3},
+ {CAT_Lm, 0x16B40, 3},
+ {CAT_Po, 0x16B44, 0},
+ {CAT_So, 0x16B45, 0},
+ {CAT_Nd, 0x16B50, 9},
+ {CAT_No, 0x16B5B, 6},
+ {CAT_Lo, 0x16B63, 20},
+ {CAT_Lo, 0x16B7D, 18},
+ {CAT_Lo, 0x16F00, 68},
+ {CAT_Lo, 0x16F50, 0},
+ {CAT_Mc, 0x16F51, 45},
+ {CAT_Mn, 0x16F8F, 3},
+ {CAT_Lm, 0x16F93, 12},
+ {CAT_Lm, 0x16FE0, 1},
+ {CAT_Lo, 0x17000, 6124},
+ {CAT_Lo, 0x18800, 754},
+ {CAT_Lo, 0x1B000, 286},
+ {CAT_Lo, 0x1B170, 395},
+ {CAT_Lo, 0x1BC00, 106},
+ {CAT_Lo, 0x1BC70, 12},
+ {CAT_Lo, 0x1BC80, 8},
+ {CAT_Lo, 0x1BC90, 9},
+ {CAT_So, 0x1BC9C, 0},
+ {CAT_Mn, 0x1BC9D, 1},
+ {CAT_Po, 0x1BC9F, 0},
+ {CAT_Cf, 0x1BCA0, 3},
+ {CAT_So, 0x1D000, 245},
+ {CAT_So, 0x1D100, 38},
+ {CAT_So, 0x1D129, 59},
+ {CAT_Mc, 0x1D165, 1},
+ {CAT_Mn, 0x1D167, 2},
+ {CAT_So, 0x1D16A, 2},
+ {CAT_Mc, 0x1D16D, 5},
+ {CAT_Cf, 0x1D173, 7},
+ {CAT_Mn, 0x1D17B, 7},
+ {CAT_So, 0x1D183, 1},
+ {CAT_Mn, 0x1D185, 6},
+ {CAT_So, 0x1D18C, 29},
+ {CAT_Mn, 0x1D1AA, 3},
+ {CAT_So, 0x1D1AE, 58},
+ {CAT_So, 0x1D200, 65},
+ {CAT_Mn, 0x1D242, 2},
+ {CAT_So, 0x1D245, 0},
+ {CAT_So, 0x1D300, 86},
+ {CAT_No, 0x1D360, 17},
+ {CAT_Lu, 0x1D400, 25},
+ {CAT_Ll, 0x1D41A, 25},
+ {CAT_Lu, 0x1D434, 25},
+ {CAT_Ll, 0x1D44E, 6},
+ {CAT_Ll, 0x1D456, 17},
+ {CAT_Lu, 0x1D468, 25},
+ {CAT_Ll, 0x1D482, 25},
+ {CAT_Lu, 0x1D49C, 0},
+ {CAT_Lu, 0x1D49E, 1},
+ {CAT_Lu, 0x1D4A2, 0},
+ {CAT_Lu, 0x1D4A5, 1},
+ {CAT_Lu, 0x1D4A9, 3},
+ {CAT_Lu, 0x1D4AE, 7},
+ {CAT_Ll, 0x1D4B6, 3},
+ {CAT_Ll, 0x1D4BB, 0},
+ {CAT_Ll, 0x1D4BD, 6},
+ {CAT_Ll, 0x1D4C5, 10},
+ {CAT_Lu, 0x1D4D0, 25},
+ {CAT_Ll, 0x1D4EA, 25},
+ {CAT_Lu, 0x1D504, 1},
+ {CAT_Lu, 0x1D507, 3},
+ {CAT_Lu, 0x1D50D, 7},
+ {CAT_Lu, 0x1D516, 6},
+ {CAT_Ll, 0x1D51E, 25},
+ {CAT_Lu, 0x1D538, 1},
+ {CAT_Lu, 0x1D53B, 3},
+ {CAT_Lu, 0x1D540, 4},
+ {CAT_Lu, 0x1D546, 0},
+ {CAT_Lu, 0x1D54A, 6},
+ {CAT_Ll, 0x1D552, 25},
+ {CAT_Lu, 0x1D56C, 25},
+ {CAT_Ll, 0x1D586, 25},
+ {CAT_Lu, 0x1D5A0, 25},
+ {CAT_Ll, 0x1D5BA, 25},
+ {CAT_Lu, 0x1D5D4, 25},
+ {CAT_Ll, 0x1D5EE, 25},
+ {CAT_Lu, 0x1D608, 25},
+ {CAT_Ll, 0x1D622, 25},
+ {CAT_Lu, 0x1D63C, 25},
+ {CAT_Ll, 0x1D656, 25},
+ {CAT_Lu, 0x1D670, 25},
+ {CAT_Ll, 0x1D68A, 27},
+ {CAT_Lu, 0x1D6A8, 24},
+ {CAT_Sm, 0x1D6C1, 0},
+ {CAT_Ll, 0x1D6C2, 24},
+ {CAT_Sm, 0x1D6DB, 0},
+ {CAT_Ll, 0x1D6DC, 5},
+ {CAT_Lu, 0x1D6E2, 24},
+ {CAT_Sm, 0x1D6FB, 0},
+ {CAT_Ll, 0x1D6FC, 24},
+ {CAT_Sm, 0x1D715, 0},
+ {CAT_Ll, 0x1D716, 5},
+ {CAT_Lu, 0x1D71C, 24},
+ {CAT_Sm, 0x1D735, 0},
+ {CAT_Ll, 0x1D736, 24},
+ {CAT_Sm, 0x1D74F, 0},
+ {CAT_Ll, 0x1D750, 5},
+ {CAT_Lu, 0x1D756, 24},
+ {CAT_Sm, 0x1D76F, 0},
+ {CAT_Ll, 0x1D770, 24},
+ {CAT_Sm, 0x1D789, 0},
+ {CAT_Ll, 0x1D78A, 5},
+ {CAT_Lu, 0x1D790, 24},
+ {CAT_Sm, 0x1D7A9, 0},
+ {CAT_Ll, 0x1D7AA, 24},
+ {CAT_Sm, 0x1D7C3, 0},
+ {CAT_Ll, 0x1D7C4, 5},
+ {CAT_Lu, 0x1D7CA, 0},
+ {CAT_Ll, 0x1D7CB, 0},
+ {CAT_Nd, 0x1D7CE, 49},
+ {CAT_So, 0x1D800, 511},
+ {CAT_Mn, 0x1DA00, 54},
+ {CAT_So, 0x1DA37, 3},
+ {CAT_Mn, 0x1DA3B, 49},
+ {CAT_So, 0x1DA6D, 7},
+ {CAT_Mn, 0x1DA75, 0},
+ {CAT_So, 0x1DA76, 13},
+ {CAT_Mn, 0x1DA84, 0},
+ {CAT_So, 0x1DA85, 1},
+ {CAT_Po, 0x1DA87, 4},
+ {CAT_Mn, 0x1DA9B, 4},
+ {CAT_Mn, 0x1DAA1, 14},
+ {CAT_Mn, 0x1E000, 6},
+ {CAT_Mn, 0x1E008, 16},
+ {CAT_Mn, 0x1E01B, 6},
+ {CAT_Mn, 0x1E023, 1},
+ {CAT_Mn, 0x1E026, 4},
+ {CAT_Lo, 0x1E800, 196},
+ {CAT_No, 0x1E8C7, 8},
+ {CAT_Mn, 0x1E8D0, 6},
+ {CAT_LC, 0x1E900, 67},
+ {CAT_Mn, 0x1E944, 6},
+ {CAT_Nd, 0x1E950, 9},
+ {CAT_Po, 0x1E95E, 1},
+ {CAT_Lo, 0x1EE00, 3},
+ {CAT_Lo, 0x1EE05, 26},
+ {CAT_Lo, 0x1EE21, 1},
+ {CAT_Lo, 0x1EE24, 0},
+ {CAT_Lo, 0x1EE27, 0},
+ {CAT_Lo, 0x1EE29, 9},
+ {CAT_Lo, 0x1EE34, 3},
+ {CAT_Lo, 0x1EE39, 0},
+ {CAT_Lo, 0x1EE3B, 0},
+ {CAT_Lo, 0x1EE42, 0},
+ {CAT_Lo, 0x1EE47, 0},
+ {CAT_Lo, 0x1EE49, 0},
+ {CAT_Lo, 0x1EE4B, 0},
+ {CAT_Lo, 0x1EE4D, 2},
+ {CAT_Lo, 0x1EE51, 1},
+ {CAT_Lo, 0x1EE54, 0},
+ {CAT_Lo, 0x1EE57, 0},
+ {CAT_Lo, 0x1EE59, 0},
+ {CAT_Lo, 0x1EE5B, 0},
+ {CAT_Lo, 0x1EE5D, 0},
+ {CAT_Lo, 0x1EE5F, 0},
+ {CAT_Lo, 0x1EE61, 1},
+ {CAT_Lo, 0x1EE64, 0},
+ {CAT_Lo, 0x1EE67, 3},
+ {CAT_Lo, 0x1EE6C, 6},
+ {CAT_Lo, 0x1EE74, 3},
+ {CAT_Lo, 0x1EE79, 3},
+ {CAT_Lo, 0x1EE7E, 0},
+ {CAT_Lo, 0x1EE80, 9},
+ {CAT_Lo, 0x1EE8B, 16},
+ {CAT_Lo, 0x1EEA1, 2},
+ {CAT_Lo, 0x1EEA5, 4},
+ {CAT_Lo, 0x1EEAB, 16},
+ {CAT_Sm, 0x1EEF0, 1},
+ {CAT_So, 0x1F000, 43},
+ {CAT_So, 0x1F030, 99},
+ {CAT_So, 0x1F0A0, 14},
+ {CAT_So, 0x1F0B1, 14},
+ {CAT_So, 0x1F0C1, 14},
+ {CAT_So, 0x1F0D1, 36},
+ {CAT_No, 0x1F100, 12},
+ {CAT_So, 0x1F110, 30},
+ {CAT_So, 0x1F130, 59},
+ {CAT_So, 0x1F170, 60},
+ {CAT_So, 0x1F1E6, 28},
+ {CAT_So, 0x1F210, 43},
+ {CAT_So, 0x1F240, 8},
+ {CAT_So, 0x1F250, 1},
+ {CAT_So, 0x1F260, 5},
+ {CAT_So, 0x1F300, 250},
+ {CAT_Sk, 0x1F3FB, 4},
+ {CAT_So, 0x1F400, 724},
+ {CAT_So, 0x1F6E0, 12},
+ {CAT_So, 0x1F6F0, 8},
+ {CAT_So, 0x1F700, 115},
+ {CAT_So, 0x1F780, 84},
+ {CAT_So, 0x1F800, 11},
+ {CAT_So, 0x1F810, 55},
+ {CAT_So, 0x1F850, 9},
+ {CAT_So, 0x1F860, 39},
+ {CAT_So, 0x1F890, 29},
+ {CAT_So, 0x1F900, 11},
+ {CAT_So, 0x1F910, 46},
+ {CAT_So, 0x1F940, 12},
+ {CAT_So, 0x1F950, 27},
+ {CAT_So, 0x1F980, 23},
+ {CAT_So, 0x1F9C0, 0},
+ {CAT_So, 0x1F9D0, 22},
+ {CAT_Lo, 0x20000, 42710},
+ {CAT_Lo, 0x2A700, 4148},
+ {CAT_Lo, 0x2B740, 221},
+ {CAT_Lo, 0x2B820, 5761},
+ {CAT_Lo, 0x2CEB0, 7472},
+ {CAT_Lo, 0x2F800, 541},
+ {CAT_Cf, 0xE0001, 0},
+ {CAT_Cf, 0xE0020, 95},
+ {CAT_Mn, 0xE0100, 239},
diff --git a/newlib/libc/ctype/ctype_.c b/newlib/libc/ctype/ctype_.c
index 9e3cdcf05..28727e8a8 100644
--- a/newlib/libc/ctype/ctype_.c
+++ b/newlib/libc/ctype/ctype_.c
@@ -87,7 +87,7 @@ static char sccsid[] = "@(#)ctype_.c 5.6 (Berkeley) 6/1/90";
/* No static const on Cygwin since it's referenced and potentially overwritten
for compatibility with older applications. */
#ifndef __CYGWIN__
-_CONST
+const
#endif
char _ctype_b[128 + 256] = {
_CTYPE_DATA_128_255,
@@ -116,7 +116,7 @@ __asm__ (" \n\
# endif
# else /* !__CYGWIN__ */
-_CONST char _ctype_[1 + 256] = {
+const char _ctype_[1 + 256] = {
0,
_CTYPE_DATA_0_127,
_CTYPE_DATA_128_255
@@ -125,7 +125,7 @@ _CONST char _ctype_[1 + 256] = {
#else /* !ALLOW_NEGATIVE_CTYPE_INDEX */
-_CONST char _ctype_[1 + 256] = {
+const char _ctype_[1 + 256] = {
0,
_CTYPE_DATA_0_127,
_CTYPE_DATA_128_255
diff --git a/newlib/libc/ctype/ctype_.h b/newlib/libc/ctype/ctype_.h
index 5356d3815..a73870b3e 100644
--- a/newlib/libc/ctype/ctype_.h
+++ b/newlib/libc/ctype/ctype_.h
@@ -7,7 +7,7 @@
#ifdef ALLOW_NEGATIVE_CTYPE_INDEX
#ifndef __CYGWIN__
- extern _CONST char _ctype_b[];
+ extern const char _ctype_b[];
#else
extern char _ctype_b[];
#endif
diff --git a/newlib/libc/ctype/ctype_cp.h b/newlib/libc/ctype/ctype_cp.h
index 004c1e2e8..9370778a2 100644
--- a/newlib/libc/ctype/ctype_cp.h
+++ b/newlib/libc/ctype/ctype_cp.h
@@ -473,7 +473,7 @@
#if defined(ALLOW_NEGATIVE_CTYPE_INDEX)
#ifndef __CYGWIN__
-static _CONST
+static const
#endif
char __ctype_cp[26][128 + 256] = {
{ _CTYPE_CP437_128_254,
@@ -636,7 +636,7 @@ char __ctype_cp[26][128 + 256] = {
#else /* !defined(ALLOW_NEGATIVE_CTYPE_INDEX) */
-static _CONST char __ctype_cp[26][1 + 256] = {
+static const char __ctype_cp[26][1 + 256] = {
{ 0,
_CTYPE_DATA_0_127,
_CTYPE_CP437_128_254,
diff --git a/newlib/libc/ctype/ctype_iso.h b/newlib/libc/ctype/ctype_iso.h
index ed1d5d674..60087dc92 100644
--- a/newlib/libc/ctype/ctype_iso.h
+++ b/newlib/libc/ctype/ctype_iso.h
@@ -277,7 +277,7 @@ extern int __iso_8859_index (const char *charset_ext);
#if defined(ALLOW_NEGATIVE_CTYPE_INDEX)
#ifndef __CYGWIN__
-static _CONST
+static const
#endif
char __ctype_iso[15][128 + 256] = {
{ _CTYPE_ISO_8859_1_128_254,
@@ -374,7 +374,7 @@ char __ctype_iso[15][128 + 256] = {
#else /* !defined(ALLOW_NEGATIVE_CTYPE_INDEX) */
-static _CONST char __ctype_iso[15][1 + 256] = {
+static const char __ctype_iso[15][1 + 256] = {
{ 0,
_CTYPE_DATA_0_127,
_CTYPE_ISO_8859_1_128_254,
diff --git a/newlib/libc/ctype/isalnum.c b/newlib/libc/ctype/isalnum.c
index 113ef0232..d926f97b7 100644
--- a/newlib/libc/ctype/isalnum.c
+++ b/newlib/libc/ctype/isalnum.c
@@ -7,17 +7,13 @@ INDEX
INDEX
isalnum_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int isalnum(int <[c]>);
#include
int isalnum_l(int <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int isalnum(<[c]>);
-
DESCRIPTION
<> is a macro which classifies singlebyte charset values by table
@@ -48,7 +44,7 @@ No OS subroutines are required.
#undef isalnum
int
-_DEFUN(isalnum,(c),int c)
+isalnum (int c)
{
return(__CTYPE_PTR[c+1] & (_U|_L|_N));
}
diff --git a/newlib/libc/ctype/isalpha.c b/newlib/libc/ctype/isalpha.c
index 59511e18e..8b8e78a29 100644
--- a/newlib/libc/ctype/isalpha.c
+++ b/newlib/libc/ctype/isalpha.c
@@ -8,17 +8,13 @@ INDEX
INDEX
isalpha_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int isalpha(int <[c]>);
#include
int isalpha_l(int <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int isalpha(<[c]>);
-
DESCRIPTION
<> is a macro which classifies singlebyte charset values by table
lookup. It is a predicate returning non-zero when <[c]> represents an
@@ -47,7 +43,7 @@ No supporting OS subroutines are required.
#undef isalpha
int
-_DEFUN(isalpha,(c),int c)
+isalpha (int c)
{
return(__CTYPE_PTR[c+1] & (_U|_L));
}
diff --git a/newlib/libc/ctype/isascii.c b/newlib/libc/ctype/isascii.c
index 45e19efd3..5adb81222 100644
--- a/newlib/libc/ctype/isascii.c
+++ b/newlib/libc/ctype/isascii.c
@@ -8,17 +8,13 @@ INDEX
INDEX
isascii_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int isascii(int <[c]>);
#include
int isascii_l(int <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int isascii(<[c]>);
-
DESCRIPTION
<> is a macro which returns non-zero when <[c]> is an ASCII
character, and 0 otherwise. It is defined for all integer values.
@@ -48,7 +44,7 @@ No supporting OS subroutines are required.
#undef isascii
int
-_DEFUN(isascii,(c),int c)
+isascii (int c)
{
return c >= 0 && c< 128;
}
diff --git a/newlib/libc/ctype/isblank.c b/newlib/libc/ctype/isblank.c
index db62a2681..0ebc2192c 100644
--- a/newlib/libc/ctype/isblank.c
+++ b/newlib/libc/ctype/isblank.c
@@ -8,17 +8,13 @@ INDEX
INDEX
isblank_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int isblank(int <[c]>);
#include
int isblank_l(int <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int isblank(<[c]>);
-
DESCRIPTION
<> is a function which classifies singlebyte charset values by table
lookup. It is a predicate returning non-zero for blank characters, and 0
@@ -46,7 +42,7 @@ No supporting OS subroutines are required.
#undef isblank
int
-_DEFUN(isblank,(c),int c)
+isblank (int c)
{
return ((__CTYPE_PTR[c+1] & _B) || (c == '\t'));
}
diff --git a/newlib/libc/ctype/iscntrl.c b/newlib/libc/ctype/iscntrl.c
index d78c957f8..ebbdd7371 100644
--- a/newlib/libc/ctype/iscntrl.c
+++ b/newlib/libc/ctype/iscntrl.c
@@ -8,17 +8,13 @@ INDEX
INDEX
iscntrl_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int iscntrl(int <[c]>);
#include
int iscntrl_l(int <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int iscntrl(<[c]>);
-
DESCRIPTION
<> is a macro which classifies singlebyte charset values by table
lookup. It is a predicate returning non-zero for control characters, and 0
@@ -50,7 +46,7 @@ No supporting OS subroutines are required.
#undef iscntrl
int
-_DEFUN(iscntrl,(c),int c)
+iscntrl (int c)
{
return(__CTYPE_PTR[c+1] & _C);
}
diff --git a/newlib/libc/ctype/isdigit.c b/newlib/libc/ctype/isdigit.c
index 06f14221d..a5c511964 100644
--- a/newlib/libc/ctype/isdigit.c
+++ b/newlib/libc/ctype/isdigit.c
@@ -8,17 +8,13 @@ INDEX
INDEX
isdigit_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int isdigit(int <[c]>);
#include
int isdigit_l(int <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int isdigit(<[c]>);
-
DESCRIPTION
<> is a macro which classifies singlebyte charset values by table
lookup. It is a predicate returning non-zero for decimal digits, and 0 for
@@ -49,7 +45,7 @@ No supporting OS subroutines are required.
#undef isdigit
int
-_DEFUN(isdigit,(c),int c)
+isdigit (int c)
{
return(__CTYPE_PTR[c+1] & _N);
}
diff --git a/newlib/libc/ctype/islower.c b/newlib/libc/ctype/islower.c
index 466252a63..2b3440489 100644
--- a/newlib/libc/ctype/islower.c
+++ b/newlib/libc/ctype/islower.c
@@ -8,17 +8,13 @@ INDEX
INDEX
islower_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int islower(int <[c]>);
#include
int islower_l(int <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int islower(<[c]>);
-
DESCRIPTION
<> is a macro which classifies singlebyte charset values by table
lookup. It is a predicate returning non-zero for minuscules
@@ -47,7 +43,7 @@ No supporting OS subroutines are required.
#undef islower
int
-_DEFUN(islower,(c),int c)
+islower (int c)
{
return ((__CTYPE_PTR[c+1] & (_U|_L)) == _L);
}
diff --git a/newlib/libc/ctype/isprint.c b/newlib/libc/ctype/isprint.c
index 21fdf5b1d..e34fbe28a 100644
--- a/newlib/libc/ctype/isprint.c
+++ b/newlib/libc/ctype/isprint.c
@@ -14,7 +14,7 @@ INDEX
INDEX
isgraph_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int isprint(int <[c]>);
int isgraph(int <[c]>);
@@ -23,11 +23,6 @@ ANSI_SYNOPSIS
int isprint_l(int <[c]>, locale_t <[locale]>);
int isgraph_l(int <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int isprint(<[c]>);
- int isgraph(<[c]>);
-
DESCRIPTION
<> is a macro which classifies singlebyte charset values by table
lookup. It is a predicate returning non-zero for printable characters,
@@ -62,7 +57,7 @@ No supporting OS subroutines are required.
#undef isgraph
int
-_DEFUN(isgraph,(c),int c)
+isgraph (int c)
{
return(__CTYPE_PTR[c+1] & (_P|_U|_L|_N));
}
@@ -70,7 +65,7 @@ _DEFUN(isgraph,(c),int c)
#undef isprint
int
-_DEFUN(isprint,(c),int c)
+isprint (int c)
{
return(__CTYPE_PTR[c+1] & (_P|_U|_L|_N|_B));
}
diff --git a/newlib/libc/ctype/ispunct.c b/newlib/libc/ctype/ispunct.c
index 4fb62197d..9c5a3fcca 100644
--- a/newlib/libc/ctype/ispunct.c
+++ b/newlib/libc/ctype/ispunct.c
@@ -8,17 +8,13 @@ INDEX
INDEX
ispunct_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int ispunct(int <[c]>);
#include
int ispunct_l(int <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int ispunct(<[c]>);
-
DESCRIPTION
<> is a macro which classifies singlebyte charset values by table
lookup. It is a predicate returning non-zero for printable
@@ -49,7 +45,7 @@ No supporting OS subroutines are required.
#undef ispunct
int
-_DEFUN(ispunct,(c),int c)
+ispunct (int c)
{
return(__CTYPE_PTR[c+1] & _P);
}
diff --git a/newlib/libc/ctype/isspace.c b/newlib/libc/ctype/isspace.c
index 2a19518eb..0def2c0ce 100644
--- a/newlib/libc/ctype/isspace.c
+++ b/newlib/libc/ctype/isspace.c
@@ -8,17 +8,13 @@ INDEX
INDEX
isspace_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int isspace(int <[c]>);
#include
int isspace_l(int <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int isspace(<[c]>);
-
DESCRIPTION
<> is a macro which classifies singlebyte charset values by table
lookup. It is a predicate returning non-zero for whitespace
@@ -48,7 +44,7 @@ No supporting OS subroutines are required.
#undef isspace
int
-_DEFUN(isspace,(c),int c)
+isspace (int c)
{
return(__CTYPE_PTR[c+1] & _S);
}
diff --git a/newlib/libc/ctype/isupper.c b/newlib/libc/ctype/isupper.c
index e36b3a35d..aeed383ec 100644
--- a/newlib/libc/ctype/isupper.c
+++ b/newlib/libc/ctype/isupper.c
@@ -8,17 +8,13 @@ INDEX
INDEX
isupper_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int isupper(int <[c]>);
#include
int isupper_l(int <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int isupper(<[c]>);
-
DESCRIPTION
<> is a macro which classifies singlebyte charset values by table
lookup. It is a predicate returning non-zero for uppercase letters
@@ -45,7 +41,7 @@ No supporting OS subroutines are required.
#undef isupper
int
-_DEFUN(isupper,(c),int c)
+isupper (int c)
{
return ((__CTYPE_PTR[c+1] & (_U|_L)) == _U);
}
diff --git a/newlib/libc/ctype/iswalnum.c b/newlib/libc/ctype/iswalnum.c
index 76fa5042c..7b2cac73b 100644
--- a/newlib/libc/ctype/iswalnum.c
+++ b/newlib/libc/ctype/iswalnum.c
@@ -8,18 +8,13 @@ INDEX
INDEX
iswalnum_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int iswalnum(wint_t <[c]>);
#include
int iswalnum_l(wint_t <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int iswalnum(<[c]>)
- wint_t <[c]>;
-
DESCRIPTION
<> is a function which classifies wide-character values that
are alphanumeric.
@@ -42,7 +37,7 @@ No supporting OS subroutines are required.
#include
int
-_DEFUN(iswalnum,(c),wint_t c)
+iswalnum (wint_t c)
{
- return (iswalpha (c) || iswdigit (c));
+ return iswalnum_l (c, 0);
}
diff --git a/newlib/libc/ctype/iswalnum_l.c b/newlib/libc/ctype/iswalnum_l.c
index e4ab3dd36..8802273ca 100644
--- a/newlib/libc/ctype/iswalnum_l.c
+++ b/newlib/libc/ctype/iswalnum_l.c
@@ -1,10 +1,23 @@
+/* Modified (m) 2017 Thomas Wolff: revise Unicode and locale/wchar handling */
#include <_ansi.h>
+#include
#include
+#include "local.h"
+#include "categories.h"
int
iswalnum_l (wint_t c, struct __locale_t *locale)
{
- /* We're using a locale-independent representation of upper/lower case
- based on Unicode data. Thus, the locale doesn't matter. */
- return iswalpha (c) || iswdigit (c);
+#ifdef _MB_CAPABLE
+ //return iswalpha (c) || iswdigit (c);
+ c = _jp2uc_l (c, locale);
+ enum category cat = category (c);
+ return cat == CAT_LC || cat == CAT_Lu || cat == CAT_Ll || cat == CAT_Lt
+ || cat == CAT_Lm || cat == CAT_Lo
+ || cat == CAT_Nl // Letter_Number
+ || cat == CAT_Nd // Decimal_Number
+ ;
+#else
+ return c < (wint_t)0x100 ? isalnum (c) : 0;
+#endif /* _MB_CAPABLE */
}
diff --git a/newlib/libc/ctype/iswalpha.c b/newlib/libc/ctype/iswalpha.c
index 92fad8e04..392877256 100644
--- a/newlib/libc/ctype/iswalpha.c
+++ b/newlib/libc/ctype/iswalpha.c
@@ -1,5 +1,6 @@
/* Copyright (c) 2002 Red Hat Incorporated.
All rights reserved.
+ Modified (m) 2017 Thomas Wolff to refer to generated Unicode data tables.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -37,18 +38,13 @@ INDEX
INDEX
iswalpha_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int iswalpha(wint_t <[c]>);
#include
int iswalpha_l(wint_t <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int iswalpha(<[c]>)
- wint_t <[c]>;
-
DESCRIPTION
<> is a function which classifies wide-character values that
are alphabetic.
@@ -68,377 +64,10 @@ PORTABILITY
No supporting OS subroutines are required.
*/
#include <_ansi.h>
-#include
#include
-#include
-#include
-#include "local.h"
-
-#ifdef _MB_CAPABLE
-#include "utf8alpha.h"
-#endif /* _MB_CAPABLE */
int
-_DEFUN(iswalpha,(c), wint_t c)
+iswalpha (wint_t c)
{
-#ifdef _MB_CAPABLE
- unsigned const char *table;
- unsigned char *ptr;
- unsigned char ctmp;
- int size;
- wint_t x;
-
- c = _jp2uc (c);
-
- /* Based on and tested against Unicode 5.2
- See utf8alpha.h for a description how to fetch the data. */
- x = (c >> 8);
- /* for some large sections, all characters are alphabetic so handle them here */
- if ((x >= 0x34 && x <= 0x4c) ||
- (x >= 0x4e && x <= 0x9e) ||
- (x >= 0xac && x <= 0xd6) ||
- (x >= 0x120 && x <= 0x122) ||
- (x >= 0x130 && x <= 0x133) ||
- (x >= 0x200 && x <= 0x2a5) ||
- (x >= 0x2a7 && x <= 0x2b6))
- return 1;
-
- switch (x)
- {
- case 0x00:
- table = u0;
- size = sizeof(u0);
- break;
- case 0x01:
- case 0x11:
- case 0x15:
- case 0x1e:
- case 0xa0:
- case 0xa1:
- case 0xa2:
- case 0xa3:
- case 0xa5:
- case 0xf9:
- case 0xfc:
- case 0x2f8:
- case 0x2f9:
- return 1;
- case 0x02:
- table = u2;
- size = sizeof(u2);
- break;
- case 0x03:
- table = u3;
- size = sizeof(u3);
- break;
- case 0x04:
- table = u4;
- size = sizeof(u4);
- break;
- case 0x05:
- table = u5;
- size = sizeof(u5);
- break;
- case 0x06:
- table = u6;
- size = sizeof(u6);
- break;
- case 0x07:
- table = u7;
- size = sizeof(u7);
- break;
- case 0x08:
- table = u8;
- size = sizeof(u8);
- break;
- case 0x09:
- table = u9;
- size = sizeof(u9);
- break;
- case 0x0a:
- table = ua;
- size = sizeof(ua);
- break;
- case 0x0b:
- table = ub;
- size = sizeof(ub);
- break;
- case 0x0c:
- table = uc;
- size = sizeof(uc);
- break;
- case 0x0d:
- table = ud;
- size = sizeof(ud);
- break;
- case 0x0e:
- table = ue;
- size = sizeof(ue);
- break;
- case 0x0f:
- table = uf;
- size = sizeof(uf);
- break;
- case 0x10:
- table = u10;
- size = sizeof(u10);
- break;
- case 0x12:
- table = u12;
- size = sizeof(u12);
- break;
- case 0x13:
- table = u13;
- size = sizeof(u13);
- break;
- case 0x14:
- table = u14;
- size = sizeof(u14);
- break;
- case 0x16:
- table = u16;
- size = sizeof(u16);
- break;
- case 0x17:
- table = u17;
- size = sizeof(u17);
- break;
- case 0x18:
- table = u18;
- size = sizeof(u18);
- break;
- case 0x19:
- table = u19;
- size = sizeof(u19);
- break;
- case 0x1a:
- table = u1a;
- size = sizeof(u1a);
- break;
- case 0x1b:
- table = u1b;
- size = sizeof(u1b);
- break;
- case 0x1c:
- table = u1c;
- size = sizeof(u1c);
- break;
- case 0x1d:
- table = u1d;
- size = sizeof(u1d);
- break;
- case 0x1f:
- table = u1f;
- size = sizeof(u1f);
- break;
- case 0x20:
- table = u20;
- size = sizeof(u20);
- break;
- case 0x21:
- table = u21;
- size = sizeof(u21);
- break;
- case 0x24:
- table = u24;
- size = sizeof(u24);
- break;
- case 0x2c:
- table = u2c;
- size = sizeof(u2c);
- break;
- case 0x2d:
- table = u2d;
- size = sizeof(u2d);
- break;
- case 0x2e:
- table = u2e;
- size = sizeof(u2e);
- break;
- case 0x30:
- table = u30;
- size = sizeof(u30);
- break;
- case 0x31:
- table = u31;
- size = sizeof(u31);
- break;
- case 0x4d:
- table = u4d;
- size = sizeof(u4d);
- break;
- case 0x9f:
- table = u9f;
- size = sizeof(u9f);
- break;
- case 0xa4:
- table = ua4;
- size = sizeof(ua4);
- break;
- case 0xa6:
- table = ua6;
- size = sizeof(ua6);
- break;
- case 0xa7:
- table = ua7;
- size = sizeof(ua7);
- break;
- case 0xa8:
- table = ua8;
- size = sizeof(ua8);
- break;
- case 0xa9:
- table = ua9;
- size = sizeof(ua9);
- break;
- case 0xaa:
- table = uaa;
- size = sizeof(uaa);
- break;
- case 0xab:
- table = uab;
- size = sizeof(uab);
- break;
- case 0xd7:
- table = ud7;
- size = sizeof(ud7);
- break;
- case 0xfa:
- table = ufa;
- size = sizeof(ufa);
- break;
- case 0xfb:
- table = ufb;
- size = sizeof(ufb);
- break;
- case 0xfd:
- table = ufd;
- size = sizeof(ufd);
- break;
- case 0xfe:
- table = ufe;
- size = sizeof(ufe);
- break;
- case 0xff:
- table = uff;
- size = sizeof(uff);
- break;
- case 0x100:
- table = u100;
- size = sizeof(u100);
- break;
- case 0x101:
- table = u101;
- size = sizeof(u101);
- break;
- case 0x102:
- table = u102;
- size = sizeof(u102);
- break;
- case 0x103:
- table = u103;
- size = sizeof(u103);
- break;
- case 0x104:
- table = u104;
- size = sizeof(u104);
- break;
- case 0x108:
- table = u108;
- size = sizeof(u108);
- break;
- case 0x109:
- table = u109;
- size = sizeof(u109);
- break;
- case 0x10a:
- table = u10a;
- size = sizeof(u10a);
- break;
- case 0x10b:
- table = u10b;
- size = sizeof(u10b);
- break;
- case 0x10c:
- table = u10c;
- size = sizeof(u10c);
- break;
- case 0x110:
- table = u110;
- size = sizeof(u110);
- break;
- case 0x123:
- table = u123;
- size = sizeof(u123);
- break;
- case 0x124:
- table = u124;
- size = sizeof(u124);
- break;
- case 0x134:
- table = u134;
- size = sizeof(u134);
- break;
- case 0x1d4:
- table = u1d4;
- size = sizeof(u1d4);
- break;
- case 0x1d5:
- table = u1d5;
- size = sizeof(u1d5);
- break;
- case 0x1d6:
- table = u1d6;
- size = sizeof(u1d6);
- break;
- case 0x1d7:
- table = u1d7;
- size = sizeof(u1d7);
- break;
- case 0x1f1:
- table = u1f1;
- size = sizeof(u1f1);
- break;
- case 0x2a6:
- table = u2a6;
- size = sizeof(u2a6);
- break;
- case 0x2b7:
- table = u2b7;
- size = sizeof(u2b7);
- break;
- case 0x2fa:
- table = u2fa;
- size = sizeof(u2fa);
- break;
- default:
- return 0;
- }
- /* we have narrowed down to a section of 256 characters to check */
- /* now check if c matches the alphabetic wide-chars within that section */
- ptr = (unsigned char *)table;
- ctmp = (unsigned char)c;
- while (ptr < table + size)
- {
- if (ctmp == *ptr)
- return 1;
- if (ctmp < *ptr)
- return 0;
- /* otherwise c > *ptr */
- /* look for 0x0 as next element which indicates a range */
- ++ptr;
- if (ptr < table + size - 1 && *ptr == 0x0)
- {
- /* we have a range..see if c falls within range */
- ++ptr;
- if (ctmp <= *ptr)
- return 1;
- ++ptr;
- }
- }
- /* not in table */
- return 0;
-#else
- return (c < (wint_t)0x100 ? isalpha (c) : 0);
-#endif /* _MB_CAPABLE */
+ return iswalpha_l (c, 0);
}
diff --git a/newlib/libc/ctype/iswalpha_l.c b/newlib/libc/ctype/iswalpha_l.c
index efcb95afc..922983ed3 100644
--- a/newlib/libc/ctype/iswalpha_l.c
+++ b/newlib/libc/ctype/iswalpha_l.c
@@ -1,10 +1,21 @@
+/* Modified (m) 2017 Thomas Wolff: revise Unicode and locale/wchar handling */
#include <_ansi.h>
+#include
#include
+#include "local.h"
+#include "categories.h"
int
iswalpha_l (wint_t c, struct __locale_t *locale)
{
- /* We're using a locale-independent representation of upper/lower case
- based on Unicode data. Thus, the locale doesn't matter. */
- return iswalpha (c);
+#ifdef _MB_CAPABLE
+ c = _jp2uc_l (c, locale);
+ enum category cat = category (c);
+ return cat == CAT_LC || cat == CAT_Lu || cat == CAT_Ll || cat == CAT_Lt
+ || cat == CAT_Lm || cat == CAT_Lo
+ || cat == CAT_Nl // Letter_Number
+ ;
+#else
+ return c < (wint_t)0x100 ? isalpha (c) : 0;
+#endif /* _MB_CAPABLE */
}
diff --git a/newlib/libc/ctype/iswblank.c b/newlib/libc/ctype/iswblank.c
index ca448a997..31779d245 100644
--- a/newlib/libc/ctype/iswblank.c
+++ b/newlib/libc/ctype/iswblank.c
@@ -1,5 +1,6 @@
/* Copyright (c) 2002 Red Hat Incorporated.
All rights reserved.
+ Modified (m) 2017 Thomas Wolff to refer to generated Unicode data tables.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -37,18 +38,13 @@ INDEX
INDEX
iswblank_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int iswblank(wint_t <[c]>);
#include
int iswblank_l(wint_t <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int iswblank(<[c]>)
- wint_t <[c]>;
-
DESCRIPTION
<> is a function which classifies wide-character values that
are categorized as blank.
@@ -67,26 +63,10 @@ PORTABILITY
No supporting OS subroutines are required.
*/
#include <_ansi.h>
-#include
#include
-#include
-#include
-#include "local.h"
int
-_DEFUN(iswblank,(c), wint_t c)
+iswblank (wint_t c)
{
-#ifdef _MB_CAPABLE
- c = _jp2uc (c);
- /* Based on Unicode 5.2. Control char 09, plus all characters
- from general category "Zs", which are not marked as decomposition
- type "noBreak". */
- return (c == 0x0009 || c == 0x0020 ||
- c == 0x1680 || c == 0x180e ||
- (c >= 0x2000 && c <= 0x2006) ||
- (c >= 0x2008 && c <= 0x200a) ||
- c == 0x205f || c == 0x3000);
-#else
- return (c < 0x100 ? isblank (c) : 0);
-#endif /* _MB_CAPABLE */
+ return iswblank_l (c, 0);
}
diff --git a/newlib/libc/ctype/iswblank_l.c b/newlib/libc/ctype/iswblank_l.c
index 696069378..b27ed820a 100644
--- a/newlib/libc/ctype/iswblank_l.c
+++ b/newlib/libc/ctype/iswblank_l.c
@@ -1,10 +1,20 @@
+/* Modified (m) 2017 Thomas Wolff: revise Unicode and locale/wchar handling */
#include <_ansi.h>
+#include
#include
+#include "local.h"
+#include "categories.h"
int
iswblank_l (wint_t c, struct __locale_t *locale)
{
- /* We're using a locale-independent representation of upper/lower case
- based on Unicode data. Thus, the locale doesn't matter. */
- return iswblank (c);
+#ifdef _MB_CAPABLE
+ c = _jp2uc_l (c, locale);
+ enum category cat = category (c);
+ // exclude ""?
+ return cat == CAT_Zs
+ || c == '\t';
+#else
+ return c < 0x100 ? isblank (c) : 0;
+#endif /* _MB_CAPABLE */
}
diff --git a/newlib/libc/ctype/iswcntrl.c b/newlib/libc/ctype/iswcntrl.c
index d094d19ed..d4b014749 100644
--- a/newlib/libc/ctype/iswcntrl.c
+++ b/newlib/libc/ctype/iswcntrl.c
@@ -1,5 +1,6 @@
/* Copyright (c) 2002 Red Hat Incorporated.
All rights reserved.
+ Modified (m) 2017 Thomas Wolff to refer to generated Unicode data tables.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -37,18 +38,13 @@ INDEX
INDEX
iswcntrl_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int iswcntrl(wint_t <[c]>);
#include
int iswcntrl_l(wint_t <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int iswcntrl(<[c]>)
- wint_t <[c]>;
-
DESCRIPTION
<> is a function which classifies wide-character values that
are categorized as control characters.
@@ -67,24 +63,10 @@ PORTABILITY
No supporting OS subroutines are required.
*/
#include <_ansi.h>
-#include
#include
-#include
-#include
-#include "local.h"
int
-_DEFUN(iswcntrl,(c), wint_t c)
+iswcntrl (wint_t c)
{
-#ifdef _MB_CAPABLE
- c = _jp2uc (c);
-
- /* Based on Unicode 5.2. All characters from general category "Cc", "Zl",
- and "Zp". */
- return ((c >= 0x0000 && c <= 0x001f) ||
- (c >= 0x007f && c <= 0x009f) ||
- c == 0x2028 || c == 0x2029);
-#else
- return (c < 0x100 ? iscntrl (c) : 0);
-#endif /* _MB_CAPABLE */
+ return iswcntrl_l (c, 0);
}
diff --git a/newlib/libc/ctype/iswcntrl_l.c b/newlib/libc/ctype/iswcntrl_l.c
index 37caba876..6a900a794 100644
--- a/newlib/libc/ctype/iswcntrl_l.c
+++ b/newlib/libc/ctype/iswcntrl_l.c
@@ -1,10 +1,20 @@
+/* Modified (m) 2017 Thomas Wolff: revise Unicode and locale/wchar handling */
#include <_ansi.h>
+#include
#include
+#include "local.h"
+#include "categories.h"
int
iswcntrl_l (wint_t c, struct __locale_t *locale)
{
- /* We're using a locale-independent representation of upper/lower case
- based on Unicode data. Thus, the locale doesn't matter. */
- return iswcntrl (c);
+#ifdef _MB_CAPABLE
+ c = _jp2uc_l (c, locale);
+ enum category cat = category (c);
+ return cat == CAT_Cc
+ || cat == CAT_Zl || cat == CAT_Zp // Line/Paragraph Separator
+ ;
+#else
+ return c < 0x100 ? iscntrl (c) : 0;
+#endif /* _MB_CAPABLE */
}
diff --git a/newlib/libc/ctype/iswctype.c b/newlib/libc/ctype/iswctype.c
index ff8e3246b..027cb8ae3 100644
--- a/newlib/libc/ctype/iswctype.c
+++ b/newlib/libc/ctype/iswctype.c
@@ -8,19 +8,13 @@ INDEX
INDEX
iswctype_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int iswctype(wint_t <[c]>, wctype_t <[desc]>);
#include
int iswctype_l(wint_t <[c]>, wctype_t <[desc]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int iswctype(<[c]>, <[desc]>)
- wint_t <[c]>;
- wctype_t <[desc]>;
-
DESCRIPTION
<> is a function which classifies wide-character values using the
wide-character test specified by <[desc]>.
@@ -44,7 +38,7 @@ No supporting OS subroutines are required.
#include "local.h"
int
-_DEFUN(iswctype,(c, desc), wint_t c _AND wctype_t desc)
+iswctype (wint_t c, wctype_t desc)
{
switch (desc)
{
diff --git a/newlib/libc/ctype/iswctype_l.c b/newlib/libc/ctype/iswctype_l.c
index d9e7b2e06..506972d7c 100644
--- a/newlib/libc/ctype/iswctype_l.c
+++ b/newlib/libc/ctype/iswctype_l.c
@@ -1,10 +1,41 @@
+/* Modified (m) 2017 Thomas Wolff: revise Unicode and locale/wchar handling */
#include <_ansi.h>
#include
+#include "local.h"
int
iswctype_l (wint_t c, wctype_t desc, struct __locale_t *locale)
{
- /* We're using a locale-independent representation of upper/lower case
- based on Unicode data. Thus, the locale doesn't matter. */
- return iswctype (c, desc);
+ switch (desc)
+ {
+ case WC_ALNUM:
+ return iswalnum_l (c, locale);
+ case WC_ALPHA:
+ return iswalpha_l (c, locale);
+ case WC_BLANK:
+ return iswblank_l (c, locale);
+ case WC_CNTRL:
+ return iswcntrl_l (c, locale);
+ case WC_DIGIT:
+ return iswdigit_l (c, locale);
+ case WC_GRAPH:
+ return iswgraph_l (c, locale);
+ case WC_LOWER:
+ return iswlower_l (c, locale);
+ case WC_PRINT:
+ return iswprint_l (c, locale);
+ case WC_PUNCT:
+ return iswpunct_l (c, locale);
+ case WC_SPACE:
+ return iswspace_l (c, locale);
+ case WC_UPPER:
+ return iswupper_l (c, locale);
+ case WC_XDIGIT:
+ return iswxdigit_l (c, locale);
+ default:
+ return 0; /* eliminate warning */
+ }
+
+ /* otherwise unknown */
+ return 0;
}
diff --git a/newlib/libc/ctype/iswdigit.c b/newlib/libc/ctype/iswdigit.c
index 7c3ad4be0..d3562f883 100644
--- a/newlib/libc/ctype/iswdigit.c
+++ b/newlib/libc/ctype/iswdigit.c
@@ -8,18 +8,13 @@ INDEX
INDEX
iswdigit_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int iswdigit(wint_t <[c]>);
#include
int iswdigit_l(wint_t <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int iswdigit(<[c]>)
- wint_t <[c]>;
-
DESCRIPTION
<> is a function which classifies wide-character values that
are decimal digits.
@@ -41,7 +36,8 @@ No supporting OS subroutines are required.
#include
int
-_DEFUN(iswdigit,(c), wint_t c)
+iswdigit (wint_t c)
{
- return (c >= (wint_t)'0' && c <= (wint_t)'9');
+ return c >= (wint_t)'0' && c <= (wint_t)'9';
+ // category (c) == CAT_Nd not to be included as of C-99
}
diff --git a/newlib/libc/ctype/iswdigit_l.c b/newlib/libc/ctype/iswdigit_l.c
index 98dd94edd..29de9d381 100644
--- a/newlib/libc/ctype/iswdigit_l.c
+++ b/newlib/libc/ctype/iswdigit_l.c
@@ -4,5 +4,5 @@
int
iswdigit_l (wint_t c, struct __locale_t *locale)
{
- return (c >= (wint_t)'0' && c <= (wint_t)'9');
+ return c >= (wint_t)'0' && c <= (wint_t)'9';
}
diff --git a/newlib/libc/ctype/iswgraph.c b/newlib/libc/ctype/iswgraph.c
index 17e3060e5..bb21c2160 100644
--- a/newlib/libc/ctype/iswgraph.c
+++ b/newlib/libc/ctype/iswgraph.c
@@ -1,5 +1,6 @@
/* Copyright (c) 2002 Red Hat Incorporated.
All rights reserved.
+ Modified (m) 2017 Thomas Wolff to refer to generated Unicode data tables.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -37,18 +38,13 @@ INDEX
INDEX
iswgraph_l
-ANSI_SYNOPSIS
+SYNOPSIS
#include
int iswgraph(wint_t <[c]>);
#include
int iswgraph_l(wint_t <[c]>, locale_t <[locale]>);
-TRAD_SYNOPSIS
- #include
- int iswgraph(<[c]>)
- wint_t <[c]>;
-
DESCRIPTION
<> is a function which classifies wide-character values that
are graphic.
@@ -70,7 +66,7 @@ No supporting OS subroutines are required.
#include
int
-_DEFUN(iswgraph,(c),wint_t c)
+iswgraph (wint_t c)
{
- return (iswprint (c) && !iswspace (c));
+ return iswgraph_l (c, 0);
}
diff --git a/newlib/libc/ctype/iswgraph_l.c b/newlib/libc/ctype/iswgraph_l.c
index 9803c1853..b8a5866e9 100644
--- a/newlib/libc/ctype/iswgraph_l.c
+++ b/newlib/libc/ctype/iswgraph_l.c
@@ -1,10 +1,23 @@
+/* Modified (m) 2017 Thomas Wolff: revise Unicode and locale/wchar handling */
#include <_ansi.h>
#include