On Mon, Jun 24, 2013 at 6:17 PM, Jorge Rodrigues <skeept at gmail.com> wrote:> Norm, > > thanks for the help. Applying the fix solves the issue I mentioned but now I > have more issues. > > I can install clang, but when running I cannot compile and link files. > If I compile with -c flag it works but compiling the following x.c file > gives an error:> /project/helder/scratch/packages2/bin/ld: unrecognized option '-C' > /project/helder/scratch/packages2/bin/ld: use the --help option for usage > information > clang: error: linker command failed with exit code 1 (use -v to see > invocation)-C is a flag for the Solaris linker only (/usr/bin/ld). It looks like /project/helder/scratch/packages2/bin/ld is actually the GNU linker, and it doesn't understand -C. I'll file the bug about the endian stuff, but we'll also have to have an <endian.h> in Solaris as well. --Stefan -- Stefan Teleman KDE e.V. stefan.teleman at gmail.com
Jakob Stoklund Olesen
2013-Jun-24 23:41 UTC
[LLVMdev] Compiling llvm and Clang in solaris 10
On Jun 24, 2013, at 4:18 PM, Stefan Teleman <stefan.teleman at gmail.com> wrote:> I'll file the bug about the endian stuff, but we'll also have to have > an <endian.h> in Solaris as well.Do you still have issues after r182419? commit 01ef4f6982451e6a7c00a713d9ae677d3a15d042 Author: Jakob Stoklund Olesen <stoklund at 2pi.dk> Date: Tue May 21 13:36:13 2013 Define BYTE_ORDER on Solaris. Solaris doesn't have an endian.h header, but SPARC is the only big-endian architecture that runs Solaris, so just use that to detect endianness at compile time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk at 182419 91177308-0d34-0410-b5e6-96231b3b80d8 Thanks, /jakob
In the solaris machine I have access to I cannot use svn. I downloaded it at home tranfered with pen drive and now the compilations doesn't complain about endian.h missing. The error now is> makemake[1]: Entering directory `/project/helder/scratch/tmp/llvm/build/lib/Support' llvm[1]: Compiling PathV2.cpp for Debug+Asserts build In file included from /project/helder/scratch/tmp/llvm/lib/Support/PathV2.cpp:964:0: /project/helder/scratch/tmp/llvm/lib/Support/Unix/PathV2.inc: In function 'llvm::error_code llvm::sys::fs::setLastModificationAndAccessTime(int, llvm::sys::TimeValue)': /project/helder/scratch/tmp/llvm/lib/Support/Unix/PathV2.inc:452:7: error: '::futimes' has not been declared if (::futimes(FD, Times)) ^ /project/aircrews/packages/sun/5.10/x86/gnu/bin/rm: cannot remove `/project/helder/scratch/tmp/llvm/build/lib/Support/Debug+Asserts/PathV2.d.tmp': No such file or directory make[1]: *** [/project/helder/scratch/tmp/llvm/build/lib/Support/Debug+Asserts/PathV2.o] Error 1 make[1]: Leaving directory `/project/helder/scratch/tmp/llvm/build/lib/Support' make: *** [all] Error 1 Thanks, Jorge On Mon, Jun 24, 2013 at 6:41 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:> > On Jun 24, 2013, at 4:18 PM, Stefan Teleman <stefan.teleman at gmail.com> > wrote: > > > I'll file the bug about the endian stuff, but we'll also have to have > > an <endian.h> in Solaris as well. > > Do you still have issues after r182419? > > commit 01ef4f6982451e6a7c00a713d9ae677d3a15d042 > Author: Jakob Stoklund Olesen <stoklund at 2pi.dk> > Date: Tue May 21 13:36:13 2013 > > Define BYTE_ORDER on Solaris. > > Solaris doesn't have an endian.h header, but SPARC is the only > big-endian architecture that runs Solaris, so just use that to detect > endianness at compile time. > > git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk at 18241991177308-0d34-0410-b5e6-96231b3b80d8 > > Thanks, > /jakob > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130625/e049c12a/attachment.html>
Is there anything I can do regarding the linker issue? The solaris linker is in /usr/ccs/bin/ld but I think llvm wants to use the gnu linker. gcc in my system was compiled with the solaris linker. Thanks, Jorge On Mon, Jun 24, 2013 at 6:18 PM, Stefan Teleman <stefan.teleman at gmail.com>wrote:> On Mon, Jun 24, 2013 at 6:17 PM, Jorge Rodrigues <skeept at gmail.com> wrote: > > Norm, > > > > thanks for the help. Applying the fix solves the issue I mentioned but > now I > > have more issues. > > > > I can install clang, but when running I cannot compile and link files. > > If I compile with -c flag it works but compiling the following x.c file > > gives an error: > > > /project/helder/scratch/packages2/bin/ld: unrecognized option '-C' > > /project/helder/scratch/packages2/bin/ld: use the --help option for usage > > information > > clang: error: linker command failed with exit code 1 (use -v to see > > invocation) > > -C is a flag for the Solaris linker only (/usr/bin/ld). It looks like > /project/helder/scratch/packages2/bin/ld is actually the GNU linker, > and it doesn't understand -C. > > I'll file the bug about the endian stuff, but we'll also have to have > an <endian.h> in Solaris as well. > > --Stefan > > -- > Stefan Teleman > KDE e.V. > stefan.teleman at gmail.com >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130625/9124e6b8/attachment.html>
On Tue, Jun 25, 2013 at 10:50 AM, Jorge Rodrigues <skeept at gmail.com> wrote:> Is there anything I can do regarding the linker issue? The solaris linker is > in /usr/ccs/bin/ld but I think llvm wants to use the gnu linker. gcc in my > system was compiled with the solaris linker.The current Solaris implementation in ${top}/tools/clang/lib/Driver/Tools.cpp has all the GCC and linker-related machinery hardcoded. I have a number of patches for Solaris which would make all the linker stuff work much better (and would give one the option to choose between different linkers at link time) but I haven't gotten the green light from Oracle to make these patches public yet - i'm waiting on the internal approval chain to complete. We *really* want to contribute Solaris support (Intel and SPARC) to clang/llvm, and these legal approvals are not only required, but also in everyone's best interests (not just our own). i'm waiting for legal approvals at this point, and i don't have a better solution handy at the moment. The only thing i can offer is "stay tuned, we're working on it". :-) --Stefan -- Stefan Teleman KDE e.V. stefan.teleman at gmail.com