* elf/Makefile: Use pie-ccflag variable.
* nscd/Makefile: Likewise.
* sysdeps/sparc/Makefile: Set $(pie-ccflag) to -fPIE.
+2008-07-24 Tom "spot" Callaway <tcallawa@redhat.com>
+
+ * Makeconfig: Define pie-ccflag and PIE-ccflag variables.
+ * elf/Makefile: Use pie-ccflag variable.
+ * nscd/Makefile: Likewise.
+ * sysdeps/sparc/Makefile: Set $(pie-ccflag) to -fPIE.
+
2008-07-21 Andreas Krebbel <krebbel1@de.ibm.com>
[BZ #6724]
# This one should always stay like this unless there is a very good reason.
PIC-ccflag = -fPIC
endif
+# This can be changed by a sysdep makefile
+pie-ccflag = -fpie
+# This one should always stay like this unless there is a very good reason.
+PIE-ccflag = -fPIE
ifeq (yes,$(build-profile))
# Under --enable-profile, we will build a static library of profiled objects.
# The profiled object files are named foo.op.
cmp $@ tst-array5-static.exp > /dev/null
ifeq (yesyes,$(have-fpie)$(build-shared))
-CFLAGS-tst-pie1.c += -fpie
+CFLAGS-tst-pie1.c += $(pie-ccflag)
$(objpfx)tst-pie1.out: $(objpfx)tst-pie1
$(elf-objpfx)$(rtld-installed-name) \
/* Storage management for the chain of loaded shared objects.
- Copyright (C) 1995-2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002,2004,2006,2007,2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#endif
new = (struct link_map *) calloc (sizeof (*new) + audit_space
- + sizeof (struct r_scope_elem)
+ + sizeof (struct link_map *)
+ sizeof (*newname) + libname_len, 1);
if (new == NULL)
return NULL;
if (netlink_socket == -1)
{
/* Just a normal netlink socket, not bound. */
- if (have_sock_cloexec)
+ if (have_sock_cloexec >= 0)
{
netlink_socket = socket (AF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, 0);
#if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC
nscd-cflags = -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2
ifeq (yesyes,$(have-fpie)$(build-shared))
-nscd-cflags += -fpie
+nscd-cflags += $(pie-ccflag)
endif
ifeq (yes,$(have-ssp))
nscd-cflags += -fstack-protector
# The Sparc `long double' is a distinct type we support.
long-double-fcts = yes
+pie-ccflag = -fPIE
+
ifeq ($(subdir),gmon)
sysdep_routines += sparc-mcount
endif