aac2
![]() |
|
|
|
|
|||||||
| Howtos & FAQs (Moderated) Would you like to share some of your solutions for certain problems? Tips or tricks? Post here. All new topics are automatically moderated. |
![]() |
|
|
Thread Tools | Display Modes |
|
#51
|
|||
|
|||
|
I'm a bit at a loss so please explain the following to me: how do I use ccache with clang for world and ports? I am aware that not all ports compile with clang so once I understand how to get it to work, I can find workarounds for ports that are not happy when they're being built with clang.
|
|
#52
|
|||
|
|||
|
Quote:
Big fat red warning for info scavengers: I'm just posting what I am trying out; don't blindly follow these steps. I'm posting this so someone can review them. Code:
cd /usr/local/libexec/ccache/world ln -s ccache clang ln -s ccache clang++ cd .. ln -s /usr/local/bin/ccache clang ln -s /usr/local/bin/ccache++ clang Code:
(...other stuff...)
CC=clang
CXX=clang++
CPP=clang-cpp
.if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*))
.if !defined(NOCCACHE)
CC:=${CC:C,^cc,/usr/local/libexec/ccache/world/cc,1}
CXX:=${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/c++,1}
CC:=${CC:C,^clang,/usr/local/libexec/ccache/world/clang,1}
CXX:=${CXX:C,^clang\+\+,/usr/local/libexec/ccache/world/clang++,1}
CCACHE_DIR:=/usr/sysccache
CCACHE_COMPRESS:=yes
CCACHE_COMPILERCHECK:=content
.endif
.endif
.if ${CC:T} == "clang"
CFLAGS+= -Qunused-arguments
.endif
Last edited by DutchDaemon; May 25th, 2012 at 22:26. |
|
#53
|
|||
|
|||
|
Replying to my own comment... again.
![]() The system has been running for a week now. A little background information: it is a rented VPS, FreeBSD runs as a Xen HVM domU. It has 512M of RAM and one CPU core. Purpose of the VPS: to run Apache and Redmine. Good news first: everything builds except for the Midnight Commander (mc). I could compile the many ports required by me and/or Redmine. But the bad news: The system is painfully slow. I'm puzzled because the box seems to be healthy as can be seen in the following snippet from top: Code:
CPU: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle Mem: 172M Active, 144M Inact, 139M Wired, 18M Cache, 59M Buf, 4860K Free Swap: 3072M Total, 896K Used, 3071M Free What I'm going to do now is this: recompile everything with gcc and test it again. If it is just as slow then we can assume that clang is not to blame. But if it is faster then something is up. Unfortunately I am not a C programmer or capable system engineer in these matters, so I can't be of much help beyond posting my own findings. I would welcome feedback though.
|
![]() |
| Tags |
| ccache, kiss |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HOWTO: FreeBSD CPU Scaling and Power Saving | vermaden | Howtos & FAQs (Moderated) | 47 | December 30th, 2011 15:25 |