This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] nvptx newlib port


On 04/10/2018 08:38 AM, Jeff Johnston wrote:
> 
> On Tue, Apr 10, 2018 at 9:56 AM, Cesar Philippidis
> <cesar@codesourcery.com <mailto:cesar@codesourcery.com>> wrote:
> 
>     On 04/06/2018 02:11 PM, Cesar Philippidis wrote:
>     > On 04/06/2018 02:08 PM, Joel Sherrill wrote:
>     >>
>     >>
>     >> On Fri, Apr 6, 2018 at 4:00 PM, Jeff Johnston
>     <jjohnstn@redhat.com <mailto:jjohnstn@redhat.com>
>     >> <mailto:jjohnstn@redhat.com <mailto:jjohnstn@redhat.com>>> wrote:
>     >>
>     >>     Looks fine.  I might suggest you add a check in
>     configure.host that
>     >>     issues
>     >>     an error or warning message if the elix-level is not set to 1 and
>     >>     --enable-global-io-streams is not set
>     >>     (if what you said above is required).  Other than that, I can
>     check
>     >>     it in
>     >>     shortly.
>     >>
>     >>
>     >> Can those be forced in the configure magic and then not required
>     >> on the configure command line?
>     >
>     > I'll see what I can do. Would it be OK to make that change in a follow
>     > up patch?
> 
>     What's a portable way of adding errors and warnings to configure.host?
>     It looks like it's just a regular shell script, so I'm not sure if
>     AC_MSG_WARN or AC_MSG_ERROR will work in there.
> 
> 
> You could try setting a variable in configure.host that gets tested in
> acinclude.m4 after configure.host returns.
> Then it can issue the AC_MSG_WARN or AC_MSG_ERROR.
>  e.g. newlib_warning_msg="nvptx does not support elix level > 1"
> 
> I am fine with silently defaulting when the user doesn't specify anything.

Here's the complete patch, with a new warning for unsupported
elix-levels on nvptx. I was hesitant to add a warning for
global-stdio-streams because that option is handled inside configure.in,
which runs well after configure.host. So in order to get that warning
working, I'd have to move the check for that flag into acinclude.m4. If
you're OK with me making that change, would you prefer that to be a
separate patch or include it with the nvptx patch? Otherwise, I'm happy
with this patch as is.

Thanks,
Cesar

>     Short of setting emitting warnings and errors, the attached patch
>     silently enable --enable-newlib-global-stdio-streams
>     --enable-newlib-elix-level=1 for nvptx targets if the user didn't
>     specify anything else. If that solution is sufficient, I can regenerate
>     a patch with the complete nvptx port.
> 
>     Thanks,
>     Cesar
> 
> 

Attachment: 0001-nvptx-port.patch.bz2
Description: application/bzip


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]