mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-03-29 13:24:49 -05:00
separated patches per toolchain
This commit is contained in:
parent
134a40df20
commit
aa4d5fa610
|
|
@ -7,11 +7,11 @@
|
|||
# specify some urls to download the source packages from
|
||||
#---------------------------------------------------------------------------------
|
||||
BINUTILS_VER=2.16.1
|
||||
GCC_VER=3.4.4
|
||||
GCC_VER=4.0.1
|
||||
NEWLIB_VER=1.13.0
|
||||
LIBOGC_VER=20050521
|
||||
LIBGBA_VER=20050615
|
||||
LIBNDS_VER=20050615
|
||||
LIBNDS_VER=20050714
|
||||
PSPSDK_VER=1.0+beta
|
||||
|
||||
BINUTILS="binutils-$BINUTILS_VER.tar.bz2"
|
||||
|
|
@ -55,7 +55,7 @@ done
|
|||
|
||||
if [ $VERSION -eq 1 ]
|
||||
then
|
||||
scriptdir='./dkarm/scripts'
|
||||
basedir='dkarm'
|
||||
package=devkitARM
|
||||
builddir=arm-elf
|
||||
target=arm-elf
|
||||
|
|
@ -64,7 +64,7 @@ fi
|
|||
|
||||
if [ $VERSION -eq 2 ]
|
||||
then
|
||||
scriptdir='./dkppc/scripts'
|
||||
basedir='dkppc'
|
||||
package=devkitPPC
|
||||
builddir=powerpc-gekko
|
||||
target=powerpc-gekko
|
||||
|
|
@ -73,7 +73,7 @@ fi
|
|||
|
||||
if [ $VERSION -eq 3 ]
|
||||
then
|
||||
scriptdir='./dkpsp/scripts'
|
||||
basedir='dkpsp'
|
||||
package=devkitPSP
|
||||
builddir=psp
|
||||
target=psp
|
||||
|
|
@ -261,6 +261,9 @@ fi
|
|||
echo use $MAKE as make
|
||||
export MAKE
|
||||
|
||||
if [ 0 ]
|
||||
then
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Extract source packages
|
||||
#---------------------------------------------------------------------------------
|
||||
|
|
@ -302,13 +305,17 @@ then
|
|||
bzip2 -cd $SRCDIR/$LIBGBA | tar -xv -C $LIBGBA_SRCDIR || { echo "Error extracting "$LIBGBA; exit; }
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
patchdir=$(pwd)/$basedir/patches
|
||||
scriptdir=$(pwd)/$basedir/scripts
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# apply patches
|
||||
#---------------------------------------------------------------------------------
|
||||
patch -p1 -d $BINUTILS_SRCDIR -i $(pwd)/patches/devkit-binutils-$BINUTILS_VER.patch || { echo "Error patching binutils"; exit; }
|
||||
patch -p1 -d $GCC_SRCDIR -i $(pwd)/patches/devkit-gcc-$GCC_VER.patch || { echo "Error patching gcc"; exit; }
|
||||
patch -p1 -d $NEWLIB_SRCDIR -i $(pwd)/patches/devkit-newlib-$NEWLIB_VER.patch || { echo "Error patching newlib"; exit; }
|
||||
patch -p1 -d $BINUTILS_SRCDIR -i $patchdir/binutils-$BINUTILS_VER.patch || { echo "Error patching binutils"; exit; }
|
||||
patch -p1 -d $GCC_SRCDIR -i $patchdir/gcc-$GCC_VER.patch || { echo "Error patching gcc"; exit; }
|
||||
patch -p1 -d $NEWLIB_SRCDIR -i $patchdir/newlib-$NEWLIB_VER.patch || { echo "Error patching newlib"; exit; }
|
||||
|
||||
if [ $VERSION -eq 3 ]
|
||||
then
|
||||
|
|
|
|||
16
dkarm/patches/binutils-2.16.1.patch
Normal file
16
dkarm/patches/binutils-2.16.1.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
diff -Nbaur --exclude=*.info* binutils-2.16.1/bfd/doc/chew.c binutils-2.16.1-new/bfd/doc/chew.c
|
||||
--- binutils-2.16.1/bfd/doc/chew.c Thu Mar 3 11:41:02 2005
|
||||
+++ binutils-2.16.1-new/bfd/doc/chew.c Mon Jun 20 00:14:07 2005
|
||||
@@ -91,6 +91,12 @@
|
||||
#define DEF_SIZE 5000
|
||||
#define STACK 50
|
||||
|
||||
+#ifdef __MINGW32__
|
||||
+/* Prevent \r\n\ line endings */
|
||||
+#include <fcntl.h>
|
||||
+unsigned int _CRT_fmode = _O_BINARY;
|
||||
+#endif
|
||||
+
|
||||
int internal_wanted;
|
||||
int internal_mode;
|
||||
|
||||
64
dkarm/patches/gcc-4.0.1.patch
Normal file
64
dkarm/patches/gcc-4.0.1.patch
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
diff -Naurb gcc-4.0.1/gcc/c-incpath.c gcc-4.0.1-new/gcc/c-incpath.c
|
||||
--- gcc-4.0.1/gcc/c-incpath.c Sun Jan 23 15:05:27 2005
|
||||
+++ gcc-4.0.1-new/gcc/c-incpath.c Fri Jul 8 11:32:20 2005
|
||||
@@ -331,13 +331,18 @@
|
||||
cpp_dir *p;
|
||||
|
||||
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
|
||||
- /* Convert all backslashes to slashes. The native CRT stat()
|
||||
- function does not recognize a directory that ends in a backslash
|
||||
- (unless it is a drive root dir, such "c:\"). Forward slashes,
|
||||
- trailing or otherwise, cause no problems for stat(). */
|
||||
- char* c;
|
||||
- for (c = path; *c; c++)
|
||||
- if (*c == '\\') *c = '/';
|
||||
+ /* Remove unnecessary trailing slashes. On some versions of MS
|
||||
+ Windows, trailing _forward_ slashes cause no problems for stat().
|
||||
+ On newer versions, stat() does not recognise a directory that ends
|
||||
+ in a '\\' or '/', unless it is a drive root dir, such as "c:/",
|
||||
+ where it is obligatory. */
|
||||
+ int pathlen = strlen (path);
|
||||
+ char* end = path + pathlen - 1;
|
||||
+ /* Preserve the lead '/' or lead "c:/". */
|
||||
+ char* start = path + (pathlen > 2 && path[1] == ':' ? 3 : 1);
|
||||
+
|
||||
+ for (; end > start && IS_DIR_SEPARATOR (*end); end--)
|
||||
+ *end = 0;
|
||||
#endif
|
||||
|
||||
p = xmalloc (sizeof (cpp_dir));
|
||||
diff -Naurb gcc-4.0.1/gcc/version.c gcc-4.0.1-arm/gcc/version.c
|
||||
--- gcc-4.0.1/gcc/version.c Thu Jul 7 19:41:54 2005
|
||||
+++ gcc-4.0.1-arm/gcc/version.c Tue Jul 26 22:31:02 2005
|
||||
@@ -14,4 +14,4 @@
|
||||
forward us bugs reported to you, if you determine that they are
|
||||
not bugs in your modifications.) */
|
||||
|
||||
-const char bug_report_url[] = "<URL:http://gcc.gnu.org/bugs.html>";
|
||||
+const char bug_report_url[] = "<URL:http://devkitpro.sourceforge.net/bugs.shtml>";
|
||||
diff -Naurb gcc-4.0.1/gcc/config/arm/t-arm-elf gcc-4.0.1-new/gcc/config/arm/t-arm-elf
|
||||
--- gcc-4.0.1/gcc/config/arm/t-arm-elf Wed Sep 1 12:14:21 2004
|
||||
+++ gcc-4.0.1-new/gcc/config/arm/t-arm-elf Wed Jul 20 23:25:14 2005
|
||||
@@ -23,8 +23,8 @@
|
||||
# MULTILIB_DIRNAMES += fpu soft
|
||||
# MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
|
||||
#
|
||||
-# MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
|
||||
-# MULTILIB_DIRNAMES += normal interwork
|
||||
+MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
|
||||
+MULTILIB_DIRNAMES += normal interwork
|
||||
#
|
||||
# MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore
|
||||
# MULTILIB_DIRNAMES += elf under
|
||||
diff -Naurb gcc-4.0.1/gcc/hwint.h gcc-4.0.1-new/gcc/hwint.h
|
||||
--- gcc-4.0.1/gcc/hwint.h Wed Nov 24 04:31:57 2004
|
||||
+++ gcc-4.0.1-new/gcc/hwint.h Thu Jul 21 14:37:06 2005
|
||||
@@ -80,7 +80,7 @@
|
||||
# define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%lx%08lx"
|
||||
# endif
|
||||
#else
|
||||
-# define HOST_WIDE_INT_PRINT "ll"
|
||||
+# define HOST_WIDE_INT_PRINT HOST_LONG_LONG_FORMAT
|
||||
# define HOST_WIDE_INT_PRINT_C "LL"
|
||||
/* We can assume that 'long long' is at least 64 bits. */
|
||||
# define HOST_WIDE_INT_PRINT_DOUBLE_HEX \
|
||||
64
dkarm/patches/newlib-1.13.0.patch
Normal file
64
dkarm/patches/newlib-1.13.0.patch
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
diff -NBaur newlib-1.13.0/newlib/libc/sys/arm/Makefile.in newlib-1.13.0-new/newlib/libc/sys/arm/Makefile.in
|
||||
--- newlib-1.13.0/newlib/libc/sys/arm/Makefile.in Wed Jun 9 20:05:09 2004
|
||||
+++ newlib-1.13.0-new/newlib/libc/sys/arm/Makefile.in Wed Jul 6 09:09:25 2005
|
||||
@@ -88,7 +88,7 @@
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
-@MAY_SUPPLY_SYSCALLS_TRUE@extra_objs = syscalls.o
|
||||
+@MAY_SUPPLY_SYSCALLS_TRUE@extra_objs = syscalls.o malloc_vars.o
|
||||
@MAY_SUPPLY_SYSCALLS_FALSE@extra_objs =
|
||||
|
||||
lib_a_SOURCES = libcfunc.c trap.S
|
||||
diff -NBaur newlib-1.13.0/newlib/libc/sys/arm/malloc_vars.c newlib-1.13.0-new/newlib/libc/sys/arm/malloc_vars.c
|
||||
--- newlib-1.13.0/newlib/libc/sys/arm/malloc_vars.c Thu Jan 1 00:00:00 1970
|
||||
+++ newlib-1.13.0-new/newlib/libc/sys/arm/malloc_vars.c Wed Jul 6 09:09:25 2005
|
||||
@@ -0,0 +1,2 @@
|
||||
+char *fake_heap_end = (char*)0;
|
||||
+char *fake_heap_start = (char*)0;
|
||||
diff -NBaur newlib-1.13.0/newlib/libc/sys/arm/syscalls.c newlib-1.13.0-new/newlib/libc/sys/arm/syscalls.c
|
||||
--- newlib-1.13.0/newlib/libc/sys/arm/syscalls.c Tue Jan 6 19:27:21 2004
|
||||
+++ newlib-1.13.0-new/newlib/libc/sys/arm/syscalls.c Wed Jul 6 09:09:25 2005
|
||||
@@ -474,19 +474,41 @@
|
||||
n = n;
|
||||
}
|
||||
|
||||
+extern char *fake_heap_end;
|
||||
+extern char *fake_heap_start;
|
||||
+
|
||||
caddr_t
|
||||
_sbrk (int incr)
|
||||
{
|
||||
extern char end asm ("end"); /* Defined by the linker. */
|
||||
static char * heap_end;
|
||||
char * prev_heap_end;
|
||||
+ char * our_heap_end;
|
||||
|
||||
if (heap_end == NULL)
|
||||
+ {
|
||||
+ if (fake_heap_start == NULL)
|
||||
+ {
|
||||
heap_end = & end;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ heap_end = fake_heap_start;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
prev_heap_end = heap_end;
|
||||
|
||||
- if (heap_end + incr > stack_ptr)
|
||||
+ if (fake_heap_end == NULL)
|
||||
+ {
|
||||
+ our_heap_end = stack_ptr;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ our_heap_end = fake_heap_end;
|
||||
+ }
|
||||
+
|
||||
+ if (heap_end + incr > our_heap_end)
|
||||
{
|
||||
/* Some of the libstdc++-v3 tests rely upon detecting
|
||||
out of memory errors, so do not abort here. */
|
||||
|
|
@ -1,20 +1,6 @@
|
|||
diff -Nbaur binutils-2.15/config.sub binutils-2.15-gekko/config.sub
|
||||
--- binutils-2.15/config.sub Mon Jun 2 21:35:44 2003
|
||||
+++ binutils-2.15-gekko/config.sub Thu Jan 20 09:03:26 2005
|
||||
@@ -218,6 +218,10 @@
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
+ -gekko)
|
||||
+ basic_machine=powerpc-eabi
|
||||
+ os=-elf
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
# Decode aliases for certain CPU-COMPANY combinations.
|
||||
diff -Nbaur binutils-2.15/bfd/doc/chew.c binutils-2.15-new/bfd/doc/chew.c
|
||||
--- binutils-2.15/bfd/doc/chew.c Sun Jun 29 11:06:40 2003
|
||||
+++ binutils-2.15-new/bfd/doc/chew.c Thu Jan 20 20:16:18 2005
|
||||
diff -Nbaur --exclude=*.info* binutils-2.16.1/bfd/doc/chew.c binutils-2.16.1-new/bfd/doc/chew.c
|
||||
--- binutils-2.16.1/bfd/doc/chew.c Thu Mar 3 11:41:02 2005
|
||||
+++ binutils-2.16.1-new/bfd/doc/chew.c Mon Jun 20 00:14:07 2005
|
||||
@@ -91,6 +91,12 @@
|
||||
#define DEF_SIZE 5000
|
||||
#define STACK 50
|
||||
|
|
@ -28,9 +14,35 @@ diff -Nbaur binutils-2.15/bfd/doc/chew.c binutils-2.15-new/bfd/doc/chew.c
|
|||
int internal_wanted;
|
||||
int internal_mode;
|
||||
|
||||
diff -Nbaur binutils-2.15/gas/config/tc-ppc.c binutils-2.15-new/gas/config/tc-ppc.c
|
||||
--- binutils-2.15/gas/config/tc-ppc.c Mon May 17 20:36:12 2004
|
||||
+++ binutils-2.15-new/gas/config/tc-ppc.c Fri Jan 21 00:28:36 2005
|
||||
diff -Nbaur --exclude=*.info* binutils-2.16.1/config.sub binutils-2.16.1-new/config.sub
|
||||
--- binutils-2.16.1/config.sub Wed Jan 19 00:34:56 2005
|
||||
+++ binutils-2.16.1-new/config.sub Mon Jun 20 00:14:07 2005
|
||||
@@ -219,6 +219,10 @@
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
+ -gekko)
|
||||
+ basic_machine=powerpc-eabi
|
||||
+ os=-elf
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
# Decode aliases for certain CPU-COMPANY combinations.
|
||||
diff -Nbaur --exclude=*.info* binutils-2.16.1/configure.in binutils-2.16.1-new/configure.in
|
||||
--- binutils-2.16.1/configure.in Sun Jun 12 20:33:06 2005
|
||||
+++ binutils-2.16.1-new/configure.in Mon Jun 20 00:53:42 2005
|
||||
@@ -242,7 +242,7 @@
|
||||
|
||||
# Some tools are only suitable for building in a "native" situation.
|
||||
# Remove these if host!=target.
|
||||
-native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
|
||||
+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
|
||||
|
||||
# Similarly, some are only suitable for cross toolchains.
|
||||
# Remove these if host=target.
|
||||
diff -Nbaur --exclude=*.info* binutils-2.16.1/gas/config/tc-ppc.c binutils-2.16.1-new/gas/config/tc-ppc.c
|
||||
--- binutils-2.16.1/gas/config/tc-ppc.c Wed Mar 2 13:24:01 2005
|
||||
+++ binutils-2.16.1-new/gas/config/tc-ppc.c Mon Jun 20 00:14:07 2005
|
||||
@@ -310,6 +310,7 @@
|
||||
sdr1 has the value 25
|
||||
srr0 has the value 26
|
||||
|
|
@ -121,9 +133,9 @@ diff -Nbaur binutils-2.15/gas/config/tc-ppc.c binutils-2.15-new/gas/config/tc-pp
|
|||
if (*str != '\0')
|
||||
++str;
|
||||
}
|
||||
diff -Nbaur binutils-2.15/include/opcode/ppc.h binutils-2.15-new/include/opcode/ppc.h
|
||||
--- binutils-2.15/include/opcode/ppc.h Mon May 17 20:36:06 2004
|
||||
+++ binutils-2.15-new/include/opcode/ppc.h Thu Jan 20 19:54:34 2005
|
||||
diff -Nbaur --exclude=*.info* binutils-2.16.1/include/opcode/ppc.h binutils-2.16.1-new/include/opcode/ppc.h
|
||||
--- binutils-2.16.1/include/opcode/ppc.h Thu Sep 9 13:42:37 2004
|
||||
+++ binutils-2.16.1-new/include/opcode/ppc.h Mon Jun 20 00:14:07 2005
|
||||
@@ -134,6 +134,9 @@
|
||||
/* Opcode is supported by machine check APU. */
|
||||
#define PPC_OPCODE_RFMCI 0x800000
|
||||
|
|
@ -145,12 +157,12 @@ diff -Nbaur binutils-2.15/include/opcode/ppc.h binutils-2.15-new/include/opcode/
|
|||
/* The POWER and PowerPC assemblers use a few macros. We keep them
|
||||
with the operands table for simplicity. The macro table is an
|
||||
array of struct powerpc_macro. */
|
||||
diff -Nbaur binutils-2.15/opcodes/ppc-dis.c binutils-2.15-new/opcodes/ppc-dis.c
|
||||
--- binutils-2.15/opcodes/ppc-dis.c Mon May 17 20:35:56 2004
|
||||
+++ binutils-2.15-new/opcodes/ppc-dis.c Thu Jan 20 19:54:34 2005
|
||||
@@ -72,6 +72,13 @@
|
||||
dialect &= ~PPC_OPCODE_ALTIVEC;
|
||||
}
|
||||
diff -Nbaur --exclude=*.info* binutils-2.16.1/opcodes/ppc-dis.c binutils-2.16.1-new/opcodes/ppc-dis.c
|
||||
--- binutils-2.16.1/opcodes/ppc-dis.c Tue Mar 22 15:31:19 2005
|
||||
+++ binutils-2.16.1-new/opcodes/ppc-dis.c Mon Jun 20 00:14:07 2005
|
||||
@@ -64,6 +64,13 @@
|
||||
&& strstr (info->disassembler_options, "efs") != NULL)
|
||||
dialect |= PPC_OPCODE_EFS;
|
||||
else
|
||||
+ if (info->disassembler_options
|
||||
+ && (strstr (info->disassembler_options, "gekko") == 0))
|
||||
|
|
@ -160,9 +172,9 @@ diff -Nbaur binutils-2.15/opcodes/ppc-dis.c binutils-2.15-new/opcodes/ppc-dis.c
|
|||
+ }
|
||||
+ else
|
||||
dialect |= (PPC_OPCODE_403 | PPC_OPCODE_601 | PPC_OPCODE_CLASSIC
|
||||
| PPC_OPCODE_COMMON);
|
||||
| PPC_OPCODE_COMMON | PPC_OPCODE_ALTIVEC);
|
||||
|
||||
@@ -247,6 +254,8 @@
|
||||
@@ -239,6 +246,8 @@
|
||||
(*info->print_address_func) (memaddr + value, info);
|
||||
else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0)
|
||||
(*info->print_address_func) ((bfd_vma) value & 0xffffffff, info);
|
||||
|
|
@ -171,15 +183,15 @@ diff -Nbaur binutils-2.15/opcodes/ppc-dis.c binutils-2.15-new/opcodes/ppc-dis.c
|
|||
else if ((operand->flags & PPC_OPERAND_CR) == 0
|
||||
|| (dialect & PPC_OPCODE_PPC) == 0)
|
||||
(*info->fprintf_func) (info->stream, "%ld", value);
|
||||
@@ -312,4 +321,5 @@
|
||||
@@ -304,4 +313,5 @@
|
||||
fprintf (stream, " power4 Disassemble the Power4 instructions\n");
|
||||
fprintf (stream, " 32 Do not disassemble 64-bit instructions\n");
|
||||
fprintf (stream, " 64 Allow disassembly of 64-bit instructions\n");
|
||||
+ fprintf (stream, " gekko Disassemble the Gamecube Gekko instructions\n");
|
||||
}
|
||||
diff -Nbaur binutils-2.15/opcodes/ppc-opc.c binutils-2.15-new/opcodes/ppc-opc.c
|
||||
--- binutils-2.15/opcodes/ppc-opc.c Mon May 17 20:35:56 2004
|
||||
+++ binutils-2.15-new/opcodes/ppc-opc.c Fri Jan 21 00:29:46 2005
|
||||
diff -Nbaur --exclude=*.info* binutils-2.16.1/opcodes/ppc-opc.c binutils-2.16.1-new/opcodes/ppc-opc.c
|
||||
--- binutils-2.16.1/opcodes/ppc-opc.c Tue Apr 19 18:09:56 2005
|
||||
+++ binutils-2.16.1-new/opcodes/ppc-opc.c Mon Jun 20 00:14:07 2005
|
||||
@@ -93,6 +93,13 @@
|
||||
static unsigned long insert_ev8 (unsigned long, long, int, const char **);
|
||||
static long extract_ev8 (unsigned long, int, int *);
|
||||
|
|
@ -194,9 +206,9 @@ diff -Nbaur binutils-2.15/opcodes/ppc-opc.c binutils-2.15-new/opcodes/ppc-opc.c
|
|||
/* The operands table.
|
||||
|
||||
The fields are bits, shift, insert, extract, flags.
|
||||
@@ -554,6 +561,25 @@
|
||||
@@ -558,6 +565,25 @@
|
||||
#define MTMSRD_L WS + 1
|
||||
{ 1, 16, 0, 0, PPC_OPERAND_OPTIONAL },
|
||||
{ 1, 16, NULL, NULL, PPC_OPERAND_OPTIONAL },
|
||||
|
||||
+ /* I Field in psq_ instructions */
|
||||
+#define PSQ_DD MTMSRD_L + 1
|
||||
|
|
@ -220,7 +232,7 @@ diff -Nbaur binutils-2.15/opcodes/ppc-opc.c binutils-2.15-new/opcodes/ppc-opc.c
|
|||
};
|
||||
|
||||
/* The functions used to insert and extract complicated operands. */
|
||||
@@ -1417,6 +1443,48 @@
|
||||
@@ -1432,6 +1458,48 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -269,7 +281,7 @@ diff -Nbaur binutils-2.15/opcodes/ppc-opc.c binutils-2.15-new/opcodes/ppc-opc.c
|
|||
/* Macros used to form opcodes. */
|
||||
|
||||
/* The main opcode. */
|
||||
@@ -1696,6 +1764,10 @@
|
||||
@@ -1715,6 +1783,10 @@
|
||||
#define XUC(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x1f))
|
||||
#define XUC_MASK XUC(0x3f, 0x1f)
|
||||
|
||||
|
|
@ -280,7 +292,7 @@ diff -Nbaur binutils-2.15/opcodes/ppc-opc.c binutils-2.15-new/opcodes/ppc-opc.c
|
|||
/* The BO encodings used in extended conditional branch mnemonics. */
|
||||
#define BODNZF (0x0)
|
||||
#define BODNZFP (0x1)
|
||||
@@ -1786,6 +1858,7 @@
|
||||
@@ -1805,6 +1877,7 @@
|
||||
#define PPCCHLK PPC_OPCODE_CACHELCK
|
||||
#define PPCCHLK64 PPC_OPCODE_CACHELCK | PPC_OPCODE_BOOKE64
|
||||
#define PPCRFMCI PPC_OPCODE_RFMCI
|
||||
|
|
@ -288,7 +300,7 @@ diff -Nbaur binutils-2.15/opcodes/ppc-opc.c binutils-2.15-new/opcodes/ppc-opc.c
|
|||
|
||||
/* The opcode table.
|
||||
|
||||
@@ -4558,6 +4631,99 @@
|
||||
@@ -4612,6 +4685,99 @@
|
||||
|
||||
{ "fcfid", XRC(63,846,0), XRA_MASK, PPC64, { FRT, FRB } },
|
||||
{ "fcfid.", XRC(63,846,1), XRA_MASK, PPC64, { FRT, FRB } },
|
||||
64
dkppc/patches/gcc-4.0.1.patch
Normal file
64
dkppc/patches/gcc-4.0.1.patch
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
diff -Naurb gcc-4.0.1/config.sub gcc-4.0.1-ppc/config.sub
|
||||
--- gcc-4.0.1/config.sub Mon Apr 25 11:36:56 2005
|
||||
+++ gcc-4.0.1-ppc/config.sub Tue Jul 26 22:32:27 2005
|
||||
@@ -219,6 +219,10 @@
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
+ -gekko)
|
||||
+ basic_machine=powerpc-eabi
|
||||
+ os=-elf
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
# Decode aliases for certain CPU-COMPANY combinations.
|
||||
diff -Naurb gcc-4.0.1/gcc/c-incpath.c gcc-4.0.1-new/gcc/c-incpath.c
|
||||
--- gcc-4.0.1/gcc/c-incpath.c Sun Jan 23 15:05:27 2005
|
||||
+++ gcc-4.0.1-new/gcc/c-incpath.c Fri Jul 8 11:32:20 2005
|
||||
@@ -331,13 +331,18 @@
|
||||
cpp_dir *p;
|
||||
|
||||
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
|
||||
- /* Convert all backslashes to slashes. The native CRT stat()
|
||||
- function does not recognize a directory that ends in a backslash
|
||||
- (unless it is a drive root dir, such "c:\"). Forward slashes,
|
||||
- trailing or otherwise, cause no problems for stat(). */
|
||||
- char* c;
|
||||
- for (c = path; *c; c++)
|
||||
- if (*c == '\\') *c = '/';
|
||||
+ /* Remove unnecessary trailing slashes. On some versions of MS
|
||||
+ Windows, trailing _forward_ slashes cause no problems for stat().
|
||||
+ On newer versions, stat() does not recognise a directory that ends
|
||||
+ in a '\\' or '/', unless it is a drive root dir, such as "c:/",
|
||||
+ where it is obligatory. */
|
||||
+ int pathlen = strlen (path);
|
||||
+ char* end = path + pathlen - 1;
|
||||
+ /* Preserve the lead '/' or lead "c:/". */
|
||||
+ char* start = path + (pathlen > 2 && path[1] == ':' ? 3 : 1);
|
||||
+
|
||||
+ for (; end > start && IS_DIR_SEPARATOR (*end); end--)
|
||||
+ *end = 0;
|
||||
#endif
|
||||
|
||||
p = xmalloc (sizeof (cpp_dir));
|
||||
diff -Naurb gcc-4.0.1/gcc/version.c gcc-4.0.1-ppc/gcc/version.c
|
||||
--- gcc-4.0.1/gcc/version.c Thu Jul 7 19:41:54 2005
|
||||
+++ gcc-4.0.1-ppc/gcc/version.c Tue Jul 26 22:31:02 2005
|
||||
@@ -14,4 +14,4 @@
|
||||
forward us bugs reported to you, if you determine that they are
|
||||
not bugs in your modifications.) */
|
||||
|
||||
-const char bug_report_url[] = "<URL:http://gcc.gnu.org/bugs.html>";
|
||||
+const char bug_report_url[] = "<URL:http://devkitpro.sourceforge.net/bugs.shtml>";
|
||||
diff -Naurb gcc-4.0.1/gcc/hwint.h gcc-4.0.1-new/gcc/hwint.h
|
||||
--- gcc-4.0.1/gcc/hwint.h Wed Nov 24 04:31:57 2004
|
||||
+++ gcc-4.0.1-new/gcc/hwint.h Thu Jul 21 14:37:06 2005
|
||||
@@ -80,7 +80,7 @@
|
||||
# define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%lx%08lx"
|
||||
# endif
|
||||
#else
|
||||
-# define HOST_WIDE_INT_PRINT "ll"
|
||||
+# define HOST_WIDE_INT_PRINT HOST_LONG_LONG_FORMAT
|
||||
# define HOST_WIDE_INT_PRINT_C "LL"
|
||||
/* We can assume that 'long long' is at least 64 bits. */
|
||||
# define HOST_WIDE_INT_PRINT_DOUBLE_HEX \
|
||||
2830
dkppc/patches/newlib-1.13.0.patch
Normal file
2830
dkppc/patches/newlib-1.13.0.patch
Normal file
File diff suppressed because it is too large
Load Diff
1800
dkpsp/patches/binutils-2.16.1.patch
Normal file
1800
dkpsp/patches/binutils-2.16.1.patch
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -1,18 +1,7 @@
|
|||
diff -Naurb gcc-4.0.1/config.sub gcc-4.0.1-new/config.sub
|
||||
diff -NBaur gcc-4.0.1/config.sub gcc-4.0.1-psp/config.sub
|
||||
--- gcc-4.0.1/config.sub Mon Apr 25 11:36:56 2005
|
||||
+++ gcc-4.0.1-new/config.sub Thu Jul 21 17:11:26 2005
|
||||
@@ -219,6 +219,10 @@
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
+ -gekko)
|
||||
+ basic_machine=powerpc-eabi
|
||||
+ os=-elf
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
# Decode aliases for certain CPU-COMPANY combinations.
|
||||
@@ -254,6 +258,7 @@
|
||||
+++ gcc-4.0.1-psp/config.sub Mon Jul 25 23:52:30 2005
|
||||
@@ -254,6 +254,7 @@
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
|
|
@ -20,7 +9,7 @@ diff -Naurb gcc-4.0.1/config.sub gcc-4.0.1-new/config.sub
|
|||
| mn10200 | mn10300 \
|
||||
| msp430 \
|
||||
| ns16k | ns32k \
|
||||
@@ -328,6 +333,7 @@
|
||||
@@ -328,6 +329,7 @@
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
|
|
@ -28,7 +17,7 @@ diff -Naurb gcc-4.0.1/config.sub gcc-4.0.1-new/config.sub
|
|||
| mmix-* \
|
||||
| msp430-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
@@ -667,6 +673,10 @@
|
||||
@@ -667,6 +669,10 @@
|
||||
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
|
|
@ -39,9 +28,9 @@ diff -Naurb gcc-4.0.1/config.sub gcc-4.0.1-new/config.sub
|
|||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
diff -Naurb gcc-4.0.1/gcc/c-incpath.c gcc-4.0.1-new/gcc/c-incpath.c
|
||||
diff -NBaur gcc-4.0.1/gcc/c-incpath.c gcc-4.0.1-psp/gcc/c-incpath.c
|
||||
--- gcc-4.0.1/gcc/c-incpath.c Sun Jan 23 15:05:27 2005
|
||||
+++ gcc-4.0.1-new/gcc/c-incpath.c Fri Jul 8 11:32:20 2005
|
||||
+++ gcc-4.0.1-psp/gcc/c-incpath.c Mon Jul 25 23:52:30 2005
|
||||
@@ -331,13 +331,18 @@
|
||||
cpp_dir *p;
|
||||
|
||||
|
|
@ -62,29 +51,15 @@ diff -Naurb gcc-4.0.1/gcc/c-incpath.c gcc-4.0.1-new/gcc/c-incpath.c
|
|||
+ char* end = path + pathlen - 1;
|
||||
+ /* Preserve the lead '/' or lead "c:/". */
|
||||
+ char* start = path + (pathlen > 2 && path[1] == ':' ? 3 : 1);
|
||||
+
|
||||
+
|
||||
+ for (; end > start && IS_DIR_SEPARATOR (*end); end--)
|
||||
+ *end = 0;
|
||||
#endif
|
||||
|
||||
p = xmalloc (sizeof (cpp_dir));
|
||||
diff -Naurb gcc-4.0.1/gcc/config/arm/t-arm-elf gcc-4.0.1-new/gcc/config/arm/t-arm-elf
|
||||
--- gcc-4.0.1/gcc/config/arm/t-arm-elf Wed Sep 1 12:14:21 2004
|
||||
+++ gcc-4.0.1-new/gcc/config/arm/t-arm-elf Wed Jul 20 23:25:14 2005
|
||||
@@ -23,8 +23,8 @@
|
||||
# MULTILIB_DIRNAMES += fpu soft
|
||||
# MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
|
||||
#
|
||||
-# MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
|
||||
-# MULTILIB_DIRNAMES += normal interwork
|
||||
+MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
|
||||
+MULTILIB_DIRNAMES += normal interwork
|
||||
#
|
||||
# MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore
|
||||
# MULTILIB_DIRNAMES += elf under
|
||||
diff -Naurb gcc-4.0.1/gcc/config/mips/mips.c gcc-4.0.1-new/gcc/config/mips/mips.c
|
||||
diff -NBaur gcc-4.0.1/gcc/config/mips/mips.c gcc-4.0.1-psp/gcc/config/mips/mips.c
|
||||
--- gcc-4.0.1/gcc/config/mips/mips.c Sun May 8 12:56:53 2005
|
||||
+++ gcc-4.0.1-new/gcc/config/mips/mips.c Fri Jul 8 10:05:36 2005
|
||||
+++ gcc-4.0.1-psp/gcc/config/mips/mips.c Mon Jul 25 23:52:30 2005
|
||||
@@ -673,6 +673,7 @@
|
||||
|
||||
/* MIPS II */
|
||||
|
|
@ -93,9 +68,9 @@ diff -Naurb gcc-4.0.1/gcc/config/mips/mips.c gcc-4.0.1-new/gcc/config/mips/mips.
|
|||
|
||||
/* MIPS III */
|
||||
{ "r4000", PROCESSOR_R4000, 3 },
|
||||
diff -Naurb gcc-4.0.1/gcc/config/mips/mips.h gcc-4.0.1-new/gcc/config/mips/mips.h
|
||||
diff -NBaur gcc-4.0.1/gcc/config/mips/mips.h gcc-4.0.1-psp/gcc/config/mips/mips.h
|
||||
--- gcc-4.0.1/gcc/config/mips/mips.h Fri Apr 15 08:00:18 2005
|
||||
+++ gcc-4.0.1-new/gcc/config/mips/mips.h Fri Jul 8 10:05:36 2005
|
||||
+++ gcc-4.0.1-psp/gcc/config/mips/mips.h Mon Jul 25 23:52:30 2005
|
||||
@@ -59,7 +59,8 @@
|
||||
PROCESSOR_R8000,
|
||||
PROCESSOR_R9000,
|
||||
|
|
@ -156,10 +131,10 @@ diff -Naurb gcc-4.0.1/gcc/config/mips/mips.h gcc-4.0.1-new/gcc/config/mips/mips.
|
|||
))
|
||||
|
||||
/* True if the result of a load is not available to the next instruction.
|
||||
diff -Naurb gcc-4.0.1/gcc/config/mips/psp.h gcc-4.0.1-new/gcc/config/mips/psp.h
|
||||
diff -NBaur gcc-4.0.1/gcc/config/mips/psp.h gcc-4.0.1-psp/gcc/config/mips/psp.h
|
||||
--- gcc-4.0.1/gcc/config/mips/psp.h Thu Jan 1 00:00:00 1970
|
||||
+++ gcc-4.0.1-new/gcc/config/mips/psp.h Fri Jul 8 10:05:36 2005
|
||||
@@ -0,0 +1,24 @@
|
||||
+++ gcc-4.0.1-psp/gcc/config/mips/psp.h Mon Jul 25 23:52:30 2005
|
||||
@@ -0,0 +1,31 @@
|
||||
+/* Support for Sony's Playstation Portable (PSP).
|
||||
+ Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
+ Contributed by Marcus R. Brown <mrbrown@ocgnet.org>
|
||||
|
|
@ -184,9 +159,16 @@ diff -Naurb gcc-4.0.1/gcc/config/mips/psp.h gcc-4.0.1-new/gcc/config/mips/psp.h
|
|||
+/* Override the startfile spec to include crt0.o. */
|
||||
+#undef STARTFILE_SPEC
|
||||
+#define STARTFILE_SPEC "crt0%O%s crti%O%s crtbegin%O%s"
|
||||
diff -Naurb gcc-4.0.1/gcc/config/mips/t-allegrex gcc-4.0.1-new/gcc/config/mips/t-allegrex
|
||||
+
|
||||
+#undef SUBTARGET_CPP_SPEC
|
||||
+#define SUBTARGET_CPP_SPEC "-DPSP=1 -D__psp__=1 -D_PSP=1"
|
||||
+
|
||||
+/* Get rid of the .pdr section. */
|
||||
+#undef SUBTARGET_ASM_SPEC
|
||||
+#define SUBTARGET_ASM_SPEC "-mno-pdr"
|
||||
diff -NBaur gcc-4.0.1/gcc/config/mips/t-allegrex gcc-4.0.1-psp/gcc/config/mips/t-allegrex
|
||||
--- gcc-4.0.1/gcc/config/mips/t-allegrex Thu Jan 1 00:00:00 1970
|
||||
+++ gcc-4.0.1-new/gcc/config/mips/t-allegrex Fri Jul 8 10:05:36 2005
|
||||
+++ gcc-4.0.1-psp/gcc/config/mips/t-allegrex Mon Jul 25 23:52:30 2005
|
||||
@@ -0,0 +1,29 @@
|
||||
+# Suppress building libgcc1.a, since the MIPS compiler port is complete
|
||||
+# and does not need anything from libgcc1.a.
|
||||
|
|
@ -217,9 +199,9 @@ diff -Naurb gcc-4.0.1/gcc/config/mips/t-allegrex gcc-4.0.1-new/gcc/config/mips/t
|
|||
+
|
||||
+LIBGCC = stmp-multilib
|
||||
+INSTALL_LIBGCC = install-multilib
|
||||
diff -Naurb gcc-4.0.1/gcc/config.gcc gcc-4.0.1-new/gcc/config.gcc
|
||||
diff -NBaur gcc-4.0.1/gcc/config.gcc gcc-4.0.1-psp/gcc/config.gcc
|
||||
--- gcc-4.0.1/gcc/config.gcc Thu May 5 21:11:50 2005
|
||||
+++ gcc-4.0.1-new/gcc/config.gcc Fri Jul 8 10:05:36 2005
|
||||
+++ gcc-4.0.1-psp/gcc/config.gcc Mon Jul 25 23:52:30 2005
|
||||
@@ -1520,6 +1520,18 @@
|
||||
tmake_file=mips/t-r3900
|
||||
use_fixproto=yes
|
||||
|
|
@ -239,9 +221,9 @@ diff -Naurb gcc-4.0.1/gcc/config.gcc gcc-4.0.1-new/gcc/config.gcc
|
|||
mmix-knuth-mmixware)
|
||||
need_64bit_hwint=yes
|
||||
;;
|
||||
diff -Naurb gcc-4.0.1/gcc/hwint.h gcc-4.0.1-new/gcc/hwint.h
|
||||
diff -NBaur gcc-4.0.1/gcc/hwint.h gcc-4.0.1-psp/gcc/hwint.h
|
||||
--- gcc-4.0.1/gcc/hwint.h Wed Nov 24 04:31:57 2004
|
||||
+++ gcc-4.0.1-new/gcc/hwint.h Thu Jul 21 14:37:06 2005
|
||||
+++ gcc-4.0.1-psp/gcc/hwint.h Mon Jul 25 23:52:30 2005
|
||||
@@ -80,7 +80,7 @@
|
||||
# define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%lx%08lx"
|
||||
# endif
|
||||
|
|
@ -251,3 +233,21 @@ diff -Naurb gcc-4.0.1/gcc/hwint.h gcc-4.0.1-new/gcc/hwint.h
|
|||
# define HOST_WIDE_INT_PRINT_C "LL"
|
||||
/* We can assume that 'long long' is at least 64 bits. */
|
||||
# define HOST_WIDE_INT_PRINT_DOUBLE_HEX \
|
||||
diff -NBaur gcc-4.0.1/gcc/version.c gcc-4.0.1-psp/gcc/version.c
|
||||
--- gcc-4.0.1/gcc/version.c Thu Jul 7 19:41:54 2005
|
||||
+++ gcc-4.0.1-psp/gcc/version.c Mon Jul 25 23:52:30 2005
|
||||
@@ -5,7 +5,7 @@
|
||||
please modify this string to indicate that, e.g. by putting your
|
||||
organization's name in parentheses at the end of the string. */
|
||||
|
||||
-const char version_string[] = "4.0.1";
|
||||
+const char version_string[] = "4.0.1 (PSPDEV 20050722)";
|
||||
|
||||
/* This is the location of the online document giving instructions for
|
||||
reporting bugs. If you distribute a modified version of GCC,
|
||||
@@ -14,4 +14,4 @@
|
||||
forward us bugs reported to you, if you determine that they are
|
||||
not bugs in your modifications.) */
|
||||
|
||||
-const char bug_report_url[] = "<URL:http://gcc.gnu.org/bugs.html>";
|
||||
+const char bug_report_url[] = "<URL:http://wiki.pspdev.org/psp:toolchain#bugs>";
|
||||
4236
dkpsp/patches/newlib-1.13.0.patch
Normal file
4236
dkpsp/patches/newlib-1.13.0.patch
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -1,325 +0,0 @@
|
|||
diff -Naurb gcc-3.3.3.orig/gcc/c-aux-info.c gcc-3.3.3/gcc/c-aux-info.c
|
||||
--- gcc-3.3.3.orig/gcc/c-aux-info.c Sun Sep 22 03:03:14 2002
|
||||
+++ gcc-3.3.3/gcc/c-aux-info.c Fri Mar 5 21:41:20 2004
|
||||
@@ -581,7 +581,7 @@
|
||||
|
||||
/* Write the actual line of auxiliary info. */
|
||||
|
||||
- fprintf (aux_info_file, "/* %s:%d:%c%c */ %s;",
|
||||
+ fprintf (aux_info_file, "/* %s(%d):%c%c */ %s;",
|
||||
DECL_SOURCE_FILE (fndecl),
|
||||
DECL_SOURCE_LINE (fndecl),
|
||||
(is_implicit) ? 'I' : (is_prototyped) ? 'N' : 'O',
|
||||
diff -Naurb gcc-3.3.3.orig/gcc/collect2.c gcc-3.3.3/gcc/collect2.c
|
||||
--- gcc-3.3.3.orig/gcc/collect2.c Mon Dec 8 19:02:40 2003
|
||||
+++ gcc-3.3.3/gcc/collect2.c Fri Mar 5 21:41:20 2004
|
||||
@@ -161,6 +161,63 @@
|
||||
#define SCAN_LIBRARIES
|
||||
#endif
|
||||
|
||||
+#ifdef __MINGW32__
|
||||
+/* We are being compiled with mingw32 as host, so we should prepare some
|
||||
+ win32 replaces for pipe(), kill(getpid(),...) and vfork() + execv()
|
||||
+*/
|
||||
+#include <io.h>
|
||||
+#include <fcntl.h>
|
||||
+
|
||||
+#define pipe(fildes) _pipe((fildes),1024*16,_O_BINARY)
|
||||
+
|
||||
+#define WIN32_LEAN_AND_MEAN
|
||||
+#include <windows.h>
|
||||
+
|
||||
+int vfork_execv(char *cmdname, char **argv, int fdout);
|
||||
+
|
||||
+/* Helper function for vfork() + execv() replacement. */
|
||||
+int vfork_execv(char *cmdname, char **argv, int fdout)
|
||||
+{
|
||||
+ STARTUPINFO SI;
|
||||
+ PROCESS_INFORMATION PI;
|
||||
+ char *params;
|
||||
+ int plen = 0;
|
||||
+ int i;
|
||||
+ BOOL bRes;
|
||||
+
|
||||
+ /* Prepare one line with arguments */
|
||||
+ for(i=0;argv[i];i++) plen += strlen(argv[i]) + 1;
|
||||
+ plen++;
|
||||
+ params = xmalloc(plen);
|
||||
+ strcpy(params,argv[0]);
|
||||
+ for(i=1;argv[i];i++) strcat(strcat(params," "),argv[i]);
|
||||
+
|
||||
+ /* Prepare startup info -- for pipes redirection */
|
||||
+ memset(&SI,0,sizeof(SI));
|
||||
+ SI.cb = sizeof(SI);
|
||||
+ SI.dwFlags = STARTF_USESTDHANDLES;
|
||||
+ SI.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
+ SI.hStdOutput = (HANDLE)_get_osfhandle(fdout);
|
||||
+ SI.hStdError = GetStdHandle(STD_ERROR_HANDLE);
|
||||
+
|
||||
+ /* Create new process in same console, with redirected (piped) stdout */
|
||||
+ bRes = CreateProcess(cmdname,params,
|
||||
+ NULL,NULL, /* Security attributes */
|
||||
+ FALSE, /* Handle inheritance */
|
||||
+ 0, /* Flags -- default, in this console, etc */
|
||||
+ NULL, /* Invironment */
|
||||
+ NULL, /* CWD */
|
||||
+ &SI, /* Startup info */
|
||||
+ &PI); /* Process info */
|
||||
+ if(!bRes) return -1;
|
||||
+ CloseHandle(PI.hProcess);
|
||||
+ CloseHandle(PI.hThread);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* END-OF-WIN32-SECTION */
|
||||
+#endif
|
||||
+
|
||||
#ifdef USE_COLLECT2
|
||||
int do_collecting = 1;
|
||||
#else
|
||||
@@ -444,7 +501,11 @@
|
||||
#endif
|
||||
|
||||
signal (signo, SIG_DFL);
|
||||
+#ifndef __MINGW32__
|
||||
kill (getpid (), signo);
|
||||
+#else
|
||||
+ ExitProcess(signo);
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -2111,6 +2172,7 @@
|
||||
fflush (stderr);
|
||||
|
||||
/* Spawn child nm on pipe */
|
||||
+#ifndef __MINGW32__
|
||||
pid = vfork ();
|
||||
if (pid == -1)
|
||||
fatal_perror (VFORK_STRING);
|
||||
@@ -2130,6 +2192,11 @@
|
||||
execv (nm_file_name, real_nm_argv);
|
||||
fatal_perror ("execv %s", nm_file_name);
|
||||
}
|
||||
+#else
|
||||
+ if(vfork_execv(nm_file_name, real_nm_argv, pipe_fd[1])) {
|
||||
+ fatal_perror ("vfork+execv %s", nm_file_name);
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
/* Parent context from here on. */
|
||||
int_handler = (void (*) PARAMS ((int))) signal (SIGINT, SIG_IGN);
|
||||
@@ -2552,6 +2619,7 @@
|
||||
fflush (stderr);
|
||||
|
||||
/* Spawn child ldd on pipe */
|
||||
+#ifndef __MINGW32__
|
||||
pid = vfork ();
|
||||
if (pid == -1)
|
||||
fatal_perror (VFORK_STRING);
|
||||
@@ -2571,6 +2639,11 @@
|
||||
execv (ldd_file_name, real_ldd_argv);
|
||||
fatal_perror ("execv %s", ldd_file_name);
|
||||
}
|
||||
+#else
|
||||
+ if(vfork_execv(ldd_file_name, real_ldd_argv, pipe_fd[1])) {
|
||||
+ fatal_perror ("vfork+execv %s", nm_file_name);
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
/* Parent context from here on. */
|
||||
int_handler = (void (*) PARAMS ((int))) signal (SIGINT, SIG_IGN);
|
||||
diff -Naurb gcc-3.3.3.orig/gcc/config/arm/arm.h gcc-3.3.3/gcc/config/arm/arm.h
|
||||
--- gcc-3.3.3.orig/gcc/config/arm/arm.h Fri Nov 15 11:21:36 2002
|
||||
+++ gcc-3.3.3/gcc/config/arm/arm.h Fri Mar 5 21:41:21 2004
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Definitions of target machine for GNU compiler, for ARM.
|
||||
Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
- 2001, 2002 Free Software Foundation, Inc.
|
||||
+ 2001, 2002, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
|
||||
and Martin Simmons (@harleqn.co.uk).
|
||||
More major hacks by Richard Earnshaw (rearnsha@arm.com)
|
||||
@@ -2180,6 +2180,7 @@
|
||||
goto WIN; \
|
||||
} \
|
||||
else if (GET_MODE_CLASS (MODE) != MODE_FLOAT \
|
||||
+ && GET_MODE_SIZE (mode) == 4 \
|
||||
&& GET_CODE (X) == SYMBOL_REF \
|
||||
&& CONSTANT_POOL_ADDRESS_P (X) \
|
||||
&& ! (flag_pic \
|
||||
diff -Naurb gcc-3.3.3.orig/gcc/config/arm/arm.md gcc-3.3.3/gcc/config/arm/arm.md
|
||||
--- gcc-3.3.3.orig/gcc/config/arm/arm.md Sun Jun 15 22:11:32 2003
|
||||
+++ gcc-3.3.3/gcc/config/arm/arm.md Fri Mar 5 21:41:21 2004
|
||||
@@ -1,6 +1,6 @@
|
||||
;;- Machine description for ARM for GNU compiler
|
||||
;; Copyright 1991, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999, 2000,
|
||||
-;; 2001, 2002 Free Software Foundation, Inc.
|
||||
+;; 2001, 2002, 2004 Free Software Foundation, Inc.
|
||||
;; Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
|
||||
;; and Martin Simmons (@harleqn.co.uk).
|
||||
;; More major hacks by Richard Earnshaw (rearnsha@arm.com).
|
||||
@@ -4585,8 +4585,8 @@
|
||||
)
|
||||
|
||||
(define_insn "*thumb_movhi_insn"
|
||||
- [(set (match_operand:HI 0 "nonimmediate_operand" "=l,l, m,*r,*h,l")
|
||||
- (match_operand:HI 1 "general_operand" "l,mn,l,*h,*r,I"))]
|
||||
+ [(set (match_operand:HI 0 "nonimmediate_operand" "=l,l,m,*r,*h,l")
|
||||
+ (match_operand:HI 1 "general_operand" "l,m,l,*h,*r,I"))]
|
||||
"TARGET_THUMB
|
||||
&& ( register_operand (operands[0], HImode)
|
||||
|| register_operand (operands[1], HImode))"
|
||||
@@ -4618,8 +4618,7 @@
|
||||
return \"ldrh %0, %1\";
|
||||
}"
|
||||
[(set_attr "length" "2,4,2,2,2,2")
|
||||
- (set_attr "type" "*,load,store1,*,*,*")
|
||||
- (set_attr "pool_range" "*,64,*,*,*,*")]
|
||||
+ (set_attr "type" "*,load,store1,*,*,*")]
|
||||
)
|
||||
|
||||
|
||||
diff -Naurb gcc-3.3.3.orig/gcc/config/arm/t-arm-elf gcc-3.3.3/gcc/config/arm/t-arm-elf
|
||||
--- gcc-3.3.3.orig/gcc/config/arm/t-arm-elf Wed May 8 16:01:14 2002
|
||||
+++ gcc-3.3.3/gcc/config/arm/t-arm-elf Fri Mar 5 21:41:21 2004
|
||||
@@ -38,9 +38,9 @@
|
||||
# MULTILIB_DIRNAMES += 32bit 26bit
|
||||
# MULTILIB_EXCEPTIONS += *mthumb/*mapcs-26*
|
||||
#
|
||||
-# MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
|
||||
-# MULTILIB_DIRNAMES += normal interwork
|
||||
-# MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*
|
||||
+MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
|
||||
+MULTILIB_DIRNAMES += normal interwork
|
||||
+MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*
|
||||
#
|
||||
# MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore
|
||||
# MULTILIB_DIRNAMES += elf under
|
||||
diff -Naurb gcc-3.3.3.orig/gcc/config/i386/mingw32-1.c gcc-3.3.3/gcc/config/i386/mingw32-1.c
|
||||
--- gcc-3.3.3.orig/gcc/config/i386/mingw32-1.c Thu Jan 1 00:00:00 1970
|
||||
+++ gcc-3.3.3/gcc/config/i386/mingw32-1.c Sat Mar 6 10:03:08 2004
|
||||
@@ -0,0 +1,44 @@
|
||||
+/* This replaces the use of stat and struct stat.st_ino to determine if
|
||||
+ files are different in gcc.c (do_spec_1) handling of --save-temps
|
||||
+ switch.
|
||||
+ Contributed by Danny Smith (dannysmith@users.sourceforge.net)
|
||||
+ Copyright 2003 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC is free software; you can redistribute it and/or modify
|
||||
+it under the terms of the GNU General Public License as published by
|
||||
+the Free Software Foundation; either version 2, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC is distributed in the hope that it will be useful,
|
||||
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#define WIN32_LEAN_AND_MEAN
|
||||
+#include <windows.h>
|
||||
+
|
||||
+/* Return non-zero if src and dst filenames do not refer to same files. */
|
||||
+
|
||||
+int w32_file_id_cmp (const char *, const char *);
|
||||
+
|
||||
+int
|
||||
+w32_file_id_cmp (src, dst)
|
||||
+ const char * src;
|
||||
+ const char * dst;
|
||||
+{
|
||||
+ char fullpath_src[MAX_PATH];
|
||||
+ char fullpath_dst[MAX_PATH];
|
||||
+ char* pfilename;
|
||||
+
|
||||
+ /* Just compare full pathnames, without regard to case. */
|
||||
+ GetFullPathName (src,MAX_PATH,fullpath_src,&pfilename);
|
||||
+ GetFullPathName (dst,MAX_PATH,fullpath_dst,&pfilename);
|
||||
+ return (lstrcmpi (fullpath_src, fullpath_dst));
|
||||
+}
|
||||
diff -Naurb gcc-3.3.3.orig/gcc/config/i386/x-mingw32 gcc-3.3.3/gcc/config/i386/x-mingw32
|
||||
--- gcc-3.3.3.orig/gcc/config/i386/x-mingw32 Thu Jan 1 00:00:00 1970
|
||||
+++ gcc-3.3.3/gcc/config/i386/x-mingw32 Sat Mar 6 09:42:12 2004
|
||||
@@ -0,0 +1,11 @@
|
||||
+#
|
||||
+# For HOST_FILE_ID_CMP for mingw32.
|
||||
+#
|
||||
+EXTRA_GCC_OBJS = mingw32-1.o
|
||||
+
|
||||
+mingw32-1.o: $(srcdir)/config/i386/mingw32-1.c
|
||||
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $?
|
||||
+
|
||||
+
|
||||
+local_includedir=$(libsubdir)/$(unlibsubdir)/..`echo $(exec_prefix) | sed -e's|^$(prefix)||' -e 's|/[^/]*|/..|g'`/include
|
||||
+STMP_FIXINC =
|
||||
diff -Naurb gcc-3.3.3.orig/gcc/config/i386/xm-mingw32.h gcc-3.3.3/gcc/config/i386/xm-mingw32.h
|
||||
--- gcc-3.3.3.orig/gcc/config/i386/xm-mingw32.h Thu Jan 10 22:21:40 2002
|
||||
+++ gcc-3.3.3/gcc/config/i386/xm-mingw32.h Sat Mar 6 09:44:41 2004
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Configuration for GNU C-compiler for hosting on Windows32.
|
||||
using GNU tools and the Windows32 API Library.
|
||||
- Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
@@ -31,3 +31,10 @@
|
||||
|
||||
#undef PATH_SEPARATOR
|
||||
#define PATH_SEPARATOR ';'
|
||||
+
|
||||
+/* This replaces the use of stat to determine if files are different
|
||||
+ in gcc.c (do_spec_1) handling of --save-temps switch. */
|
||||
+
|
||||
+extern int
|
||||
+w32_file_id_cmp PARAMS((const char *, const char *));
|
||||
+#define HOST_FILE_ID_CMP(SRC,DST) w32_file_id_cmp (SRC, DST)
|
||||
diff -Naurb gcc-3.3.3.orig/gcc/config.gcc gcc-3.3.3/gcc/config.gcc
|
||||
--- gcc-3.3.3.orig/gcc/config.gcc Wed Jan 21 06:06:00 2004
|
||||
+++ gcc-3.3.3/gcc/config.gcc Fri Mar 5 21:41:21 2004
|
||||
@@ -1352,6 +1352,7 @@
|
||||
xm_defines=POSIX
|
||||
xm_file=i386/xm-mingw32.h
|
||||
tmake_file="i386/t-cygwin i386/t-mingw32"
|
||||
+ xmake_file=i386/x-mingw32
|
||||
extra_objs=winnt.o
|
||||
if test x$enable_threads = xyes; then
|
||||
thread_file='win32'
|
||||
diff -Naurb gcc-3.3.3.orig/gcc/gcc.c gcc-3.3.3/gcc/gcc.c
|
||||
--- gcc-3.3.3.orig/gcc/gcc.c Sat Dec 6 03:53:02 2003
|
||||
+++ gcc-3.3.3/gcc/gcc.c Sat Mar 6 09:44:14 2004
|
||||
@@ -4075,7 +4075,9 @@
|
||||
static int suffixed_basename_length;
|
||||
static const char *input_basename;
|
||||
static const char *input_suffix;
|
||||
+#ifndef HOST_FILE_ID_CMP
|
||||
static struct stat input_stat;
|
||||
+#endif
|
||||
static int input_stat_set;
|
||||
|
||||
/* The compiler used to process the current input file. */
|
||||
@@ -4540,6 +4542,9 @@
|
||||
*((char *) temp_filename + temp_filename_length) = '\0';
|
||||
if (strcmp (temp_filename, input_filename) != 0)
|
||||
{
|
||||
+#if defined HOST_FILE_ID_CMP
|
||||
+ if (HOST_FILE_ID_CMP(input_filename, temp_filename) != 0)
|
||||
+#else
|
||||
struct stat st_temp;
|
||||
|
||||
/* Note, set_input() resets input_stat_set to 0. */
|
||||
@@ -4559,6 +4564,7 @@
|
||||
|| stat (temp_filename, &st_temp) < 0
|
||||
|| input_stat.st_dev != st_temp.st_dev
|
||||
|| input_stat.st_ino != st_temp.st_ino)
|
||||
+#endif
|
||||
{
|
||||
temp_filename = save_string (temp_filename,
|
||||
temp_filename_length + 1);
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,42 +0,0 @@
|
|||
diff -NBaur pspsdk-1.0+beta/tools/psp-config.c pspsdk-1.0+beta-new/tools/psp-config.c
|
||||
--- pspsdk-1.0+beta/tools/psp-config.c Mon Jun 27 06:31:22 2005
|
||||
+++ pspsdk-1.0+beta-new/tools/psp-config.c Tue Jul 5 04:54:45 2005
|
||||
@@ -17,8 +19,17 @@
|
||||
#define PATH_SEP ":"
|
||||
#define DIR_SEP '/'
|
||||
#define DIR_SEP_STR "/"
|
||||
+
|
||||
+#ifdef __MINGW32__
|
||||
+
|
||||
+/* The suffix to the path to strip off, if this is not there then we have an error */
|
||||
+#define PSPDEV_PATH_SUFFIX "/bin/psp-config.exe"
|
||||
+#else
|
||||
+
|
||||
/* The suffix to the path to strip off, if this is not there then we have an error */
|
||||
#define PSPDEV_PATH_SUFFIX "/bin/psp-config"
|
||||
+
|
||||
+#endif
|
||||
/************************/
|
||||
|
||||
/* Speficies that the current usage is to the print the pspsdk path */
|
||||
@@ -70,6 +81,20 @@
|
||||
int found = 0;
|
||||
|
||||
/* Check if name is an absolute path, if so out job is done */
|
||||
+#ifdef __MINGW32__
|
||||
+
|
||||
+ char *ptr = name;
|
||||
+
|
||||
+ char temp = name[0];
|
||||
+ *(ptr++) = '/';
|
||||
+ *(ptr++) = temp;
|
||||
+ while (*(ptr)) {
|
||||
+ temp = *(ptr);
|
||||
+ if (temp == '\\') *(ptr) = '/';
|
||||
+ ptr++;
|
||||
+ }
|
||||
+
|
||||
+#endif
|
||||
if(name[0] == DIR_SEP)
|
||||
{
|
||||
/* Absolute path */
|
||||
Loading…
Reference in New Issue
Block a user