aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNeal Frager <neal.frager@amd.com>2024-01-11 18:30:19 +0000
committerCorinna Vinschen <corinna@vinschen.de>2024-01-23 09:49:03 +0100
commit90d6966b88392dbcef01c64766eb452c645a7bfe (patch)
treed6cb99ced8e4055fad2cf6b1cb5b3a1e6c85e473 /configure.ac
parent276dd12f69b1cf113a009da331d3bcfc4783fdce (diff)
downloadnewlib-90d6966b88392dbcef01c64766eb452c645a7bfe.zip
newlib-90d6966b88392dbcef01c64766eb452c645a7bfe.tar.gz
newlib-90d6966b88392dbcef01c64766eb452c645a7bfe.tar.bz2
configure.ac: configurable tooldir install path
This patch is required to fix how the newlib headers are installed when using a sysroot install directory. The cross compiler expects headers to be in .../host/usr/arm-none-eabi/sysroot/usr/include/newlib.h by default newlib installed the headers into .../host/usr/arm-none-eabi/sysroot/usr/arm-none-eabi/include/newlib.h ${exec_prefix} provides the .../host/usr/arm-none-eabi/sysroot path ${target_noncanonical} provides an extra arm-none-eabi/ that must be removed. With this patch, users can specify the tooldir path that is needed. Signed-off-by: Neal Frager <neal.frager@amd.com> Co-developed-by: Chris Wardman <cjwfirmware@vxmdesign.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index f1bb721..05ddf69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2599,7 +2599,15 @@ esac
# Some systems (e.g., one of the i386-aix systems the gas testers are
# using) don't handle "\$" correctly, so don't use it here.
-tooldir='${exec_prefix}'/${target_noncanonical}
+AC_ARG_WITH([tooldir],
+ [AS_HELP_STRING([--with-tooldir=PATH],
+ [use given path to install target tools after build])],
+ [AS_CASE([x"$withval"],
+ [x/*],,
+ [AC_MSG_ERROR([argument to --with-tooldir must be an absolute path])])
+ ],
+ [with_tooldir='${exec_prefix}'/${target_noncanonical}])
+tooldir=${with_tooldir}
build_tooldir=${tooldir}
# Create a .gdbinit file which runs the one in srcdir