This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] GCC 3.4.3 BeOS patches


Some time ago i've built GCC 3.4.1 on BeOS and used it for some time now. 
Because of ABI changes it can't be used for native BeOS applications using 
Be C++ API, but i used it for porting C++ applications from other 
platforms (for example Wesnoth game :).
Now i've cleaned up patches and split them so they can be easier reviewed. 
I've used GCC 3.4.3 for Wesnoth 0.8.8 build and all seems to be working 

I attached following patches:

gcc-3.4.3-BeOS-beos-elf.diff changes some defs for BeOS elf :)
gcc-3.4.3-BeOS-collect2.diff another change needed.
gcc-3.4.3-BeOS-gthread.diff implements threading support for BeOS.

gcc-3.4.3-BeOS-jcr-fix.diff _Jv... symbol can't be added to BeOS 
executables if it's missing, or they will not be able to run (BeOS errors 
about missing symbol). Can someone point me where should i change config 
to not include _Jv symbols (and/or .jcr section), so i don't need this 
hacky fix?

gcc-3.4.3-BeOS-makefiles.diff this is needed for building GCC - BeOS 
doesn't have libm, math is in other system library used by default so no 
additional link is needed. I know this can't be accepted because it 
touches other platforms. Can someone make -lm be optional and checked in 
configure script (i don't know much about autoconf, and most probably 
someone here will be able to change that in seconds :(?

All exceutables i build using 3.4.1 and 3.4.3 worked fine. There's only 
one problem, but i'm not sure if it's because of GCC:

Let's say we have dynamic library libA which exports C++ function, which 
may throw exception. We also have executable B which is linked to libA and 
uses that function. When exception is thrown executable catches only 
unknown exception and not an object. 
In previous try to mail this to maillist i've attached test case for that 
(my english is poor, so small code should better explain what i mean), but 
it seems mail didn't got to maillist (.zip files aren't allowed?). So i've 
uploaded it to .

GCC 2.x generated lib and exe work ok (catch given object), GCC 3.x 
generated code does not (catches unknown exception).
I noticed that since the time of 2.9.x (Be's port) there are two new 
sections added by binutils: eh_frame and gcc_except_table. Can it be that 
it's BeOS dynamic loader which doesn't understand them, and doesn't load 
information needed to properly catch exceptions? Or maybe i did something 
wrong when building BeOS port of GCC? Is it GCC's part at all, or maybe 
binutils? or both? or something else (BeOS own loader)?


Attachment: gcc-3.4.3-BeOS-makefiles.diff
Description: Text document

Attachment: gcc-3.4.3-BeOS-jcr-fix.diff
Description: Text document

Attachment: gcc-3.4.3-BeOS-gthread.diff
Description: Text document

Attachment: gcc-3.4.3-BeOS-collect2.diff
Description: Text document

Attachment: gcc-3.4.3-BeOS-beos-elf.diff
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]