Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

[3.4] no futimes/futimens on solaris (use futimesat instead?) #19365

Closed Quuxplusone closed 7 years ago

Quuxplusone commented 10 years ago
Bugzilla Link PR19366
Status RESOLVED DUPLICATE of bug 24606
Importance P normal
Reported by Frank Bergemann (FBergemann@web.de)
Reported on 2014-04-08 00:58:06 -0700
Last modified on 2017-07-26 03:10:49 -0700
Version 3.4
Hardware Sun Solaris
CC fedor.v.sergeev@gmail.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
On Solaris 10 (sparcv9) i get following compilation problem:
In file included from /data/FBergemann/SRC2/llvm-
release_34/lib/Support/Path.cpp:1035:0:
/data/FBergemann/SRC2/llvm-release_34/lib/Support/Unix/Path.inc:540:2: error:
#error Missing futimes() and futimens()
 #error Missing futimes() and futimens()
  ^

I could at least continue compilation for using futimesat(...) instead - hacked
this way:

#if defined(HAVE_FUTIMENS)
  timespec Times[2];
  Times[0].tv_sec = Time.toPosixTime();
  Times[0].tv_nsec = 0;
  Times[1] = Times[0];
  if (::futimens(FD, Times))
#elif defined(HAVE_FUTIMES)
  timeval Times[2];
  Times[0].tv_sec = Time.toPosixTime();
  Times[0].tv_usec = 0;
  Times[1] = Times[0];
  if (::futimes(FD, Times))
#else
  timeval Times[2];
  Times[0].tv_sec = Time.toPosixTime();
  Times[0].tv_usec = 0;
  Times[1] = Times[0];
  if (::futimesat(FD, NULL, Times))
#endif

Can you check, if you can incorporate futimesat(...) option into the build
procedure?

- thanks!

best regards,
Frank
Quuxplusone commented 10 years ago
after all it seems, that clang 3.4 is not supported for Solaris 10 sparcv9(?):

> clang -o test test.c
clang: warning: unknown platform, assuming -mfloat-abi=soft
Unsupported architecture
UNREACHABLE executed at /data/FBergemann/SRC2/llvm-
release_34/tools/clang/lib/Driver/Tools.cpp:5205!
Stack dump:
0.      Program arguments: clang -o test test.c
1.      Compilation construction
2.      Building compilation jobs
3.      Building compilation jobs
Abort

???

regards,
Frank
Quuxplusone commented 10 years ago
i don't understand why is stated here
http://clang.llvm.org/docs/UsersManual.html#cpu-architectures-features-and-limitations
"clang currently contains some support for other architectures (e.g. Sparc);
however, significant pieces of code generation are still missing, and they
haven’t undergone significant testing."

???

\Frank
Quuxplusone commented 10 years ago
Even worse in http://llvm.org/svn/llvm-project/cfe/trunk/lib/Driver/Tools.cpp

void solaris::Link::ConstructJob(Compilation &C, const JobAction &JA,
                                  const InputInfo &Output,
                                  const InputInfoList &Inputs,
                                  const ArgList &Args,
                                  const char *LinkingOutput) const {
  // FIXME: Find a real GCC, don't hard-code versions here
  std::string GCCLibPath = "/usr/gcc/4.5/lib/gcc/";
[...]

\Frank
Quuxplusone commented 7 years ago
Solaris support is much better now.
For the remaining gcc toolchain discovery issues see PR24606.

_This bug has been marked as a duplicate of bug 24606_