Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pspdev/psptoolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
Diogo Autilio committed Jun 10, 2014
2 parents 72bd4d7 + 55bcfb7 commit f4879a7
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 200 deletions.
19 changes: 0 additions & 19 deletions patches/gcc-4.6.3-fix54638.patch

This file was deleted.

110 changes: 0 additions & 110 deletions patches/gcc-4.6.3-texinfofix.patch

This file was deleted.

118 changes: 59 additions & 59 deletions patches/gcc-4.6.3-PSP.patch → patches/gcc-4.6.4-PSP.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Nbaur gcc-4.6.3/config.sub gcc-4.6.3-psp/config.sub
--- gcc-4.6.3/config.sub 2010-05-25 14:22:07.000000000 +0100
+++ gcc-4.6.3-psp/config.sub 2012-04-04 22:37:30.000000000 +0100
diff -Nbaur gcc-4.6.4/config.sub gcc-4.6.4-psp/config.sub
--- gcc-4.6.4/config.sub 2010-05-25 09:22:07.000000000 -0400
+++ gcc-4.6.4-psp/config.sub 2014-06-09 18:54:13.013936018 -0400
@@ -279,6 +279,7 @@
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
Expand Down Expand Up @@ -28,9 +28,9 @@ diff -Nbaur gcc-4.6.3/config.sub gcc-4.6.3-psp/config.sub
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
diff -Nbaur gcc-4.6.3/gcc/config/mips/allegrex.md gcc-4.6.3-psp/gcc/config/mips/allegrex.md
--- gcc-4.6.3/gcc/config/mips/allegrex.md 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.6.3-psp/gcc/config/mips/allegrex.md 2012-04-04 22:37:30.000000000 +0100
diff -Nbaur gcc-4.6.4/gcc/config/mips/allegrex.md gcc-4.6.4-psp/gcc/config/mips/allegrex.md
--- gcc-4.6.4/gcc/config/mips/allegrex.md 1969-12-31 19:00:00.000000000 -0500
+++ gcc-4.6.4-psp/gcc/config/mips/allegrex.md 2014-06-09 18:54:13.013936018 -0400
@@ -0,0 +1,191 @@
+;; Sony ALLEGREX instructions.
+;; Copyright (C) 2005 Free Software Foundation, Inc.
Expand Down Expand Up @@ -223,30 +223,9 @@ diff -Nbaur gcc-4.6.3/gcc/config/mips/allegrex.md gcc-4.6.3-psp/gcc/config/mips/
+ "round.w.s\t%0,%1"
+ [(set_attr "type" "fcvt")
+ (set_attr "mode" "SF")])
diff -Nbaur gcc-4.6.3/gcc/config/mips/mips-ftypes.def gcc-4.6.3-psp/gcc/config/mips/mips-ftypes.def
--- gcc-4.6.3/gcc/config/mips/mips-ftypes.def 2009-02-20 15:20:38.000000000 +0000
+++ gcc-4.6.3-psp/gcc/config/mips/mips-ftypes.def 2012-04-04 22:37:31.000000000 +0100
@@ -53,9 +53,12 @@

