From: junio@siamese.dhis.twinsun.com
To: Manuel McLure <manuel@mclure.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: Linux 2.4.3-ac12
Date: 21 Apr 2001 23:07:28 -0700 [thread overview]
Message-ID: <7vitjxcvrz.fsf@siamese.dhis.twinsun.com> (raw)
In-Reply-To: <E14rA0N-0004sv-00@the-village.bc.nu> <20010421211722.C976@ulthar.internal.mclure.org>
In-Reply-To: <20010421211722.C976@ulthar.internal.mclure.org>
>>>>> "MM" == Manuel McLure <manuel@mclure.org> writes:
MM> Something's wrong with this - it won't build with RH 7.1 kgcc
MM> (egcs-2.91.66):
...
MM> rwsem.o(.text+0x2ed): undefined reference to `__builtin_expect'
MM> /usr/src/linux-2.4.3-ac12/lib/lib.a(rwsem.o): In function
MM> `rwsem_up_write_wake':rwsem.o(.text+0x3c6): undefined reference to
MM> `__builtin_expect'
MM> make: *** [vmlinux] Error 1
MM> Sat Apr 21 20:35:37 PDT 2001
MM> ac12 builds OK with the standard RH 7.1 gcc (2.96), ac11 built fine with
MM> both the standard gcc and kgcc.
You need the following patch on i386. I am not attaching any
diff for other architectures , since I do not know which version
of gcc on other architectures started implementing this feature.
If gcc 2.96 uniformly implements it, I'd rather move this
backward compatibility definition of __builtin_expect from
include/asm-$(arch)/compiler.h to include/asm-generic/
somewhere.
--- 2.4.3-ac12/include/asm-i386/compiler.h Sat Apr 21 22:56:03 2001
+++ 2.4.3-ac12/include/asm-i386/compiler.h Sat Apr 21 22:56:43 2001
@@ -0,0 +1,13 @@
+#ifndef __I386_COMPILER_H
+#define __I386_COMPILER_H 1
+
+/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
+ a mechanism by which the user can annotate likely branch directions and
+ expect the blocks to be reordered appropriately. Define __builtin_expect
+ to nothing for earlier compilers. */
+
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#define __builtin_expect(x, expected_value) (x)
+#endif
+
+#endif /* __I386_COMPILER_H */
--- 2.4.3-ac12/include/asm-i386/semaphore.h Sat Apr 21 22:55:38 2001
+++ 2.4.3-ac12/include/asm-i386/semaphore.h Sat Apr 21 22:55:57 2001
@@ -38,6 +38,7 @@
#include <asm/system.h>
#include <asm/atomic.h>
+#include <asm/compiler.h>
#include <linux/wait.h>
#include <linux/rwsem.h>
next prev parent reply other threads:[~2001-04-22 6:08 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-22 2:53 Linux 2.4.3-ac12 Alan Cox
2001-04-22 4:17 ` Manuel McLure
2001-04-22 5:47 ` junio
2001-04-22 6:07 ` junio [this message]
2001-04-22 10:42 ` Philip Blundell
2001-04-22 12:26 ` Alan Cox
2001-04-22 12:43 ` Philip Blundell
2001-04-22 12:54 ` Alan Cox
2001-04-22 13:00 ` Philip Blundell
2001-04-22 13:10 ` Alan Cox
2001-04-22 13:22 ` Russell King
2001-04-22 13:29 ` Alan Cox
2001-04-22 16:12 ` Jes Sorensen
2001-04-22 16:30 ` Mohammad A. Haque
2001-04-22 17:27 ` Roman Zippel
2001-04-22 17:43 ` Jes Sorensen
2001-04-22 18:42 ` Alan Cox
2001-04-23 6:54 ` Geert Uytterhoeven
2001-04-22 13:51 ` Philip Blundell
2001-04-22 12:11 ` Alan Cox
2001-04-22 12:18 ` Russell King
2001-04-22 12:51 ` Alan Cox
2001-04-22 12:55 ` John Jasen
2001-04-22 13:00 ` Alan Cox
2001-04-22 8:57 ` Eyal Lebedinsky
2001-04-22 12:20 ` Alan Cox
2001-04-22 13:04 ` Eyal Lebedinsky
2001-04-22 16:25 ` John Cavan
2001-04-22 17:07 ` Manuel McLure
2001-04-22 18:48 ` Alan Cox
2001-04-22 18:57 ` Manuel McLure
2001-04-22 18:59 ` Linux 2.4.3-ac12 unresolved symbol rwsem J Sloan
2001-04-23 0:19 ` Linux 2.4.3-ac12 John Cavan
2001-04-23 8:35 ` Byeong-ryeol Kim
2001-04-23 22:18 ` Byeong-ryeol Kim
2001-04-22 22:46 ` Mr. James W. Laferriere
-- strict thread matches above, loose matches on Subject: below --
2001-04-22 13:48 f5ibh
2001-04-22 14:03 ` Jesper Juhl
2001-04-22 17:26 Dieter Nützel
2001-04-22 19:53 ` J . A . Magallon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vitjxcvrz.fsf@siamese.dhis.twinsun.com \
--to=junio@siamese.dhis.twinsun.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=manuel@mclure.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.