public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: "Frager, Neal" <neal.frager@amd.com>
To: "jjohnstn@redhat.com" <jjohnstn@redhat.com>,
	"thomas.petazzoni@bootlin.com" <thomas.petazzoni@bootlin.com>
Cc: "cjwfirmware@vxmdesign.com" <cjwfirmware@vxmdesign.com>,
	"newlib@sourceware.org" <newlib@sourceware.org>,
	"Frager, Neal" <neal.frager@amd.com>
Subject: RE: [PATCH v2 1/1] configure.ac: configurable tooldir install path
Date: Tue, 9 Jan 2024 14:18:45 +0000	[thread overview]
Message-ID: <CH2PR12MB5004DEF25A8CE9FBF60CF94FF06A2@CH2PR12MB5004.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20240109103953.1112223-1-neal.frager@amd.com>

Hi Jeff, Thomas,

Thank you both for your assistance with the patch below.

I am now dealing with a version conflict between newlib and buildroot.
I hope you can help me find the best solution for it.

On my machine, I have tested the patch below using autoconf 2.69.

However, the goal is for this patch is to ultimately integrate with
buildroot.

Currently, buildroot hardcodes the autoconf version that it builds
and uses to version 2.71.

But with autoconf version 2.71, I get the following error from the
newlib configure.ac because it requires specifically version 2.69:

>>> newlib-bare-metal 4.3.0 Autoreconfiguring
configure.ac:34: error: Please use exactly Autoconf 2.69 instead of 2.71.
config/override.m4:12: _GCC_AUTOCONF_VERSION_CHECK is expanded from...
configure.ac:34: the top level

As you are newlib and buildroot maintainers, could you
please help me with guidance about how to resolve this
issue?  

I can easily make a patch to make the autoconf version used
by buildroot configurable, but I would like your opinions
before I proceed.

Thank you again for your support!

Best regards,
Neal Frager
AMD

> 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>
> ---
> V1->V2:
> - migrated patch to configure.ac
> - changed option name to --with-tooldir=PATH
> ---
> configure.ac | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)

> diff --git a/configure.ac b/configure.ac
> index f1bb72100..9a01c1562 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2599,7 +2599,18 @@ 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])],
> +  [case x"$withval" in
> +     x/*) ;;
> +     *)
> +       with_tooldir=
> +       AC_MSG_WARN([argument to --with-tooldir must be an absolute path])
> +       ;;
> +   esac],
> +  [with_tooldir='${exec_prefix}'/${target_noncanonical}])
> +tooldir='${with_tooldir}'
> build_tooldir=${tooldir}
 
> # Create a .gdbinit file which runs the one in srcdir
> -- 
> 2.25.1


  reply	other threads:[~2024-01-09 14:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 10:39 Neal Frager
2024-01-09 14:18 ` Frager, Neal [this message]
2024-01-09 15:35   ` Frager, Neal
2024-01-10  9:53   ` Corinna Vinschen
2024-01-10 15:03     ` Mike Frysinger
2024-01-10 16:21       ` Corinna Vinschen
2024-01-10 20:44         ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CH2PR12MB5004DEF25A8CE9FBF60CF94FF06A2@CH2PR12MB5004.namprd12.prod.outlook.com \
    --to=neal.frager@amd.com \
    --cc=cjwfirmware@vxmdesign.com \
    --cc=jjohnstn@redhat.com \
    --cc=newlib@sourceware.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).