+z +Z compiler flag for HP
1. 今天遇到一问题,在sles11/vxworks下编译通过,但是在hpux下失败
2. 编译错误:
/usr/ccs/bin/ld:DP relative code in file /projects/xxx/DERIVED/tfa_pa32-hpux.a(tfa02_pa32-hpux.o) -shared library must be position
independent. Use +z or +Z to recompile.
3. 修改makefile,添加+z选项
ifeq($(BLD_TARGET_ARCH),pa32-hpux)
TS_LOGLIB_OPTS.o+= +z
endif
4. 重新编译
5. 报新的错误如下:
/usr/ccs/bin/ld:Data Linkage Table (+z) overflow in file /projects/xxx/loglib_pa32-hpux-mt.a(a7ts_log_pa32-hpux-mt.o)- use +Z option to recompile
Reference from: /projects/xxx/loglib_pa32-hpux-mt.a(a7ts_log_pa32-hpux-mt.o)(0x604)
6. 查询+z 和 +Z 的区别,如下:
+z,+Z Both ofthese options cause the compiler to generate position independent code(PIC) for use in building shared libraries. +Z is the default in 64-bitmode. The -G and -p options are ignored if +z or +Z is used. Normally,+z should be used to generate PIC; however, when certain limits areexceeded, +Z is required to generate PIC. The ld linker issues theerror indicating when +Z is required. If both +z and +Z are
specified, only the last one encountered applies. For a more completediscussion regarding PIC and these
options, see HP-UX Linker and Libraries Online User's Guide and the manualProgramming on HP-UX.
7. 修改makefile,添加+Z选项:
ifeq($(BLD_TARGET_ARCH),pa32-hpux)
TS_LOGLIB_OPTS.o+= +Z
endif
8. 编译通过。
9. 结论:
9.1 +z/+Z 相当于gcc 中的-fPIC;
(The '+Z' refers to *compiler* flag for HP cc/CC, which isequivalent to '-fPIC' for gcc.)
9.2 +z +Z有区别;
9.3 这个选项是编译(compile)选项,而不是链接(ld)选项;
+z +Z compiler flag for HP相关推荐
- Linux最全解压命令(*.tar *tar.gz *.gz *.tar.bz2 *.bz2 *tar.xz *.xz *tar.Z *.Z *.rar *.zip *.7z *.7za)
压缩解压命令 (这里重点介绍tar命令,它是一个打包程序,它可 以调用其它的命令,如:gzip bzip2.除此之外还有 rar zip命令) 注:无特殊说明**/代表文件夹,*/代表次一级文件夹 * ...
- 分型图z=z*z+c的画法
python代码: import numpy as np from PIL import Image from numba import jit MAXITERS = 200 RADIUS = 100 ...
- [Python] 读取存储.mat数据 scipy.io.loadmat(FileName)和scipy.io.savemat('XXX.mat', {'x': x,'y': y,'z': z})
读取.mat数据 scipy.io.loadmat("FilePath") 功能: 读取路径为"FilePath"的.mat文件,函数返回值为字典类型dict. ...
- z=z(x,y)中面积积分和方向余弦
三维坐标中,xyz三个方向余弦的计算和关系,是理解和贯穿整个曲线和曲面积分的核心之一.理解了这三个变量的计算和关系,是理解曲面积分,高斯公式,斯托克斯公式的核心.
- matlab 非a到z,matlab命令及函数A到Z
A a abs 绝对值.模.字符的ASCII码值 acos 反余弦 acosh 反双曲余弦 acot 反余切 acoth 反双曲余切 acsc 反余割 acsch 反双曲余割 align 启动图形对象 ...
- chi2inv函数 matlab_matlab函数列表(A~Z)【转】
A a abs 绝对值.模.字符的ASCII码值 acos 反余弦 acosh 反双曲余弦 acot 反余切 acoth 反双曲余切 acsc 反余割 acsch 反双曲余割 align 启动图形对象 ...
- Z Commands – Zcat, Zless, Zgrep, Zdiff
lester@lester-ThinkPad-T410:~$ man zcat GZIP(1) ...
- 职业操盘手内部教材 z
重 点抢筹区: 是主力机构在低位拉高建仓后的一个相当尴尬的区域!因为在这个区域,场外的绝大多数投资者不敢买,而场内持有的人却很想卖!所以会出现成片的卖盘挂单! 由于主力向上做的意图已经非常明显,所 ...
- Ctrl + z 和 Linux jobs
最近在使用 star agent 的过程中,颇感 webssh 开窗口不太方便,不像原本在本地用的多窗口工具那么方便.不过在使用 Ctrl + z 和 linux 本身的 jobs 命令之后,这个情况 ...
最新文章
- origin+matlab基础绘图
- Arnold+Shave 渲染毛发
- android小知识之意图(intent)
- Linux---More命令 初级实现
- 音乐计算机官方.,Boom音乐电脑版
- 忘记MySQL密码以及无法登陆等解决办法
- 引用springboot starter 的springboot项目无法引用 springboot starter依赖的项目中的类
- 微动探测原理及仪器介绍
- Word中批量删除引用符号
- python 微信公众号接口之上传图片素材
- 技巧:XP桌面图标阴影的去除
- 服务器虚拟机系统速度,虚拟主机的快慢与什么有关系
- 狄利克雷原理及其应用
- 数组转这种格式 county_list:{ 110101: “东城区“, 110102: “西城区“, 110105: “朝阳区“, 110106: “丰台区“,
- Auto.js逆向分析-提取脚本文件(附源码)
- Linux 系列(一) - 基本命令
- 搞 AI 建模预测都在用 Python,其实入门用 SPL 也不错
- android商户扫码枪读取手机二维码
- 盘点 | 2022值得学习的编程语言 TOP 7
- 开关电源:效率与VOUT的关系