我很好奇是否可以强制GNU libtool使用Solaris CC编译器而不是GCC?如果是这样,那怎么可能呢?
以下是libpol 7.28.1的libtool构建脚本,SMTP,TCP / IP等开源库,我昨晚在Solaris UNIX上运行。
Making all in lib
make[1]: Entering directory `/net/beige/export/marc/DQT/EmailLib/curl-7.28.1/lib'
make all-am
make[2]: Entering directory `/net/beige/export/marc/DQT/EmailLib/curl-7.28.1/lib'
if /bin/bash -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -O2 -Wno-system-headers -MT libcurl_la-file.lo -MD -MP -MF ".deps/libcurl_la-file.Tpo" -c -o libcurl_la-file.lo `test -f 'file.c' || echo './'`file.c; \
then mv -f ".deps/libcurl_la-file.Tpo" ".deps/libcurl_la-file.Plo"; else rm -f ".deps/libcurl_la-file.Tpo"; exit 1; fi
libtool: compile: gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -O2 -Wno-system-headers -MT libcurl_la-file.lo -MD -MP -MF .deps/libcurl_la-file.Tpo -c file.c -fPIC -DPIC -o .libs/libcurl_la-file.o
libtool: compile: gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -O2 -Wno-system-headers -MT libcurl_la-file.lo -MD -MP -MF .deps/libcurl_la-file.Tpo -c file.c -o libcurl_la-file.o >/dev/null 2>&1
if /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -O2 -Wno-system-headers -MT libcurl_la-timeval.lo -MD -MP -MF ".deps/libcurl_la-timeval.Tpo" -c -o libcurl_la-timeval.lo `test -f 'timeval.c' || echo './'`timeval.c; \
then mv -f ".deps/libcurl_la-timeval.Tpo" ".deps/libcurl_la-timeval.Plo"; else rm -f ".deps/libcurl_la-timeval.Tpo"; exit 1; fi
libtool: compile: gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -O2 -Wno-system-headers -MT libcurl_la-timeval.lo -MD -MP -MF .deps/libcurl_la-timeval.Tpo -c timeval.c -fPIC -DPIC -o .libs/libcurl_la-timeval.o
libtool: compile: gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -O2 -Wno-system-headers -MT libcurl_la-timeval.lo -MD -MP -MF .deps/libcurl_la-timeval.Tpo -c timeval.c -o libcurl_la-timeval.o >/dev/null 2>&1
-------------------------- libpcre在Solaris Unix上制作CC = cc ------------- --------
$ make CC=cc
Making all in lib
make[1]: Entering directory `/net/beige/export/marc/DQT/EmailLib/curl-7.28.1/lib'
make all-am
make[2]: Entering directory `/net/beige/export/marc/DQT/EmailLib/curl-7.28.1/lib'
if /bin/bash ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -O2 -Wno-system-headers -MT libcurl_la-file.lo -MD -MP -MF ".deps/libcurl_la-file.Tpo" -c -o libcurl_la-file.lo `test -f 'file.c' || echo './'`file.c; \
then mv -f ".deps/libcurl_la-file.Tpo" ".deps/libcurl_la-file.Plo"; else rm -f ".deps/libcurl_la-file.Tpo"; exit 1; fi
libtool: compile: cc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -O2 -Wno-system-headers -MT libcurl_la-file.lo -MD -MP -MF .deps/libcurl_la-file.Tpo -c file.c -fPIC -DPIC -o .libs/libcurl_la-file.o
cc: Warning: option -2 passed to ld
cc: illegal option -Wno-system-headers
make[2]: *** [libcurl_la-file.lo] Error 1
make[2]: Leaving directory `/net/beige/export/marc/DQT/EmailLib/curl-7.28.1/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/net/beige/export/marc/DQT/EmailLib/curl-7.28.1/lib'
make: *** [all-recursive] Error 1
答案 0 :(得分:2)
不会“./configure CC = cc”就够了吗?
由于gcc和cc会有很大的不同,我认为在配置时间后更改编译器可能会稍微容易出错,但你也可以尝试一下:
“make CC = cc”