DEF_MIPS_FTYPE (2, (SI, DI, SI))
DEF_MIPS_FTYPE (2, (SI, POINTER, SI))
+DEF_MIPS_FTYPE (1, (SI, HI))
+DEF_MIPS_FTYPE (1, (SI, SF))
DEF_MIPS_FTYPE (1, (SI, SI))
DEF_MIPS_FTYPE (2, (SI, SI, SI))
DEF_MIPS_FTYPE (3, (SI, SI, SI, SI))
+DEF_MIPS_FTYPE (1, (SI, QI))
DEF_MIPS_FTYPE (1, (SI, V2HI))
DEF_MIPS_FTYPE (2, (SI, V2HI, V2HI))
DEF_MIPS_FTYPE (1, (SI, V4QI))
@@ -124,3 +127,4 @@
DEF_MIPS_FTYPE (2, (VOID, SI, SI))
DEF_MIPS_FTYPE (2, (VOID, V2HI, V2HI))
DEF_MIPS_FTYPE (2, (VOID, V4QI, V4QI))
+DEF_MIPS_FTYPE (1, (VOID, VOID))
diff -Nbaur gcc-4.6.3/gcc/config/mips/mips.c gcc-4.6.3-psp/gcc/config/mips/mips.c
--- gcc-4.6.3/gcc/config/mips/mips.c 2011-05-29 18:48:14.000000000 +0100
+++ gcc-4.6.3-psp/gcc/config/mips/mips.c 2012-04-04 22:37:31.000000000 +0100
diff -Nbaur gcc-4.6.4/gcc/config/mips/mips.c gcc-4.6.4-psp/gcc/config/mips/mips.c
--- gcc-4.6.4/gcc/config/mips/mips.c 2012-09-02 06:37:49.000000000 -0400
+++ gcc-4.6.4-psp/gcc/config/mips/mips.c 2014-06-09 18:54:13.021936018 -0400
@@ -239,7 +239,12 @@
MIPS_BUILTIN_CMP_SINGLE,

Expand Down Expand Up @@ -428,7 +407,7 @@ diff -Nbaur gcc-4.6.3/gcc/config/mips/mips.c gcc-4.6.3-psp/gcc/config/mips/mips.
}
gcc_unreachable ();
}
@@ -15918,6 +16020,22 @@
@@ -15921,6 +16023,22 @@
Do all CPP-sensitive stuff in non-MIPS16 mode; we'll switch to
MIPS16 mode afterwards if need be. */
mips_set_mips16_mode (false);
Expand All @@ -451,9 +430,30 @@ diff -Nbaur gcc-4.6.3/gcc/config/mips/mips.c gcc-4.6.3-psp/gcc/config/mips/mips.
}

/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
diff -Nbaur gcc-4.6.3/gcc/config/mips/mips.h gcc-4.6.3-psp/gcc/config/mips/mips.h
--- gcc-4.6.3/gcc/config/mips/mips.h 2011-03-08 20:51:11.000000000 +0000
+++ gcc-4.6.3-psp/gcc/config/mips/mips.h 2012-04-04 22:37:31.000000000 +0100
diff -Nbaur gcc-4.6.4/gcc/config/mips/mips-ftypes.def gcc-4.6.4-psp/gcc/config/mips/mips-ftypes.def
--- gcc-4.6.4/gcc/config/mips/mips-ftypes.def 2009-02-20 10:20:38.000000000 -0500
+++ gcc-4.6.4-psp/gcc/config/mips/mips-ftypes.def 2014-06-09 18:54:13.013936018 -0400
@@ -53,9 +53,12 @@

