Compare commits

...

14 Commits

Author SHA1 Message Date
Michael Lotz
5d242e9e05 Add the -no-undefined flag only for non-shared objects as before, i.e. shared
libraries are allowed to use undefined symbols.


git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-13 15:42:32 +00:00
Michael Lotz
7219b3c58f * Change gnu include path to 3rdparty and also add /boot/common/include to the
include list as in r28324. I really thought I updated this based on this patch.
* Added /boot/home/config/include to the include list as well, not sure why this
  wasn't present before. If there's a specific reason against it please tell.


git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-13 15:37:22 +00:00
Michael Lotz
beaf9299fc * Amend link and startfile specs for the -shared option.
* Remove the part of the link specs that automatically names the output after
  the last source file. Therefore we'll produce a.out for now. Sadly the %b
  variable does also evaluate to libraries in GCC4 which makes it unusable for
  this case. A "gcc file.cpp -lstdc++" would for example produce an output
  named libstdc++...


git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-23 20:51:17 +00:00
Michael Lotz
21658f885f Add missing default CPU setting for m68k.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-06 23:46:58 +00:00
Michael Lotz
0e5d48202a Make the arm target valid as well.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-06 23:10:34 +00:00
Michael Lotz
2a214e38d2 Add missing support for ppc and m68k targets.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-06 22:05:19 +00:00
Michael Lotz
db596da671 Remove the extra /posix from the NATIVE_SYSTEM_HEADER_DIR since we override the limits test adding it again. Should fix native GCC4 compilation.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-28 21:23:05 +00:00
Michael Lotz
33c77afbe9 Updating config.guess and config.sub so the inline GMP and MPFR libs can be built under Haiku.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29080 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-28 20:15:42 +00:00
Michael Lotz
04f456db0e Broke finding limits.h for the cross-compiler by removing that. For the native
compile it's enough the set the NATIVE_SYSTEM_HEADER_DIR, but for cross
compiling this is needed. Sorry for that, should've be more cautious when
updating.


git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-28 17:35:08 +00:00
Michael Lotz
850146e02b Move t-haiku where it should be. It's shared for all platforms of course.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-28 17:31:12 +00:00
Michael Lotz
71707d824a Put the changes to the generated build files into their .ac/.am source.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-28 16:09:58 +00:00
Michael Lotz
87cbf3a69a This should fix running the get_patches script. I don't really know how this could previously have worked. I can just guess that on the platform it worked, the MPFR lib wasn't built because it was preinstalled.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-28 13:05:13 +00:00
Michael Lotz
36de11649f Don't blindly assume -lm presence. Add a check for the host and remove the -lm
on Haiku so building should work natively.


git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-28 03:07:50 +00:00
Michael Lotz
3fce03fd27 Remove the __BEOS__ builtin define. Also add an uppercase __ARM__ for the ARM config.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-28 01:49:45 +00:00
17 changed files with 3232 additions and 906 deletions

View File

@@ -3265,7 +3265,7 @@ genprogmd = attr attrtab automata codes conditions config constants emit \
$(genprogmd:%=build/gen%$(build_exeext)): $(BUILD_RTL) $(BUILD_ERRORS)
# These programs need libs over and above what they get from the above list.
build/genautomata$(build_exeext) : BUILD_LIBS += -lm
build/genautomata$(build_exeext) : BUILD_LIBS += @math_library@
# These programs are not linked with the MD reader.
build/gengenrtl$(build_exeext) : $(BUILD_ERRORS)

View File

@@ -1128,7 +1128,7 @@ x86_64-*-freebsd*)
tmake_file="${tmake_file} i386/t-crtstuff"
;;
i[34567]86-*-haiku*)
tmake_file='i386/t-haiku i386/t-crtpic'
tmake_file='t-haiku i386/t-crtpic'
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h haiku.h i386/haiku.h"
extra_parts='crtbegin.o crtend.o'
;;
@@ -1645,6 +1645,8 @@ m68k-*-rtems*)
extra_parts="crtbegin.o crtend.o"
;;
m68k-*-haiku*)
default_m68k_cpu=68020
default_cf_cpu=5206
tmake_file="m68k/t-m68kbare m68k/t-crtstuff t-haiku" #??
tm_file="${tm_file} dbxelf.h elfos.h haiku.h m68k/haiku.h"
tm_defines="MOTOROLA USE_GAS"

