]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* Makeconfig: Define pie-ccflag and PIE-ccflag variables.
authorUlrich Drepper <drepper@redhat.com>
Sat, 26 Jul 2008 22:22:24 +0000 (22:22 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 26 Jul 2008 22:22:24 +0000 (22:22 +0000)
* elf/Makefile: Use pie-ccflag variable.
* nscd/Makefile: Likewise.
* sysdeps/sparc/Makefile: Set $(pie-ccflag) to -fPIE.

ChangeLog
Makeconfig
elf/Makefile
elf/dl-object.c
nptl/sysdeps/unix/sysv/linux/mq_notify.c
nscd/Makefile
sysdeps/sparc/Makefile

index 86c49a3de66c12a1b03d493ba076347dddf9d0a4..eabfcb5c50c282ac620df03e0063a0a0d336c1ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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]
index 7de7621f5657c4d3ec17cd170ae21b28ca1f6119..a78615eb6a7a7c588f490a7ee757b1307e29ac67 100644 (file)
@@ -712,6 +712,10 @@ pic-ccflag = -fPIC
 # 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.
index e50915354798e2969e9c77bc1f7a21cd054b275c..abb957216655647826acecd41be23046213a1366 100644 (file)
@@ -800,7 +800,7 @@ $(objpfx)tst-array5-static.out: $(objpfx)tst-array5-static
        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) \
index 7780de63042d7d53c998b53d25e544729875a5a6..be4ea38f9fe7d5d78c652d472282070af7ea2aa4 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -50,7 +50,7 @@ _dl_new_object (char *realname, const char *libname, int type,
 #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;
index 1be452a0e0c055ef755e1e8e9e42c73fe0fafd08..49ddeae052c0be3601f5cd73d4bf6850f7a25c54 100644 (file)
@@ -169,7 +169,7 @@ init_mq_netlink (void)
   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
index 51badea2016957d6a93d3d1888a5b9da6298f3dd..364ddfe8dde8df779ee53f9abba7cbe0c76de8d0 100644 (file)
@@ -90,7 +90,7 @@ CFLAGS-nscd_initgroups.c = -fexceptions
 
 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
index 9fa5324b41fdfb57e9236ee22bbd401a475102f1..73b926554e1cd93d2fc5548494c66e91762419fa 100644 (file)
@@ -1,6 +1,8 @@
 # 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