DEF_MIPS_FTYPE (2, (SI, DI, SI))
DEF_MIPS_FTYPE (2, (SI, POINTER, SI))
+DEF_MIPS_FTYPE (1, (SI, HI))
+DEF_MIPS_FTYPE (1, (SI, SF))
DEF_MIPS_FTYPE (1, (SI, SI))
DEF_MIPS_FTYPE (2, (SI, SI, SI))
DEF_MIPS_FTYPE (3, (SI, SI, SI, SI))
+DEF_MIPS_FTYPE (1, (SI, QI))
DEF_MIPS_FTYPE (1, (SI, V2HI))
DEF_MIPS_FTYPE (2, (SI, V2HI, V2HI))
DEF_MIPS_FTYPE (1, (SI, V4QI))
@@ -124,3 +127,4 @@
DEF_MIPS_FTYPE (2, (VOID, SI, SI))
DEF_MIPS_FTYPE (2, (VOID, V2HI, V2HI))
DEF_MIPS_FTYPE (2, (VOID, V4QI, V4QI))
+DEF_MIPS_FTYPE (1, (VOID, VOID))
diff -Nbaur gcc-4.6.4/gcc/config/mips/mips.h gcc-4.6.4-psp/gcc/config/mips/mips.h
--- gcc-4.6.4/gcc/config/mips/mips.h 2011-03-08 15:51:11.000000000 -0500
+++ gcc-4.6.4-psp/gcc/config/mips/mips.h 2014-06-09 18:54:13.021936018 -0400
@@ -231,6 +231,7 @@
#define TARGET_SB1 (mips_arch == PROCESSOR_SB1 \
|| mips_arch == PROCESSOR_SB1A)
Expand Down Expand Up @@ -556,9 +556,9 @@ diff -Nbaur gcc-4.6.3/gcc/config/mips/mips.h gcc-4.6.3-psp/gcc/config/mips/mips.
#ifndef HAVE_AS_TLS
#define HAVE_AS_TLS 0
#endif
diff -Nbaur gcc-4.6.3/gcc/config/mips/mips.md gcc-4.6.3-psp/gcc/config/mips/mips.md
--- gcc-4.6.3/gcc/config/mips/mips.md 2012-01-09 22:09:53.000000000 +0000
+++ gcc-4.6.3-psp/gcc/config/mips/mips.md 2012-04-04 22:37:31.000000000 +0100
diff -Nbaur gcc-4.6.4/gcc/config/mips/mips.md gcc-4.6.4-psp/gcc/config/mips/mips.md
--- gcc-4.6.4/gcc/config/mips/mips.md 2012-01-09 17:09:53.000000000 -0500
+++ gcc-4.6.4-psp/gcc/config/mips/mips.md 2014-06-09 18:54:13.021936018 -0400
@@ -37,6 +37,7 @@
74kf2_1
74kf1_1
Expand Down Expand Up @@ -700,9 +700,9 @@ diff -Nbaur gcc-4.6.3/gcc/config/mips/mips.md gcc-4.6.3-psp/gcc/config/mips/mips
(define_c_enum "unspec" [
UNSPEC_ADDRESS_FIRST
])
diff -Nbaur gcc-4.6.3/gcc/config/mips/mips.opt gcc-4.6.3-psp/gcc/config/mips/mips.opt
--- gcc-4.6.3/gcc/config/mips/mips.opt 2011-02-17 01:59:04.000000000 +0000
+++ gcc-4.6.3-psp/gcc/config/mips/mips.opt 2012-04-04 22:37:31.000000000 +0100
diff -Nbaur gcc-4.6.4/gcc/config/mips/mips.opt gcc-4.6.4-psp/gcc/config/mips/mips.opt
--- gcc-4.6.4/gcc/config/mips/mips.opt 2011-02-16 20:59:04.000000000 -0500
+++ gcc-4.6.4-psp/gcc/config/mips/mips.opt 2014-06-09 18:54:13.025936018 -0400
@@ -306,5 +306,9 @@
Target Report Var(TARGET_XGOT)
Lift restrictions on GOT size
Expand All @@ -713,9 +713,9 @@ diff -Nbaur gcc-4.6.3/gcc/config/mips/mips.opt gcc-4.6.3-psp/gcc/config/mips/mip
+
noasmopt
Driver
diff -Nbaur gcc-4.6.3/gcc/config/mips/psp.h gcc-4.6.3-psp/gcc/config/mips/psp.h
--- gcc-4.6.3/gcc/config/mips/psp.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.6.3-psp/gcc/config/mips/psp.h 2012-04-04 22:37:31.000000000 +0100
diff -Nbaur gcc-4.6.4/gcc/config/mips/psp.h gcc-4.6.4-psp/gcc/config/mips/psp.h
--- gcc-4.6.4/gcc/config/mips/psp.h 1969-12-31 19:00:00.000000000 -0500
+++ gcc-4.6.4-psp/gcc/config/mips/psp.h 2014-06-09 18:54:13.025936018 -0400
@@ -0,0 +1,31 @@
+/* Support for Sony's Playstation Portable (PSP).
+ Copyright (C) 2005 Free Software Foundation, Inc.
Expand Down Expand Up @@ -748,9 +748,9 @@ diff -Nbaur gcc-4.6.3/gcc/config/mips/psp.h gcc-4.6.3-psp/gcc/config/mips/psp.h
+/* Get rid of the .pdr section. */
+#undef SUBTARGET_ASM_SPEC
+#define SUBTARGET_ASM_SPEC "-mno-pdr"
diff -Nbaur gcc-4.6.3/gcc/config/mips/t-allegrex gcc-4.6.3-psp/gcc/config/mips/t-allegrex
--- gcc-4.6.3/gcc/config/mips/t-allegrex 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.6.3-psp/gcc/config/mips/t-allegrex 2012-04-04 22:37:31.000000000 +0100
diff -Nbaur gcc-4.6.4/gcc/config/mips/t-allegrex gcc-4.6.4-psp/gcc/config/mips/t-allegrex
--- gcc-4.6.4/gcc/config/mips/t-allegrex 1969-12-31 19:00:00.000000000 -0500
+++ gcc-4.6.4-psp/gcc/config/mips/t-allegrex 2014-06-09 18:54:13.025936018 -0400
@@ -0,0 +1,29 @@
+# Suppress building libgcc1.a, since the MIPS compiler port is complete
+# and does not need anything from libgcc1.a.
Expand Down Expand Up @@ -781,10 +781,10 @@ diff -Nbaur gcc-4.6.3/gcc/config/mips/t-allegrex gcc-4.6.3-psp/gcc/config/mips/t
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
diff -Nbaur gcc-4.6.3/gcc/config.gcc gcc-4.6.3-psp/gcc/config.gcc
--- gcc-4.6.3/gcc/config.gcc 2011-07-22 17:44:50.000000000 +0100
+++ gcc-4.6.3-psp/gcc/config.gcc 2012-04-04 22:37:31.000000000 +0100
@@ -2033,6 +2033,18 @@
diff -Nbaur gcc-4.6.4/gcc/config.gcc gcc-4.6.4-psp/gcc/config.gcc
--- gcc-4.6.4/gcc/config.gcc 2013-03-06 12:40:07.000000000 -0500
+++ gcc-4.6.4-psp/gcc/config.gcc 2014-06-09 18:54:13.025936018 -0400
@@ -2037,6 +2037,18 @@
tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
tmake_file="mips/t-r3900 mips/t-libgcc-mips16"
;;
Expand All @@ -803,9 +803,9 @@ diff -Nbaur gcc-4.6.3/gcc/config.gcc gcc-4.6.3-psp/gcc/config.gcc
mmix-knuth-mmixware)
tm_file="${tm_file} newlib-stdint.h"
need_64bit_hwint=yes
diff -Nbaur gcc-4.6.3/gcc/crtstuff.c gcc-4.6.3-psp/gcc/crtstuff.c
--- gcc-4.6.3/gcc/crtstuff.c 2010-12-23 12:08:21.000000000 +0000
+++ gcc-4.6.3-psp/gcc/crtstuff.c 2012-04-04 22:37:31.000000000 +0100
diff -Nbaur gcc-4.6.4/gcc/crtstuff.c gcc-4.6.4-psp/gcc/crtstuff.c
--- gcc-4.6.4/gcc/crtstuff.c 2010-12-23 07:08:21.000000000 -0500
+++ gcc-4.6.4-psp/gcc/crtstuff.c 2014-06-09 18:54:13.025936018 -0400
@@ -48,7 +48,7 @@

