RE: [PATCH v1 1/1] configure: correct tooldir install path

"Frager, Neal" <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CH2PR12MB50043E711DCB06FD78129A32F093A@CH2PR12MB5004.namprd12.prod.outlook.com>
Hi Thomas,

> 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.
> 
> Signed-off-by: Neal Frager <[email protected]>
> Co-developed-by: Chris Wardman <[email protected]>
> ---
>  configure | 7 +++++++
>  1 file changed, 7 insertions(+)

> The configure script is generated from configure.ac, so you should not
> patch configure but configure.ac.

When building newlib, I am not seeing the configure script get
generated.  If I only patch configure.ac, the configure script stays
the same and my patch appears ignored.

Do you know what I could be missing?

> +  --with-install-sysroot  use sysroot install directory
>    --with-debug-prefix-map='A=B C=D ...'
>                            map A to B, C to D ... in debug information
>    --with-build-config='NAME NAME2...'
> @@ -7057,7 +7059,12 @@ 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.
> +# Check whether --with-install-sysroot was given.
> +if test "${with_install_sysroot+set}" = set; then :

> --with/--without options are usually not used for boolean things,
> instead --enable/--disable option are used for boolean things.

> However here, I think that what would make sense is a --with-tooldir
> option. When not passed, the value is
> '${exec_prefix}'/${target_noncanonical}, and when passed, the value is
> the one passed in the option:

> ./configure ... --with-tooldir=/blabla

I made this correction, and the --with-tooldir option only works
if I patch it directly into the configure script.

Could you help me figure out what is missing?

Best regards,
Neal Frager
AMD
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.