0

我很好奇是否可以强制 GNU libtool 使用 Solaris CC 编译器而不是 GCC?如果是这样,那该怎么做?

这是 libpcre 7.28.1 的 libtool 构建脚本,它是我昨晚在 Solaris UNIX 上运行的 SMTP、TCP/IP 等开源库。

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

--------------------------在 Solaris Unix 上 libpcre make 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
4

1 回答 1

2

“./configure CC=cc”不够吗?

由于 gcc 和 cc 会完全不同,我认为在配置时间之后更改编译器可能更容易出错,但您也可以尝试:

“使抄送=抄送”

于 2012-12-10T12:23:33.463 回答