Force use gcc to compile (instead of cc) in ./configure under Solaris Sparc

左心房为你撑大大i 提交于 2019-12-07 21:15:17

问题


I want to build fossil code on Solaris.

wget http://www.fossil-scm.org/index.html/tarball/tip.tar.xz
tar xf tip.tar.xz ; cd tip.tar
./configure CC=gcc CXX=g++ C=gcc BCC=gcc  # no error

It will cause

$make
cc -o bld/translate ./src/translate.c
/usr/ucb/cc:  language optional software package not installed
$which cc
/usr/ucb/cc
$which gcc
/usr/local/bin/gcc
$which g++
/usr/local/bin/g++

I'm sure my gcc/g++ are workable. After I add a dirty hack on replace the 'BCC = cc' line of Makefilewith 'BCC = gcc' after ./configure. It compilable. But I don't know how to fix the source code.


回答1:


I downloaded that tarball, ran command ./configure CC=gcc and found it did not work at all, the generated Makefile still use cc for default compiler.

Use vi edit Makefile, change

BCC = gcc
....
TCC = gcc

then make again.




回答2:


Set the compiler in the environment.

export CC=gcc



来源:https://stackoverflow.com/questions/14253367/force-use-gcc-to-compile-instead-of-cc-in-configure-under-solaris-sparc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!