Re: [PATCH] libc: Replace i386/sys/fenv.h symlink with an #include shim

Joel Sherrill <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAF9ehCXg2dYMe9oFJy8=W2rufxvD6T-4_Jgd6Duk4BzCaqLg_w@mail.gmail.com>
On Sat, Mar 13, 2021, 12:11 PM David Macek via Newlib <[email protected]>
wrote:

> > > More to the point, how big of an issue would be to duplicate the file?
> >
> > I'm not hot on duplicating an identical file, it just raises maintenance
> > cost.  I'm currently looking into a solution to share the file without
> > duplicating it.
>
> Something like a Makefile rule?
>

The include file set for newlib already merges files from multiple
directories in a specific order and I recall (maybe incorrectly) that they
aren't merged during the build but the include path is carefully managed.

Is there a place put a shared file and have a one liner in both targets?
The problem I see here is that this is an odd case where two architectures
share the same code and you need a common include directory. For RTEMS,
this isn't unusual and our build system accounts for this well. But this is
an outlier for newlib.

Maybe a mix of a unique shared filename that is included and a secondary
machine directory being added to the include processing.

Just thinking out loud. There is an overarching pattern to how the shared,
machine, and system include directories are processed and I think any
solution to avoid symbolic links across architectures is going to have to
account for that.

--joel

>
> --
> David Macek
>
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.