/* Target machine header files require this define. */
Expand All @@ -815,9 +815,9 @@ diff -Nbaur gcc-4.6.3/gcc/crtstuff.c gcc-4.6.3-psp/gcc/crtstuff.c
/* FIXME: Including auto-host is incorrect, but until we have
identified the set of defines that need to go into auto-target.h,
this will have to do. */
diff -Nbaur gcc-4.6.3/libcpp/Makefile.in gcc-4.6.3-psp/libcpp/Makefile.in
--- gcc-4.6.3/libcpp/Makefile.in 2012-03-01 12:03:46.000000000 +0000
+++ gcc-4.6.3-psp/libcpp/Makefile.in 2012-04-05 09:32:31.000000000 +0100
diff -Nbaur gcc-4.6.4/libcpp/Makefile.in gcc-4.6.4-psp/libcpp/Makefile.in
--- gcc-4.6.4/libcpp/Makefile.in 2013-04-12 05:58:00.000000000 -0400
+++ gcc-4.6.4-psp/libcpp/Makefile.in 2014-06-09 18:54:13.025936018 -0400
@@ -212,8 +212,8 @@
# Note that we put the dependencies into a .Tpo file, then move them
# into place if the compile succeeds. We need this because gcc does
Expand All @@ -829,9 +829,9 @@ diff -Nbaur gcc-4.6.3/libcpp/Makefile.in gcc-4.6.3-psp/libcpp/Makefile.in
else
COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
$(depcomp) $(COMPILE.base)
diff -Nbaur gcc-4.6.3/libgcc/config.host gcc-4.6.3-psp/libgcc/config.host
--- gcc-4.6.3/libgcc/config.host 2011-11-23 22:15:54.000000000 +0000
+++ gcc-4.6.3-psp/libgcc/config.host 2012-04-04 22:37:31.000000000 +0100
diff -Nbaur gcc-4.6.4/libgcc/config.host gcc-4.6.4-psp/libgcc/config.host
--- gcc-4.6.4/libgcc/config.host 2011-11-23 17:15:54.000000000 -0500
+++ gcc-4.6.4-psp/libgcc/config.host 2014-06-09 18:54:13.025936018 -0400
@@ -436,6 +436,8 @@
;;
mipstx39-*-elf* | mipstx39el-*-elf*)
Expand Down
10 changes: 4 additions & 6 deletions scripts/002-gcc-stage1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# gcc-stage1.sh by Dan Peori (danpeori@oopo.net) customized by yreeen(yreeen@gmail.com)

