This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nscd/12125] New: Problems linking nscd under certain gcc conditions
- From: "viriketo at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Fri, 15 Oct 2010 17:44:04 +0000
- Subject: [Bug nscd/12125] New: Problems linking nscd under certain gcc conditions
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=12125
Summary: Problems linking nscd under certain gcc conditions
Product: glibc
Version: 2.12
Status: NEW
Severity: normal
Priority: P2
Component: nscd
AssignedTo: drepper.fsp@gmail.com
ReportedBy: viriketo@gmail.com
The 'nscd' makefile reads:
ifeq (yes,$(have-ssp))
nscd-cflags += -fstack-protector
endif
...
ifeq (yesyes,$(have-fpie)$(build-shared))
relro-LDFLAGS += -Wl,-z,now
$(objpfx)nscd: $(addprefix $(objpfx),$(nscd-modules:=.o))
$(+link-pie)
endif
And the link-pie defined in 'Makeconfig' says to use "-nostdlib" in the gcc
linking call.
The check for the stack protector does not use "-nostdlib", so a simple
"-fstack-protector" succeeds. Here is the gcc spec part:
*link_ssp:
%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}
*link_command:
... %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)} ...
So, the trouble appears when glibc is:
- build as shared
- -fpie found
- -fstack-protector found
Because it tries to link nscd with -nostdlib but without supplying
-lssp_noshared -lssp
This problem happens in glibc 2.12.1 and glibc 2.11 at least.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.