DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th January 2013
lumiwa lumiwa is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 4 Times in 3 Posts
Default clang -v

Hi!

I have:
FreeBSD 9.1-RELEASE #0 r243826: Tue Dec 4 06:55:39 UTC 2012
r...@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386

Almost 90% of ports I built with clang and in etc/make.conf I have:

CC=clang
CXX=clang++
CPP=clang-cpp

But when I ran clang --version I got:

FreeBSD clang version 3.1 (branches/release_31 156863) 20120523
Target: i386-unknown-freebsd9.0
Thread model: posix

Why it shows "Target: i386-unknown-freebsd9.0", please?

Thanks in advance...
Reply With Quote
  #2   (View Single Post)  
Old 11th January 2013
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,067
Thanked 198 Times in 156 Posts
Default

Code:
/// Target triples are strings in the canonical form:
///   ARCHITECTURE-VENDOR-OPERATING_SYSTEM
/// or
///   ARCHITECTURE-VENDOR-OPERATING_SYSTEM-ENVIRONMENT
In this case the vendor is `unknown'.

Possible vendors seem to be:
Code:
  enum VendorType {
    UnknownVendor,

    Apple,
    PC,
    SCEI
  };
(See: src/contrib/llvm/tools/clang/lib/Driver/Driver.cpp and src/contrib/llvm/include/llvm/ADT/Triple.h)

AFAIK this does nothing or very little, but I didn't investigate further.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 11th January 2013
lumiwa lumiwa is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 4 Times in 3 Posts
Default

Quote:
Originally Posted by Carpetsmoker View Post
Code:
/// Target triples are strings in the canonical form:
///   ARCHITECTURE-VENDOR-OPERATING_SYSTEM
/// or
///   ARCHITECTURE-VENDOR-OPERATING_SYSTEM-ENVIRONMENT
In this case the vendor is `unknown'.

Possible vendors seem to be:
Code:
  enum VendorType {
    UnknownVendor,

    Apple,
    PC,
    SCEI
  };
(See: src/contrib/llvm/tools/clang/lib/Driver/Driver.cpp and src/contrib/llvm/include/llvm/ADT/Triple.h)

AFAIK this does nothing or very little, but I didn't investigate further.
I was confused why is FreeBSD 9.0 if I have 9.1 version.

Thank you.
Reply With Quote
  #4   (View Single Post)  
Old 16th January 2013
bryn1u bryn1u is offline
Port Guard
 
Join Date: May 2009
Posts: 15
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by lumiwa View Post
Hi!

I have:
FreeBSD 9.1-RELEASE #0 r243826: Tue Dec 4 06:55:39 UTC 2012
r...@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386

Almost 90% of ports I built with clang and in etc/make.conf I have:

CC=clang
CXX=clang++
CPP=clang-cpp

But when I ran clang --version I got:

FreeBSD clang version 3.1 (branches/release_31 156863) 20120523
Target: i386-unknown-freebsd9.0
Thread model: posix

Why it shows "Target: i386-unknown-freebsd9.0", please?

Thanks in advance...
You have the same problem as I have:
Code:
root@ks3290849:/usr/ports/devel/subversion # clang --version
FreeBSD clang version 3.1 (branches/release_31 156863) 20120523
Target: x86_64-unknown-freebsd9.0
Thread model: posix
root@ks3290849:/usr/ports/devel/subversion # uname -a
FreeBSD ks3290849.kimsufi.com 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
Reply With Quote
  #5   (View Single Post)  
Old 16th January 2013
bryn1u bryn1u is offline
Port Guard
 
Join Date: May 2009
Posts: 15
Thanked 0 Times in 0 Posts
Default

Here is the answer:
Quote:
Yep, the target identifier is set up statically when the new sources of Clang are merged. Sources of 3.1 where merged when there was 9.0-STABLE. 9.1-STABLE already has 3.2 and $ clang --version says
Code:
:
FreeBSD clang version 3.2 (tags/RELEASE_32/final 170710) 20121221
Target: x86_64-unknown-freebsd9.1
Thread model: posix
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD FreeBSD 10 will be using Clang instead of GCC J65nko News 0 15th May 2012 09:10 PM
LLVM Clang Vs gcc aleunix OpenBSD General 8 22nd February 2012 10:24 AM
LLVM 3.0 requires Clang and DragonEgg J65nko News 0 2nd December 2011 06:55 PM
LLVM milestone reached - Clang compiler self-hosts J65nko News 0 5th February 2010 03:48 PM


All times are GMT. The time now is 01:23 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick