Compare commits

...

9 Commits

Author SHA1 Message Date
Oliver Tappe
49182b477d - patched $(MK_DOC) into the default dependencies, such that chow.c gets
built during the make process. Before, it was being built during the
  install process, when gcc might not be available, if the install goes
  into an empty folder. Now, installs in empty folders work properly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@11253 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-04 23:18:59 +00:00
Oliver Tappe
2ec313f7c3 - forgot about committing this, contains updated changes (from last release).
git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@11252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-04 21:23:26 +00:00
Axel Dörfler
89e5a936a4 Added some of the tools you need to build and where you can find them.
It still doesn't seem to be enough, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@11250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-04 20:06:51 +00:00
shatty
67a3c23c86 fixed scientific(ios& i) - thanks to John [Beta] Drinkwater
git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@10545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-29 23:38:46 +00:00
shatty
5f2a11b032 provide convenience fixed(ios&) and scientific(ios&) inline functions
git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@10475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-16 03:46:43 +00:00
Oliver Tappe
4616c25941 - we no longer hard-patch ld to not use relocation combination (combreloc),
as the default (using it) seems to generate slightly smaller results and
  not break anything.


git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@10421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 17:30:14 +00:00
Oliver Tappe
8f27e7c7a5 - we no longer need to hard-patch ld to not allow undefined symbols in
objects, as we now do this via gcc-specs.


git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@10420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 17:28:20 +00:00
Oliver Tappe
bd6811b11a - added --no-undefined to the specs so that we can drop a patch that changed
ld to use this as default.


git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@10419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 16:17:00 +00:00
Oliver Tappe
b1f7854b8a - added missing documentation for --relative-path-errors option.
git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@10418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 16:14:42 +00:00
8 changed files with 68 additions and 22 deletions

View File

@@ -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>

View File

@@ -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)

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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. */

View File

@@ -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

View File

@@ -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*/

View File

@@ -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!