public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/28738] New: LIBC_LINKER_FEATURE doesn't work on linker -z option
@ 2022-01-02 14:00 hjl.tools at gmail dot com
2022-01-03 13:12 ` [Bug build/28738] " cvs-commit at gcc dot gnu.org
2022-01-12 14:25 ` hjl.tools at gmail dot com
0 siblings, 2 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-02 14:00 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28738
Bug ID: 28738
Summary: LIBC_LINKER_FEATURE doesn't work on linker -z option
Product: glibc
Version: 2.35
Status: NEW
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
CC: carlos at redhat dot com
Target Milestone: ---
[hjl@gnu-tgl-2 tmp]$ touch x.c
[hjl@gnu-tgl-2 tmp]$ gcc -shared -Wl,-z,foobar x.c
/usr/local/bin/ld: warning: -z foobar ignored
[hjl@gnu-tgl-2 tmp]$ echo $?
0
[hjl@gnu-tgl-2 tmp]$
But LIBC_LINKER_FEATURE has
dnl Check linker option support.
dnl LIBC_LINKER_FEATURE([ld_option], [cc_option], [action-if-true],
[action-if-false])
AC_DEFUN([LIBC_LINKER_FEATURE],
[AC_MSG_CHECKING([for linker that supports $1])
libc_linker_feature=no
if test x"$gnu_ld" = x"yes"; then
cat > conftest.c <<EOF
int _start (void) { return 42; }
EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
$2 -nostdlib -nostartfiles
-fPIC -shared -o conftest.so conftest.c
1>&AS_MESSAGE_LOG_FD])
then
libc_linker_feature=yes
fi
rm -f conftest*
fi
Check for any linker -z option will be successful.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-12 14:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-02 14:00 [Bug build/28738] New: LIBC_LINKER_FEATURE doesn't work on linker -z option hjl.tools at gmail dot com
2022-01-03 13:12 ` [Bug build/28738] " cvs-commit at gcc dot gnu.org
2022-01-12 14:25 ` hjl.tools at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).