Bug 74781
Summary: | compat-egcs needs better documention on usage | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Eric Ding <w7alc7r02> |
Component: | compat-egcs | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED WONTFIX | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-10-03 19:06:42 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Eric Ding
2002-10-01 16:30:44 UTC
After a day and a half of experimentation, I've come to the conclusion that compat-egcs is ... seriously confusing. :) The only way I could create shared libraries and executables that worked well on Red Hat 6.2 was to do the following: 1) run /usr/i386-glibc21-linux/bin/i386-glibc21-linux.sh to set the LDEMULATION and GCC_EXEC_PREFIX environment variables correctly. 2) compile and link with gcc 2.96 driving, *not* with egcs. So with a simple program, I'd compile as follows: gcc -c test.c 3) When compiling C++ programs, I found that gcc 2.96 was not passing a flag that the egcs subprograms expected, namely __cplusplus. So when compiling a C++ program, I have to do: g++ -D__cplusplus test.c and then... 4) I found that I have to actually use gcc 2.96 to link, *not* egcs as I had expected. The latter simply fails to work because it's using the wrong object files/libraries when compiling. So again, the possibilities might be: gcc -o test test.o gcc -shared -o libtest.so test.o gcc -shared -o libtest.so test.o -lstdc++ g++ -shared -o libtest.so test.o All of this leads me to wonder whether compat-egcs has been thoroughly tested (never mind that it's completely undocumented...). Have I come to the correct conclusions, or not? Or... just use i386-glibc21-linux-gcc and i386-glibc21-linux-c++. I shoulda guessed. Or should I have? Can someone write documentation for this stuff, please? compat-egcs is not included in the distribution any longer. |