sys-devel/binutils: don't try -static-pie at all in the sanity check

rcrt1.o isn't always available and static-pie support can be buggy (which
is why it's interesting to test, but if we can't rely on it being available,
we also can't rely on it at least without some checking being OK in some
glibc version too). Need to try again with a has_version check for glibc[static-pie]
at least and possibly more.

Closes: https://bugs.gentoo.org/965478
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-11-06 12:22:38 +00:00
parent b288d27d59
commit 6b116320b6
4 changed files with 8 additions and 4 deletions

View File

@@ -553,7 +553,8 @@ binutils_sanity_check() {
local opt opt2
# TODO: test multilib variants?
for opt in '' '-O2' ; do
for opt2 in '-static' '-static-pie' '-fno-PIE -no-pie' ; do
# TODO: add static-pie? we need to check if support exists, though (bug #965478)
for opt2 in '-static' '-fno-PIE -no-pie' ; do
$(tc-getCC) ${opt} ${opt2} -B"${ED}${BINPATH}" "${T}"/number.c "${T}"/test.c -o "${T}"/test
if "${T}"/test | grep -q "Hello Gentoo! Your magic number is: 42" ; then
:;

View File

@@ -557,7 +557,8 @@ binutils_sanity_check() {
local opt opt2
# TODO: test multilib variants?
for opt in '' '-O2' ; do
for opt2 in '-static' '-static-pie' '-fno-PIE -no-pie' ; do
# TODO: add static-pie? we need to check if support exists, though (bug #965478)
for opt2 in '-static' '-fno-PIE -no-pie' ; do
$(tc-getCC) ${opt} ${opt2} -B"${ED}${BINPATH}" "${T}"/number.c "${T}"/test.c -o "${T}"/test
if "${T}"/test | grep -q "Hello Gentoo! Your magic number is: 42" ; then
:;

View File

@@ -555,7 +555,8 @@ binutils_sanity_check() {
local opt opt2
# TODO: test multilib variants?
for opt in '' '-O2' ; do
for opt2 in '-static' '-static-pie' '-fno-PIE -no-pie' ; do
# TODO: add static-pie? we need to check if support exists, though (bug #965478)
for opt2 in '-static' '-fno-PIE -no-pie' ; do
$(tc-getCC) ${opt} ${opt2} -B"${ED}${BINPATH}" "${T}"/number.c "${T}"/test.c -o "${T}"/test
if "${T}"/test | grep -q "Hello Gentoo! Your magic number is: 42" ; then
:;

View File

@@ -557,7 +557,8 @@ binutils_sanity_check() {
local opt opt2
# TODO: test multilib variants?
for opt in '' '-O2' ; do
for opt2 in '-static' '-static-pie' '-fno-PIE -no-pie' ; do
# TODO: add static-pie? we need to check if support exists, though (bug #965478)
for opt2 in '-static' '-fno-PIE -no-pie' ; do
$(tc-getCC) ${opt} ${opt2} -B"${ED}${BINPATH}" "${T}"/number.c "${T}"/test.c -o "${T}"/test
if "${T}"/test | grep -q "Hello Gentoo! Your magic number is: 42" ; then
:;