强制使用gcc在Solaris Sparc下的./configure中编译(而不是cc) [英] Force use gcc to compile (instead of cc) in ./configure under Solaris Sparc

查看:467
本文介绍了强制使用gcc在Solaris Sparc下的./configure中编译(而不是cc)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在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#无错误

它会导致

  $ make 
cc -o bld / translate ./src/translate。 c
/ usr / ucb / cc:语言可选软件包未安装
$其中cc
/ usr / ucb / cc
$其中gcc
/ usr / local / bin / gcc
$其中g ++
/ usr / local / bin / g ++

我确定我的gcc / g ++是可行的。在添加一个肮脏的黑客之后,在./configure之后替换Makefile中的'BCC = cc'行'BCC = gcc'。它可编译。但我不知道如何修复源代码。

解决方案

我下载了tarball,运行命令 ./ configure CC = gcc ,发现它根本不起作用,生成的 Makefile 仍然使用 cc <

使用 vi 编辑 Makefile ,change

  BCC = gcc 
....
TCC = gcc

然后再次制作


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.

解决方案

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.

这篇关于强制使用gcc在Solaris Sparc下的./configure中编译(而不是cc)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