Overriding CFLAGS put in by buildserver_MQ, Tuxedo及OLTP讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MQ, Tuxedo及OLTP讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3868 | 回复: 0   主题: Overriding CFLAGS put in by buildserver        下一篇 
johnnyfox
注册用户
等级:新兵
经验:41
发帖:90
精华:0
注册:2011-12-12
状态:离线
发送短消息息给johnnyfox 加好友    发送短消息息给johnnyfox 发消息
发表于: IP:您无权察看 2014-11-13 11:36:23 | [全部帖] [楼主帖] 楼主

I am trying to figure out how to get rid of the buildserver options being put in when I recompile using 10GR3 tuxedo for hpux 64 bit(it over-rides the compiler via the CC but not CFLAGS). I have both CFLAGS and CC set, CC is picked up but appears to be no way to get rid of the implied CFLAGS(+DA2.0W -Wl,+s -D__BIGMSGQUEUE_ENABLED ) below. The older version did not have this behaviour

New 10GR3

sdevcomp:/home/jurban/cwork>make CLEANCONN

CFLAGS="-g -L /opt/tuxedo10gR3/lib -L /home/hems/prod/lib -L /opt/oracle/product/current/lib -I /opt/tuxedo10gR3/include -I /home/hems/prod/include -L /opt/tuxedo10gR3/lib -L /home/hems/prod/lib -L /opt/oracle/product/current/lib -I /opt/tuxedo10gR3/include -I /home/hems/prod/include" \

CC="gcc" \

buildserver -v -s CLEANCONN -o CLEANCONN -l cleanconn.o -l -lclntsh -l -lusr -r Oracle_XA

gcc +DA2.0W -Wl,+s -D__BIGMSGQUEUE_ENABLED -g -L /opt/tuxedo10gR3/lib -L /home/hems/prod/lib -L /opt/oracle/product/current/lib -I /opt/tuxedo10gR3/include -I /home/hems/prod/include -L /opt/tuxedo10gR3/lib -L /home/hems/prod/lib -L /opt/oracle/product/current/lib -I /opt/tuxedo10gR3/include -I /home/hems/prod/include -I$TUXDIR/include -o CLEANCONN BS-6c55.c -L${TUXDIR}/lib -ltux -lbuft -L${ORACLE_HOME}/lib -lclntsh -lfml -lfml32 -lengine -lpthread -lcl -lnsl cleanconn.o -lclntsh -lusr

gcc: +DA2.0W: No such file or directory

CMDTUX_CAT:1832: ERROR: can't execute gcc +DA2.0W -Wl,+s -D__BIGMSGQUEUE_ENABLED -g -L /opt/tuxedo10gR3/lib -L /home/hems/prod/lib -L /opt/oracle/product/current/lib -I /opt/tuxedo10gR3/include -I /home/hems/prod/include -L /opt/tuxedo10gR3/lib -L /home/hems/prod/lib -L /opt/oracle/product/current/lib -I /opt/tuxedo10gR3/include -I /home/hems/prod/include -I$TUXDIR/include -o CLEANCONN BS-6c55.c -L${TUXDIR}/lib -ltux -lbuft -L${ORACLE_HOME}/lib -lclntsh -lfml -lfml32 -lengine -lpthread -lcl -lnsl cleanconn.o -lclntsh -lusr

*** Error exit code 1

Older version:

gcc -c -g -L /opt/tuxedo6.5/lib -L /home/hems/prod/lib -L /opt/oracle/product/current/lib32 -I /opt/tuxedo6.5/include -I /home/hems/prod/include cleanconn.c

CFLAGS="-g -L /opt/tuxedo6.5/lib -L /home/hems/prod/lib -L /opt/oracle/product/current/lib32 -I /opt/tuxedo6.5/include -I /home/hems/prod/include -L /opt/tuxedo6.5/lib -L /home/hems/prod/lib -L /opt/oracle/product/current/lib32 -I /opt/tuxedo6.5/include -I /home/hems/prod/include" \

CC="gcc" \

buildserver -v -s CLEANCONN -o CLEANCONN -l cleanconn.o -l -lclntsh -l -lusr -r Oracle_XA

gcc -g -L /opt/tuxedo6.5/lib -L /home/hems/prod/lib -L /opt/oracle/product/current/lib32 -I /opt/tuxedo6.5/include -I /home/hems/prod/include -L /opt/tuxedo6.5/lib -L /home/hems/prod/lib -L /opt/oracle/product/current/lib32 -I /opt/tuxedo6.5/include -I /home/hems/prod/include -I$TUXDIR/include -o CLEANCONN BS-6dc7.c -L${TUXDIR}/lib -ltux -lbuft -ltux2 -L${ORACLE_HOME}/lib32 ${ORACLE_HOME}/lib32/libsql9.a -lcore9 -lnls9 -lcore9 -lmm -lfml -lfml32 -lgp -lnsl cleanconn.o -lclntsh -lusr

Current make lines:

CFLAGS=${DEBUGFLAGS} ${LIBDIRS} ${INCDIRS}

# 32 bit CFLAGS=${DEBUGFLAGS} ${LIBDIRS} ${INCDIRS}

#CFLAGS=${DEBUGFLAGS} ${INCDIRS}

CC=gcc

${CLEAN_CONN}: ${CLEAN_CONN_OBJ}

CFLAGS="${CFLAGS} ${LIBDIRS} ${INCDIRS}" \

CC="${CC}" \

buildserver ${VERBOSE} -s ${CLEAN_CONN} -o $@ -l ${CLEAN_CONN_OBJ} -l ${LIBS} -r Oracle_XA中间件技术社区-Tuxedo论坛

If the environment variable CC is set, buildclient and buildserver use the value of this variable as the C++ or C compiler to be executed. You can remove unwanted compiler options by creating a shell script called ccedit with the following contents:

REALCC=gcc

CCCMD=`echo $* | sed -e 's/+DA2.0W //g' -e 's/-Wl,+s //g' -e's/-D__BIGMSGQUEUE_ENABLED //g'`

echo "Executing $REALCC $CCCMD"

exec $REALCC $CCCMD

If you then export CC=ccedit Tuxedo will invoke your shell script as the compiler, which will remove the unwanted options and invoke the actual C compiler.

Note that some flag settings must be consistent throughout the set of binaries linked into an executable, so exercise care in deciding which default compiler flags to remove.

(If any other customer is using COBOL and wants to remove unwanted options passed to a COBOL compiler, the ALTCC environment variable can be used in a similar way for COBOL.)

A previous discussion on this issue can be found at

http://forums.oracle.com/forums/thread.jspa?messageID=3302823

Ed

--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论