* BZ 5012: Add FAQ entry for compiling with optimization
@ 2007-10-27 15:16 Andreas Jaeger
2008-02-22 9:00 ` Andreas Jaeger
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Jaeger @ 2007-10-27 15:16 UTC (permalink / raw)
To: libc-hacker
[-- Attachment #1: Type: text/plain, Size: 2330 bytes --]
The following adds an entry to the FAQ to mention why optimization is
needed for compiling glibc. Ok to commit?
Andreas
2007-10-27 Andreas Jaeger <aj@suse.de>,
Carlos O'Donell <carlos@systemhalted.org>
[BZ #5012]
* FAQ.in: Describe why glibc needs to be compiled with
optimization.
============================================================
Index: FAQ.in
--- FAQ.in 8 Apr 2005 20:59:50 -0000 1.137
+++ FAQ.in 27 Oct 2007 15:14:50 -0000
@@ -387,6 +387,32 @@ yourself. Please remember that for each
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 +1711,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>
\f
Local Variables:
mode:outline
--
Andreas Jaeger, Director Platform / openSUSE, aj@suse.de
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: Type: application/pgp-signature, Size: 193 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: BZ 5012: Add FAQ entry for compiling with optimization
2007-10-27 15:16 BZ 5012: Add FAQ entry for compiling with optimization Andreas Jaeger
@ 2008-02-22 9:00 ` Andreas Jaeger
2008-02-22 9:09 ` Roland McGrath
2008-02-22 14:34 ` Ulrich Drepper
0 siblings, 2 replies; 5+ messages in thread
From: Andreas Jaeger @ 2008-02-22 9:00 UTC (permalink / raw)
To: libc-hacker
[-- Attachment #1: Type: text/plain, Size: 2526 bytes --]
Andreas Jaeger <aj@suse.de> writes:
> The following adds an entry to the FAQ to mention why optimization is
> needed for compiling glibc. Ok to commit?
Is it ok to commit this one?
Andreas
> Andreas
>
> 2007-10-27 Andreas Jaeger <aj@suse.de>,
> Carlos O'Donell <carlos@systemhalted.org>
>
> [BZ #5012]
> * FAQ.in: Describe why glibc needs to be compiled with
> optimization.
>
> ============================================================
> Index: FAQ.in
> --- FAQ.in 8 Apr 2005 20:59:50 -0000 1.137
> +++ FAQ.in 27 Oct 2007 15:14:50 -0000
> @@ -387,6 +387,32 @@ yourself. Please remember that for each
> 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 +1711,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>
> \f
> Local Variables:
> mode:outline
Andreas
--
Andreas Jaeger, Director Platform/openSUSE, aj@suse.de
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: BZ 5012: Add FAQ entry for compiling with optimization
2008-02-22 9:00 ` Andreas Jaeger
@ 2008-02-22 9:09 ` Roland McGrath
2008-02-22 14:34 ` Ulrich Drepper
1 sibling, 0 replies; 5+ messages in thread
From: Roland McGrath @ 2008-02-22 9:09 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: libc-hacker
I think you can always commit FAQ changes without getting approval.
If there are inaccuracies introduced, we can correct them.
Thanks,
Roland
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: BZ 5012: Add FAQ entry for compiling with optimization
2008-02-22 9:00 ` Andreas Jaeger
2008-02-22 9:09 ` Roland McGrath
@ 2008-02-22 14:34 ` Ulrich Drepper
2008-02-22 14:46 ` Andreas Jaeger
1 sibling, 1 reply; 5+ messages in thread
From: Ulrich Drepper @ 2008-02-22 14:34 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: libc-hacker
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andreas Jaeger wrote:
> Is it ok to commit this one?
I commented on this when it was submitted. This is not enough and the
proposed text is somewhat misleading.
- --
â§ Ulrich Drepper â§ Red Hat, Inc. â§ 444 Castro St â§ Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFHvt1Q2ijCOnn/RHQRAu5jAJ9AlzwWm01WE4A3egGD9w4W3LESrgCfYwqJ
IjrMwIVHgqSDTC56paTo+gA=
=9tJr
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: BZ 5012: Add FAQ entry for compiling with optimization
2008-02-22 14:34 ` Ulrich Drepper
@ 2008-02-22 14:46 ` Andreas Jaeger
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Jaeger @ 2008-02-22 14:46 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: libc-hacker
[-- Attachment #1: Type: text/plain, Size: 680 bytes --]
Ulrich Drepper <drepper@redhat.com> writes:
> Andreas Jaeger wrote:
>> Is it ok to commit this one?
>
> I commented on this when it was submitted. This is not enough and the
> proposed text is somewhat misleading.
AFAIR your comments where on the first draft of this by Carlos and I
made changes to the text for this final form.
I cannot find any comment from you on the version that is referenced
here,
Andreas
--
Andreas Jaeger, Director Platform/openSUSE, aj@suse.de
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-02-22 14:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-27 15:16 BZ 5012: Add FAQ entry for compiling with optimization Andreas Jaeger
2008-02-22 9:00 ` Andreas Jaeger
2008-02-22 9:09 ` Roland McGrath
2008-02-22 14:34 ` Ulrich Drepper
2008-02-22 14:46 ` Andreas Jaeger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).