aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2008-02-22 09:57:19 +0000
committerAndreas Jaeger <aj@suse.de>2008-02-22 09:57:19 +0000
commitc49e86f103be3db22cbb3eee5c6299a0a8ac401b (patch)
tree7525b4613beb4635193e379ce3836167298d00a3
parent73b82641f43cf058f6a92b9c10df1cac4e08f096 (diff)
downloadglibc-c49e86f103be3db22cbb3eee5c6299a0a8ac401b.zip
glibc-c49e86f103be3db22cbb3eee5c6299a0a8ac401b.tar.gz
glibc-c49e86f103be3db22cbb3eee5c6299a0a8ac401b.tar.bz2
[BZ #5012]
* FAQ.in: Describe why glibc needs to be compiled with optimization.
-rw-r--r--FAQ.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/FAQ.in b/FAQ.in
index d0b2805..a5c7123 100644
--- a/FAQ.in
+++ b/FAQ.in
@@ -387,6 +387,31 @@ yourself. Please remember that for each architecture there may be various
patches required to get glibc HEAD into a runnable state. The best course
of action is to determine if you have all the required patches.
+?? Why do I get:
+ `#error "glibc cannot be compiled without optimization"',
+ when trying to compile GNU libc with GNU CC?
+
+{AJ,CO} There are a couple of reasons why the GNU C library will not work
+correctly if it is not complied with optimzation.
+
+In the early startup of the dynamic loader (_dl_start), before
+relocation of the PLT, you cannot make function calls. You must inline
+the functions you will use during early startup, or call compiler
+builtins (__builtin_*).
+
+Without optimizations enabled GNU CC will not inline functions. The
+early startup of the dynamic loader will make function calls via an
+unrelocated PLT and crash.
+
+Without auditing the dynamic linker code it would be difficult to remove
+this requirement.
+
+Another reason is that nested functions must be inlined in many cases to
+avoid executable stacks.
+
+In practice there is no reason to compile without optimizations, therefore
+we require that GNU libc be compiled with optimizations enabled.
+
? Installation and configuration issues
?? Can I replace the libc on my Linux system with GNU libc?
@@ -1685,6 +1710,7 @@ Answers were given by:
{AO} Alexandre Oliva, <aoliva@redhat.com>
{BH} Bruno Haible, <haible@clisp.cons.org>
{SM} Steven Munroe, <sjmunroe@us.ibm.com>
+{CO} Carlos O'Donell, <carlos@systemhalted.org>
Local Variables:
mode:outline