public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Misc Patches
@ 2020-02-19 14:03 Joel Sherrill
  2020-02-19 14:04 ` [PATCH v3 1/2] newlib/libc/include/devctl.h: Add extern "C" wrapper Joel Sherrill
  2020-02-19 14:04 ` [PATCH v3 2/2] x86_64/i386 fenv: Replace symlink with include fenv_stub.c Joel Sherrill
  0 siblings, 2 replies; 8+ messages in thread
From: Joel Sherrill @ 2020-02-19 14:03 UTC (permalink / raw)
  To: newlib; +Cc: Joel Sherrill

Hi

This patch series is small and the patches are independent.
The only common factor is that they fix issues recently encountered
in the RTEMS Community.

0001 - Add extern "C" to devctl.h
0002 - Convert symlinks to real files for x86_64 and i386 fenv

Now of this is particularly complicated but hopefully the explanations
are adequate in the commit message.

Thanks.

--joel

Joel Sherrill (2):
  newlib/libc/include/devctl.h: Add extern "C" wrapper
  x86_64/i386 fenv: Replace symlink with include fenv_stub.c

 newlib/libc/include/devctl.h                 | 8 ++++++++
 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 +++++++-
 24 files changed, 169 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

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 2/2] x86_64/i386 fenv: Replace symlink with include fenv_stub.c
  2020-02-19 14:03 [PATCH v3 0/2] Misc Patches Joel Sherrill
  2020-02-19 14:04 ` [PATCH v3 1/2] newlib/libc/include/devctl.h: Add extern "C" wrapper Joel Sherrill
@ 2020-02-19 14:04 ` Joel Sherrill
  2020-02-20  9:01   ` Corinna Vinschen
  1 sibling, 1 reply; 8+ messages in thread
From: Joel Sherrill @ 2020-02-19 14:04 UTC (permalink / raw)
  To: newlib; +Cc: Joel Sherrill

Having symlinks for these files led to an issue reported to the
RTEMS Project that showed up on MSYS2. Per the report we received,
there are no such things as links on Windows, it is a copy of the
file and if it does not exist it has to fail. The working all depends
on the order the tar file is built. 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 f97d27d..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/feclearexcept.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/fegetenv.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/fegetexceptflag.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/fegetround.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/feholdexcept.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 1d7c7a1..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/fenv.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/feraiseexcept.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/fesetenv.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/fesetexceptflag.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/fesetround.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/fetestexcept.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /dev/null
+++ b/newlib/libm/machine/i386/feupdateenv.c
@@ -0,0 +1,7 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ * 
+ * (c) Copyright 2019 Joel Sherrill <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /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 <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /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 <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /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 <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /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 <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /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 <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /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 <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /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 <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /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 <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /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 <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /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 <joel@rtems.org>
+ */
+
+#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 f97d27d..0000000
--- 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 0000000..a8601af
--- /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 <joel@rtems.org>
+ */
+
+#include "../../fenv/fenv_stub.c"
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 1/2] newlib/libc/include/devctl.h: Add extern "C" wrapper
  2020-02-19 14:03 [PATCH v3 0/2] Misc Patches Joel Sherrill
@ 2020-02-19 14:04 ` Joel Sherrill
  2020-02-20  8:49   ` Corinna Vinschen
  2020-02-19 14:04 ` [PATCH v3 2/2] x86_64/i386 fenv: Replace symlink with include fenv_stub.c Joel Sherrill
  1 sibling, 1 reply; 8+ messages in thread
From: Joel Sherrill @ 2020-02-19 14:04 UTC (permalink / raw)
  To: newlib; +Cc: Joel Sherrill

Adding this was necessary to allow posix_devctl() from C++.
---
 newlib/libc/include/devctl.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/newlib/libc/include/devctl.h b/newlib/libc/include/devctl.h
