From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18585 invoked by alias); 17 Feb 2012 07:58:16 -0000 Received: (qmail 18567 invoked by uid 22791); 17 Feb 2012 07:58:14 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Feb 2012 07:58:02 +0000 From: "tschwinge at sourceware dot org" To: glibc-bugs@sources.redhat.com Subject: [Bug hurd/4822] grow_heap: static linking warns about madvise() not implemented Date: Fri, 17 Feb 2012 07:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: hurd X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tschwinge at sourceware dot org X-Bugzilla-Status: VERIFIED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: roland at gnu dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00155.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=4822 Thomas Schwinge changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED CC| |tschwinge at sourceware dot | |org --- Comment #4 from Thomas Schwinge 2012-02-17 07:57:12 UTC --- (In reply to comment #2) > Should be fixed in trunk, but I didn't actually try to compile for Hurd. I fixed it up for you in commit 9078ce930afda8bbcba6fe860a13ca62abcf2742. ;-) Errors and warnings were: gcc-4.4 malloc.c [...] [...] In file included from ../include/sys/mman.h:2, from malloc.c:1754: ../misc/sys/mman.h:95: error: expected identifier or '(' before 'void' ../misc/sys/mman.h:95: error: expected ')' before '(' token [...] make[3]: *** [/media/erich/home/thomas/tmp/glibc/debian/madvise/eglibc-2.13/build-tree/hurd-i386-libc/malloc/malloc.o] Error 1 make[3]: Leaving directory `/media/erich/home/thomas/tmp/glibc/debian/madvise/eglibc-2.13/malloc' make[2]: *** [malloc/subdir_lib] Error 2 (Poor GCC, seeing that ``prototype''.) After fixing that: In file included from malloc.c:2567: arena.c: In function 'shrink_heap': arena.c:823: warning: left-hand operand of comma expression has no effect arena.c:823: warning: left-hand operand of comma expression has no effect malloc.c: In function 'mTRIm': malloc.c:5874: warning: left-hand operand of comma expression has no effect malloc.c:5874: warning: left-hand operand of comma expression has no effect Now the situation is as follows: $ echo 'int main() { }' | gcc -o /dev/null -x c - $ echo 'int main() { madvise (); }' | gcc -o /dev/null -x c - $ echo 'int main() { }' | gcc -o /dev/null -static -x c - $ echo 'int main() { madvise (); }' | gcc -o /dev/null -static -x c - /tmp/cce05X6t.o: In function `main': :(.text+0x7): warning: warning: madvise is not implemented and will always fail That is, in the -static case, we only get the warning if madvise is actively being used in the user code, but not due to glibc's own usage in malloc. Joseph already had amended the NEWS file. Samuel, you can now replace the Debian glibc patch with d2c736f809690dd69f1cade53a61b99e401bb0e3 and 9078ce930afda8bbcba6fe860a13ca62abcf2742. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.