Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-27 11:11:44 +0300
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-30 11:47:57 +0300
commit6158b30e3e9b1b582ae60b15d64e775fa1705483 (patch)
tree1a2d615c1b610996574650fba91d36e263afc57f /newlib/configure.host
parent62a5c6b02c4a0353eb024840113a991c357b4c43 (diff)
RISC-V: Do not use _init/_fini
Introduce new host configuration variable "have_init_fini" which is set to "yes" by default. Override it for RISC-V to "no". Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Diffstat (limited to 'newlib/configure.host')
-rw-r--r--newlib/configure.host8
1 files changed, 8 insertions, 0 deletions
diff --git a/newlib/configure.host b/newlib/configure.host
index 4eebf6d95..bfa51669d 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -47,6 +47,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=
@@ -65,6 +66,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
@@ -266,6 +268,7 @@ case "${host_cpu}" in
machine_dir=riscv
newlib_cflags="${newlib_cflags} -DHAVE_NANOSLEEP"
default_newlib_atexit_dynamic_alloc="no"
+ have_init_fini=no
;;
rl78)
machine_dir=rl78
@@ -920,6 +923,11 @@ 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