forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
426 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
From 32cf40699346d37fabfa887bbd95e95004799ae1 Mon Sep 17 00:00:00 2001 | ||
From: Andreas Schwab <[email protected]> | ||
Date: Mon, 6 Sep 2010 14:55:59 +0200 | ||
Subject: [PATCH] Don't mix pattern rules with normal rules | ||
|
||
diff --git a/manual/Makefile b/manual/Makefile | ||
index c5866eb9def..b1f5fa73e5e 100644 | ||
--- a/manual/Makefile | ||
+++ b/manual/Makefile | ||
@@ -232,7 +232,10 @@ ifdef objpfx | ||
.PHONY: stubs | ||
stubs: $(objpfx)stubs | ||
endif | ||
-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%: | ||
+$(objpfx)stubs ../po/manual.pot: | ||
+ $(make-target-directory) | ||
+ touch $@ | ||
+$(objpfx)stamp%: | ||
$(make-target-directory) | ||
touch $@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/malloc/obstack.c b/malloc/obstack.c | ||
index 25a90514f78..c3c7db4a96b 100644 | ||
--- a/malloc/obstack.c | ||
+++ b/malloc/obstack.c | ||
@@ -115,7 +115,7 @@ int obstack_exit_failure = EXIT_FAILURE; | ||
/* A looong time ago (before 1994, anyway; we're not sure) this global variable | ||
was used by non-GNU-C macros to avoid multiple evaluation. The GNU C | ||
library still exports it because somebody might use it. */ | ||
-struct obstack *_obstack_compat; | ||
+struct obstack *_obstack_compat = 0; | ||
compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0); | ||
# endif | ||
# endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
commit 4a531bb0b3b582cb693de9f76d2d97d970f9a5d5 | ||
Author: H.J. Lu <[email protected]> | ||
Date: Fri Dec 24 20:14:37 2010 -0500 | ||
|
||
Remove `.ctors' and `.dtors' output sections | ||
|
||
diff --git a/config.h.in b/config.h.in | ||
index 18bf01a38c..9e797eb5b7 100644 | ||
--- a/config.h.in | ||
+++ b/config.h.in | ||
@@ -201,6 +201,9 @@ | ||
/* Define if multi-arch DSOs should be generated. */ | ||
#undef USE_MULTIARCH | ||
|
||
+/* Define if `.ctors' and `.dtors' sections shouldn't be used. */ | ||
+#define NO_CTORS_DTORS_SECTIONS | ||
+ | ||
/* | ||
^L */ | ||
|
||
diff --git a/elf/sofini.c b/elf/sofini.c | ||
index 5e06f0ca92..13e74b7903 100644 | ||
--- a/elf/sofini.c | ||
+++ b/elf/sofini.c | ||
@@ -1,12 +1,14 @@ | ||
/* Finalizer module for ELF shared C library. This provides terminating | ||
null pointer words in the `.ctors' and `.dtors' sections. */ | ||
|
||
+#ifndef NO_CTORS_DTORS_SECTIONS | ||
static void (*const __CTOR_END__[1]) (void) | ||
__attribute__ ((used, section (".ctors"))) | ||
= { 0 }; | ||
static void (*const __DTOR_END__[1]) (void) | ||
__attribute__ ((used, section (".dtors"))) | ||
= { 0 }; | ||
+#endif | ||
|
||
/* Terminate the frame unwind info section with a 4byte 0 as a sentinel; | ||
this would be the 'length' field in a real FDE. */ | ||
diff --git a/elf/soinit.c b/elf/soinit.c | ||
index 6fecbb5674..1db676af01 100644 | ||
--- a/elf/soinit.c | ||
+++ b/elf/soinit.c | ||
@@ -3,6 +3,7 @@ | ||
the `.ctors' and `.dtors' sections so the lists are terminated, and | ||
calling those lists of functions. */ | ||
|
||
+#ifndef NO_CTORS_DTORS_SECTIONS | ||
#include <libc-internal.h> | ||
#include <stdlib.h> | ||
|
||
@@ -40,3 +41,4 @@ __libc_fini (void) | ||
|
||
void (*_fini_ptr) (void) __attribute__ ((section (".fini_array"))) | ||
= &__libc_fini; | ||
+#endif | ||
diff --git a/sysdeps/i386/init-first.c b/sysdeps/i386/init-first.c | ||
index c6355a8b7b..2af042fe4b 100644 | ||
--- a/sysdeps/i386/init-first.c | ||
+++ b/sysdeps/i386/init-first.c | ||
@@ -59,7 +59,9 @@ _init (int argc, ...) | ||
{ | ||
init (&argc); | ||
|
||
+#ifndef NO_CTORS_DTORS_SECTIONS | ||
__libc_global_ctors (); | ||
+#endif | ||
} | ||
#endif | ||
|
||
diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c | ||
index f9a7a58deb..60823bd789 100644 | ||
--- a/sysdeps/mach/hurd/i386/init-first.c | ||
+++ b/sysdeps/mach/hurd/i386/init-first.c | ||
@@ -92,7 +92,7 @@ posixland_init (int argc, char **argv, char **envp) | ||
__getopt_clean_environment (envp); | ||
#endif | ||
|
||
-#ifdef SHARED | ||
+#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS | ||
__libc_global_ctors (); | ||
#endif | ||
} | ||
diff --git a/sysdeps/mach/hurd/powerpc/init-first.c b/sysdeps/mach/hurd/powerpc/init-first.c | ||
index 20fa1d4f12..21b5054b0a 100644 | ||
--- a/sysdeps/mach/hurd/powerpc/init-first.c | ||
+++ b/sysdeps/mach/hurd/powerpc/init-first.c | ||
@@ -82,7 +82,7 @@ posixland_init (int argc, char **argv, char **envp) | ||
__getopt_clean_environment (__environ); | ||
#endif | ||
|
||
-#ifdef SHARED | ||
+#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS | ||
__libc_global_ctors (); | ||
#endif | ||
} | ||
diff --git a/sysdeps/sh/init-first.c b/sysdeps/sh/init-first.c | ||
index d816625ef4..1f3a821fea 100644 | ||
--- a/sysdeps/sh/init-first.c | ||
+++ b/sysdeps/sh/init-first.c | ||
@@ -59,7 +59,9 @@ _init (int argc, ...) | ||
{ | ||
init (&argc); | ||
|
||
+#ifndef NO_CTORS_DTORS_SECTIONS | ||
__libc_global_ctors (); | ||
+#endif | ||
} | ||
#endif | ||
|
||
diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c | ||
index 7b2333d4bf..a60212f4ed 100644 | ||
--- a/sysdeps/unix/sysv/linux/init-first.c | ||
+++ b/sysdeps/unix/sysv/linux/init-first.c | ||
@@ -93,7 +93,7 @@ _init (int argc, char **argv, char **envp) | ||
__getopt_clean_environment (envp); | ||
#endif | ||
|
||
-#ifdef SHARED | ||
+#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS | ||
__libc_global_ctors (); | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
commit 7c8a67320e26b8c11108bf0a3410d3aef9cf3486 | ||
Author: Ulrich Drepper <[email protected]> | ||
Date: Sat Jan 31 00:21:15 2009 +0000 | ||
|
||
* elf/Makefile (ld.so): Adjust the sed script to insert _begin in to | ||
|
||
newer linker scripts. | ||
|
||
diff --git a/elf/Makefile b/elf/Makefile | ||
index 8079fe9f96..e44ff1d382 100644 | ||
--- a/elf/Makefile | ||
+++ b/elf/Makefile | ||
@@ -304,7 +304,7 @@ $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map) | ||
$(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 | \ | ||
LC_ALL=C \ | ||
sed -e '/^=========/,/^=========/!d;/^=========/d' \ | ||
- -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \ | ||
+ -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \ | ||
> [email protected] | ||
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ \ | ||
$(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/sunrpc/rpc_clntout.c b/sunrpc/rpc_clntout.c | ||
index ec040c775e2..ce4d2a4c953 100644 | ||
--- a/sunrpc/rpc_clntout.c | ||
+++ b/sunrpc/rpc_clntout.c | ||
@@ -31,7 +31,7 @@ | ||
*/ | ||
#include <stdio.h> | ||
#include <string.h> | ||
-#include <rpc/types.h> | ||
+#include "rpc/types.h" | ||
#include "rpc_parse.h" | ||
#include "rpc_util.h" | ||
#include "proto.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/misc/regexp.c b/misc/regexp.c | ||
index ee7d572..e0b4b47 100644 | ||
--- a/misc/regexp.c | ||
+++ b/misc/regexp.c | ||
@@ -23,11 +23,11 @@ | ||
#include <regex.h> | ||
|
||
/* Define the variables used for the interface. */ | ||
-char *loc1; | ||
-char *loc2; | ||
+char *loc1 __attribute__ ((nocommon)); | ||
+char *loc2 __attribute__ ((nocommon)); | ||
|
||
/* Although we do not support the use we define this variable as well. */ | ||
-char *locs; | ||
+char *locs __attribute__ ((nocommon)); | ||
|
||
|
||
/* Find the next match in STRING. The compiled regular expression is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- a/misc/regexp.c | ||
+++ b/misc/regexp.c | ||
@@ -29,14 +29,15 @@ | ||
|
||
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23) | ||
|
||
-/* Define the variables used for the interface. */ | ||
-char *loc1; | ||
-char *loc2; | ||
+/* Define the variables used for the interface. Avoid .symver on common | ||
+ symbol, which just creates a new common symbol, not an alias. */ | ||
+char *loc1 __attribute__ ((nocommon)); | ||
+char *loc2 __attribute__ ((nocommon)); | ||
compat_symbol (libc, loc1, loc1, GLIBC_2_0); | ||
compat_symbol (libc, loc2, loc2, GLIBC_2_0); | ||
|
||
/* Although we do not support the use we define this variable as well. */ | ||
-char *locs; | ||
+char *locs __attribute__ ((nocommon)); | ||
compat_symbol (libc, locs, locs, GLIBC_2_0); |
Oops, something went wrong.