## set gcc version
GCC_VERSION=4.6.3
GMP_VERSION=5.1.0
MPC_VERSION=1.0.1
MPFR_VERSION=3.1.1
GCC_VERSION=4.6.4
GMP_VERSION=5.1.3
MPC_VERSION=1.0.2
MPFR_VERSION=3.1.2

## Exit on errors
set -e
Expand All @@ -21,8 +21,6 @@
## Enter the source directory and patch the source code.
cd gcc-$GCC_VERSION
patch -p1 < ../../patches/gcc-$GCC_VERSION-PSP.patch
patch -p1 < ../../patches/gcc-$GCC_VERSION-texinfofix.patch
patch -p2 < ../../patches/gcc-$GCC_VERSION-fix54638.patch

## Unpack the library source code.
ln -fs ../gmp-$GMP_VERSION gmp
Expand Down
10 changes: 4 additions & 6 deletions scripts/005-gcc-stage2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# gdc support from TurkeyMan( https://github.com/TurkeyMan )

## set gcc version
GCC_VERSION=4.6.3
GMP_VERSION=5.1.0
MPC_VERSION=1.0.1
MPFR_VERSION=3.1.1
GCC_VERSION=4.6.4
GMP_VERSION=5.1.3
MPC_VERSION=1.0.2
MPFR_VERSION=3.1.2

## Exit on errors
set -e
Expand All @@ -22,8 +22,6 @@
## Enter the source directory and patch the source code.
cd gcc-$GCC_VERSION
patch -p1 -i ../../patches/gcc-$GCC_VERSION-PSP.patch
patch -p1 -i ../../patches/gcc-$GCC_VERSION-texinfofix.patch
patch -p2 -i ../../patches/gcc-$GCC_VERSION-fix54638.patch

## Unpack the library source code.
ln -fs ../gmp-$GMP_VERSION gmp
Expand Down

0 comments on commit f4879a7

Please sign in to comment.