From fbaa096772f77be664864d80508906ad018cc23b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 25 Feb 2020 07:38:33 -0600 Subject: [PATCH] x86_64/i386 fenv: Replace symlink with include fenv_stub.c Having symlinks for these files led to an issue reported to the RTEMS Project that showed up using some tar for native Windows to unpack the newlib sources. It creates symlinks in the tar file as copies of the files the symlinks point to. If the links appear in the tar file before the source exists, it cannot copy the file. The solution in this patch is to convert the files that are symbolic links into simple files which include the file they were linked to. This should be more portable and avoids the symbolinc link problem. --- newlib/libm/machine/i386/feclearexcept.c | 8 +++++++- newlib/libm/machine/i386/fegetenv.c | 8 +++++++- newlib/libm/machine/i386/fegetexceptflag.c | 8 +++++++- newlib/libm/machine/i386/fegetround.c | 8 +++++++- newlib/libm/machine/i386/feholdexcept.c | 8 +++++++- newlib/libm/machine/i386/fenv.c | 8 +++++++- newlib/libm/machine/i386/feraiseexcept.c | 8 +++++++- newlib/libm/machine/i386/fesetenv.c | 8 +++++++- newlib/libm/machine/i386/fesetexceptflag.c | 8 +++++++- newlib/libm/machine/i386/fesetround.c | 8 +++++++- newlib/libm/machine/i386/fetestexcept.c | 8 +++++++- newlib/libm/machine/i386/feupdateenv.c | 8 +++++++- newlib/libm/machine/x86_64/feclearexcept.c | 8 +++++++- newlib/libm/machine/x86_64/fegetenv.c | 8 +++++++- newlib/libm/machine/x86_64/fegetexceptflag.c | 8 +++++++- newlib/libm/machine/x86_64/fegetround.c | 8 +++++++- newlib/libm/machine/x86_64/feholdexcept.c | 8 +++++++- newlib/libm/machine/x86_64/feraiseexcept.c | 8 +++++++- newlib/libm/machine/x86_64/fesetenv.c | 8 +++++++- newlib/libm/machine/x86_64/fesetexceptflag.c | 8 +++++++- newlib/libm/machine/x86_64/fesetround.c | 8 +++++++- newlib/libm/machine/x86_64/fetestexcept.c | 8 +++++++- newlib/libm/machine/x86_64/feupdateenv.c | 8 +++++++- 23 files changed, 161 insertions(+), 23 deletions(-) mode change 120000 => 100644 newlib/libm/machine/i386/feclearexcept.c mode change 120000 => 100644 newlib/libm/machine/i386/fegetenv.c mode change 120000 => 100644 newlib/libm/machine/i386/fegetexceptflag.c mode change 120000 => 100644 newlib/libm/machine/i386/fegetround.c mode change 120000 => 100644 newlib/libm/machine/i386/feholdexcept.c mode change 120000 => 100644 newlib/libm/machine/i386/fenv.c mode change 120000 => 100644 newlib/libm/machine/i386/feraiseexcept.c mode change 120000 => 100644 newlib/libm/machine/i386/fesetenv.c mode change 120000 => 100644 newlib/libm/machine/i386/fesetexceptflag.c mode change 120000 => 100644 newlib/libm/machine/i386/fesetround.c mode change 120000 => 100644 newlib/libm/machine/i386/fetestexcept.c mode change 120000 => 100644 newlib/libm/machine/i386/feupdateenv.c mode change 120000 => 100644 newlib/libm/machine/x86_64/feclearexcept.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fegetenv.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fegetexceptflag.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fegetround.c mode change 120000 => 100644 newlib/libm/machine/x86_64/feholdexcept.c mode change 120000 => 100644 newlib/libm/machine/x86_64/feraiseexcept.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fesetenv.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fesetexceptflag.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fesetround.c mode change 120000 => 100644 newlib/libm/machine/x86_64/fetestexcept.c mode change 120000 => 100644 newlib/libm/machine/x86_64/feupdateenv.c diff --git a/newlib/libm/machine/i386/feclearexcept.c b/newlib/libm/machine/i386/feclearexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/feclearexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/feclearexcept.c b/newlib/libm/machine/i386/feclearexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/feclearexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fegetenv.c b/newlib/libm/machine/i386/fegetenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fegetenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fegetenv.c b/newlib/libm/machine/i386/fegetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fegetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fegetexceptflag.c b/newlib/libm/machine/i386/fegetexceptflag.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fegetexceptflag.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fegetexceptflag.c b/newlib/libm/machine/i386/fegetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fegetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fegetround.c b/newlib/libm/machine/i386/fegetround.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fegetround.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fegetround.c b/newlib/libm/machine/i386/fegetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fegetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/feholdexcept.c b/newlib/libm/machine/i386/feholdexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/feholdexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/feholdexcept.c b/newlib/libm/machine/i386/feholdexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/feholdexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fenv.c b/newlib/libm/machine/i386/fenv.c deleted file mode 120000 index 1d7c7a117..000000000 --- a/newlib/libm/machine/i386/fenv.c +++ /dev/null @@ -1 +0,0 @@ -../x86_64/fenv.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fenv.c b/newlib/libm/machine/i386/fenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/feraiseexcept.c b/newlib/libm/machine/i386/feraiseexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/feraiseexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/feraiseexcept.c b/newlib/libm/machine/i386/feraiseexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/feraiseexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fesetenv.c b/newlib/libm/machine/i386/fesetenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fesetenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fesetenv.c b/newlib/libm/machine/i386/fesetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fesetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fesetexceptflag.c b/newlib/libm/machine/i386/fesetexceptflag.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fesetexceptflag.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fesetexceptflag.c b/newlib/libm/machine/i386/fesetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fesetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fesetround.c b/newlib/libm/machine/i386/fesetround.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fesetround.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fesetround.c b/newlib/libm/machine/i386/fesetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fesetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/fetestexcept.c b/newlib/libm/machine/i386/fetestexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/fetestexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/fetestexcept.c b/newlib/libm/machine/i386/fetestexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/fetestexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/i386/feupdateenv.c b/newlib/libm/machine/i386/feupdateenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/i386/feupdateenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/i386/feupdateenv.c b/newlib/libm/machine/i386/feupdateenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/i386/feupdateenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/feclearexcept.c b/newlib/libm/machine/x86_64/feclearexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/feclearexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/feclearexcept.c b/newlib/libm/machine/x86_64/feclearexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/feclearexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fegetenv.c b/newlib/libm/machine/x86_64/fegetenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fegetenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fegetenv.c b/newlib/libm/machine/x86_64/fegetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fegetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fegetexceptflag.c b/newlib/libm/machine/x86_64/fegetexceptflag.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fegetexceptflag.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fegetexceptflag.c b/newlib/libm/machine/x86_64/fegetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fegetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fegetround.c b/newlib/libm/machine/x86_64/fegetround.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fegetround.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fegetround.c b/newlib/libm/machine/x86_64/fegetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fegetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/feholdexcept.c b/newlib/libm/machine/x86_64/feholdexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/feholdexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/feholdexcept.c b/newlib/libm/machine/x86_64/feholdexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/feholdexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/feraiseexcept.c b/newlib/libm/machine/x86_64/feraiseexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/feraiseexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/feraiseexcept.c b/newlib/libm/machine/x86_64/feraiseexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/feraiseexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fesetenv.c b/newlib/libm/machine/x86_64/fesetenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fesetenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fesetenv.c b/newlib/libm/machine/x86_64/fesetenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fesetenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fesetexceptflag.c b/newlib/libm/machine/x86_64/fesetexceptflag.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fesetexceptflag.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fesetexceptflag.c b/newlib/libm/machine/x86_64/fesetexceptflag.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fesetexceptflag.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fesetround.c b/newlib/libm/machine/x86_64/fesetround.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fesetround.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fesetround.c b/newlib/libm/machine/x86_64/fesetround.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fesetround.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/fetestexcept.c b/newlib/libm/machine/x86_64/fetestexcept.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/fetestexcept.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/fetestexcept.c b/newlib/libm/machine/x86_64/fetestexcept.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/fetestexcept.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c" diff --git a/newlib/libm/machine/x86_64/feupdateenv.c b/newlib/libm/machine/x86_64/feupdateenv.c deleted file mode 120000 index f97d27dd8..000000000 --- a/newlib/libm/machine/x86_64/feupdateenv.c +++ /dev/null @@ -1 +0,0 @@ -../../fenv/fenv_stub.c \ No newline at end of file diff --git a/newlib/libm/machine/x86_64/feupdateenv.c b/newlib/libm/machine/x86_64/feupdateenv.c new file mode 100644 index 000000000..8cbee7771 --- /dev/null +++ b/newlib/libm/machine/x86_64/feupdateenv.c @@ -0,0 +1,7 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * (c) Copyright 2019 Joel Sherrill + */ + +#include "../../fenv/fenv_stub.c"