View File

@@ -55,8 +55,8 @@
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__BEOS__"); \
builtin_define ("__HAIKU__"); \
builtin_define ("__ARM__"); \
builtin_define ("__arm__"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \

View File

@@ -62,7 +62,7 @@ Boston, MA 02111-1307, USA. */
it was i386-mcount.o, but that doesn't exist in gcc 2.95.3 either. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!nostart:start_dyn.o%s} init_term_dyn.o%s %{p:mcount.o%s}"
#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!shared:%{!nostart:start_dyn.o%s}} init_term_dyn.o%s %{p:mcount.o%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
@@ -83,6 +83,8 @@ Boston, MA 02111-1307, USA. */
{ GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, \
{ FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, \
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 }, \
{ "/boot/home/config/include", 0, 0, 0, 0, 0 }, \
{ "/boot/common/include", 0, 0, 0, 0, 0 }, \
{ "/boot/develop/headers/os", 0, 0, 0, 0, 0 }, \
{ "/boot/develop/headers/os/app", 0, 0, 0, 0, 0 }, \
{ "/boot/develop/headers/os/device", 0, 0, 0, 0, 0 }, \
@@ -106,7 +108,7 @@ Boston, MA 02111-1307, USA. */
{ "/boot/develop/headers/os/be_apps/Deskbar", 0, 0, 0, 0, 0 }, \
{ "/boot/develop/headers/os/be_apps/NetPositive", 0, 0, 0, 0, 0 }, \
{ "/boot/develop/headers/os/be_apps/Tracker", 0, 0, 0, 0, 0 }, \
{ "/boot/develop/headers/gnu", 0, 0, 0, 0, 0 }, \
{ "/boot/develop/headers/3rdparty", 0, 0, 0, 0, 0 }, \
{ "/boot/develop/headers/cpp", 0, 0, 0, 0, 0 }, \
{ "/boot/develop/headers/bsd", 0, 0, 0, 0, 0 }, \
{ "/boot/develop/headers/posix", 0, 0, 0, 0, 0 }, \
@@ -146,7 +148,7 @@ Boston, MA 02111-1307, USA. */
{ CROSS_INCLUDE_DIR "/os/be_apps/Deskbar", 0, 0, 0, 1, 0 }, \
{ CROSS_INCLUDE_DIR "/os/be_apps/NetPositive", 0, 0, 0, 1, 0 }, \
{ CROSS_INCLUDE_DIR "/os/be_apps/Tracker", 0, 0, 0, 1, 0 }, \
{ CROSS_INCLUDE_DIR "/gnu", 0, 0, 0, 1, 0 }, \
{ CROSS_INCLUDE_DIR "/3rdparty", 0, 0, 0, 1, 0 }, \
{ CROSS_INCLUDE_DIR "/cpp", 0, 0, 0, 1, 0 }, \
{ CROSS_INCLUDE_DIR "/bsd", 0, 0, 0, 1, 0 }, \
{ CROSS_INCLUDE_DIR "/posix", 0, 0, 0, 1, 0 }, \

View File

@@ -46,7 +46,6 @@ Boston, MA 02111-1307, USA. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__BEOS__"); \
builtin_define ("__HAIKU__"); \
builtin_define ("__INTEL__"); \
builtin_define ("_X86_"); \
@@ -70,7 +69,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_haiku -shared -no-undefined -Bsymbolic %{nostart:-e 0}"
#define LINK_SPEC "-m elf_i386_haiku -shared -Bsymbolic %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
/* A C statement (sans semicolon) to output to the stdio stream
FILE the assembler definition of uninitialized global DECL named

View File

@@ -80,7 +80,6 @@ Boston, MA 02110-1301, USA. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__BEOS__"); \
builtin_define ("__HAIKU__"); \
builtin_define ("__M68K__"); \
builtin_define_std ("mc68000"); \

View File

@@ -47,7 +47,6 @@ Boston, MA 02111-1307, USA. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__BEOS__"); \
builtin_define ("__HAIKU__"); \
builtin_define ("__POWERPC__"); \
builtin_define ("__powerpc__"); \

View File

@@ -1,3 +1,4 @@
# There are system headers elsewhere, but these are the ones that
# we are most likely to want to apply any fixes to.
NATIVE_SYSTEM_HEADER_DIR = /boot/develop/headers/posix
NATIVE_SYSTEM_HEADER_DIR = /boot/develop/headers
LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/posix/limits.h ]

10
gcc/gcc/configure vendored
View File

@@ -9064,6 +9064,15 @@ esac
# --------
# Configure -lm usage for host tools that need it
math_library="-lm"
case $host in
*-*-haiku*)
# no separate math library needed
math_library=
;;
esac
# These libraries may be used by collect2.
# We may need a special search path to get them linked.
echo "$as_me:$LINENO: checking for collect2 libraries" >&5
@@ -24035,6 +24044,7 @@ s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
/@language_hooks@/r $language_hooks
s,@language_hooks@,,;t t
s,@math_library@,$math_library,;t t
CEOF
_ACEOF

View File

@@ -945,6 +945,15 @@ AC_C_BIGENDIAN
# --------
# Configure -lm usage for host tools that need it
math_library="-lm"
case $host in
*-*-haiku*)
# no separate math library needed
math_library=
;;
esac
# These libraries may be used by collect2.
# We may need a special search path to get them linked.
AC_CACHE_CHECK(for collect2 libraries, gcc_cv_collect2_libs,

2237
gcc/gmp/config.guess vendored

File diff suppressed because it is too large Load Diff

1767
gcc/gmp/config.sub vendored

File diff suppressed because it is too large Load Diff

View File

@@ -222,6 +222,8 @@ arm*-*-netbsdelf*)
;;
arm*-*-netbsd*)
;;
arm-*-haiku*)
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
;;
arm*-*-uclinux*) # ARM ucLinux
@@ -313,7 +315,7 @@ i[34567]86-*-freebsd*)
;;
x86_64-*-freebsd*)
;;
i[34567]86-*-haikuelf* | i[34567]86-*-haiku*)
i[34567]86-*-haiku*)
;;
i[34567]86-*-netbsdelf*)
;;
@@ -417,6 +419,8 @@ m68k-*-aout*)
;;
m68k-*-coff*)
;;
m68k-*-haiku*)
;;
m68020-*-elf* | m68k-*-elf*)
;;
m68010-*-netbsdelf* | m68k*-*-netbsdelf*)
@@ -495,6 +499,8 @@ powerpc64-*-darwin*)
;;
powerpc*-*-freebsd*)
;;
powerpc-*-haiku*)
;;
powerpc-*-netbsd*)
;;
powerpc-*-chorusos*)

View File

@@ -33,7 +33,7 @@ mpfr_TEXINFOS = fdl.texi
MAKEINFOFLAGS = --enable-encoding
get_patches.c: PATCHES get_patches.sh
./get_patches.sh > $@ || rm -f $@
$(srcdir)/get_patches.sh > $@ || rm -f $@
# Do not add get_patches.c to CLEANFILES so that this file doesn't
# need to be (re)built as long as no patches are applied. Anyway the

View File

@@ -1666,7 +1666,7 @@ uninstall-info: uninstall-info-recursive
get_patches.c: PATCHES get_patches.sh
./get_patches.sh > $@ || rm -f $@
$(srcdir)/get_patches.sh > $@ || rm -f $@
tune:
$(MAKE) $(AM_MAKEFLAGS) tuneup$(EXEEXT)

35
gcc/mpfr/config.guess vendored
View File

@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2007-07-22'
timestamp='2008-01-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -56,8 +56,8 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -532,7 +532,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[45])
*:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@@ -799,6 +799,9 @@ EOF
EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -833,7 +836,14 @@ EOF
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -954,8 +964,8 @@ EOF
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
xtensa:Linux:*:*)
echo xtensa-unknown-linux-gnu
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
@@ -1206,6 +1216,9 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1474,9 +1487,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please
send the following data and any information you think might be

44
gcc/mpfr/config.sub vendored
View File

@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2007-06-28'
timestamp='2008-01-16'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -72,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -369,10 +369,14 @@ case $basic_machine in
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -443,6 +447,14 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
c90)
basic_machine=c90-cray
os=-unicos
@@ -668,6 +680,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
@@ -813,6 +833,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
@@ -1021,6 +1049,10 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
tile*)
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;