[petsc-dev] Need a CFLAGS that does is *not* included in the link
Chetan Jhurani
chetan.jhurani at gmail.com
Thu May 24 21:31:21 CDT 2012
I faced a similar problem when using -x argument with nvcc during
petsc configuration, which could be fixed if CFLAGS was not passed
to the linker. So sending this info in case it is useful.
[jhurani at enrico ~]$ cat a.c
int main()
{
}
[jhurani at enrico ~]$ nvcc a.c -x c++ -c
[jhurani at enrico ~]$ nvcc a.o -x c++
a.o:1: error: stray '\177' in program
a.o:1: error: stray '\2' in program
a.o:1: error: stray '\1' in program
a.o:1: error: stray '\1' in program
a.o:1:8: warning: null character(s) ignored
a.o:1: error: stray '\1' in program
a.o:1:18: warning: null character(s) ignored
and many more lines…
Chetan
From: petsc-dev-bounces at mcs.anl.gov [mailto:petsc-dev-bounces at mcs.anl.gov] On Behalf Of Jed Brown
Sent: Thursday, May 24, 2012 7:09 PM
To: For users of the development version of PETSc
Subject: [petsc-dev] Need a CFLAGS that does is *not* included in the link
Building PETSc with clang++ produces a warning about compiling *.c as C++ being deprecated. To silence the warning, we would need to pass "-x c++" to the compiler, but NOT to the linker. CFLAGS is currently also passed to the linker. Is this something we want to fix?
Clang used to SEGV when "-x c++" is passed to the linker. Now (latest SVN) it just interprets the object file as C++ source (which obviously produces a ton of garbage).
http://llvm.org/bugs/show_bug.cgi?id=12924
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120524/be1a3504/attachment.html>
More information about the petsc-dev
mailing list