add a fix in order to avoid using the broken BDirectWindow-typeinfo function

that is contained inside the BE-libs.
  We generate a new one and use this instead


git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9618 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2004-10-28 18:35:04 +00:00
parent 5c130f4191
commit cd8c180f96
3 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,18 @@
/*
** This file exists merely to produce the typeinfo-function for BDirectWindow
** (i.e. the symbol __tf13BDirectWindow).
** It seems that the version of this function included in the Be-libs isn't
** working (it crashes GLTeapot, for instance). So we use this file to
** generate a working version of this function which will be linked into any
** application automatically, fixing the problem.
** TODO: check if this applies to Dano/Zeta and deactivate this if it doesn't.
**/
#include <typeinfo>
#include <DirectWindow.h>
void
dummy()
{
typeid(BDirectWindow);
}

View File

@ -202,7 +202,7 @@ Boston, MA 02111-1307, USA. */
#define LIBGCC_SPEC ""
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!nostart: %{!shared: start_dyn.o%s}} init_term_dyn.o%s %{p:i386-mcount.o%s}"
#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!nostart: %{!shared: start_dyn.o%s fix_bdirectwin_typeinfo.o%s}} init_term_dyn.o%s %{p:i386-mcount.o%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"

View File

@ -12,3 +12,11 @@ INSTALL_ASSERT_H =
winnt.o: $(srcdir)/config/i386/winnt.c
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/winnt.c
EXTRA_PARTS += fix_bdirectwin_typeinfo.o
# The purpose of this rule is to generate fix_bdirectwin_typeinfo.o.
# This object-file is required to fix a problem with the BDirectWindow-typeinfo
# function as provided by the Be-libs (which crashes GLTeapot).
#
fix_bdirectwin_typeinfo.o: $(srcdir)/beos-specific/fix_bdirectwin_typeinfo.cpp
gcc -c -O0 $(srcdir)/beos-specific/fix_bdirectwin_typeinfo.cpp