Symlinks in Newlib break mingw host builds

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Symlinks in Newlib break mingw host builds

Joel Sherrill
Hi

The following patch in newlib adds links as part of the i386/x86_64 fenv
support. Windows does not have symlinks and it is emulated as copy.
This complicates a bsdtar extraction of source.

 https://github.com/RTEMS/sourceware-mirror-newlib-
 cygwin/commit/cfc4955234828881145a20987c8a0a3cd373585c

 We tried to extract the tar file a second time, this has worked with
other tar files with symlinks however it does not work. We don't know why.

My current best idea is to replace all the symlinks in those libm
directories
with a short file that includes the file instead of symlinking to it.

Any other thoughts to eliminate the symlinks since they cause issues.

--joel
Reply | Threaded
Open this post in threaded view
|

Re: Symlinks in Newlib break mingw host builds

Keith Packard
Joel Sherrill <[hidden email]> writes:

> My current best idea is to replace all the symlinks in those libm
> directories with a short file that includes the file instead of
> symlinking to it.

I like this plan.

I've used a similar technique when building the malloc functions in my
newlib fork, picolibc, which uses meson instead of autotools. Instead of
custom build rules for each object, I create short source files that
have the necessary definitions and then include the shared source file.

--
-keith

signature.asc (847 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Symlinks in Newlib break mingw host builds

Jeff Johnston
In reply to this post by Joel Sherrill
On Mon, Feb 10, 2020 at 11:16 AM Joel Sherrill <[hidden email]> wrote:

> Hi
>
> The following patch in newlib adds links as part of the i386/x86_64 fenv
> support. Windows does not have symlinks and it is emulated as copy.
> This complicates a bsdtar extraction of source.
>
>  https://github.com/RTEMS/sourceware-mirror-newlib-
>  cygwin/commit/cfc4955234828881145a20987c8a0a3cd373585c
>
>  We tried to extract the tar file a second time, this has worked with
> other tar files with symlinks however it does not work. We don't know why.
>
> My current best idea is to replace all the symlinks in those libm
> directories
> with a short file that includes the file instead of symlinking to it.
>

Sounds fine.  Please go ahead.


> Any other thoughts to eliminate the symlinks since they cause issues.
>
> --joel
>
>