mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 05:36:32 +00:00
Integrate gcc 3.4.2 and add patches from both openembedded (6??-*)
and Dan Kegel's crosstools (7??-*). Use makefile vars for toolchain names in ccache.mk and gdb.mk. Fix a g++-related symlink issue with ccache. Change the default to gcc 3.4.2 and binutils 2.15.91.0.2 (now that mips is building). Let the users go forth and test... ;-)
This commit is contained in:
parent
cbd2923af7
commit
ce1dd7b540
15
Makefile
15
Makefile
@ -50,6 +50,7 @@ ARCH:=i386
|
|||||||
#
|
#
|
||||||
DEFAULT_KERNEL_HEADERS:=2.4.25
|
DEFAULT_KERNEL_HEADERS:=2.4.25
|
||||||
#DEFAULT_KERNEL_HEADERS:=2.6.7
|
#DEFAULT_KERNEL_HEADERS:=2.6.7
|
||||||
|
#DEFAULT_KERNEL_HEADERS:=2.6.8
|
||||||
|
|
||||||
# Choose gcc version.
|
# Choose gcc version.
|
||||||
# WARNING -- 2.95 currently only builds for i386, arm, mips*, and powerpc.
|
# WARNING -- 2.95 currently only builds for i386, arm, mips*, and powerpc.
|
||||||
@ -59,7 +60,8 @@ DEFAULT_KERNEL_HEADERS:=2.4.25
|
|||||||
#GCC_VERSION:=3.3.3
|
#GCC_VERSION:=3.3.3
|
||||||
#GCC_VERSION:=3.3.4
|
#GCC_VERSION:=3.3.4
|
||||||
#GCC_VERSION:=3.4.0
|
#GCC_VERSION:=3.4.0
|
||||||
GCC_VERSION:=3.4.1
|
#GCC_VERSION:=3.4.1
|
||||||
|
GCC_VERSION:=3.4.2
|
||||||
|
|
||||||
# Choose binutils version.
|
# Choose binutils version.
|
||||||
#
|
#
|
||||||
@ -70,9 +72,9 @@ GCC_VERSION:=3.4.1
|
|||||||
#BINUTILS_VERSION:=2.15.90.0.1
|
#BINUTILS_VERSION:=2.15.90.0.1
|
||||||
#BINUTILS_VERSION:=2.15.90.0.1.1
|
#BINUTILS_VERSION:=2.15.90.0.1.1
|
||||||
#BINUTILS_VERSION:=2.15.90.0.2
|
#BINUTILS_VERSION:=2.15.90.0.2
|
||||||
BINUTILS_VERSION:=2.15.90.0.3
|
#BINUTILS_VERSION:=2.15.90.0.3
|
||||||
#BINUTILS_VERSION:=2.15.91.0.1
|
#BINUTILS_VERSION:=2.15.91.0.1
|
||||||
#BINUTILS_VERSION:=2.15.91.0.2
|
BINUTILS_VERSION:=2.15.91.0.2
|
||||||
|
|
||||||
# Choose gdb version.
|
# Choose gdb version.
|
||||||
#
|
#
|
||||||
@ -212,8 +214,11 @@ TARGETS+=busybox #tinylogin
|
|||||||
# More development system stuff for those that want it
|
# More development system stuff for those that want it
|
||||||
#TARGETS+=m4 autoconf automake libtool
|
#TARGETS+=m4 autoconf automake libtool
|
||||||
|
|
||||||
# Some nice debugging tools
|
# Some nice debugging tools for the host
|
||||||
#TARGETS+=gdb strace ltrace
|
#TARGETS+=gdbclient
|
||||||
|
# Some nice debugging tools for the target
|
||||||
|
#TARGETS+=gdbserver gdb_target
|
||||||
|
#TARGETS+=strace ltrace
|
||||||
|
|
||||||
# The Valgrind debugger (x86 only)
|
# The Valgrind debugger (x86 only)
|
||||||
#TARGETS+=valgrind
|
#TARGETS+=valgrind
|
||||||
|
@ -51,26 +51,29 @@ $(STAGING_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR1)/$(CCACHE_BINARY)
|
|||||||
# Otherwise, relative paths for include dirs break.
|
# Otherwise, relative paths for include dirs break.
|
||||||
mkdir -p $(STAGING_DIR)/bin-ccache;
|
mkdir -p $(STAGING_DIR)/bin-ccache;
|
||||||
(cd $(STAGING_DIR)/bin-ccache; \
|
(cd $(STAGING_DIR)/bin-ccache; \
|
||||||
ln -fs $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-gcc; \
|
ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-gcc; \
|
||||||
ln -fs $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-cc; \
|
ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-cc; \
|
||||||
ln -fs $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-uclibc-cc);
|
ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(REAL_GNU_TARGET_NAME)-cc);
|
||||||
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc ] && \
|
[ -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc ] && \
|
||||||
mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(STAGING_DIR)/bin-ccache/
|
mv $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin-ccache/
|
||||||
(cd $(STAGING_DIR)/bin; \
|
(cd $(STAGING_DIR)/bin; \
|
||||||
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-cc; \
|
ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-cc; \
|
||||||
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-gcc; \
|
ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-gcc; \
|
||||||
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-cc; \
|
ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-cc; \
|
||||||
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc);
|
ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-gcc);
|
||||||
ifeq ($(INSTALL_LIBSTDCPP),true)
|
ifeq ($(INSTALL_LIBSTDCPP),true)
|
||||||
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-c++ ] && \
|
[ -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c++ ] && \
|
||||||
mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-c++ $(STAGING_DIR)/bin-ccache/
|
mv $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c++ $(STAGING_DIR)/bin-ccache/
|
||||||
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-g++ ] && \
|
[ -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-g++ ] && \
|
||||||
mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-g++ $(STAGING_DIR)/bin-ccache/
|
mv $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-g++ $(STAGING_DIR)/bin-ccache/
|
||||||
(cd $(STAGING_DIR)/bin; \
|
(cd $(STAGING_DIR)/bin; \
|
||||||
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-c++; \
|
ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-c++; \
|
||||||
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-g++;\
|
ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-g++;\
|
||||||
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-c++; \
|
ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-c++; \
|
||||||
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-g++);
|
ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-g++);
|
||||||
|
(cd $(STAGING_DIR)/bin-ccache; \
|
||||||
|
ln -fs $(REAL_GNU_TARGET_NAME)-c++ $(GNU_TARGET_NAME)-c++; \
|
||||||
|
ln -fs $(REAL_GNU_TARGET_NAME)-g++ $(GNU_TARGET_NAME)-g++);
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ccache: gcc $(STAGING_DIR)/$(CCACHE_TARGET_BINARY)
|
ccache: gcc $(STAGING_DIR)/$(CCACHE_TARGET_BINARY)
|
||||||
|
@ -170,7 +170,7 @@ $(GDB_CLIENT_DIR)/gdb/gdb: $(GDB_CLIENT_DIR)/.configured
|
|||||||
|
|
||||||
$(TARGET_CROSS)gdb: $(GDB_CLIENT_DIR)/gdb/gdb
|
$(TARGET_CROSS)gdb: $(GDB_CLIENT_DIR)/gdb/gdb
|
||||||
install -c $(GDB_CLIENT_DIR)/gdb/gdb $(TARGET_CROSS)gdb
|
install -c $(GDB_CLIENT_DIR)/gdb/gdb $(TARGET_CROSS)gdb
|
||||||
ln -s ../../bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-gdb \
|
ln -s ../../bin/$(REAL_GNU_TARGET_NAME)-gdb \
|
||||||
$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/gdb
|
$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/gdb
|
||||||
|
|
||||||
gdbclient: $(TARGET_CROSS)gdb
|
gdbclient: $(TARGET_CROSS)gdb
|
||||||
|
10
sources/binutils/2.15.91.0.2/500-branch-likely.patch
Normal file
10
sources/binutils/2.15.91.0.2/500-branch-likely.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- binutils-2.15.90.0.3/gas/config/tc-mips.c-dist 2004-08-19 12:56:20.000000000 -0500
|
||||||
|
+++ binutils-2.15.90.0.3/gas/config/tc-mips.c 2004-08-19 12:57:30.000000000 -0500
|
||||||
|
@@ -2708,6 +2708,7 @@
|
||||||
|
prev_insn_reloc_type[1] = BFD_RELOC_UNUSED;
|
||||||
|
prev_insn_reloc_type[2] = BFD_RELOC_UNUSED;
|
||||||
|
prev_insn_extended = 0;
|
||||||
|
+ prev_insn_is_delay_slot = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
@ -0,0 +1,118 @@
|
|||||||
|
From http://sources.redhat.com/ml/binutils/2004-08/msg00190.html
|
||||||
|
|
||||||
|
Date: Tue, 17 Aug 2004 12:04:29 +0200
|
||||||
|
From: Jakub Jelinek <jakub at redhat dot com>
|
||||||
|
To: binutils at sources dot redhat dot com
|
||||||
|
Subject: [PATCH] Fix `defined in discarded section' errors when building ia64 gcc
|
||||||
|
Message-ID: <20040817100429.GL30497@sunsite.ms.mff.cuni.cz>
|
||||||
|
Reply-To: Jakub Jelinek <jakub at redhat dot com>
|
||||||
|
References: <20040817090201.GK30497@sunsite.ms.mff.cuni.cz>
|
||||||
|
In-Reply-To: <20040817090201 dot GK30497 at sunsite dot ms dot mff dot cuni dot cz>
|
||||||
|
|
||||||
|
On Tue, Aug 17, 2004 at 11:02:01AM +0200, Jakub Jelinek wrote:
|
||||||
|
> Current gcc 3.4.x (at least gcc-3_4-rhl-branch) doesn't build with CVS
|
||||||
|
> binutils (nor 2.15.91.0.2).
|
||||||
|
> The problem is that libstdc++.so linking fails with:
|
||||||
|
> `.gnu.linkonce.t._ZNSdD2Ev' referenced in section `.gnu.linkonce.ia64unw._ZNSdD2Ev' of .libs/sstream-inst.o: defined in discarded section `.gnu.linkonce.t._ZNSdD2Ev' of .libs/sstream-inst.o
|
||||||
|
> The problem is that both io-inst.s and sstream-inst.s have
|
||||||
|
> .gnu.linkonce.t._ZNSdD2Ev definition, but because io-inst.cc
|
||||||
|
> also instantiates some templates sstream-inst.cc doesn't instantiate,
|
||||||
|
> the inliner can do a better job in io-inst.cc.
|
||||||
|
> The result is that _ZNSdD2Ev in io-inst.cc is a leaf routine, while
|
||||||
|
> it is not in sstream-inst.cc (in assembly,
|
||||||
|
> _ZNSdD2Ev in io-inst.s starts with .prologue and no .save directives,
|
||||||
|
> while _ZNSdD2Ev] in sstream-inst.s has .prologue 12, 35 and some
|
||||||
|
> .save directives.
|
||||||
|
> IA-64 ABI allows leaf routines to have no unwind section at all,
|
||||||
|
> which means .gnu.linkonce.ia64unw._ZNSdD2Ev is not created in
|
||||||
|
> io-inst.o at all and as .gnu.linkonce.t._ZNSdD2Ev comes first
|
||||||
|
> and wins, .gnu.linkonce.ia64unw._ZNSdD2Ev in sstream.o suddenly
|
||||||
|
> references a discarded section.
|
||||||
|
>
|
||||||
|
> Not sure what should be done here, but certainly the compiler
|
||||||
|
> isn't at fault here, it is a binutils problem.
|
||||||
|
> One fix could be to create empty .gnu.linkonce.ia64unw.* section
|
||||||
|
> in assembler, another special case ia64 unwind sections in the linker.
|
||||||
|
|
||||||
|
Here is a patch for the first possibility.
|
||||||
|
It certainly makes libstdc++.so to link and even the unwind info looks
|
||||||
|
good on brief skimming.
|
||||||
|
|
||||||
|
2004-08-17 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* config/tc-ia64.c (start_unwind_section): Add linkonce_empty
|
||||||
|
argument, don't do anything if current section is not
|
||||||
|
.gnu.linkonce.t.* and linkonce_empty is set.
|
||||||
|
(generate_unwind_image, dot_endp): Adjust callers, call
|
||||||
|
start_unwind_section (*, 1) if nothing will be put into the
|
||||||
|
section.
|
||||||
|
|
||||||
|
--- binutils/gas/config/tc-ia64.c.jj 2004-07-30 11:42:24.000000000 +0200
|
||||||
|
+++ binutils/gas/config/tc-ia64.c 2004-08-17 13:45:04.288173205 +0200
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
/* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
|
||||||
|
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||||
|
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||||
|
+ Free Software Foundation, Inc.
|
||||||
|
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||||
|
|
||||||
|
This file is part of GAS, the GNU Assembler.
|
||||||
|
@@ -3297,7 +3298,7 @@ static char *special_linkonce_name[] =
|
||||||
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
-start_unwind_section (const segT text_seg, int sec_index)
|
||||||
|
+start_unwind_section (const segT text_seg, int sec_index, int linkonce_empty)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Use a slightly ugly scheme to derive the unwind section names from
|
||||||
|
@@ -3359,6 +3360,8 @@ start_unwind_section (const segT text_se
|
||||||
|
prefix = special_linkonce_name [sec_index - SPECIAL_SECTION_UNWIND];
|
||||||
|
suffix += sizeof (".gnu.linkonce.t.") - 1;
|
||||||
|
}
|
||||||
|
+ else if (linkonce_empty)
|
||||||
|
+ return;
|
||||||
|
|
||||||
|
prefix_len = strlen (prefix);
|
||||||
|
suffix_len = strlen (suffix);
|
||||||
|
@@ -3444,7 +3447,7 @@ generate_unwind_image (const segT text_s
|
||||||
|
expressionS exp;
|
||||||
|
bfd_reloc_code_real_type reloc;
|
||||||
|
|
||||||
|
- start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO);
|
||||||
|
+ start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 0);
|
||||||
|
|
||||||
|
/* Make sure the section has 4 byte alignment for ILP32 and
|
||||||
|
8 byte alignment for LP64. */
|
||||||
|
@@ -3485,6 +3488,8 @@ generate_unwind_image (const segT text_s
|
||||||
|
unwind.personality_routine = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ else
|
||||||
|
+ start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 1);
|
||||||
|
|
||||||
|
free_saved_prologue_counts ();
|
||||||
|
unwind.list = unwind.tail = unwind.current_entry = NULL;
|
||||||
|
@@ -4164,7 +4169,7 @@ dot_endp (dummy)
|
||||||
|
subseg_set (md.last_text_seg, 0);
|
||||||
|
unwind.proc_end = expr_build_dot ();
|
||||||
|
|
||||||
|
- start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND);
|
||||||
|
+ start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 0);
|
||||||
|
|
||||||
|
/* Make sure that section has 4 byte alignment for ILP32 and
|
||||||
|
8 byte alignment for LP64. */
|
||||||
|
@@ -4204,6 +4209,9 @@ dot_endp (dummy)
|
||||||
|
bytes_per_address);
|
||||||
|
|
||||||
|
}
|
||||||
|
+ else
|
||||||
|
+ start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 1);
|
||||||
|
+
|
||||||
|
subseg_set (saved_seg, saved_subseg);
|
||||||
|
|
||||||
|
/* Parse names of main and alternate entry points and set symbol sizes. */
|
||||||
|
|
||||||
|
|
||||||
|
Jakub
|
||||||
|
|
68
sources/binutils/2.15.91.0.2/701-binutils-dup-sections.patch
Normal file
68
sources/binutils/2.15.91.0.2/701-binutils-dup-sections.patch
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
See http://sources.redhat.com/ml/binutils/2004-08/msg00256.html
|
||||||
|
|
||||||
|
Date: Fri, 20 Aug 2004 21:13:43 -0400
|
||||||
|
From: Daniel Jacobowitz <drow at false dot org>
|
||||||
|
To: binutils at sources dot redhat dot com
|
||||||
|
Subject: Re: Handle SEC_LINK_DUPLICATES_SAME_CONTENTS for arm-linux
|
||||||
|
Message-ID: <20040821011342.GA30319@nevyn.them.org>
|
||||||
|
Mail-Followup-To: binutils at sources dot redhat dot com
|
||||||
|
References: <20040818145518.GA9774@nevyn.them.org> <20040819055040.GA11820@lucon.org> <20040819080034.GE21716@bubble.modra.org> <20040820173240.GA17678@nevyn.them.org> <20040821003737.GB16016@bubble.modra.org>
|
||||||
|
In-Reply-To: <20040821003737 dot GB16016 at bubble dot modra dot org>
|
||||||
|
|
||||||
|
On Sat, Aug 21, 2004 at 10:07:38AM +0930, Alan Modra wrote:
|
||||||
|
> On Fri, Aug 20, 2004 at 01:32:40PM -0400, Daniel Jacobowitz wrote:
|
||||||
|
> > Thanks. How's this?
|
||||||
|
>
|
||||||
|
> As you might have guessed from my rather slack review of your previous
|
||||||
|
> patch, I trust you enough to give the OK without proper review. But
|
||||||
|
> since you asked... :)
|
||||||
|
|
||||||
|
Checked in as so.
|
||||||
|
|
||||||
|
--
|
||||||
|
Daniel Jacobowitz
|
||||||
|
|
||||||
|
[ rediffed against binutils-2.15.91.0.2, with some elbow grease ]
|
||||||
|
|
||||||
|
2004-08-20 Daniel Jacobowitz <dan@debian.org>
|
||||||
|
|
||||||
|
* elflink.c (_bfd_elf_section_already_linked): Handle
|
||||||
|
SEC_LINK_DUPLICATES_SAME_CONTENTS.
|
||||||
|
--- binutils-2.15.91.0.2/bfd/elflink.c.old 2004-07-27 21:36:08.000000000 -0700
|
||||||
|
+++ binutils-2.15.91.0.2/bfd/elflink.c 2004-08-26 06:38:07.000000000 -0700
|
||||||
|
@@ -9359,6 +9359,35 @@
|
||||||
|
(_("%s: %s: warning: duplicate section `%s' has different size\n"),
|
||||||
|
bfd_archive_filename (abfd), name);
|
||||||
|
break;
|
||||||
|
+ case SEC_LINK_DUPLICATES_SAME_CONTENTS:
|
||||||
|
+ if (sec->size != l->sec->size)
|
||||||
|
+ (*_bfd_error_handler)
|
||||||
|
+ (_("%B: duplicate section `%A' has different size\n"),
|
||||||
|
+ bfd_archive_filename (abfd), sec);
|
||||||
|
+ else if (sec->size != 0)
|
||||||
|
+ {
|
||||||
|
+ bfd_byte *sec_contents, *l_sec_contents;
|
||||||
|
+
|
||||||
|
+ if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))
|
||||||
|
+ (*_bfd_error_handler)
|
||||||
|
+ (_("%B: warning: could not read contents of section `%A'\n"),
|
||||||
|
+ bfd_archive_filename (abfd), sec);
|
||||||
|
+ else if (!bfd_malloc_and_get_section (l->sec->owner, l->sec,
|
||||||
|
+ &l_sec_contents))
|
||||||
|
+ (*_bfd_error_handler)
|
||||||
|
+ (_("%B: warning: could not read contents of section `%A'\n"),
|
||||||
|
+ bfd_archive_filename(l->sec->owner), l->sec);
|
||||||
|
+ else if (memcmp (sec_contents, l_sec_contents, sec->size) != 0)
|
||||||
|
+ (*_bfd_error_handler)
|
||||||
|
+ (_("%B: warning: duplicate section `%A' has different contents\n"),
|
||||||
|
+ bfd_archive_filename (abfd), sec);
|
||||||
|
+
|
||||||
|
+ if (sec_contents)
|
||||||
|
+ free (sec_contents);
|
||||||
|
+ if (l_sec_contents)
|
||||||
|
+ free (l_sec_contents);
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set the output_section field so that lang_add_section
|
101
sources/binutils/2.15.91.0.2/702-binutils-skip-comments.patch
Normal file
101
sources/binutils/2.15.91.0.2/702-binutils-skip-comments.patch
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
|
||||||
|
Fixes
|
||||||
|
localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
|
||||||
|
when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
|
||||||
|
|
||||||
|
Paths adjusted to match crosstool's patcher.
|
||||||
|
|
||||||
|
Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
|
||||||
|
From: Andreas Schwab <schwab at suse dot de>
|
||||||
|
To: Nathan Sidwell <nathan at codesourcery dot com>
|
||||||
|
Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
|
||||||
|
Date: Fri, 23 Apr 2004 22:27:19 +0200
|
||||||
|
Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
|
||||||
|
|
||||||
|
Nathan Sidwell <nathan@codesourcery.com> writes:
|
||||||
|
|
||||||
|
> Index: read.c
|
||||||
|
> ===================================================================
|
||||||
|
> RCS file: /cvs/src/src/gas/read.c,v
|
||||||
|
> retrieving revision 1.76
|
||||||
|
> diff -c -3 -p -r1.76 read.c
|
||||||
|
> *** read.c 12 Mar 2004 17:48:12 -0000 1.76
|
||||||
|
> --- read.c 18 Mar 2004 09:56:05 -0000
|
||||||
|
> *************** read_a_source_file (char *name)
|
||||||
|
> *** 1053,1059 ****
|
||||||
|
> #endif
|
||||||
|
> input_line_pointer--;
|
||||||
|
> /* Report unknown char as ignored. */
|
||||||
|
> ! ignore_rest_of_line ();
|
||||||
|
> }
|
||||||
|
>
|
||||||
|
> #ifdef md_after_pass_hook
|
||||||
|
> --- 1053,1059 ----
|
||||||
|
> #endif
|
||||||
|
> input_line_pointer--;
|
||||||
|
> /* Report unknown char as ignored. */
|
||||||
|
> ! demand_empty_rest_of_line ();
|
||||||
|
> }
|
||||||
|
>
|
||||||
|
> #ifdef md_after_pass_hook
|
||||||
|
|
||||||
|
This means that the unknown character is no longer ignored, despite the
|
||||||
|
comment. As a side effect a line starting with a line comment character
|
||||||
|
not followed by APP in NO_APP mode now triggers an error instead of just a
|
||||||
|
warning, breaking builds of glibc on m68k-linux. Earlier in
|
||||||
|
read_a_source_file where #APP is handled there is another comment that
|
||||||
|
claims that unknown comments are ignored, when in fact they aren't (only
|
||||||
|
the initial line comment character is skipped).
|
||||||
|
|
||||||
|
Note that the presence of #APP will mess up the line counters, but
|
||||||
|
that appears to be difficult to fix.
|
||||||
|
|
||||||
|
Andreas.
|
||||||
|
|
||||||
|
2004-04-23 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* read.c (read_a_source_file): Ignore unknown text after line
|
||||||
|
comment character. Fix misleading comment.
|
||||||
|
|
||||||
|
--- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200
|
||||||
|
+++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
/* read.c - read a source file -
|
||||||
|
Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
||||||
|
- 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||||
|
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GAS, the GNU Assembler.
|
||||||
|
|
||||||
|
@@ -950,10 +950,14 @@ read_a_source_file (char *name)
|
||||||
|
unsigned int new_length;
|
||||||
|
char *tmp_buf = 0;
|
||||||
|
|
||||||
|
- bump_line_counters ();
|
||||||
|
s = input_line_pointer;
|
||||||
|
if (strncmp (s, "APP\n", 4))
|
||||||
|
- continue; /* We ignore it */
|
||||||
|
+ {
|
||||||
|
+ /* We ignore it */
|
||||||
|
+ ignore_rest_of_line ();
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ bump_line_counters ();
|
||||||
|
s += 4;
|
||||||
|
|
||||||
|
sb_new (&sbuf);
|
||||||
|
@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
|
||||||
|
continue;
|
||||||
|
#endif
|
||||||
|
input_line_pointer--;
|
||||||
|
- /* Report unknown char as ignored. */
|
||||||
|
+ /* Report unknown char as error. */
|
||||||
|
demand_empty_rest_of_line ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
Andreas Schwab, SuSE Labs, schwab@suse.de
|
||||||
|
SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany
|
||||||
|
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
|
||||||
|
"And now for something completely different."
|
433
sources/gcc/3.4.2/100-uclibc-conf.patch
Normal file
433
sources/gcc/3.4.2/100-uclibc-conf.patch
Normal file
@ -0,0 +1,433 @@
|
|||||||
|
diff -urN gcc-3.4.1-dist/boehm-gc/configure gcc-3.4.1/boehm-gc/configure
|
||||||
|
--- gcc-3.4.1-dist/boehm-gc/configure 2004-07-01 14:14:03.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/boehm-gc/configure 2004-08-12 16:22:57.000000000 -0500
|
||||||
|
@@ -1947,6 +1947,11 @@
|
||||||
|
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||||
|
;;
|
||||||
|
|
||||||
|
+linux-uclibc*)
|
||||||
|
+ lt_cv_deplibs_check_method=pass_all
|
||||||
|
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||||
|
+ ;;
|
||||||
|
+
|
||||||
|
netbsd*)
|
||||||
|
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||||
|
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||||
|
diff -urN gcc-3.4.1-dist/boehm-gc/ltconfig gcc-3.4.1/boehm-gc/ltconfig
|
||||||
|
--- gcc-3.4.1-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/boehm-gc/ltconfig 2004-08-12 15:54:42.000000000 -0500
|
||||||
|
@@ -1981,6 +1981,23 @@
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
+linux-uclibc*)
|
||||||
|
+ version_type=linux
|
||||||
|
+ need_lib_prefix=no
|
||||||
|
+ need_version=no
|
||||||
|
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||||
|
+ soname_spec='${libname}${release}.so$major'
|
||||||
|
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||||
|
+ shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
+ shlibpath_overrides_runpath=no
|
||||||
|
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
|
||||||
|
+ file_magic_cmd=/usr/bin/file
|
||||||
|
+ file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||||
|
+
|
||||||
|
+ # Assume using the uClibc dynamic linker.
|
||||||
|
+ dynamic_linker="uClibc ld.so"
|
||||||
|
+ ;;
|
||||||
|
+
|
||||||
|
netbsd*)
|
||||||
|
version_type=sunos
|
||||||
|
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-12 15:54:42.000000000 -0500
|
||||||
|
@@ -81,6 +81,18 @@
|
||||||
|
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
||||||
|
|
||||||
|
#undef LINK_SPEC
|
||||||
|
+#ifdef USE_UCLIBC
|
||||||
|
+#define LINK_SPEC "%{h*} %{version:-v} \
|
||||||
|
+ %{b} %{Wl,*:%*} \
|
||||||
|
+ %{static:-Bstatic} \
|
||||||
|
+ %{shared:-shared} \
|
||||||
|
+ %{symbolic:-Bsymbolic} \
|
||||||
|
+ %{rdynamic:-export-dynamic} \
|
||||||
|
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
|
||||||
|
+ -X \
|
||||||
|
+ %{mbig-endian:-EB}" \
|
||||||
|
+ SUBTARGET_EXTRA_LINK_SPEC
|
||||||
|
+#else
|
||||||
|
#define LINK_SPEC "%{h*} %{version:-v} \
|
||||||
|
%{b} %{Wl,*:%*} \
|
||||||
|
%{static:-Bstatic} \
|
||||||
|
@@ -91,6 +103,7 @@
|
||||||
|
-X \
|
||||||
|
%{mbig-endian:-EB}" \
|
||||||
|
SUBTARGET_EXTRA_LINK_SPEC
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
|
||||||
|
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/cris/linux.h gcc-3.4.1/gcc/config/cris/linux.h
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/cris/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||||
|
@@ -79,6 +79,25 @@
|
||||||
|
#undef CRIS_DEFAULT_CPU_VERSION
|
||||||
|
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||||
|
|
||||||
|
+#ifdef USE_UCLIBC
|
||||||
|
+
|
||||||
|
+#undef CRIS_SUBTARGET_VERSION
|
||||||
|
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||||
|
+
|
||||||
|
+#undef CRIS_LINK_SUBTARGET_SPEC
|
||||||
|
+#define CRIS_LINK_SUBTARGET_SPEC \
|
||||||
|
+ "-mcrislinux\
|
||||||
|
+ -rpath-link include/asm/../..%s\
|
||||||
|
+ %{shared} %{static}\
|
||||||
|
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
|
||||||
|
+ %{!shared: \
|
||||||
|
+ %{!static: \
|
||||||
|
+ %{rdynamic:-export-dynamic} \
|
||||||
|
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
|
||||||
|
+ %{!r:%{O2|O3: --gc-sections}}"
|
||||||
|
+
|
||||||
|
+#else /* USE_UCLIBC */
|
||||||
|
+
|
||||||
|
#undef CRIS_SUBTARGET_VERSION
|
||||||
|
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||||
|
|
||||||
|
@@ -93,6 +112,8 @@
|
||||||
|
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
|
||||||
|
%{!r:%{O2|O3: --gc-sections}}"
|
||||||
|
|
||||||
|
+#endif /* USE_UCLIBC */
|
||||||
|
+
|
||||||
|
|
||||||
|
/* Node: Run-time Target */
|
||||||
|
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc gcc-3.4.1/gcc/config/cris/t-linux-uclibc
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/cris/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||||
|
@@ -0,0 +1,3 @@
|
||||||
|
+T_CFLAGS = -DUSE_UCLIBC
|
||||||
|
+TARGET_LIBGCC2_CFLAGS += -fPIC
|
||||||
|
+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/i386/linux.h gcc-3.4.1/gcc/config/i386/linux.h
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/i386/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||||
|
@@ -118,6 +118,15 @@
|
||||||
|
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
|
||||||
|
%{static:-static}}}"
|
||||||
|
#else
|
||||||
|
+#if defined USE_UCLIBC
|
||||||
|
+#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
|
||||||
|
+ %{!shared: \
|
||||||
|
+ %{!ibcs: \
|
||||||
|
+ %{!static: \
|
||||||
|
+ %{rdynamic:-export-dynamic} \
|
||||||
|
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||||
|
+ %{static:-static}}}"
|
||||||
|
+#else
|
||||||
|
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
|
||||||
|
%{!shared: \
|
||||||
|
%{!ibcs: \
|
||||||
|
@@ -126,6 +135,7 @@
|
||||||
|
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||||
|
%{static:-static}}}"
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* A C statement (sans semicolon) to output to the stdio stream
|
||||||
|
FILE the assembler definition of uninitialized global DECL named
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/mips/linux.h gcc-3.4.1/gcc/config/mips/linux.h
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/mips/linux.h 2004-06-15 20:42:24.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/gcc/config/mips/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||||
|
@@ -109,6 +109,17 @@
|
||||||
|
|
||||||
|
/* Borrowed from sparc/linux.h */
|
||||||
|
#undef LINK_SPEC
|
||||||
|
+#ifdef USE_UCLIBC
|
||||||
|
+#define LINK_SPEC \
|
||||||
|
+ "%(endian_spec) \
|
||||||
|
+ %{shared:-shared} \
|
||||||
|
+ %{!shared: \
|
||||||
|
+ %{!ibcs: \
|
||||||
|
+ %{!static: \
|
||||||
|
+ %{rdynamic:-export-dynamic} \
|
||||||
|
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||||
|
+ %{static:-static}}}"
|
||||||
|
+#else
|
||||||
|
#define LINK_SPEC \
|
||||||
|
"%(endian_spec) \
|
||||||
|
%{shared:-shared} \
|
||||||
|
@@ -118,6 +129,7 @@
|
||||||
|
%{rdynamic:-export-dynamic} \
|
||||||
|
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||||
|
%{static:-static}}}"
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#undef SUBTARGET_ASM_SPEC
|
||||||
|
#define SUBTARGET_ASM_SPEC "\
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/linux.h gcc-3.4.1/gcc/config/rs6000/linux.h
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/rs6000/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||||
|
@@ -61,7 +61,11 @@
|
||||||
|
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
|
||||||
|
|
||||||
|
#undef LINK_OS_DEFAULT_SPEC
|
||||||
|
+#ifdef USE_UCLIBC
|
||||||
|
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
|
||||||
|
+#else
|
||||||
|
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||||
|
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h gcc-3.4.1/gcc/config/rs6000/sysv4.h
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h 2004-06-10 01:39:50.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/gcc/config/rs6000/sysv4.h 2004-08-12 15:54:43.000000000 -0500
|
||||||
|
@@ -947,6 +947,7 @@
|
||||||
|
mcall-linux : %(link_os_linux) ; \
|
||||||
|
mcall-gnu : %(link_os_gnu) ; \
|
||||||
|
mcall-netbsd : %(link_os_netbsd) ; \
|
||||||
|
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
|
||||||
|
mcall-openbsd: %(link_os_openbsd) ; \
|
||||||
|
: %(link_os_default) }"
|
||||||
|
|
||||||
|
@@ -1124,6 +1125,10 @@
|
||||||
|
%{rdynamic:-export-dynamic} \
|
||||||
|
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||||
|
|
||||||
|
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||||
|
+ %{rdynamic:-export-dynamic} \
|
||||||
|
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
|
||||||
|
+
|
||||||
|
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||||
|
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||||
|
#endif
|
||||||
|
@@ -1290,6 +1295,7 @@
|
||||||
|
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
|
||||||
|
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
|
||||||
|
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
|
||||||
|
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
|
||||||
|
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
|
||||||
|
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
|
||||||
|
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/sh/linux.h gcc-3.4.1/gcc/config/sh/linux.h
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/sh/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||||
|
@@ -73,12 +73,21 @@
|
||||||
|
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||||
|
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||||
|
#undef SUBTARGET_LINK_SPEC
|
||||||
|
+#ifdef USE_UCLIBC
|
||||||
|
+#define SUBTARGET_LINK_SPEC \
|
||||||
|
+ "%{shared:-shared} \
|
||||||
|
+ %{!static: \
|
||||||
|
+ %{rdynamic:-export-dynamic} \
|
||||||
|
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||||
|
+ %{static:-static}"
|
||||||
|
+#else
|
||||||
|
#define SUBTARGET_LINK_SPEC \
|
||||||
|
"%{shared:-shared} \
|
||||||
|
%{!static: \
|
||||||
|
%{rdynamic:-export-dynamic} \
|
||||||
|
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||||
|
%{static:-static}"
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#undef LIB_SPEC
|
||||||
|
#define LIB_SPEC \
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc gcc-3.4.1/gcc/config/sh/t-linux-uclibc
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/sh/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||||
|
@@ -0,0 +1,13 @@
|
||||||
|
+T_CFLAGS = -DUSE_UCLIBC
|
||||||
|
+
|
||||||
|
+TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
|
||||||
|
+LIB1ASMFUNCS_CACHE = _ic_invalidate
|
||||||
|
+
|
||||||
|
+LIB2FUNCS_EXTRA=
|
||||||
|
+
|
||||||
|
+MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
|
||||||
|
+MULTILIB_DIRNAMES=
|
||||||
|
+MULTILIB_MATCHES =
|
||||||
|
+MULTILIB_EXCEPTIONS=
|
||||||
|
+
|
||||||
|
+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc gcc-3.4.1/gcc/config/sh/t-sh64-uclibc
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/sh/t-sh64-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||||
|
@@ -0,0 +1,13 @@
|
||||||
|
+EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
|
||||||
|
+
|
||||||
|
+LIB1ASMFUNCS = \
|
||||||
|
+ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
|
||||||
|
+ _shcompact_call_trampoline _shcompact_return_trampoline \
|
||||||
|
+ _shcompact_incoming_args _ic_invalidate _nested_trampoline \
|
||||||
|
+ _push_pop_shmedia_regs \
|
||||||
|
+ _udivdi3 _divdi3 _umoddi3 _moddi3
|
||||||
|
+
|
||||||
|
+MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
|
||||||
|
+MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
|
||||||
|
+MULTILIB_MATCHES=
|
||||||
|
+MULTILIB_EXCEPTIONS=
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/t-linux-uclibc gcc-3.4.1/gcc/config/t-linux-uclibc
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||||
|
@@ -0,0 +1,15 @@
|
||||||
|
+T_CFLAGS = -DUSE_UCLIBC
|
||||||
|
+
|
||||||
|
+# Compile crtbeginS.o and crtendS.o with pic.
|
||||||
|
+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
|
||||||
|
+# Compile libgcc2.a with pic.
|
||||||
|
+TARGET_LIBGCC2_CFLAGS = -fPIC
|
||||||
|
+
|
||||||
|
+# Override t-slibgcc-elf-ver to export some libgcc symbols with
|
||||||
|
+# the symbol versions that glibc used.
|
||||||
|
+SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
|
||||||
|
+
|
||||||
|
+# Use unwind-dw2-fde
|
||||||
|
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
|
||||||
|
+ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
|
||||||
|
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c gthr-gnat.c
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||||
|
--- gcc-3.4.1-dist/gcc/config.gcc 2004-04-21 10:12:35.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/gcc/config.gcc 2004-08-12 15:59:46.000000000 -0500
|
||||||
|
@@ -664,6 +664,12 @@
|
||||||
|
extra_parts=""
|
||||||
|
use_collect2=yes
|
||||||
|
;;
|
||||||
|
+arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
|
||||||
|
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||||
|
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
|
||||||
|
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||||
|
+ gnu_ld=yes
|
||||||
|
+ ;;
|
||||||
|
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||||
|
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||||
|
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
|
||||||
|
@@ -725,6 +731,10 @@
|
||||||
|
tmake_file="cris/t-cris cris/t-elfmulti"
|
||||||
|
gas=yes
|
||||||
|
;;
|
||||||
|
+cris-*-linux-uclibc*)
|
||||||
|
+ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
|
||||||
|
+ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
|
||||||
|
+ ;;
|
||||||
|
cris-*-linux*)
|
||||||
|
tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
|
||||||
|
tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
|
||||||
|
@@ -988,6 +998,11 @@
|
||||||
|
thread_file='single'
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
+i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux
|
||||||
|
+ # with ELF format using uClibc
|
||||||
|
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
|
||||||
|
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
|
||||||
|
+ ;;
|
||||||
|
i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
|
||||||
|
# with ELF format using glibc 2
|
||||||
|
# aka GNU/Linux C library 6
|
||||||
|
@@ -1547,6 +1562,16 @@
|
||||||
|
gnu_ld=yes
|
||||||
|
gas=yes
|
||||||
|
;;
|
||||||
|
+mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
|
||||||
|
+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
|
||||||
|
+ case ${target} in
|
||||||
|
+ mipsisa32*-*)
|
||||||
|
+ target_cpu_default="MASK_SOFT_FLOAT"
|
||||||
|
+ tm_defines="MIPS_ISA_DEFAULT=32"
|
||||||
|
+ ;;
|
||||||
|
+ esac
|
||||||
|
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
|
||||||
|
+ ;;
|
||||||
|
mips*-*-linux*) # Linux MIPS, either endian.
|
||||||
|
tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
|
||||||
|
case ${target} in
|
||||||
|
@@ -1764,6 +1789,10 @@
|
||||||
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
|
||||||
|
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
|
||||||
|
;;
|
||||||
|
+powerpc-*-linux-uclibc*)
|
||||||
|
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
|
||||||
|
+ tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
|
||||||
|
+ ;;
|
||||||
|
powerpc-*-linux*)
|
||||||
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
|
||||||
|
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
|
||||||
|
@@ -1924,9 +1953,17 @@
|
||||||
|
tmake_file="${tmake_file} sh/t-le"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
- tmake_file="${tmake_file} sh/t-linux"
|
||||||
|
+ case ${target} in
|
||||||
|
+ *-*-linux-uclibc*) tmake_file="${tmake_file} sh/t-linux-uclibc" ;;
|
||||||
|
+ *) tmake_file="${tmake_file} sh/t-linux" ;;
|
||||||
|
+ esac
|
||||||
|
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
|
||||||
|
case ${target} in
|
||||||
|
+ sh64*-*-linux-uclibc*)
|
||||||
|
+ tmake_file="${tmake_file} sh/t-sh64-uclibc"
|
||||||
|
+ tm_file="${tm_file} sh/sh64.h"
|
||||||
|
+ extra_headers="shmedia.h ushmedia.h sshmedia.h"
|
||||||
|
+ ;;
|
||||||
|
sh64*)
|
||||||
|
tmake_file="${tmake_file} sh/t-sh64"
|
||||||
|
tm_file="${tm_file} sh/sh64.h"
|
||||||
|
diff -urN gcc-3.4.1-dist/libtool.m4 gcc-3.4.1/libtool.m4
|
||||||
|
--- gcc-3.4.1-dist/libtool.m4 2004-05-18 04:08:37.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/libtool.m4 2004-08-12 15:54:43.000000000 -0500
|
||||||
|
@@ -689,6 +689,11 @@
|
||||||
|
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||||
|
;;
|
||||||
|
|
||||||
|
+linux-uclibc*)
|
||||||
|
+ lt_cv_deplibs_check_method=pass_all
|
||||||
|
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||||
|
+ ;;
|
||||||
|
+
|
||||||
|
netbsd*)
|
||||||
|
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||||
|
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||||
|
diff -urN gcc-3.4.1-dist/ltconfig gcc-3.4.1/ltconfig
|
||||||
|
--- gcc-3.4.1-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/ltconfig 2004-08-12 15:55:48.000000000 -0500
|
||||||
|
@@ -602,6 +602,7 @@
|
||||||
|
|
||||||
|
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||||
|
case $host_os in
|
||||||
|
+linux-uclibc*) ;;
|
||||||
|
linux-gnu*) ;;
|
||||||
|
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||||
|
esac
|
||||||
|
@@ -1262,6 +1263,24 @@
|
||||||
|
dynamic_linker='GNU/Linux ld.so'
|
||||||
|
;;
|
||||||
|
|
||||||
|
+linux-uclibc*)
|
||||||
|
+ version_type=linux
|
||||||
|
+ need_lib_prefix=no
|
||||||
|
+ need_version=no
|
||||||
|
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||||
|
+ soname_spec='${libname}${release}.so$major'
|
||||||
|
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||||
|
+ shlibpath_var=LD_LIBRARY_PATH
|
||||||
|
+ shlibpath_overrides_runpath=no
|
||||||
|
+ # This implies no fast_install, which is unacceptable.
|
||||||
|
+ # Some rework will be needed to allow for fast_install
|
||||||
|
+ # before this can be enabled.
|
||||||
|
+ # Note: copied from linux-gnu, and may not be appropriate.
|
||||||
|
+ hardcode_into_libs=yes
|
||||||
|
+ # Assume using the uClibc dynamic linker.
|
||||||
|
+ dynamic_linker="uClibc ld.so"
|
||||||
|
+ ;;
|
||||||
|
+
|
||||||
|
netbsd*)
|
||||||
|
need_lib_prefix=no
|
||||||
|
need_version=no
|
3246
sources/gcc/3.4.2/200-uclibc-locale.patch
Normal file
3246
sources/gcc/3.4.2/200-uclibc-locale.patch
Normal file
File diff suppressed because it is too large
Load Diff
46
sources/gcc/3.4.2/400-mips-delay-slot.patch
Normal file
46
sources/gcc/3.4.2/400-mips-delay-slot.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
http://www.linux-mips.org/archives/linux-mips/2004-09/msg00000.html
|
||||||
|
|
||||||
|
Atsushi Nemoto <anemo@mba.ocn.ne.jp> writes:
|
||||||
|
>/ Is this a get_user's problem or gcc's?/
|
||||||
|
|
||||||
|
The latter. gcc is putting the empty asm:
|
||||||
|
|
||||||
|
__asm__ ("":"=r" (__gu_val));
|
||||||
|
|
||||||
|
into the delay slot of the call.
|
||||||
|
|
||||||
|
Part of the problem is that gcc estimates the length of an asm to be the
|
||||||
|
number of instruction separators + 1. This means that it estimates the
|
||||||
|
asm above to be one instruction long, which is perhaps a little silly
|
||||||
|
for an empty string.
|
||||||
|
|
||||||
|
But the real problem is that gcc should never trust this estimate anyway,
|
||||||
|
since each "instruction" could obviously be a multi-instruction macro.
|
||||||
|
gcc should certainly never put asms into delay slots.
|
||||||
|
|
||||||
|
FWIW, I don't think the bug is specific to 3.3 or 3.4. It could
|
||||||
|
probably trigger for other gcc versions too. It is highly dependent
|
||||||
|
on scheduling though.
|
||||||
|
|
||||||
|
The attached 3.4.x patch fixes the problem there, but if you want to work
|
||||||
|
around it for old versions, just avoid using empty asms if you can,
|
||||||
|
or make them volatile if you can't.
|
||||||
|
|
||||||
|
Of course, the problem isn't confined to empty asms. If you have an asm
|
||||||
|
with a single, multi-instruction macro, gcc might try putting that in a
|
||||||
|
delay slot too. You should at least get an assembler warning in that case.
|
||||||
|
|
||||||
|
Richard
|
||||||
|
|
||||||
|
|
||||||
|
--- gcc-3.4.1/gcc/config/mips/mips.md-orig 2004-09-02 10:38:36.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/gcc/config/mips/mips.md 2004-09-02 10:38:42.000000000 -0500
|
||||||
|
@@ -251,7 +251,7 @@
|
||||||
|
|
||||||
|
;; Can the instruction be put into a delay slot?
|
||||||
|
(define_attr "can_delay" "no,yes"
|
||||||
|
- (if_then_else (and (eq_attr "type" "!branch,call,jump")
|
||||||
|
+ (if_then_else (and (eq_attr "type" "!branch,call,jump,multi")
|
||||||
|
(and (eq_attr "hazard" "none")
|
||||||
|
(eq_attr "single_insn" "yes")))
|
||||||
|
(const_string "yes")
|
79
sources/gcc/3.4.2/600-gcc34-arm-ldm-peephole.patch
Normal file
79
sources/gcc/3.4.2/600-gcc34-arm-ldm-peephole.patch
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
--- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole 2004-01-13 08:24:37.000000000 -0500
|
||||||
|
+++ gcc-3.4.0/gcc/config/arm/arm.md 2004-04-24 18:18:04.000000000 -0400
|
||||||
|
@@ -8810,13 +8810,16 @@
|
||||||
|
(set_attr "length" "4,8,8")]
|
||||||
|
)
|
||||||
|
|
||||||
|
+; Try to convert LDR+LDR+arith into [add+]LDM+arith
|
||||||
|
+; On XScale, LDM is always slower than two LDRs, so only do this if
|
||||||
|
+; optimising for size.
|
||||||
|
(define_insn "*arith_adjacentmem"
|
||||||
|
[(set (match_operand:SI 0 "s_register_operand" "=r")
|
||||||
|
(match_operator:SI 1 "shiftable_operator"
|
||||||
|
[(match_operand:SI 2 "memory_operand" "m")
|
||||||
|
(match_operand:SI 3 "memory_operand" "m")]))
|
||||||
|
(clobber (match_scratch:SI 4 "=r"))]
|
||||||
|
- "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])"
|
||||||
|
+ "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])"
|
||||||
|
"*
|
||||||
|
{
|
||||||
|
rtx ldm[3];
|
||||||
|
@@ -8851,6 +8854,8 @@
|
||||||
|
}
|
||||||
|
if (val1 && val2)
|
||||||
|
{
|
||||||
|
+ /* This would be a loss on a Harvard core, but adjacent_mem_locations()
|
||||||
|
+ will prevent it from happening. */
|
||||||
|
rtx ops[3];
|
||||||
|
ldm[0] = ops[0] = operands[4];
|
||||||
|
ops[1] = XEXP (XEXP (operands[2], 0), 0);
|
||||||
|
--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole 2004-04-24 18:16:25.000000000 -0400
|
||||||
|
+++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:18:04.000000000 -0400
|
||||||
|
@@ -4593,8 +4593,11 @@
|
||||||
|
arith_adjacentmem pattern to output an overlong sequence. */
|
||||||
|
if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1))
|
||||||
|
return 0;
|
||||||
|
-
|
||||||
|
- return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4);
|
||||||
|
+
|
||||||
|
+ /* For Harvard cores, only accept pairs where one offset is zero.
|
||||||
|
+ See comment in load_multiple_sequence. */
|
||||||
|
+ return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4)
|
||||||
|
+ && (!arm_ld_sched || val0 == 0 || val1 == 0);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -4838,6 +4841,11 @@
|
||||||
|
*load_offset = unsorted_offsets[order[0]];
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* For XScale a two-word LDM is a performance loss, so only do this if
|
||||||
|
+ size is more important. See comments in arm_gen_load_multiple. */
|
||||||
|
+ if (nops == 2 && arm_tune_xscale && !optimize_size)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
if (unsorted_offsets[order[0]] == 0)
|
||||||
|
return 1; /* ldmia */
|
||||||
|
|
||||||
|
@@ -5064,6 +5072,11 @@
|
||||||
|
*load_offset = unsorted_offsets[order[0]];
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* For XScale a two-word LDM is a performance loss, so only do this if
|
||||||
|
+ size is more important. See comments in arm_gen_load_multiple. */
|
||||||
|
+ if (nops == 2 && arm_tune_xscale && !optimize_size)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
if (unsorted_offsets[order[0]] == 0)
|
||||||
|
return 1; /* stmia */
|
||||||
|
|
||||||
|
--- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole 2003-07-05 01:27:22.000000000 -0400
|
||||||
|
+++ gcc-3.4.0/gcc/genpeep.c 2004-04-24 18:18:04.000000000 -0400
|
||||||
|
@@ -381,6 +381,7 @@
|
||||||
|
printf ("#include \"recog.h\"\n");
|
||||||
|
printf ("#include \"except.h\"\n\n");
|
||||||
|
printf ("#include \"function.h\"\n\n");
|
||||||
|
+ printf ("#include \"flags.h\"\n\n");
|
||||||
|
|
||||||
|
printf ("#ifdef HAVE_peephole\n");
|
||||||
|
printf ("extern rtx peep_operand[];\n\n");
|
119
sources/gcc/3.4.2/601-gcc34-arm-ldm.patch
Normal file
119
sources/gcc/3.4.2/601-gcc34-arm-ldm.patch
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500
|
||||||
|
+++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400
|
||||||
|
@@ -8520,6 +8520,26 @@
|
||||||
|
return_used_this_function = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* Return the number (counting from 0) of
|
||||||
|
+ the least significant set bit in MASK. */
|
||||||
|
+
|
||||||
|
+#ifdef __GNUC__
|
||||||
|
+inline
|
||||||
|
+#endif
|
||||||
|
+static int
|
||||||
|
+number_of_first_bit_set (mask)
|
||||||
|
+ int mask;
|
||||||
|
+{
|
||||||
|
+ int bit;
|
||||||
|
+
|
||||||
|
+ for (bit = 0;
|
||||||
|
+ (mask & (1 << bit)) == 0;
|
||||||
|
+ ++bit)
|
||||||
|
+ continue;
|
||||||
|
+
|
||||||
|
+ return bit;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
const char *
|
||||||
|
arm_output_epilogue (rtx sibling)
|
||||||
|
{
|
||||||
|
@@ -8753,27 +8773,47 @@
|
||||||
|
saved_regs_mask |= (1 << PC_REGNUM);
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Load the registers off the stack. If we only have one register
|
||||||
|
- to load use the LDR instruction - it is faster. */
|
||||||
|
- if (saved_regs_mask == (1 << LR_REGNUM))
|
||||||
|
- {
|
||||||
|
- /* The exception handler ignores the LR, so we do
|
||||||
|
- not really need to load it off the stack. */
|
||||||
|
- if (eh_ofs)
|
||||||
|
- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
|
||||||
|
- else
|
||||||
|
- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
|
||||||
|
- }
|
||||||
|
- else if (saved_regs_mask)
|
||||||
|
+ if (saved_regs_mask)
|
||||||
|
{
|
||||||
|
- if (saved_regs_mask & (1 << SP_REGNUM))
|
||||||
|
- /* Note - write back to the stack register is not enabled
|
||||||
|
- (ie "ldmfd sp!..."). We know that the stack pointer is
|
||||||
|
- in the list of registers and if we add writeback the
|
||||||
|
- instruction becomes UNPREDICTABLE. */
|
||||||
|
- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
|
||||||
|
+ /* Load the registers off the stack. If we only have one register
|
||||||
|
+ to load use the LDR instruction - it is faster. */
|
||||||
|
+ if (bit_count (saved_regs_mask) == 1)
|
||||||
|
+ {
|
||||||
|
+ int reg = number_of_first_bit_set (saved_regs_mask);
|
||||||
|
+
|
||||||
|
+ switch (reg)
|
||||||
|
+ {
|
||||||
|
+ case SP_REGNUM:
|
||||||
|
+ /* Mustn't use base writeback when loading SP. */
|
||||||
|
+ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
+ case LR_REGNUM:
|
||||||
|
+ if (eh_ofs)
|
||||||
|
+ {
|
||||||
|
+ /* The exception handler ignores the LR, so we do
|
||||||
|
+ not really need to load it off the stack. */
|
||||||
|
+ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ /* else fall through */
|
||||||
|
+
|
||||||
|
+ default:
|
||||||
|
+ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
else
|
||||||
|
- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||||
|
+ {
|
||||||
|
+ if (saved_regs_mask & (1 << SP_REGNUM))
|
||||||
|
+ /* Note - write back to the stack register is not enabled
|
||||||
|
+ (ie "ldmfd sp!..."). We know that the stack pointer is
|
||||||
|
+ in the list of registers and if we add writeback the
|
||||||
|
+ instruction becomes UNPREDICTABLE. */
|
||||||
|
+ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
|
||||||
|
+ else
|
||||||
|
+ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (current_function_pretend_args_size)
|
||||||
|
@@ -11401,22 +11441,6 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-/* Return the number (counting from 0) of
|
||||||
|
- the least significant set bit in MASK. */
|
||||||
|
-
|
||||||
|
-inline static int
|
||||||
|
-number_of_first_bit_set (int mask)
|
||||||
|
-{
|
||||||
|
- int bit;
|
||||||
|
-
|
||||||
|
- for (bit = 0;
|
||||||
|
- (mask & (1 << bit)) == 0;
|
||||||
|
- ++bit)
|
||||||
|
- continue;
|
||||||
|
-
|
||||||
|
- return bit;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
/* Generate code to return from a thumb function.
|
||||||
|
If 'reg_containing_return_addr' is -1, then the return address is
|
||||||
|
actually on the stack, at the stack pointer. */
|
22
sources/gcc/3.4.2/602-sdk-libstdc++-includes.patch
Normal file
22
sources/gcc/3.4.2/602-sdk-libstdc++-includes.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
|
||||||
|
+++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
|
||||||
|
libmath_la_SOURCES = stubs.c
|
||||||
|
|
||||||
|
-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
|
||||||
|
+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
|
||||||
|
|
||||||
|
# Only compiling "C" sources in this directory.
|
||||||
|
LIBTOOL = @LIBTOOL@ --tag CC
|
||||||
|
--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
|
||||||
|
+++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
|
||||||
|
@@ -18,7 +18,7 @@
|
||||||
|
$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
|
||||||
|
|
||||||
|
# -I/-D flags to pass when compiling.
|
||||||
|
-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
|
||||||
|
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
|
||||||
|
|
||||||
|
|
||||||
|
|
44
sources/gcc/3.4.2/700-pr15068-fix.patch
Normal file
44
sources/gcc/3.4.2/700-pr15068-fix.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
See http://gcc.gnu.org/PR15068
|
||||||
|
|
||||||
|
Fixes error
|
||||||
|
|
||||||
|
../sysdeps/generic/s_fmax.c: In function `__fmax':
|
||||||
|
../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
|
||||||
|
Please submit a full bug report,
|
||||||
|
with preprocessed source if appropriate.
|
||||||
|
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
|
||||||
|
make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
|
||||||
|
make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
|
||||||
|
make[1]: *** [math/others] Error 2
|
||||||
|
make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
|
||||||
|
make: *** [all] Error 2
|
||||||
|
|
||||||
|
[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
|
||||||
|
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
|
||||||
|
|
||||||
|
--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800
|
||||||
|
+++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700
|
||||||
|
@@ -1878,6 +1878,7 @@
|
||||||
|
rtx set_src = SET_SRC (pc_set (BB_END (bb)));
|
||||||
|
rtx cond_true = XEXP (set_src, 0);
|
||||||
|
rtx reg = XEXP (cond_true, 0);
|
||||||
|
+ enum rtx_code inv_cond;
|
||||||
|
|
||||||
|
if (GET_CODE (reg) == SUBREG)
|
||||||
|
reg = SUBREG_REG (reg);
|
||||||
|
@@ -1886,11 +1887,13 @@
|
||||||
|
in the form of a comparison of a register against zero.
|
||||||
|
If the condition is more complex than that, then it is safe
|
||||||
|
not to record any information. */
|
||||||
|
- if (GET_CODE (reg) == REG
|
||||||
|
+ inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
|
||||||
|
+ if (inv_cond != UNKNOWN
|
||||||
|
+ && GET_CODE (reg) == REG
|
||||||
|
&& XEXP (cond_true, 1) == const0_rtx)
|
||||||
|
{
|
||||||
|
rtx cond_false
|
||||||
|
- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
|
||||||
|
+ = gen_rtx_fmt_ee (inv_cond,
|
||||||
|
GET_MODE (cond_true), XEXP (cond_true, 0),
|
||||||
|
XEXP (cond_true, 1));
|
||||||
|
if (GET_CODE (XEXP (set_src, 1)) == PC)
|
70
sources/gcc/3.4.2/800-arm-bigendian.patch
Normal file
70
sources/gcc/3.4.2/800-arm-bigendian.patch
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||||
|
Adds support for arm*b-linux* big-endian ARM targets
|
||||||
|
|
||||||
|
See http://gcc.gnu.org/PR16350
|
||||||
|
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-08-16 16:01:50.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-16 15:43:40.000000000 -0500
|
||||||
|
@@ -30,17 +30,34 @@
|
||||||
|
/* Do not assume anything about header files. */
|
||||||
|
#define NO_IMPLICIT_EXTERN_C
|
||||||
|
|
||||||
|
+/*
|
||||||
|
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||||
|
+ * (big endian) configurations.
|
||||||
|
+ */
|
||||||
|
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||||
|
+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
|
||||||
|
+#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||||
|
+#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||||
|
+#else
|
||||||
|
+#define TARGET_ENDIAN_DEFAULT 0
|
||||||
|
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||||
|
+#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* Default is to use APCS-32 mode. */
|
||||||
|
#undef TARGET_DEFAULT
|
||||||
|
-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
|
||||||
|
+#define TARGET_DEFAULT \
|
||||||
|
+ ( ARM_FLAG_APCS_32 | \
|
||||||
|
+ ARM_FLAG_MMU_TRAPS | \
|
||||||
|
+ TARGET_ENDIAN_DEFAULT )
|
||||||
|
|
||||||
|
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||||
|
|
||||||
|
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||||
|
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||||
|
|
||||||
|
#undef MULTILIB_DEFAULTS
|
||||||
|
#define MULTILIB_DEFAULTS \
|
||||||
|
- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||||
|
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||||
|
|
||||||
|
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
|
||||||
|
|
||||||
|
@@ -101,7 +118,7 @@
|
||||||
|
%{rdynamic:-export-dynamic} \
|
||||||
|
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
|
||||||
|
-X \
|
||||||
|
- %{mbig-endian:-EB}" \
|
||||||
|
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||||
|
SUBTARGET_EXTRA_LINK_SPEC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||||
|
--- gcc-3.4.1-dist/gcc/config.gcc 2004-08-16 16:01:50.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/gcc/config.gcc 2004-08-16 16:01:25.000000000 -0500
|
||||||
|
@@ -672,6 +672,11 @@
|
||||||
|
;;
|
||||||
|
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||||
|
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||||
|
+ case $target in
|
||||||
|
+ arm*b-*)
|
||||||
|
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
|
||||||
|
+ ;;
|
||||||
|
+ esac
|
||||||
|
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
|
||||||
|
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||||
|
gnu_ld=yes
|
27
sources/gcc/3.4.2/810-arm-bigendian-uclibc.patch
Normal file
27
sources/gcc/3.4.2/810-arm-bigendian-uclibc.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||||
|
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-08-16 16:08:18.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-16 16:06:24.000000000 -0500
|
||||||
|
@@ -107,7 +107,7 @@
|
||||||
|
%{rdynamic:-export-dynamic} \
|
||||||
|
%{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
|
||||||
|
-X \
|
||||||
|
- %{mbig-endian:-EB}" \
|
||||||
|
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||||
|
SUBTARGET_EXTRA_LINK_SPEC
|
||||||
|
#else
|
||||||
|
#define LINK_SPEC "%{h*} %{version:-v} \
|
||||||
|
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||||
|
--- gcc-3.4.1-dist/gcc/config.gcc 2004-08-16 16:08:18.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/gcc/config.gcc 2004-08-16 16:03:25.000000000 -0500
|
||||||
|
@@ -666,6 +666,11 @@
|
||||||
|
;;
|
||||||
|
arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
|
||||||
|
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||||
|
+ case $target in
|
||||||
|
+ arm*b-*)
|
||||||
|
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
|
||||||
|
+ ;;
|
||||||
|
+ esac
|
||||||
|
tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
|
||||||
|
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||||
|
gnu_ld=yes
|
270
sources/gcc/3.4.2/arm-softfloat.patch.conditional
Normal file
270
sources/gcc/3.4.2/arm-softfloat.patch.conditional
Normal file
@ -0,0 +1,270 @@
|
|||||||
|
Note... modified my mjn3 to not conflict with the big endian arm patch.
|
||||||
|
Warning!!! Only the linux target is aware of TARGET_ENDIAN_DEFAULT.
|
||||||
|
Also changed
|
||||||
|
#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||||
|
%{!mcpu=*:-mcpu=xscale} \
|
||||||
|
%{mhard-float:-mfpu=fpa} \
|
||||||
|
%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||||
|
to
|
||||||
|
#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||||
|
%{mhard-float:-mfpu=fpa} \
|
||||||
|
%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||||
|
in gcc/config/arm/linux-elf.h.
|
||||||
|
#
|
||||||
|
# Submitted:
|
||||||
|
#
|
||||||
|
# Dimitry Andric <dimitry@andric.com>, 2004-05-01
|
||||||
|
#
|
||||||
|
# Description:
|
||||||
|
#
|
||||||
|
# Nicholas Pitre released this patch for gcc soft-float support here:
|
||||||
|
# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html
|
||||||
|
#
|
||||||
|
# This version has been adapted to work with gcc 3.4.0.
|
||||||
|
#
|
||||||
|
# The original patch doesn't distinguish between softfpa and softvfp modes
|
||||||
|
# in the way Nicholas Pitre probably meant. His description is:
|
||||||
|
#
|
||||||
|
# "Default is to use APCS-32 mode with soft-vfp. The old Linux default for
|
||||||
|
# floats can be achieved with -mhard-float or with the configure
|
||||||
|
# --with-float=hard option. If -msoft-float or --with-float=soft is used then
|
||||||
|
# software float support will be used just like the default but with the legacy
|
||||||
|
# big endian word ordering for double float representation instead."
|
||||||
|
#
|
||||||
|
# Which means the following:
|
||||||
|
#
|
||||||
|
# * If you compile without -mhard-float or -msoft-float, you should get
|
||||||
|
# software floating point, using the VFP format. The produced object file
|
||||||
|
# should have these flags in its header:
|
||||||
|
#
|
||||||
|
# private flags = 600: [APCS-32] [VFP float format] [software FP]
|
||||||
|
#
|
||||||
|
# * If you compile with -mhard-float, you should get hardware floating point,
|
||||||
|
# which always uses the FPA format. Object file header flags should be:
|
||||||
|
#
|
||||||
|
# private flags = 0: [APCS-32] [FPA float format]
|
||||||
|
#
|
||||||
|
# * If you compile with -msoft-float, you should get software floating point,
|
||||||
|
# using the FPA format. This is done for compatibility reasons with many
|
||||||
|
# existing distributions. Object file header flags should be:
|
||||||
|
#
|
||||||
|
# private flags = 200: [APCS-32] [FPA float format] [software FP]
|
||||||
|
#
|
||||||
|
# The original patch from Nicholas Pitre contained the following constructs:
|
||||||
|
#
|
||||||
|
# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||||
|
# %{mhard-float:-mfpu=fpa} \
|
||||||
|
# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
|
||||||
|
#
|
||||||
|
# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This
|
||||||
|
# is probably the reason Robert Schwebel modified it to:
|
||||||
|
#
|
||||||
|
# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||||
|
# %{mhard-float:-mfpu=fpa} \
|
||||||
|
# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}"
|
||||||
|
#
|
||||||
|
# But this causes the following behaviour:
|
||||||
|
#
|
||||||
|
# * If you compile without -mhard-float or -msoft-float, the compiler generates
|
||||||
|
# software floating point instructions, but *nothing* is passed to the
|
||||||
|
# assembler, which results in an object file which has flags:
|
||||||
|
#
|
||||||
|
# private flags = 0: [APCS-32] [FPA float format]
|
||||||
|
#
|
||||||
|
# This is not correct!
|
||||||
|
#
|
||||||
|
# * If you compile with -mhard-float, the compiler generates hardware floating
|
||||||
|
# point instructions, and passes "-mfpu=fpa" to the assembler, which results
|
||||||
|
# in an object file which has the same flags as in the previous item, but now
|
||||||
|
# those *are* correct.
|
||||||
|
#
|
||||||
|
# * If you compile with -msoft-float, the compiler generates software floating
|
||||||
|
# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that
|
||||||
|
# order) to the assembler, which results in an object file with flags:
|
||||||
|
#
|
||||||
|
# private flags = 600: [APCS-32] [VFP float format] [software FP]
|
||||||
|
#
|
||||||
|
# This is not correct, because the last "-mfpu=" option on the assembler
|
||||||
|
# command line determines the actual FPU convention used (which should be FPA
|
||||||
|
# in this case).
|
||||||
|
#
|
||||||
|
# Therefore, I modified this patch to get the desired behaviour. Every
|
||||||
|
# instance of the notation:
|
||||||
|
#
|
||||||
|
# %{msoft-float:-mfpu=softfpa -mfpu=softvfp}
|
||||||
|
#
|
||||||
|
# was changed to:
|
||||||
|
#
|
||||||
|
# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}
|
||||||
|
#
|
||||||
|
# I also did the following:
|
||||||
|
#
|
||||||
|
# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to
|
||||||
|
# be consistent with Nicholas' original patch.
|
||||||
|
# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS
|
||||||
|
# macros I could find. I think that if you compile without any options, you
|
||||||
|
# would like to get the defaults. :)
|
||||||
|
# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
|
||||||
|
# anymore. (The required functions are now in libgcc.)
|
||||||
|
|
||||||
|
diff -urN gcc-3.4.1-old/gcc/config/arm/coff.h gcc-3.4.1/gcc/config/arm/coff.h
|
||||||
|
--- gcc-3.4.1-old/gcc/config/arm/coff.h 2004-02-24 08:25:22.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/arm/coff.h 2004-09-02 21:51:15.000000000 -0500
|
||||||
|
@@ -31,11 +31,16 @@
|
||||||
|
#define TARGET_VERSION fputs (" (ARM/coff)", stderr)
|
||||||
|
|
||||||
|
#undef TARGET_DEFAULT
|
||||||
|
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||||
|
+#define TARGET_DEFAULT \
|
||||||
|
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||||
|
+ | ARM_FLAG_VFP \
|
||||||
|
+ | ARM_FLAG_APCS_32 \
|
||||||
|
+ | ARM_FLAG_APCS_FRAME \
|
||||||
|
+ | ARM_FLAG_MMU_TRAPS )
|
||||||
|
|
||||||
|
#ifndef MULTILIB_DEFAULTS
|
||||||
|
#define MULTILIB_DEFAULTS \
|
||||||
|
- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
|
||||||
|
+ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* This is COFF, but prefer stabs. */
|
||||||
|
diff -urN gcc-3.4.1-old/gcc/config/arm/elf.h gcc-3.4.1/gcc/config/arm/elf.h
|
||||||
|
--- gcc-3.4.1-old/gcc/config/arm/elf.h 2004-02-24 08:25:22.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/arm/elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||||
|
@@ -46,7 +46,9 @@
|
||||||
|
|
||||||
|
#ifndef SUBTARGET_ASM_FLOAT_SPEC
|
||||||
|
#define SUBTARGET_ASM_FLOAT_SPEC "\
|
||||||
|
-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
|
||||||
|
+%{mapcs-float:-mfloat} \
|
||||||
|
+%{mhard-float:-mfpu=fpa} \
|
||||||
|
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ASM_SPEC
|
||||||
|
@@ -106,12 +108,17 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef TARGET_DEFAULT
|
||||||
|
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||||
|
+#define TARGET_DEFAULT \
|
||||||
|
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||||
|
+ | ARM_FLAG_VFP \
|
||||||
|
+ | ARM_FLAG_APCS_32 \
|
||||||
|
+ | ARM_FLAG_APCS_FRAME \
|
||||||
|
+ | ARM_FLAG_MMU_TRAPS )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef MULTILIB_DEFAULTS
|
||||||
|
#define MULTILIB_DEFAULTS \
|
||||||
|
- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
|
||||||
|
+ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define TARGET_ASM_FILE_START_APP_OFF true
|
||||||
|
diff -urN gcc-3.4.1-old/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||||
|
--- gcc-3.4.1-old/gcc/config/arm/linux-elf.h 2004-09-02 21:50:52.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-09-02 22:00:49.000000000 -0500
|
||||||
|
@@ -44,12 +44,26 @@
|
||||||
|
#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-/* Default is to use APCS-32 mode. */
|
||||||
|
+/*
|
||||||
|
+ * Default is to use APCS-32 mode with soft-vfp.
|
||||||
|
+ * The old Linux default for floats can be achieved with -mhard-float
|
||||||
|
+ * or with the configure --with-float=hard option.
|
||||||
|
+ * If -msoft-float or --with-float=soft is used then software float
|
||||||
|
+ * support will be used just like the default but with the legacy
|
||||||
|
+ * big endian word ordering for double float representation instead.
|
||||||
|
+ */
|
||||||
|
#undef TARGET_DEFAULT
|
||||||
|
-#define TARGET_DEFAULT \
|
||||||
|
- ( ARM_FLAG_APCS_32 | \
|
||||||
|
- ARM_FLAG_MMU_TRAPS | \
|
||||||
|
- TARGET_ENDIAN_DEFAULT )
|
||||||
|
+#define TARGET_DEFAULT \
|
||||||
|
+ ( ARM_FLAG_APCS_32 \
|
||||||
|
+ | ARM_FLAG_SOFT_FLOAT \
|
||||||
|
+ | TARGET_ENDIAN_DEFAULT \
|
||||||
|
+ | ARM_FLAG_VFP \
|
||||||
|
+ | ARM_FLAG_MMU_TRAPS )
|
||||||
|
+
|
||||||
|
+#undef SUBTARGET_EXTRA_ASM_SPEC
|
||||||
|
+#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||||
|
+%{mhard-float:-mfpu=fpa} \
|
||||||
|
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||||
|
|
||||||
|
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||||
|
|
||||||
|
@@ -57,7 +71,7 @@
|
||||||
|
|
||||||
|
#undef MULTILIB_DEFAULTS
|
||||||
|
#define MULTILIB_DEFAULTS \
|
||||||
|
- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||||
|
+ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
|
||||||
|
|
||||||
|
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
|
||||||
|
|
||||||
|
@@ -72,7 +86,7 @@
|
||||||
|
%{shared:-lc} \
|
||||||
|
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||||
|
|
||||||
|
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
|
||||||
|
+#define LIBGCC_SPEC "-lgcc"
|
||||||
|
|
||||||
|
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
|
||||||
|
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
|
||||||
|
diff -urN gcc-3.4.1-old/gcc/config/arm/t-linux gcc-3.4.1/gcc/config/arm/t-linux
|
||||||
|
--- gcc-3.4.1-old/gcc/config/arm/t-linux 2003-09-20 16:09:07.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/gcc/config/arm/t-linux 2004-09-02 21:51:15.000000000 -0500
|
||||||
|
@@ -4,7 +4,10 @@
|
||||||
|
LIBGCC2_DEBUG_CFLAGS = -g0
|
||||||
|
|
||||||
|
LIB1ASMSRC = arm/lib1funcs.asm
|
||||||
|
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
|
||||||
|
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
|
||||||
|
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
|
||||||
|
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
|
||||||
|
+ _fixsfsi _fixunssfsi
|
||||||
|
|
||||||
|
# MULTILIB_OPTIONS = mhard-float/msoft-float
|
||||||
|
# MULTILIB_DIRNAMES = hard-float soft-float
|
||||||
|
diff -urN gcc-3.4.1-old/gcc/config/arm/unknown-elf.h gcc-3.4.1/gcc/config/arm/unknown-elf.h
|
||||||
|
--- gcc-3.4.1-old/gcc/config/arm/unknown-elf.h 2004-02-24 08:25:22.000000000 -0600
|
||||||
|
+++ gcc-3.4.1/gcc/config/arm/unknown-elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||||
|
@@ -30,7 +30,12 @@
|
||||||
|
|
||||||
|
/* Default to using APCS-32 and software floating point. */
|
||||||
|
#ifndef TARGET_DEFAULT
|
||||||
|
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||||
|
+#define TARGET_DEFAULT \
|
||||||
|
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||||
|
+ | ARM_FLAG_VFP \
|
||||||
|
+ | ARM_FLAG_APCS_32 \
|
||||||
|
+ | ARM_FLAG_APCS_FRAME \
|
||||||
|
+ | ARM_FLAG_MMU_TRAPS )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Now we define the strings used to build the spec file. */
|
||||||
|
diff -urN gcc-3.4.1-old/gcc/config/arm/xscale-elf.h gcc-3.4.1/gcc/config/arm/xscale-elf.h
|
||||||
|
--- gcc-3.4.1-old/gcc/config/arm/xscale-elf.h 2003-07-01 18:26:43.000000000 -0500
|
||||||
|
+++ gcc-3.4.1/gcc/config/arm/xscale-elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||||
|
@@ -49,11 +49,12 @@
|
||||||
|
endian, regardless of the endian-ness of the memory
|
||||||
|
system. */
|
||||||
|
|
||||||
|
-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||||
|
- %{mhard-float:-mfpu=fpa} \
|
||||||
|
- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
|
||||||
|
+#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||||
|
+%{!mcpu=*:-mcpu=xscale} \
|
||||||
|
+%{mhard-float:-mfpu=fpa} \
|
||||||
|
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||||
|
|
||||||
|
#ifndef MULTILIB_DEFAULTS
|
||||||
|
#define MULTILIB_DEFAULTS \
|
||||||
|
- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
|
||||||
|
+ { "mlittle-endian", "mno-thumb-interwork", "marm" }
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user