From aeaa31bd2afc3e7c6b8514a6796b138851a288e6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 11 Feb 2002 15:09:52 +0000 Subject: [PATCH] Fixed Linux hang of the TXP loader by overriding the default -O2 optimization level which appears to cause the code to hang, -O works fine for some strange reason, I havn't found any direct problems in the code. This may be compiler bug or a code bug, the bug may go away in later versions of GNUC++, the problem currently occurs under GCC2.96. --- src/osgPlugins/txp/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/osgPlugins/txp/Makefile b/src/osgPlugins/txp/Makefile index 7e3574291..b604b300e 100644 --- a/src/osgPlugins/txp/Makefile +++ b/src/osgPlugins/txp/Makefile @@ -32,6 +32,14 @@ TARGET_LOADER_FILES = osgPlugins/$(TARGET_BASENAME).$(DL_EXT) LIBS = $(GL_LIBS) -losg -losgDB MACOSXLIBS = -L$(OSGHOME)/lib -losg -losgDB -lstdc++ +# override the compiler optimization, since GNU C++ 2.96 has problems with +# areas of the TXP loader code when compiling at -O2 optimization level. +# -O works fine?! Guess this is a tempory bug, or may be something more +# subtle in the TXP code itself, but my investigations havn't revealled +# anything to fix, right now it looks like just a compiler bug. +# Robert Osfield, Feb 2002. +CFLAGS += -O + C++FLAGS += -I. -I$(OSGHOME)/include LDFLAGS += -L$(OSGHOME)/lib