如何在Linux上启用ccache
发布时间:2020-05-23 09:38:54 所属栏目:Linux 来源:互联网
导读:关于在GNU / Linux上启用ccache的文档很少.以下是 launchpad.net的回复: At the moment, I think the best way to enable ccache is to add “/usr/lib/ccache” to the front of your path. If you want to enable it for all users by
|
关于在GNU / Linux上启用ccache的文档很少.以下是 launchpad.net的回复:
有人可以给我更多关于启用ccache的信息吗? 解决方法至少有两种方法:i)覆盖Makefile中的CC,CXX,…标志.在R框架内,读取系统和可选的用户配置文件,我只需设置 VER=4.7 CC=ccache gcc-$(VER) CXX=ccache g++-$(VER) SHLIB_CXXLD=g++-$(VER) FC=ccache gfortran F77=ccache gfortran 这也允许我在gcc版本之间来回切换.现在所有涉及R的编译都使用ccache. ii)对于其他用途,我已经部署了在/usr/bin之前检查/usr/local / bin /的事实.人们可以做到 root@max:/usr/local/bin# ls -l gcc lrwxrwxrwx 1 root root 15 Jan 27 11:04 gcc -> /usr/bin/ccache root@max:/usr/local/bin# ./gcc --version gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 Copyright (C) 2012 Free Software Foundation,Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. root@max:/usr/local/bin# 现在通过ccache调用gcc: edd@max:/tmp$cp -vax ~/src/progs/C/benfordsLaw.c . `/home/edd/src/progs/C/benfordsLaw.c' -> `./benfordsLaw.c' edd@max:/tmp$time /usr/local/bin/gcc -c benfordsLaw.c real 0m0.292s user 0m0.052s sys 0m0.012s edd@max:/tmp$time /usr/local/bin/gcc -c benfordsLaw.c real 0m0.026s user 0m0.004s sys 0m0.000s edd@max:/tmp$ (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- linux – CentOS错误 – sudo:有效的uid不是0,sudo是否安装
- 执行cp命令时提示cp: 略过目录
- Linux命令行实用程序首先使用/ etc / hosts解析主机名
- linux – Apache,suexec,PHP,suPHP
- linux – 如何让apache包含文件夹中的所有文件
- zsh – 如何在命令行中获取上一个命令的第n个参数?
- linux – authorized_keys的核心位置是个好主意吗?
- c – 如何以编程方式获取linux中设备/分区的uuid?
- 如何获取箭头键并在Linux中的键盘上输入键以表现得像window
- ssh – 保护linux服务器:iptables vs fail2ban