index fd3409f..889693e 100644
--- a/newlib/libc/include/devctl.h
+++ b/newlib/libc/include/devctl.h
@@ -35,6 +35,10 @@
 
 #include <sys/cdefs.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(__rtems__)
 /*
  * The FACE Technical Standard, Edition 3.0 and later require the
@@ -67,4 +71,8 @@ int posix_devctl(
 );
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 1/2] newlib/libc/include/devctl.h: Add extern "C" wrapper
  2020-02-19 14:04 ` [PATCH v3 1/2] newlib/libc/include/devctl.h: Add extern "C" wrapper Joel Sherrill
@ 2020-02-20  8:49   ` Corinna Vinschen
  0 siblings, 0 replies; 8+ messages in thread
From: Corinna Vinschen @ 2020-02-20  8:49 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]

On Feb 19 08:03, Joel Sherrill wrote:
> Adding this was necessary to allow posix_devctl() from C++.
> ---
>  newlib/libc/include/devctl.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/newlib/libc/include/devctl.h b/newlib/libc/include/devctl.h
> index fd3409f..889693e 100644
> --- a/newlib/libc/include/devctl.h
> +++ b/newlib/libc/include/devctl.h
> @@ -35,6 +35,10 @@
>  
>  #include <sys/cdefs.h>
>  
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>  #if defined(__rtems__)
>  /*
>   * The FACE Technical Standard, Edition 3.0 and later require the
> @@ -67,4 +71,8 @@ int posix_devctl(
>  );
>  #endif
>  
> +#ifdef __cplusplus
> +}
> +#endif
> +
>  #endif
> -- 
> 1.8.3.1

Pushed.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] x86_64/i386 fenv: Replace symlink with include fenv_stub.c
  2020-02-19 14:04 ` [PATCH v3 2/2] x86_64/i386 fenv: Replace symlink with include fenv_stub.c Joel Sherrill
@ 2020-02-20  9:01   ` Corinna Vinschen
  2020-02-20 13:54     ` Joel Sherrill
  0 siblings, 1 reply; 8+ messages in thread
From: Corinna Vinschen @ 2020-02-20  9:01 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

Hey Joel,

the patch itself is fine, but I'm puzzeling over the commit message.

On Feb 19 08:03, Joel Sherrill wrote:
> Having symlinks for these files led to an issue reported to the
> RTEMS Project that showed up on MSYS2. Per the report we received,

MSYS2 is a Cygwin clone which understands any kind of Cygwin symlink,
an invention from way back when Windows really didn't have symlinks.

> there are no such things as links on Windows,

NTFS has symlinks since Windows Vista, about 2007.

> it is a copy of the
> file and if it does not exist it has to fail. The working all depends
> on the order the tar file is built. If the links appear in the tar file
> before the source exists, it cannot copy the file.

Isn't that just somebody using an inadequate tool here?  Do you have a
pointer to a bugzilla/github/whatever issue clarifying the actual
problem?


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] x86_64/i386 fenv: Replace symlink with include fenv_stub.c
  2020-02-20  9:01   ` Corinna Vinschen
@ 2020-02-20 13:54     ` Joel Sherrill
  2020-02-20 14:10       ` Corinna Vinschen
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Sherrill @ 2020-02-20 13:54 UTC (permalink / raw)
  To: Newlib, Chris Johns

On Thu, Feb 20, 2020 at 3:01 AM Corinna Vinschen <vinschen@redhat.com>
wrote:

> Hey Joel,
>
> the patch itself is fine, but I'm puzzeling over the commit message.
>

That was the end result of the investigation into the user's issue. I had
to be
pinged privately to even notice that my fenv addition of symlinks triggered
the
failure. It just wasn't obvious at first to me. It was hard to see how the
fenv patch
could trigger this.

My conclusion is that avoiding symlinks in source distributions falls into
the
same rule bucket as not using capitalization to distinguish files in the
same
directory. Works almost everywhere not not quite. Just like we used to avoid
long file names.


>
> On Feb 19 08:03, Joel Sherrill wrote:
> > Having symlinks for these files led to an issue reported to the
> > RTEMS Project that showed up on MSYS2. Per the report we received,
>
> MSYS2 is a Cygwin clone which understands any kind of Cygwin symlink,
> an invention from way back when Windows really didn't have symlinks.
>
> > there are no such things as links on Windows,
>
> NTFS has symlinks since Windows Vista, about 2007.
>

Yeah. It is an issue with tar. Apparently you can't create symlinks
to non-existent files at least with bsdtar. If the link is in the tar file
before
the real file, it fails to create the file. Maybe GNU tar covers this
up.

>
> > it is a copy of the
> > file and if it does not exist it has to fail. The working all depends
> > on the order the tar file is built. If the links appear in the tar file
> > before the source exists, it cannot copy the file.
>
> Isn't that just somebody using an inadequate tool here?  Do you have a
> pointer to a bugzilla/github/whatever issue clarifying the actual
> problem?
>

Here is the thread. It is a few messages in before investigation shows it
is a tar file issue.

https://lists.rtems.org/pipermail/devel/2020-February/057184.html

The RTEMS ticket is here:

https://devel.rtems.org/ticket/3868

I know this is an odd one.

--joel

>
>
> Thanks,
> Corinna
>
> --
> Corinna Vinschen
> Cygwin Maintainer
> Red Hat
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] x86_64/i386 fenv: Replace symlink with include fenv_stub.c
  2020-02-20 13:54     ` Joel Sherrill
@ 2020-02-20 14:10       ` Corinna Vinschen
  2020-02-25 13:38         ` Joel Sherrill
  0 siblings, 1 reply; 8+ messages in thread
From: Corinna Vinschen @ 2020-02-20 14:10 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

On Feb 20 07:54, Joel Sherrill wrote:
> On Thu, Feb 20, 2020 at 3:01 AM Corinna Vinschen <vinschen@redhat.com>
> wrote:
> 
> > Hey Joel,
> >
> > the patch itself is fine, but I'm puzzeling over the commit message.
> >
> [...]
> Yeah. It is an issue with tar. Apparently you can't create symlinks
> to non-existent files at least with bsdtar. If the link is in the tar file
> before
> the real file, it fails to create the file. Maybe GNU tar covers this
> up.
> [...]
> Here is the thread. It is a few messages in before investigation shows it
> is a tar file issue.
> 
> https://lists.rtems.org/pipermail/devel/2020-February/057184.html
> 
> The RTEMS ticket is here:
> 
> https://devel.rtems.org/ticket/3868
> 
> I know this is an odd one.

In that case I'd like to change the commit message to something along
these lines:

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

This doesn't point to MSYS2 or "recet" Windows versions as the culprit.


That ok with you?


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] x86_64/i386 fenv: Replace symlink with include fenv_stub.c
  2020-02-20 14:10       ` Corinna Vinschen
@ 2020-02-25 13:38         ` Joel Sherrill
  0 siblings, 0 replies; 8+ messages in thread
From: Joel Sherrill @ 2020-02-25 13:38 UTC (permalink / raw)
  To: Newlib

On Thu, Feb 20, 2020 at 8:10 AM Corinna Vinschen <vinschen@redhat.com>
wrote:

> On Feb 20 07:54, Joel Sherrill wrote:
> > On Thu, Feb 20, 2020 at 3:01 AM Corinna Vinschen <vinschen@redhat.com>
> > wrote:
> >
> > > Hey Joel,
> > >
> > > the patch itself is fine, but I'm puzzeling over the commit message.
> > >
> > [...]
> > Yeah. It is an issue with tar. Apparently you can't create symlinks
> > to non-existent files at least with bsdtar. If the link is in the tar
> file
> > before
> > the real file, it fails to create the file. Maybe GNU tar covers this
> > up.
> > [...]
> > Here is the thread. It is a few messages in before investigation shows it
> > is a tar file issue.
> >
> > https://lists.rtems.org/pipermail/devel/2020-February/057184.html
> >
> > The RTEMS ticket is here:
> >
> > https://devel.rtems.org/ticket/3868
> >
> > I know this is an odd one.
>
> In that case I'd like to change the commit message to something along
> these lines:
>
> ---
> 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.
> ---
>
> This doesn't point to MSYS2 or "recet" Windows versions as the culprit.
>
>
> That ok with you?
>

It is. :)

Patch coming.

--joel


>
>
> Thanks,
> Corinna
>
> --
> Corinna Vinschen
> Cygwin Maintainer
> Red Hat
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-02-25 13:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 14:03 [PATCH v3 0/2] Misc Patches Joel Sherrill
2020-02-19 14:04 ` [PATCH v3 1/2] newlib/libc/include/devctl.h: Add extern "C" wrapper Joel Sherrill
2020-02-20  8:49   ` Corinna Vinschen
2020-02-19 14:04 ` [PATCH v3 2/2] x86_64/i386 fenv: Replace symlink with include fenv_stub.c Joel Sherrill
2020-02-20  9:01   ` Corinna Vinschen
2020-02-20 13:54     ` Joel Sherrill
2020-02-20 14:10       ` Corinna Vinschen
2020-02-25 13:38         ` Joel Sherrill

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).