summaryrefslogtreecommitdiff
path: root/open_issues/glibc_madvise_vs_static_linking.mdwn
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-02-18 00:58:35 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-02-18 00:58:35 +0100
commit49a086299e047b18280457b654790ef4a2e5abfa (patch)
treec2b29e0734d560ce4f58c6945390650b5cac8a1b /open_issues/glibc_madvise_vs_static_linking.mdwn
parente2b3602ea241cd0f6bc3db88bf055bee459028b6 (diff)
Revert "rename open_issues.mdwn to service_solahart_jakarta_selatan__082122541663.mdwn"
This reverts commit 95878586ec7611791f4001a4ee17abf943fae3c1.
Diffstat (limited to 'open_issues/glibc_madvise_vs_static_linking.mdwn')
-rw-r--r--open_issues/glibc_madvise_vs_static_linking.mdwn48
1 files changed, 48 insertions, 0 deletions
diff --git a/open_issues/glibc_madvise_vs_static_linking.mdwn b/open_issues/glibc_madvise_vs_static_linking.mdwn
new file mode 100644
index 00000000..4af41931
--- /dev/null
+++ b/open_issues/glibc_madvise_vs_static_linking.mdwn
@@ -0,0 +1,48 @@
+[[!meta copyright="Copyright © 2010, 2011, 2012, 2013 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!tag open_issue_glibc]]
+
+[[!sourceware_PR 4822]].
+
+ $ echo 'int main() {}' | gcc -o /dev/null -static -x c -
+ /usr/lib/gcc/i486-gnu/4.4.5/../../../libcrt.a(malloc.o): In function `_int_free':
+ (.text+0xdc3): warning: warning: madvise is not implemented and will always fail
+
+This is correct, but it does confuse GNU Autoconf, for example, which then
+thinks that static linking is not supported and sets a flag accordingly, which
+luckly no / not many packages use.
+
+*This call does not influence the semantics of the application (except in the
+case of MADV_DONTNEED), but may influence its performance. The kernel is free
+to ignore the advice.* (`man madvise`), so we may simply want to turn it into a
+no-op in glibc, avoiding the link-time warning.
+
+GCC c5db973fdab3db3e13db575e5650c0bcfd3630f4 (2011-10-17) makes use of this.
+As we now export the symbol (and `MADV_DONTNEED`, too), GCC will no longer
+`munmap` pages, but will keep them mapped for later re-use. This may increase
+memory usage. The discussion in [[!message-id
+"20120720162519.734e02eb@spoyarek"]] touches related topics.
+
+2011-07: This is what Samuel has [done for Debian
+glibc](http://anonscm.debian.org/viewvc/pkg-glibc/glibc-package/trunk/debian/patches/hurd-i386/local-madvise_warn.diff).
+
+
+# IRC, freenode, #hurd, 2012-02-16
+
+ <tschwinge> youpi: With Roland's fix the situation will be that just using
+ gcc -static doesn't emit the stub warning, but still will do so in case
+ that the source code itself links in madvise. Is this acceptable for
+ you/Debian/...?
+ <youpi> packages with -Werror will still bug out
+ <youpi> not that I consider -Werror to be a good idea, though :)
+ <tschwinge> youpi: Indeed. Compiler warnings can be caused by all kinds of
+ things. -Werror is good for development, but not for releases.