[cfe-dev] Can't build CLang with CLang on FreeBSD

Jay Sullivan notfed at gmail.com
Fri Apr 16 08:36:24 PDT 2010


When I try to build clang with clang, I get an error when building
Alarm.cpp. When I compile with profiling, I'm seeing the error "clang:
warning: the clang compiler does not support '-pg' ".  The build then
fails in the same place (Alarm.cpp) whether I use Debug and/or
Release, with or without profiling.  My operating system is FreeBSD
7.0-RELEASE.   The clang I'm using was built with gcc4.2.1 (admittedly
I'm not sure if that matters).

---- Here's some info about my PC ----

$ uname -a
FreeBSD dell.petio.org 7.0-RELEASE FreeBSD 7.0-RELEASE #2: Tue Dec 23
01:38:59 EST 2008     root at dell.petio.org:/usr/obj/usr/src/sys/DELL
i386

$ dmesg | head -n 20
Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-RELEASE #2: Tue Dec 23 01:38:59 EST 2008
    root at dell.petio.org:/usr/obj/usr/src/sys/DELL
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 2.66GHz (2657.83-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf29  Stepping = 9
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x4400<CNXT-ID,xTPR>
real memory  = 259473408 (247 MB)
avail memory = 244158464 (232 MB)

----Here's the version info for the compilers:----

$ gcc -v
  Using built-in specs.
  Target: i386-undermydesk-freebsd
  Configured with: FreeBSD/i386 system compiler
  Thread model: posix
  gcc version 4.2.1 20070719  [FreeBSD]

$ g++ -v
  Using built-in specs.
  Target: i386-undermydesk-freebsd
  Configured with: FreeBSD/i386 system compiler
  Thread model: posix
  gcc version 4.2.1 20070719  [FreeBSD]

$ clang -v
  clang version 1.5 (trunk 101372)
  Target: i386-unknown-freebsd7.0
  Thread model: posix

$ clang++ -v
  clang version 1.5 (trunk 101372)
  Target: i386-unknown-freebsd7.0
  Thread model: posix

----Here's the outputs for the builds:----

Debug (build fails)
    $ env CC=clang CXX=clang++ ./configure --enable-profiling
        Output: http://petio.org/2010/04/16/clang_debug_configure
    $ gmake VERBOSE=1
        Output: http://petio.org/2010/04/16/clang_debug_make

Debug+Profile (build fails)
    $ env CC=clang CXX=clang++ ./configure --enable-profiling
        Output: http://petio.org/2010/04/16/clang_debug_profile_configure
    $ gmake VERBOSE=1
        Output: http://petio.org/2010/04/16/clang_debug_profile_make

Release (build fails)
    $ env CC=clang CXX=clang++ ./configure --enable-optimized --enable-profiling
        Output: http://petio.org/2010/04/16/clang_release_configure
    $ gmake VERBOSE=1
        Output: http://petio.org/2010/04/16/clang_release_make

Release+Profile (build fails)
    $ env CC=clang CXX=clang++ ./configure --enable-optimized --enable-profiling
        Output: http://petio.org/2010/04/16/clang_release_profile_configure
    $ gmake VERBOSE=1
        Output: http://petio.org/2010/04/16/clang_release_profile_make

-- 
Jay Sullivan



More information about the cfe-dev mailing list