mirror of
https://review.haiku-os.org/buildtools
synced 2026-02-04 16:03:15 +01:00
Compare commits
9 Commits
btrev10352
...
btrev11253
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49182b477d | ||
|
|
2ec313f7c3 | ||
|
|
89e5a936a4 | ||
|
|
67a3c23c86 | ||
|
|
5f2a11b032 | ||
|
|
4616c25941 | ||
|
|
8f27e7c7a5 | ||
|
|
bd6811b11a | ||
|
|
b1f7854b8a |
@@ -32,6 +32,15 @@ Ok, now everything is compiled and ready, waiting to be installed:
|
||||
|
||||
That's it, gcc-2.95.3 and binutils-2.15 are now installed and active.
|
||||
|
||||
For the installation, you'll need the following tools/libraries to be installed:
|
||||
autoconf
|
||||
automake
|
||||
gettext
|
||||
libdl
|
||||
libiconv
|
||||
|
||||
You'll find most of these in the GNU and LibPak packages on BeBits (http://www.bebits.com/app/2971, and http://www.bebits.com/app/3322 respectively).
|
||||
|
||||
So have fun!
|
||||
|
||||
Please send questions & bug-reports to: Oliver Tappe <gcc@hirschkaefer.de>
|
||||
|
||||
@@ -259,7 +259,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
all: all-redirect $(MKDOC)
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
|
||||
@@ -301,8 +301,7 @@ main (int argc, char **argv)
|
||||
link_info.notice_all = FALSE;
|
||||
link_info.nocopyreloc = FALSE;
|
||||
link_info.new_dtags = FALSE;
|
||||
/* disable combreloc by default for BeOS: */
|
||||
link_info.combreloc = FALSE;
|
||||
link_info.combreloc = TRUE;
|
||||
link_info.eh_frame_hdr = FALSE;
|
||||
link_info.strip_discarded = TRUE;
|
||||
link_info.strip = strip_none;
|
||||
|
||||
@@ -999,12 +999,7 @@ parse_args (unsigned argc, char **argv)
|
||||
/* When creating a shared library, the default
|
||||
behaviour is to ignore any unresolved references. */
|
||||
if (link_info.unresolved_syms_in_objects == RM_NOT_YET_SET)
|
||||
#ifdef __BEOS__
|
||||
/* BeOS uses -shared for apps, but wants to report undefined symbols for them */
|
||||
link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols;
|
||||
#else
|
||||
link_info.unresolved_syms_in_objects = RM_IGNORE;
|
||||
#endif
|
||||
if (link_info.unresolved_syms_in_shared_libs == RM_NOT_YET_SET)
|
||||
link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ Boston, MA 02111-1307, USA. */
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{!o*:-o %b} -m elf_i386_be -shared -Bsymbolic %{nostart:-e 0} %{shared:-e 0}"
|
||||
#define LINK_SPEC "%{!o*:-o %b} -m elf_i386_be -shared -Bsymbolic --no-undefined %{nostart:-e 0} %{shared:-e 0}"
|
||||
|
||||
/* Provide start and end file specs appropriate to glibc. */
|
||||
|
||||
|
||||
@@ -586,6 +586,10 @@ values between 1-10, the default is 5 (B_LOW_PRIORITY).
|
||||
Disable any BeOS-R5 compatibility fixes (like the automatic linking of
|
||||
fix_bdirectwindow_typeinfo.o).
|
||||
|
||||
@item --relative-path-errors
|
||||
Disable the BeOS-specific feature of absolute paths when displaying errors.
|
||||
If you specify this option, relative paths will be used instead.
|
||||
|
||||
@item --help
|
||||
Print (on the standard output) a description of the command line options
|
||||
understood by @code{gcc}. If the @code{-v} option is also specified
|
||||
|
||||
@@ -284,6 +284,10 @@ inline ios& hex(ios& i)
|
||||
{ i.setf(ios::hex, ios::dec|ios::hex|ios::oct); return i; }
|
||||
inline ios& oct(ios& i)
|
||||
{ i.setf(ios::oct, ios::dec|ios::hex|ios::oct); return i; }
|
||||
inline ios& fixed(ios& i)
|
||||
{ i.setf(ios::fixed, ios::floatfield); return i; }
|
||||
inline ios& scientific(ios& i)
|
||||
{ i.setf(ios::scientific, ios::floatfield); return i; }
|
||||
} // extern "C++"
|
||||
|
||||
#endif /*!_IOSTREAM_H*/
|
||||
|
||||
@@ -91,27 +91,62 @@ Bugs/Peculiarities:
|
||||
entries in place, just change the type to R_386_NONE. This hack seems to
|
||||
work for all BeOS dynamic loaders.
|
||||
|
||||
- The Be-compilers had the habit of putting automatically generated functions
|
||||
into each object file that uses them. This behaviour corresponds to what gcc
|
||||
calls multiple symbol spaces. For ELF, however, multiple symbol spaces do
|
||||
not make much sense, as all global symbols are automatically being exported
|
||||
(i.e. there is only a single symbol space).
|
||||
This version of gcc activates multiple symbol spaces only when optimization
|
||||
is switched off. In optimizing mode, a single symbol space is used, in order
|
||||
to yield smaller object files, libraries and apps.
|
||||
You can use the new switch -f(no-)multiple-symbol-spaces to force gcc to
|
||||
use (or not use) multiple symbol spaces.
|
||||
|
||||
- Every app is now automatically linked against a (new) object file named
|
||||
fix_bdirectwin_typeinfo.o
|
||||
Older compilers had the habit of generating typeinfo-functions in each
|
||||
object file that uses them (dynamic_cast). My version of gcc only does that
|
||||
if optimization is switched off. In optimizing mode, these functions are not
|
||||
kept in each object file, but they are taken from the library which "defines"
|
||||
the class that is the target of the dynamic_cast. This works fine for most
|
||||
cases, but the Be-libraries seem to contain a broken version of the
|
||||
BDirectWindow-typeinfo-function.
|
||||
As a result of the multiple / single symbol space issue, older compilers
|
||||
generate typeinfo-functions in each object file that uses them (via
|
||||
dynamic_cast).
|
||||
As this compiler uses a single symbol space when optimizing, type-info
|
||||
functions are not kept in each object file, but they are taken from the
|
||||
library which "defines" the class that is the target of the dynamic_cast.
|
||||
This works fine for most cases, but the Be-libraries seem to contain a
|
||||
broken version of the BDirectWindow-typeinfo-function.
|
||||
The difference here is that older compilers never used this function, as the
|
||||
linker always linked to the (object-file-)internal version of this funtion.
|
||||
Gcc-2.95.3 doesn't always generate these, so that the one living inside the
|
||||
Be-libraries is being used, which in turn leads to a crash (an example is
|
||||
GLTeapot).
|
||||
Be-libraries is being used, which in turn leads to a crash (examples are
|
||||
GLTeapot or libSDL.so).
|
||||
As a solution to this problem, I have created a new object file, named
|
||||
fix_bdirectwin_typeinfo.o, that contains an implementation of the
|
||||
BDirectWindow-typeinfo-funtion. Every app is now linked against this file
|
||||
automatically (by means of the specs-file), such that the broken
|
||||
BDirectWindow-typeinfo-funtion. Every app and library is now linked against
|
||||
this file automatically (by means of the specs-file), such that the broken
|
||||
implementation from the libs isn't used.
|
||||
What remains a mystery to me is how that broken function found its way into
|
||||
the libs in the first place...
|
||||
You can use the new switch -no-beos-fixes to switch off this fix. This is
|
||||
especially useful if you are debugging small test applications and you do
|
||||
not want/need the symbols from fix_bdirectwin_typeinfo.o.
|
||||
What remains a mystery to me is to what respect this function is broken
|
||||
and how it found its way into the libs in the first place...
|
||||
|
||||
- gcc-2.95.3 is a bit more decisive when it comes to the handling of inline
|
||||
assembly operand constraints. The original gcc-2.95.3 contained a bug
|
||||
(or two rather) that resulted in a complaint about a "fixed or forbidden
|
||||
register" bx or bp being spilled for an inline asm-clause that requires
|
||||
rather a lot of register operands. This bug has been fixed (i.e. bx and
|
||||
bp are now only spilled if it is safe to do so), but it's still quite
|
||||
probable that inline assembly that compiled and worked for gnupro-000224
|
||||
may not compile instantly with gcc-2.95.3.
|
||||
So far I have been able to fix all the inline assembly related problems by
|
||||
specifying other operand constraints, but I wouldn't be surprised if there
|
||||
are projects out there for which this won't work.
|
||||
|
||||
- the generation of debugging info has been, and still is, problematic. So
|
||||
whenever you encounter weird error messages or other strange behaviour,
|
||||
please try to deactivate debug-info (remove -g from the build).
|
||||
I think it is especially unwise to combine optimization with debug-info
|
||||
(which a lot of opensource projects seem to do by default), as this
|
||||
combination seems to be the least reliable during compilation and the
|
||||
resulting apps aren't useful in the debugger either.
|
||||
|
||||
- I believe 2.95.3 improves upon the other available compilers for BeOS, but
|
||||
this does not mean that it is better for all purposes, it is just different!
|
||||
|
||||
Reference in New Issue
Block a user