加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gdb-runtest-pie-override.patch 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
HukunaMatata 提交于 2020-01-13 14:20 . upgrade version to 8.3.1
make check//unix/-fPIE/-pie RUNTESTFLAGS=solib-display.exp
gcc -fpic -c -fPIE -pie -o x.o x.c
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
=> Change the order for overrides.
One has to also use -fPIC rather than -fPIE, -fPIC is stronger.
The correct way would be:
make check//unix RUNTESTFLAGS='CC_FOR_TARGET=gcc\ -fPIC\ -pie CXX_FOR_TARGET=g++\ -fPIC\ -pie solib-display.exp'
But there is a problem with testsuite.unix non-unique subdir name and also
a problem with make -j parallelization of the testsuite.
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
--- a/gdb/testsuite/lib/future.exp
+++ b/gdb/testsuite/lib/future.exp
@@ -185,6 +185,10 @@ proc gdb_default_target_compile {source destfile type options} {
set ldflags ""
set dest [target_info name]
+ if {[board_info $dest exists multilib_flags]} {
+ append add_flags " [board_info $dest multilib_flags]"
+ }
+
if {[info exists CFLAGS_FOR_TARGET]} {
append add_flags " $CFLAGS_FOR_TARGET"
}
@@ -519,10 +523,6 @@ proc gdb_default_target_compile {source destfile type options} {
}
}
- if {[board_info $dest exists multilib_flags]} {
- append add_flags " [board_info $dest multilib_flags]"
- }
-
verbose "doing compile"
set sources ""
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化