gcc: Sync with OE.dev

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4485 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie 2008-05-16 09:06:00 +00:00
parent 4c664f698c
commit 3c35b00196
124 changed files with 593416 additions and 164 deletions

View File

@ -55,6 +55,6 @@ do_compile_prepend_avr32() {
FORTRAN = ""
JAVA = ""
EXTRA_OECONF += " --disable-libssp "
EXTRA_OECONF_BASE = "--disable-libssp --disable-libmudflap"
ARM_INSTRUCTION_SET = "arm"

View File

@ -1,3 +1,7 @@
upstream: n/a
comment: Use the preprocessor we have just compiled instead the one of
the system. There might be incompabilities between us and them.
Index: gcc-4.1.1/Makefile.in
===================================================================
--- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200

View File

@ -68,6 +68,6 @@ FORTRAN = ""
FORTRAN_linux-gnueabi = ",fortran"
JAVA = ""
EXTRA_OECONF += " --disable-libssp --disable-bootstrap "
EXTRA_OECONF_BASE += " --disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap"
ARM_INSTRUCTION_SET = "arm"

View File

@ -6,13 +6,32 @@ require gcc-common.inc
DEPENDS = "mpfr gmp"
SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://fedora/gcc43-c++-builtin-redecl.patch;patch=1;pnum=0 \
file://fedora/gcc43-ia64-libunwind.patch;patch=1;pnum=0 \
file://fedora/gcc43-java-nomulti.patch;patch=1;pnum=0 \
file://fedora/gcc43-ppc32-retaddr.patch;patch=1;pnum=0 \
file://fedora/gcc43-pr27898.patch;patch=1;pnum=0 \
file://fedora/gcc43-pr32139.patch;patch=1;pnum=0 \
file://fedora/gcc43-pr33763.patch;patch=1;pnum=0 \
file://fedora/gcc43-rh330771.patch;patch=1;pnum=0 \
file://fedora/gcc43-rh341221.patch;patch=1;pnum=0 \
file://fedora/gcc43-cpp-pragma.patch;patch=1;pnum=0 \
file://fedora/gcc43-java-debug-iface-type.patch;patch=1;pnum=0 \
file://fedora/gcc43-libgomp-speedup.patch;patch=1;pnum=0 \
file://fedora/gcc43-pr35440.patch;patch=1;pnum=0 \
file://fedora/gcc43-i386-libgomp.patch;patch=1;pnum=0 \
file://fedora/gcc43-pr35751.patch;patch=1;pnum=0 \
file://fedora/gcc43-rh251682.patch;patch=1;pnum=0 \
file://debian/arm-unbreak-eabi-armv4t.dpatch;patch=1 \
file://debian/libstdc++-pic.dpatch;patch=1;pnum=0 \
file://debian/gcc-ice-hack.dpatch;patch=1;pnum=0 \
file://debian/pr30961.dpatch;patch=1;pnum=0 \
# file://100-uclibc-conf.patch;patch=1 \
# file://103-uclibc-conf-noupstream.patch;patch=1 \
# file://200-uclibc-locale.patch;patch=1 \
# file://203-uclibc-locale-no__x.patch;patch=1 \
# file://204-uclibc-locale-wchar_fix.patch;patch=1 \
# file://205-uclibc-locale-update.patch;patch=1 \
file://300-libstdc++-pic.patch;patch=1 \
file://301-missing-execinfo_h.patch;patch=1 \
# file://302-c99-snprintf.patch;patch=1 \
# file://303-c99-complex-ugly-hack.patch;patch=1 \
@ -33,7 +52,6 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
# file://arm-thumb-cache.patch;patch=1 \
file://ldflags.patch;patch=1 \
file://zecke-xgcc-cpp.patch;patch=1 \
# file://unbreak-armv4t.patch;patch=1 \
file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://cache-amnesia.patch;patch=1 \
file://gfortran.patch;patch=1 \

View File

@ -0,0 +1,78 @@
#! /bin/sh -e
# DP: - When running the ACATS, look for the gnat tools in their new
# DP: directory (build/gnattools), and for the shared libraries in
# DP: build/gcc/ada/rts, build/libgnatvsn and build/libgnatprj.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/testsuite/ada/acats/run_acats~
+++ gcc/testsuite/ada/acats/run_acats 2006-04-22 08:57:50.933824704 +0200
@@ -11,23 +11,42 @@
host_gnatmake=`type gnatmake | awk '{print $3}'`
ROOT=`${PWDCMD-pwd}`
BASE=`cd $ROOT/../../..; ${PWDCMD-pwd}`
-
-PATH=$BASE:$ROOT:$PATH
-ADA_INCLUDE_PATH=$BASE/ada/rts
+GNATTOOLS=`cd $BASE/../gnattools; ${PWDCMD-pwd}`
+LIBGNATVSN=`cd $BASE/../libgnatvsn; ${PWDCMD-pwd}`
+LIBGNATPRJ=`cd $BASE/../libgnatprj; ${PWDCMD-pwd}`
+
+PATH=$GNATTOOLS:$BASE:$ROOT:$PATH
+ADA_INCLUDE_DIR=$BASE/ada/rts
+ADA_INCLUDE_PATH=$ADA_INCLUDE_DIR:$LIBGNATVSN:$LIBGNATPRJ
LD_LIBRARY_PATH=$ADA_INCLUDE_PATH:$BASE:$LD_LIBRARY_PATH
ADA_OBJECTS_PATH=$ADA_INCLUDE_PATH
-if [ ! -d $ADA_INCLUDE_PATH ]; then
+if [ ! -d $ADA_INCLUDE_DIR ]; then
echo gnatlib missing, exiting.
exit 1
fi
-if [ ! -f $BASE/gnatchop ]; then
+if [ ! -d $GNATTOOLS ]; then
+ echo gnattools missing, exiting.
+ exit 1
+fi
+
+if [ ! -d $LIBGNATVSN ]; then
+ echo libgnatvsn missing, exiting.
+ exit 1
+fi
+
+if [ ! -d $LIBGNATPRJ ]; then
+ echo libgnatprj missing, exiting.
+ exit 1
+fi
+
+if [ ! -f $GNATTOOLS/gnatchop ]; then
echo gnattools missing, exiting.
exit 1
fi
-if [ ! -f $BASE/gnatmake ]; then
+if [ ! -f $GNATTOOLS/gnatmake ]; then
echo gnattools missing, exiting.
exit 1
fi

View File

@ -0,0 +1,88 @@
#! /bin/sh -e
# DP: Fix GNAT on alpha.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2008-04-01 Aurelien Jarno <aurelien@aurel32.net>
* s-osinte-linux-alpha.ads (SC_NPROCESSORS_ONLN): New constant
for sysconf call.
(bit_field): New packed boolean type used by cpu_set_t.
(cpu_set_t): New type corresponding to the C type with
the same name. Note that on the Ada side we use a bit
field array for the affinity mask. There is not need
for the C macro for setting individual bit.
(pthread_setaffinity_np): New imported routine.
Index: gcc/ada/s-osinte-linux-alpha.ads
===================================================================
--- gcc/ada/s-osinte-linux-alpha.ads (révision 133772)
+++ gcc/ada/s-osinte-linux-alpha.ads (copie de travail)
@@ -237,6 +237,7 @@
pragma Import (C, sysconf);
SC_CLK_TCK : constant := 2;
+ SC_NPROCESSORS_ONLN : constant := 84;
-------------------------
-- Priority Scheduling --
@@ -268,6 +269,7 @@
type Thread_Body is access
function (arg : System.Address) return System.Address;
+ pragma Convention (C, Thread_Body);
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
@@ -448,12 +450,31 @@
pragma Import (C, pthread_getspecific, "pthread_getspecific");
type destructor_pointer is access procedure (arg : System.Address);
+ pragma Convention (C, destructor_pointer);
function pthread_key_create
(key : access pthread_key_t;
destructor : destructor_pointer) return int;
pragma Import (C, pthread_key_create, "pthread_key_create");
+ CPU_SETSIZE : constant := 1_024;
+
+ type bit_field is array (1 .. CPU_SETSIZE) of Boolean;
+ for bit_field'Size use CPU_SETSIZE;
+ pragma Pack (bit_field);
+ pragma Convention (C, bit_field);
+
+ type cpu_set_t is record
+ bits : bit_field;
+ end record;
+ pragma Convention (C, cpu_set_t);
+
+ function pthread_setaffinity_np
+ (thread : pthread_t;
+ cpusetsize : size_t;
+ cpuset : access cpu_set_t) return int;
+ pragma Import (C, pthread_setaffinity_np, "__gnat_pthread_setaffinity_np");
+
private
type sigset_t is record

View File

@ -0,0 +1,147 @@
#! /bin/sh -e
# DP: - Change the default search path for project files to the one specified
# DP: by the Debian Policy for Ada: /usr/share/ada/adainclude.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
Index: gcc/ada/Make-lang.in
===================================================================
--- gcc/ada/Make-lang.in.orig
+++ gcc/ada/Make-lang.in
@@ -974,7 +974,7 @@
$(ECHO) " S1 : constant String := \"$(ADA_INCLUDE_DIR)/\";" >>tmp-sdefault.adb
$(ECHO) " S2 : constant String := \"$(ADA_RTL_OBJ_DIR)/\";" >>tmp-sdefault.adb
$(ECHO) " S3 : constant String := \"$(target)/\";" >>tmp-sdefault.adb
- $(ECHO) " S4 : constant String := \"$(libsubdir)/\";" >>tmp-sdefault.adb
+ $(ECHO) " S4 : constant String := \"/usr/share/ada/adainclude/\";" >>tmp-sdefault.adb
$(ECHO) " function Include_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
$(ECHO) " begin" >>tmp-sdefault.adb
$(ECHO) " return Relocate_Path (S0, S1);" >>tmp-sdefault.adb
Index: gcc/ada/prj-ext.adb
===================================================================
--- gcc/ada/prj-ext.adb.orig
+++ gcc/ada/prj-ext.adb
@@ -24,7 +24,6 @@
------------------------------------------------------------------------------
with Hostparm;
-with Makeutl; use Makeutl;
with Output; use Output;
with Osint; use Osint;
with Sdefault;
@@ -254,38 +253,10 @@
-- Set the initial value of Current_Project_Path
- if Add_Default_Dir then
- declare
- Prefix : String_Ptr := Sdefault.Search_Dir_Prefix;
- begin
- if Prefix = null then
- Prefix := new String'(Executable_Prefix_Path);
-
- if Prefix.all /= "" then
- if Get_Mode = Ada_Only then
- Current_Project_Path :=
- new String'(Name_Buffer (1 .. Name_Len) &
- Path_Separator &
- Prefix.all & Directory_Separator & "gnat");
-
- else
- Current_Project_Path :=
- new String'(Name_Buffer (1 .. Name_Len) &
- Path_Separator &
- Prefix.all & Directory_Separator &
- "share" & Directory_Separator & "gpr");
- end if;
- end if;
-
- else
- Current_Project_Path :=
- new String'(Name_Buffer (1 .. Name_Len) & Path_Separator &
- Prefix.all &
- ".." & Directory_Separator &
- ".." & Directory_Separator &
- ".." & Directory_Separator & "gnat");
- end if;
- end;
+ if Add_Default_Dir and Sdefault.Search_Dir_Prefix /= null then
+ Current_Project_Path :=
+ new String'(Name_Buffer (1 .. Name_Len) & Path_Separator &
+ Sdefault.Search_Dir_Prefix.all);
end if;
if Current_Project_Path = null then
Index: gcc/ada/gnatls.adb
===================================================================
--- gcc/ada/gnatls.adb.orig
+++ gcc/ada/gnatls.adb
@@ -1622,9 +1622,6 @@
declare
Project_Path : String_Access := Getenv (Gpr_Project_Path);
- Lib : constant String :=
- Directory_Separator & "lib" & Directory_Separator;
-
First : Natural;
Last : Natural;
@@ -1684,36 +1681,8 @@
if Add_Default_Dir then
Name_Len := 0;
Add_Str_To_Name_Buffer (Sdefault.Search_Dir_Prefix.all);
-
- -- On Windows, make sure that all directory separators are '\'
-
- if Directory_Separator /= '/' then
- for J in 1 .. Name_Len loop
- if Name_Buffer (J) = '/' then
- Name_Buffer (J) := Directory_Separator;
- end if;
- end loop;
- end if;
-
- -- Find the sequence "/lib/"
-
- while Name_Len >= Lib'Length
- and then Name_Buffer (Name_Len - 4 .. Name_Len) /= Lib
- loop
- Name_Len := Name_Len - 1;
- end loop;
-
- -- If the sequence "/lib"/ was found, display the default
- -- directory <prefix>/lib/gnat/.
-
- if Name_Len >= 5 then
- Name_Buffer (Name_Len + 1 .. Name_Len + 4) := "gnat";
- Name_Buffer (Name_Len + 5) := Directory_Separator;
- Name_Len := Name_Len + 5;
- Write_Str (" ");
- Write_Line
- (To_Host_Dir_Spec (Name_Buffer (1 .. Name_Len), True).all);
- end if;
+ Write_Str (" ");
+ Write_Line (Name_Buffer (1 .. Name_Len));
end if;
end;

View File

@ -0,0 +1,50 @@
#! /bin/sh -e
# DP: Simplify Ada driver check (we always build using the required
# DP: Ada version. Needed for warnings on alpha.
dir=./
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
#cd ${dir} && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#rm -f ${dir}configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- config/acx.m4~ 2007-09-02 19:24:08.865326043 +0200
+++ config/acx.m4 2007-09-02 19:28:53.719623005 +0200
@@ -380,7 +380,7 @@
# Other compilers, like HP Tru64 UNIX cc, exit successfully when
# given a .adb file, but produce no object file. So we must check
# if an object file was really produced to guard against this.
-errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
+errors=`(${CC} -c conftest.adb) 2>/dev/null || echo failure`
if test x"$errors" = x && test -f conftest.$ac_objext; then
acx_cv_cc_gcc_supports_ada=yes
fi
--- configure~ 2007-09-02 16:50:31.206279000 +0200
+++ configure 2007-09-02 19:28:58.259691491 +0200
@@ -4261,7 +4261,7 @@
# Other compilers, like HP Tru64 UNIX cc, exit successfully when
# given a .adb file, but produce no object file. So we must check
# if an object file was really produced to guard against this.
-errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
+errors=`(${CC} -c conftest.adb) 2>/dev/null || echo failure`
if test x"$errors" = x && test -f conftest.$ac_objext; then
acx_cv_cc_gcc_supports_ada=yes
fi

View File

@ -0,0 +1,42 @@
#! /bin/sh -e
# DP: Look for gcc-3.4, gcc-4.0 and gcc-4.1 as gcc with Ada support.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/aclocal.m4~ Sat Mar 2 00:37:42 2002
+++ gcc/aclocal.m4 Sat Apr 6 13:01:36 2002
@@ -312,6 +312,11 @@
${ac_tool_prefix}$user_cc $user_cc \
${ac_tool_prefix}gcc gcc \
${ac_tool_prefix}cc cc \
+ ${ac_tool_prefix}gcc-4.3 gcc-4.3 \
+ ${ac_tool_prefix}gcc-4.2 gcc-4.2 \
+ ${ac_tool_prefix}gcc-4.1 gcc-4.1 \
+ ${ac_tool_prefix}gcc-4.0 gcc-4.0 \
+ ${ac_tool_prefix}gcc-3.4 gcc-3.4 \
${ac_tool_prefix}gnatgcc gnatgcc \
${ac_tool_prefix}gnatcc gnatcc \
${ac_tool_prefix}adagcc adagcc \

View File

@ -0,0 +1,87 @@
#! /bin/sh -e
# DP: use gcc-4.3 instead of gcc as the command name.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
Index: gcc/ada/comperr.adb
===================================================================
--- gcc/ada/comperr.adb.orig 2007-09-10 18:53:41.000000000 +0200
+++ gcc/ada/comperr.adb 2007-12-05 00:15:52.596687382 +0100
@@ -330,7 +330,7 @@
End_Line;
Write_Str
- ("| Include the exact gcc or gnatmake command " &
+ ("| Include the exact gcc-4.3 or gnatmake command " &
"that you entered.");
End_Line;
Index: gcc/ada/gnatlink.adb
===================================================================
--- gcc/ada/gnatlink.adb.orig 2007-10-19 15:14:33.000000000 +0200
+++ gcc/ada/gnatlink.adb 2007-12-05 00:15:52.596687382 +0100
@@ -137,7 +137,7 @@
-- This table collects the arguments to be passed to compile the binder
-- generated file.
- Gcc : String_Access := Program_Name ("gcc");
+ Gcc : String_Access := Program_Name ("gcc-4.3");
Read_Mode : constant String := "r" & ASCII.Nul;
@@ -1368,7 +1368,8 @@
end if;
Write_Line (" --GCC=comp Use comp as the compiler");
- Write_Line (" --LINK=nam Use 'nam' for the linking rather than 'gcc'");
+ Write_Line (" --LINK=nam Use 'nam' for the linking rather " &
+ "than 'gcc-4.3'");
Write_Eol;
Write_Line (" [non-Ada-objects] list of non Ada object files");
Write_Line (" [linker-options] other options for the linker");
Index: gcc/ada/make.adb
===================================================================
--- gcc/ada/make.adb.orig 2007-10-19 15:14:33.000000000 +0200
+++ gcc/ada/make.adb 2007-12-05 00:15:52.604687208 +0100
@@ -662,7 +662,7 @@
-- Compiler, Binder & Linker Data and Subprograms --
----------------------------------------------------
- Gcc : String_Access := Program_Name ("gcc");
+ Gcc : String_Access := Program_Name ("gcc-4.3");
Gnatbind : String_Access := Program_Name ("gnatbind");
Gnatlink : String_Access := Program_Name ("gnatlink");
-- Default compiler, binder, linker programs
Index: gcc/ada/gnatchop.adb
===================================================================
--- gcc/ada/gnatchop.adb.orig 2007-10-19 15:14:33.000000000 +0200
+++ gcc/ada/gnatchop.adb 2007-12-05 00:15:52.612687034 +0100
@@ -44,7 +44,7 @@
Config_File_Name : constant String_Access := new String'("gnat.adc");
-- The name of the file holding the GNAT configuration pragmas
- Gcc : String_Access := new String'("gcc");
+ Gcc : String_Access := new String'("gcc-4.3");
-- May be modified by switch --GCC=
Gcc_Set : Boolean := False;

View File

@ -0,0 +1,46 @@
#! /bin/sh -e
# DP: proposed patch for PR ada/27194.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- orig/gnatvsn.adb 2005-07-01 03:29:17.000000000 +0200
+++ gcc/ada/gnatvsn.adb 2006-04-18 10:00:05.100002000 +0200
@@ -54,12 +54,13 @@
-------------------------
function Gnat_Version_String return String is
- NUL_Pos : Positive := 1;
+ NUL_Pos : Positive := Version_String'Last;
begin
- loop
- exit when Version_String (NUL_Pos) = ASCII.NUL;
-
- NUL_Pos := NUL_Pos + 1;
+ for J in Version_String'Range loop
+ if Version_String (J) = ASCII.NUL then
+ NUL_Pos := J;
+ exit;
+ end if;
end loop;
return Version_String (1 .. NUL_Pos - 1);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,346 @@
#! /bin/sh -e
# DP: - Enable support for symbolic tracebacks in exceptions (delete the dummy
# DP: convert_addresses from adaint.c, and provide a real one separately.)
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
Ported Jürgen Pfeifer's patch to enable symbolic tracebacks on Debian
GNU/Linux.
The binary distribution of GNAT 3.15p comes with an old version of
binutils that includes a library, libaddr2line.a. This library does
not exist in recent versions of binutils. The patch works around this
by calling /usr/bin/addr2line (still part of binutils) and parsing the
output. See debian/convert_addresses.c for the gory details.
I have modified convert_addresses.c to not use a shell script anymore;
Debian controls the version of binutils which is installed. Also, I
use execve instead of execle.
--
Ludovic Brenta.
# ' make emacs highlighting happy
Index: gcc/ada/Makefile.in
===================================================================
--- gcc/ada/Makefile.in.orig 2008-01-13 22:19:26.000000000 +0100
+++ gcc/ada/Makefile.in 2008-01-29 11:56:42.178635045 +0100
@@ -1655,7 +1655,7 @@
a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
- $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
+ $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o convert_addresses.o
# Default run time files
@@ -1810,7 +1810,6 @@
for file in rts/*.ali; do \
$(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
done
- -$(INSTALL_DATA) rts/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
-cd rts; for file in *$(arext);do \
$(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
$(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
@@ -1907,7 +1906,7 @@
$(GNATRTL_OBJS)
$(RM) rts/libgnat$(arext) rts/libgnarl$(arext)
$(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnat$(arext) \
- $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
+ $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) g-trasym.o convert_addresses.o)
ifneq ($(PREFIX_OBJS),)
$(AR_FOR_TARGET) $(AR_FLAGS) rts/libgccprefix$(arext) \
$(PREFIX_OBJS);
@@ -1940,6 +1939,7 @@
$(TARGET_LIBGCC2_CFLAGS) \
-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
+ g-trasym.o convert_addresses.o \
$(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(MISCLIB) -lm
cd rts; ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
@@ -2183,6 +2183,7 @@
sysdep.o : sysdep.c
raise-gcc.o : raise-gcc.c raise.h
raise.o : raise.c raise.h
+convert_addresses.o : convert_addresses.c
vx_stack_info.o : vx_stack_info.c
gen-soccon: gen-soccon.c gsocket.h
Index: gcc/ada/adaint.c
===================================================================
--- gcc/ada/adaint.c.orig 2008-01-13 22:19:26.000000000 +0100
+++ gcc/ada/adaint.c 2008-01-29 11:56:06.614450462 +0100
@@ -2852,35 +2852,6 @@
}
#endif
-#if defined (CROSS_DIRECTORY_STRUCTURE) \
- || (! ((defined (sparc) || defined (i386)) && defined (sun) \
- && defined (__SVR4)) \
- && ! (defined (linux) && (defined (i386) || defined (__x86_64__))) \
- && ! (defined (linux) && defined (__ia64__)) \
- && ! defined (__FreeBSD__) \
- && ! defined (__hpux__) \
- && ! defined (__APPLE__) \
- && ! defined (_AIX) \
- && ! (defined (__alpha__) && defined (__osf__)) \
- && ! defined (VMS) \
- && ! defined (__MINGW32__) \
- && ! (defined (__mips) && defined (__sgi)))
-
-/* Dummy function to satisfy g-trasym.o. See the preprocessor conditional
- just above for a list of native platforms that provide a non-dummy
- version of this procedure in libaddr2line.a. */
-
-void
-convert_addresses (const char *file_name ATTRIBUTE_UNUSED,
- void *addrs ATTRIBUTE_UNUSED,
- int n_addr ATTRIBUTE_UNUSED,
- void *buf ATTRIBUTE_UNUSED,
- int *len ATTRIBUTE_UNUSED)
-{
- *len = 0;
-}
-#endif
-
#if defined (_WIN32)
int __gnat_argument_needs_quote = 1;
#else
Index: gcc/ada/convert_addresses.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/ada/convert_addresses.c 2008-01-29 11:56:06.614450462 +0100
@@ -0,0 +1,157 @@
+/*
+ Copyright (C) 1999 by Juergen Pfeifer <juergen.pfeifer@gmx.net>
+ Ada for Linux Team (ALT)
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, distribute with modifications, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name(s) of the above copyright
+ holders shall not be used in advertising or otherwise to promote the
+ sale, use or other dealings in this Software without prior written
+ authorization.
+*/
+#include <sys/types.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <signal.h>
+
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define MAX_LINE 1024
+
+#define CLOSE1 close(fd1[0]); close(fd1[1])
+#define CLOSE2 close(fd2[0]); close(fd2[1])
+#define RESTSIG sigaction(SIGPIPE,&oact,NULL)
+
+void convert_addresses
+( void* addrs[],
+ int n_addr,
+ char* buf,
+ int* len)
+{
+ int max_len = *len;
+ pid_t pid = getpid();
+ pid_t child;
+
+ struct sigaction act, oact;
+
+ int fd1[2], fd2[2];
+ char exe_name[128];
+
+ *buf = 0; *len = 0;
+ /* Thanx to the /proc filesystem we can very easily reference our own
+ executable image:-)*/
+ snprintf(exe_name,sizeof(exe_name),"--exe=/proc/%ld/exe", (long)pid);
+
+ act.sa_handler = SIG_IGN;
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = 0;
+ if (sigaction(SIGPIPE,&act,&oact) < 0)
+ return;
+
+ if (pipe(fd1) >= 0) {
+ if (pipe(fd2)>=0) {
+ if ((child = fork()) < 0) {
+ CLOSE1; CLOSE2; RESTSIG;
+ return;
+ }
+ else {
+ if (0==child) {
+ close(fd1[1]);
+ close(fd2[0]);
+ if (fd1[0] != STDIN_FILENO) {
+ if (dup2(fd1[0],STDIN_FILENO) != STDIN_FILENO) {
+ CLOSE1; CLOSE2;
+ }
+ close(fd1[0]);
+ }
+ if (fd2[1] != STDOUT_FILENO) {
+ if (dup2(fd2[1],STDOUT_FILENO) != STDOUT_FILENO) {
+ CLOSE1; CLOSE2;
+ }
+ close(fd2[1]);
+ }
+ {
+ /* As pointed out by Florian Weimer to me, it is a
+ security threat to call the script with a user defined
+ environment and using the path. That would be Trojans
+ pleasure. Therefore we use the absolute path to
+ addr2line and an empty environment. That should be
+ safe.
+ */
+ char *const argv[] = { "addr2line",
+ exe_name,
+ "--demangle=gnat",
+ "--functions",
+ "--basenames",
+ NULL };
+ char *const envp[] = { NULL };
+ if (execve("/usr/bin/addr2line", argv, envp) < 0) {
+ CLOSE1; CLOSE2;
+ }
+ }
+ }
+ else {
+ int i, n;
+ char hex[16];
+ char line[MAX_LINE + 1];
+ char *p;
+ char *s = buf;
+
+ /* Parent context */
+ close(fd1[0]);
+ close(fd2[1]);
+
+ for(i=0; i < n_addr; i++) {
+ snprintf(hex,sizeof(hex),"%p\n",addrs[i]);
+ write(fd1[1],hex,strlen(hex));
+ n = read(fd2[0],line,MAX_LINE);
+ if (n<=0)
+ break;
+ line[n]=0;
+ /* We have approx. 16 additional chars for "%p in " clause.
+ We use this info to prevent a buffer overrun.
+ */
+ if (n + 16 + (*len) > max_len)
+ break;
+ p = strchr(line,'\n');
+ if (p) {
+ if (*(p+1)) {
+ *p = 0;
+ *len += snprintf(s, (max_len - (*len)), "%p in %s at %s",addrs[i], line, p+1);
+ }
+ else {
+ *len += snprintf(s, (max_len - (*len)), "%p at %s",addrs[i], line);
+ }
+ s = buf + (*len);
+ }
+ }
+ close(fd1[1]);
+ close(fd2[0]);
+ }
+ }
+ }
+ else {
+ CLOSE1;
+ }
+ }
+ RESTSIG;
+}
Index: gcc/ada/g-trasym.adb
===================================================================
--- gcc/ada/g-trasym.adb.orig 2007-04-11 10:18:15.000000000 +0200
+++ gcc/ada/g-trasym.adb 2008-01-29 11:56:06.614450462 +0100
@@ -32,16 +32,16 @@
------------------------------------------------------------------------------
-- Run-time symbolic traceback support
+-- This file has been modified by Juergen Pfeifer (31-Dec-1999) for
+-- the purpose to support the Ada for Linux Team implementation of
+-- convert_addresses. This implementation has the advantage to run
+-- on the binutils as they are deployed on Linux.
with System.Soft_Links;
with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback;
package body GNAT.Traceback.Symbolic is
- pragma Linker_Options ("-laddr2line");
- pragma Linker_Options ("-lbfd");
- pragma Linker_Options ("-liberty");
-
package TSL renames System.Soft_Links;
-- To perform the raw addresses to symbolic form translation we rely on a
@@ -79,9 +79,13 @@
-- raw addresses provided in ADDRS, looked up in debug information from
-- FILENAME. LEN is filled with the result length.
--
- -- This procedure is provided by libaddr2line on targets that support
- -- it. A dummy version is in adaint.c for other targets so that build
- -- of shared libraries doesn't generate unresolved symbols.
+ -- This is the ALT Linux specific version adapted to the binutils
+ -- deployed with most Linuxes. These binutils already have an
+ -- addr2line tool that demangles Ada symbolic names, but there are
+ -- version dependant variants for the option names. Therefore our
+ -- implementation spawns a shell script that does normalization of
+ -- the option and then executes addr2line and communicates with it
+ -- through a bidirectional pipe.
--
-- Note that this procedure is *not* thread-safe.
@@ -93,8 +97,9 @@
(c_exename : System.Address) return System.Address;
pragma Import (C, locate_exec_on_path, "__gnat_locate_exec_on_path");
- Res : String (1 .. 256 * Traceback'Length);
- Len : Integer;
+ B_Size : constant Integer := 256 * Traceback'Length;
+ Len : Integer := B_Size;
+ Res : String (1 .. B_Size);
use type System.Address;

View File

@ -0,0 +1,44 @@
#! /bin/sh -e
# DP: #212912
# DP: on alpha-linux, make -mieee default and add -mieee-disable switch
# DP: to turn default off (doc patch)
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- src/gcc/doc/invoke.texi~ 2005-09-29 20:00:57.638380128 +0200
+++ src/gcc/doc/invoke.texi 2005-09-30 22:23:22.922502992 +0200
@@ -7670,6 +7670,13 @@
values such as not-a-number and plus/minus infinity. Other Alpha
compilers call this option @option{-ieee_with_no_inexact}.
+DEBIAN SPECIFIC: This option is on by default, unless
+@option{-ffinite-math-only} (which is part of the @option{-ffast-math}
+set) is specified, because the software functions in the GNU libc math
+libraries generate denormalized numbers, NaNs, and infs (all of which
+will cause a programs to SIGFPE when it attempts to use the results without
+@option{-mieee}).
+
@item -mieee-with-inexact
@opindex mieee-with-inexact
This is like @option{-mieee} except the generated code also maintains

View File

@ -0,0 +1,57 @@
#! /bin/sh -e
# DP: #212912
# DP: on alpha-linux, make -mieee default and add -mieee-disable switch
# DP: to turn default off
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- src/gcc/config/alpha/alpha.c~ 2005-06-04 21:25:45.000000000 +0200
+++ src/gcc/config/alpha/alpha.c 2005-09-30 22:21:33.251175568 +0200
@@ -248,6 +248,10 @@
{ 0, 0, 0 }
};
+ /* If not -ffinite-math-only, enable -mieee*/
+ if (!flag_finite_math_only)
+ target_flags |= MASK_IEEE|MASK_IEEE_CONFORMANT;
+
/* Unicos/Mk doesn't have shared libraries. */
if (TARGET_ABI_UNICOSMK && flag_pic)
{
#--- src/gcc/doc/invoke.texi~ 2005-09-29 20:00:57.638380128 +0200
#+++ src/gcc/doc/invoke.texi 2005-09-30 22:23:22.922502992 +0200
#@@ -7670,6 +7670,13 @@
# values such as not-a-number and plus/minus infinity. Other Alpha
# compilers call this option @option{-ieee_with_no_inexact}.
#
#+DEBIAN SPECIFIC: This option is on by default, unless
#+@option{-ffinite-math-only} (which is part of the @option{-ffast-math}
#+set) is specified, because the software functions in the GNU libc math
#+libraries generate denormalized numbers, NaNs, and infs (all of which
#+will cause a programs to SIGFPE when it attempts to use the results without
#+@option{-mieee}).
#+
# @item -mieee-with-inexact
# @opindex mieee-with-inexact
# This is like @option{-mieee} except the generated code also maintains

View File

@ -0,0 +1,49 @@
#! /bin/sh -e
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
Index: gcc/config/alpha/alpha.c
===================================================================
--- gcc/config/alpha/alpha.c (revision 115263)
+++ gcc/config/alpha/alpha.c (working copy)
@@ -9372,7 +9372,7 @@
fputs ("\t.set nomacro\n", asm_out_file);
if (TARGET_SUPPORT_ARCH | TARGET_BWX | TARGET_MAX | TARGET_FIX | TARGET_CIX)
{
- const char *arch;
+ const char *arch = NULL;
if (alpha_cpu == PROCESSOR_EV6 || TARGET_FIX || TARGET_CIX)
arch = "ev6";
@@ -9382,10 +9382,9 @@
arch = "ev56";
else if (alpha_cpu == PROCESSOR_EV5)
arch = "ev5";
- else
- arch = "ev4";
- fprintf (asm_out_file, "\t.arch %s\n", arch);
+ if (arch)
+ fprintf (asm_out_file, "\t.arch %s\n", arch);
}
}
#endif

View File

@ -0,0 +1,36 @@
#! /bin/sh -e
# DP: Fix armv4t build on ARM
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- src/gcc/config/arm/linux-eabi.h.orig 2007-11-24 12:37:38.000000000 +0000
+++ src/gcc/config/arm/linux-eabi.h 2007-11-24 12:39:41.000000000 +0000
@@ -44,7 +44,7 @@
The ARM10TDMI core is the default for armv5t, so set
SUBTARGET_CPU_DEFAULT to achieve this. */
#undef SUBTARGET_CPU_DEFAULT
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
/* TARGET_BIG_ENDIAN_DEFAULT is set in
config.gcc for big endian configurations. */

View File

@ -0,0 +1,39 @@
#! /bin/sh -e
# DP: boehm-gc/pthread_support.c (GC_get_nprocs): Use sysconf as fallback.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
Index: boehm-gc/pthread_support.c
===================================================================
--- boehm-gc/pthread_support.c (revision 127207)
+++ boehm-gc/pthread_support.c (working copy)
@@ -724,7 +724,8 @@
f = open("/proc/stat", O_RDONLY);
if (f < 0 || (len = STAT_READ(f, stat_buf, STAT_BUF_SIZE)) < 100) {
WARN("Couldn't read /proc/stat\n", 0);
- return -1;
+ /* Fallback to sysconf after the warning */
+ return sysconf(_SC_NPROCESSORS_ONLN);
}
for (i = 0; i < len - 100; ++i) {
if (stat_buf[i] == '\n' && stat_buf[i+1] == 'c'

View File

@ -0,0 +1,37 @@
#! /bin/sh -e
# DP: Disable running the boehm-gc testsuite. Hangs the buildd at least on hppa.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- boehm-gc/Makefile.in~ 2004-06-20 16:24:06.000000000 +0200
+++ boehm-gc/Makefile.in 2004-06-23 09:43:42.000000000 +0200
@@ -662,7 +662,8 @@
test "$$failed" -eq 0; \
else :; fi
check-am: $(check_PROGRAMS)
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+ : # $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+ @echo target $@ disabled for Debian build.
check: check-recursive
all-am: Makefile $(LTLIBRARIES) all-multi
installdirs: installdirs-recursive

View File

@ -0,0 +1,94 @@
#! /bin/sh -e
# DP: disable some biarch libraries for biarch builds
if [ $# -eq 3 ] && [ "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
-unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
--- config-ml.in.orig 2007-12-01 10:09:04.533972767 +0100
+++ config-ml.in 2007-12-01 10:21:50.625529084 +0100
@@ -301,6 +301,11 @@
done
fi
;;
+i[34567]86-*-*)
+ case " $multidirs " in
+ *" 64 "*) ac_configure_args="${ac_configure_args} --host=x86_64-linux-gnu"
+ esac
+ ;;
m68*-*-*)
if [ x$enable_softfloat = xno ]
then
@@ -472,9 +477,36 @@
esac
done
fi
+ case " $multidirs " in
+ *" 64 "*) ac_configure_args="${ac_configure_args} --host=powerpc64-linux-gnu"
+ esac
+ ;;
+s390-*-*)
+ case " $multidirs " in
+ *" 64 "*) ac_configure_args="${ac_configure_args} --host=s390x-linux-gnu"
+ esac
;;
esac
+if [ -z "$biarch_multidir_names" ]; then
+ biarch_multidir_names="libiberty libstdc++-v3 libgfortran libmudflap libssp libffi libobjc libgomp"
+ echo "WARNING: biarch_multidir_names is unset. Use default value:"
+ echo " $biarch_multidir_names"
+fi
+ml_srcbase=`basename $ml_realsrcdir`
+old_multidirs="${multidirs}"
+multidirs=""
+for x in ${old_multidirs}; do
+ case " $x " in
+ " 32 "|" n32 "|" 64 " )
+ case "$biarch_multidir_names" in
+ *"$ml_srcbase"*) multidirs="${multidirs} ${x}" ;;
+ esac
+ ;;
+ *) multidirs="${multidirs} ${x}" ;;
+ esac
+done
+
# Remove extraneous blanks from multidirs.
# Tests like `if [ -n "$multidirs" ]' require it.
multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'`
@@ -852,9 +884,20 @@
fi
fi
+ ml_configure_args=
+ for arg in ${ac_configure_args}
+ do
+ case $arg in
+ *CC=*) ml_configure_args=${ml_config_env} ;;
+ *CXX=*) ml_configure_args=${ml_config_env} ;;
+ *GCJ=*) ml_configure_args=${ml_config_env} ;;
+ *) ;;
+ esac
+ done
+
if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
- ${ac_configure_args} ${ml_config_env} ${ml_srcdiroption} ; then
+ ${ac_configure_args} ${ml_configure_args} ${ml_srcdiroption} ; then
true
else
exit 1

View File

@ -0,0 +1,37 @@
#! /bin/sh -e
# DP: set default 32bit ix86 architecture to i486
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/config/i386/i386.c~ 2007-06-28 13:23:31.000000000 +0200
+++ gcc/config/i386/i386.c 2007-06-28 13:26:33.000000000 +0200
@@ -1953,7 +1953,7 @@
"-mtune=generic instead as appropriate.");
if (!ix86_arch_string)
- ix86_arch_string = TARGET_64BIT ? "x86-64" : "i386";
+ ix86_arch_string = TARGET_64BIT ? "x86-64" : "i486";
else
ix86_arch_specified = 1;

View File

@ -0,0 +1,129 @@
#! /bin/sh -e
# DP: Fix the linker error when creating an xcc for ia64
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
cd ${dir}gcc && autoconf
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/config/ia64/fde-glibc.c gcc-4.0.0.new/gcc/config/ia64/fde-glibc.c
--- gcc-4.0.0.orig/gcc/config/ia64/fde-glibc.c 2003-11-02 18:35:20.000000000 +0100
+++ gcc-4.0.0.new/gcc/config/ia64/fde-glibc.c 2005-05-15 02:42:27.675247674 +0200
@@ -31,6 +31,7 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
+#ifndef inhibit_libc
#include "config.h"
#include <stddef.h>
#include <stdlib.h>
@@ -162,3 +163,5 @@ _Unwind_FindTableEntry (void *pc, unsign
return data.ret;
}
+
+#endif
diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/config/ia64/unwind-ia64.c gcc-4.0.0.new/gcc/config/ia64/unwind-ia64.c
--- gcc-4.0.0.orig/gcc/config/ia64/unwind-ia64.c 2005-04-06 05:50:36.000000000 +0200
+++ gcc-4.0.0.new/gcc/config/ia64/unwind-ia64.c 2005-05-15 02:43:10.842199954 +0200
@@ -30,7 +30,7 @@
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
-
+#ifndef inhibit_libc
#include "tconfig.h"
#include "tsystem.h"
#include "coretypes.h"
@@ -2404,3 +2404,4 @@ alias (_Unwind_SetIP);
#endif
#endif
+#endif
diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/config/sh/linux-unwind.h gcc-4.0.0.new/gcc/config/sh/linux-unwind.h
--- gcc-4.0.0.orig/gcc/config/sh/linux-unwind.h 2005-02-11 02:12:57.000000000 +0100
+++ gcc-4.0.0.new/gcc/config/sh/linux-unwind.h 2005-05-15 02:44:31.000000000 +0200
@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */
/* Do code reading to identify a signal frame, and set the frame
state data appropriately. See unwind-dw2.c for the structs. */
+#ifndef inhibit_libc
#include <signal.h>
#include <sys/ucontext.h>
#include "insn-constants.h"
@@ -169,3 +170,4 @@ sh_fallback_frame_state (struct _Unwind_
return _URC_NO_REASON;
}
#endif /* defined (__SH5__) */
+#endif
diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/unwind-compat.c gcc-4.0.0.new/gcc/unwind-compat.c
--- gcc-4.0.0.orig/gcc/unwind-compat.c 2004-09-04 02:15:40.000000000 +0200
+++ gcc-4.0.0.new/gcc/unwind-compat.c 2005-05-15 02:41:17.000000000 +0200
@@ -29,6 +29,7 @@
02110-1301, USA. */
#if defined (USE_GAS_SYMVER) && defined (USE_LIBUNWIND_EXCEPTIONS)
+#ifndef inhibit_libc
#include "tconfig.h"
#include "tsystem.h"
#include "unwind.h"
@@ -204,3 +205,4 @@ _Unwind_SetIP (struct _Unwind_Context *c
}
symver (_Unwind_SetIP, GCC_3.0);
#endif
+#endif
diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/unwind-generic.h gcc-4.0.0.new/gcc/unwind-generic.h
--- gcc-4.0.0.orig/gcc/unwind-generic.h 2004-11-30 09:15:39.000000000 +0100
+++ gcc-4.0.0.new/gcc/unwind-generic.h 2005-05-15 02:38:33.000000000 +0200
@@ -202,6 +202,7 @@ extern _Unwind_Reason_Code _Unwind_SjLj_
compatible with the standard ABI for IA-64, we inline these. */
#ifdef __ia64__
+#ifndef inhibit_libc
#include <stdlib.h>
static inline _Unwind_Ptr
@@ -220,6 +221,7 @@ _Unwind_GetTextRelBase (struct _Unwind_C
/* @@@ Retrieve the Backing Store Pointer of the given context. */
extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *);
+#endif
#else
extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *);
extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *);
diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.new/gcc/config/alpha/linux-unwind.h gcc-4.0.0.new2/gcc/config/alpha/linux-unwind.h
--- gcc-4.0.0.new/gcc/config/alpha/linux-unwind.h 2005-02-11 02:12:54.000000000 +0100
+++ gcc-4.0.0.new2/gcc/config/alpha/linux-unwind.h 2005-05-15 05:09:16.000000000 +0200
@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */
/* Do code reading to identify a signal frame, and set the frame
state data appropriately. See unwind-dw2.c for the structs. */
+#ifndef inhibit_libc
#include <signal.h>
#include <sys/ucontext.h>
@@ -80,3 +81,5 @@ alpha_fallback_frame_state (struct _Unwi
fs->retaddr_column = 64;
return _URC_NO_REASON;
}
+
+#endif

View File

@ -0,0 +1,39 @@
#! /bin/sh -e
# DP: Set cross include path to .../include, not .../sys-include
# DP: This should be a fix for famous limits.h issue
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
cd ${dir}gcc && autoconf
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/configure.ac.orig 2005-08-24 06:24:11.000000000 +0400
+++ gcc/configure.ac 2005-12-06 00:40:45.000000000 +0300
@@ -681,7 +681,7 @@
], [
TARGET_SYSTEM_ROOT=
TARGET_SYSTEM_ROOT_DEFINE=
- CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
+ CROSS_SYSTEM_HEADER_DIR='$(prefix)/$(target_noncanonical)/include'
])
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)

View File

@ -0,0 +1,47 @@
#! /bin/sh -e
# DP: build protoize/unprotoize binaries
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
-unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/Makefile.in.orig 2007-09-06 21:31:39.864036975 +0200
+++ gcc/Makefile.in 2007-09-06 21:33:57.836118252 +0200
@@ -137,7 +137,7 @@
# Selection of languages to be made.
CONFIG_LANGUAGES = @all_selected_languages@
-LANGUAGES = c gcov$(exeext) gcov-dump$(exeext) $(CONFIG_LANGUAGES)
+LANGUAGES = c proto gcov$(exeext) gcov-dump$(exeext) $(CONFIG_LANGUAGES)
# Various ways of specifying flags for compilations:
# CFLAGS is for the user to override to, e.g., do a cross build with -O2.
@@ -3280,14 +3280,14 @@
protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) Makefile version.h cppdefault.h intl.h
(SHLIB_LINK='$(SHLIB_LINK)'; \
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) -Wno-error \
$(DRIVER_DEFINES) \
$(srcdir)/protoize.c $(OUTPUT_OPTION))
unprotoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(TM_H) Makefile version.h cppdefault.h intl.h
(SHLIB_LINK='$(SHLIB_LINK)'; \
- $(CC) -c -DUNPROTOIZE $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CC) -c -DUNPROTOIZE $(ALL_CFLAGS) $(ALL_CPPFLAGS) -Wno-error \
$(DRIVER_DEFINES) \
$(srcdir)/protoize.c $(OUTPUT_OPTION))

View File

@ -0,0 +1,246 @@
#! /bin/sh -e
# DP: Add D options and specs for the gcc driver.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
diff -urN gcc.orig/d/lang.opt gcc/d/lang.opt
--- gcc.orig/d/lang.opt 1970-01-01 01:00:00.000000000 +0100
+++ gcc/d/lang.opt 2007-03-04 16:29:47.000000000 +0100
@@ -0,0 +1,160 @@
+; GDC -- D front-end for GCC
+; Copyright (C) 2004 David Friedman
+;
+; This program 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 of the License, or
+; (at your option) any later version.
+;
+; This program 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 this program; if not, write to the Free Software
+; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+; This is used in GCC 3.4+
+
+Language
+D
+
+I
+D Joined Separate
+-I <dir> Add <dir> to the end of the main include path.
+
+J
+D Joined Separate
+-J <dir> Add <dir> to the end of the string import path.
+
+fdeprecated
+D
+Allow use of deprecated features
+
+fassert
+D
+Generate runtime code for assert()'s
+
+frelease
+D
+Compile release version
+
+funittest
+D
+Compile in unittest code
+
+fversion=
+D Joined RejectNegative
+-fversion=<level|ident> Compile in version code >= <level> or identified by <ident>
+
+fdebug=
+D Joined RejectNegative
+-fdebug,-fdebug=<level>,-fdebug=<ident> Compile in debug code, code <= level, or code identified by ident
+
+fdebug
+D
+Compile in debug code
+
+fdebug-c
+D
+With -g, generate C debug information for debugger compatibility
+
+fd-verbose
+D
+Print information about D language processing to stdout
+
+fd-version=1
+D RejectNegative
+Compile as D language version 1
+
+femit-templates=
+D Joined RejectNegative
+-femit-templates=[normal|private|all|none|auto] Control template emission
+
+femit-templates
+D
+-femit-templates Emit templates code and data even if the linker cannot merge multiple copies
+
+nostdinc
+D
+Do not search standard system include directories
+
+fonly=
+D Joined RejectNegative
+Process all modules specified on the command line, but only generate code for the module specified by the argument.
+
+fod=
+D Joined RejectNegative
+-fod=<directory> Specify the object output directory. Note: this is actually a driver option; the backend ignores it.
+
+fop
+D
+Specify that the source file's parent directories should be appended to the object output directory. Note: this is actually a driver option; the backend ignores it.
+
+fintfc
+Generate D interface files
+
+fintfc-dir=
+D Joined RejectNegative
+-fintfc-dir=<dir> Write D interface files to directory <dir>
+
+fintfc-file=
+D Joined RejectNegative
+-fintfc-file=<filename> Write D interface file to <filename>
+
+fdoc
+D
+Generate documentation
+
+fdoc-dir=
+D Joined RejectNegative
+-fdoc-dir=<docdir> Write documentation file to docdir directory
+
+fdoc-file=
+D Joined RejectNegative
+-fdoc-file=<filename> Write documentation file to filename
+
+fdoc-inc=
+D Joined RejectNegative
+-fdoc-inc=<filename> Include a Ddoc macro file
+
+fmultilib-dir=
+D Joined RejectNegative
+-fmultilib-dir=<dir> Select header multilib subdirectory
+
+Wsign-compare
+D
+Warn about signed-unsigned comparisons
+
+fdump-source
+D RejectNegative
+Dump decoded UTF-8 text and source from HTML
+
+fbuiltin
+D
+Recognize built-in functions
+
+funsigned-char
+D
+Make \"char\" unsigned by default (silently ignored in D)
+
+fsigned-char
+D
+Make \"char\" signed by default (silently ignored in D)
+
+iprefix
+D Joined Separate
+-iprefix <path> Specify <path> as a prefix for next two options
+
+isysroot
+D Joined Separate
+-isysroot <dir> Set <dir> to be the system root directory
+
+isystem
+D Joined Separate
+-isystem <dir> Add <dir> to the start of the system include path
+
+Wall
+D
+Enable most warning messages
diff -urN gcc.orig/d/lang-specs.h gcc/d/lang-specs.h
--- gcc.orig/d/lang-specs.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc/d/lang-specs.h 2007-03-04 16:36:44.000000000 +0100
@@ -0,0 +1,53 @@
+/* GDC -- D front-end for GCC
+ Copyright (C) 2004 David Friedman
+
+ This program 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 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+#ifndef D_D_SPEC
+#define D_D_SPEC 0
+#endif
+
+/* %{!M} probably doesn't make sense because we would need
+ to do that -- -MD and -MMD doesn't sound like a plan for D.... */
+
+/* %(d_options) ? */
+
+#if GCC_SPEC_FORMAT_4
+#define D_D_SPEC_REST 0, 1, 0
+#else
+#define D_D_SPEC_REST 0
+#endif
+
+#if D_DRIVER_ONLY
+{".html", "@d", D_D_SPEC_REST },
+{".HTML", "@d", D_D_SPEC_REST },
+{".htm", "@d", D_D_SPEC_REST },
+{".HTM", "@d", D_D_SPEC_REST },
+{".xhtml", "@d", D_D_SPEC_REST },
+{".XHTML", "@d", D_D_SPEC_REST },
+{".d", "@d", D_D_SPEC_REST },
+{".D", "@d", D_D_SPEC_REST },
+{"@d",
+ "%{!E:cc1d %i %:d-all-sources() %(cc1_options) %I %N %{nostdinc*} %{+e*} %{I*} %{J*}\
+ %{M} %{MM} %{!fsyntax-only:%(invoke_as)}}", D_D_SPEC_REST },
+#else
+{".d", "@d", D_D_SPEC_REST },
+{".D", "@d", D_D_SPEC_REST },
+{"@d",
+ "%{!E:cc1d %i %(cc1_options) %I %N %{nostdinc*} %{+e*} %{I*} %{J*}\
+ %{M} %{MM} %{!fsyntax-only:%(invoke_as)}}", D_D_SPEC_REST },
+#endif
+

View File

@ -0,0 +1,40 @@
#! /bin/sh -e
# DP: Add options and specs for languages that are not built from a source
# DP: (but built from separate sources).
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/Makefile.in~ 2006-07-11 14:03:25.865618000 +0200
+++ gcc/Makefile.in 2006-07-11 21:15:30.011548776 +0200
@@ -424,8 +424,8 @@
xm_include_list=@xm_include_list@
xm_defines=@xm_defines@
lang_checks=check-gcc
-lang_opt_files=@lang_opt_files@ $(srcdir)/c.opt $(srcdir)/common.opt
-lang_specs_files=@lang_specs_files@
+lang_opt_files=$(sort @lang_opt_files@ $(foreach lang,$(debian_extra_langs),$(srcdir)/$(lang)/lang.opt)) $(srcdir)/c.opt $(srcdir)/common.opt
+lang_specs_files=$(sort @lang_specs_files@ $(foreach lang,$(debian_extra_langs),$(srcdir)/$(lang)/lang-specs.h))
lang_tree_files=@lang_tree_files@
target_cpu_default=@target_cpu_default@
GCC_THREAD_FILE=@thread_file@

View File

@ -0,0 +1,163 @@
#! /bin/sh -e
# DP: Link using --hash-style=both (alpha, amd64, ia64, i386, powerpc, ppc64, s390, sparc)
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2006-07-11 Jakub Jelinek <jakub@redhat.com>
* config/i386/linux.h (LINK_SPEC): Add --hash-style=both.
* config/i386/linux64.h (LINK_SPEC): Likewise.
* config/rs6000/sysv4.h (LINK_OS_LINUX_SPEC): Likewise.
* config/rs6000/linux64.h (LINK_OS_LINUX_SPEC32,
LINK_OS_LINUX_SPEC64): Likewise.
* config/s390/linux.h (LINK_SPEC): Likewise.
* config/ia64/linux.h (LINK_SPEC): Likewise.
* config/sparc/linux.h (LINK_SPEC): Likewise.
* config/sparc/linux64.h (LINK_SPEC, LINK_ARCH32_SPEC,
LINK_ARCH64_SPEC): Likewise.
* config/alpha/linux-elf.h (LINK_SPEC): Likewise.
--- gcc/config/alpha/linux-elf.h.orig 2007-08-04 08:55:58.000000000 +0200
+++ gcc/config/alpha/linux-elf.h 2007-09-01 15:47:26.605865578 +0200
@@ -39,7 +39,7 @@
#define ELF_DYNAMIC_LINKER LINUX_DYNAMIC_LINKER
-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
+#define LINK_SPEC "-m elf64alpha --hash-style=both %{G*} %{relax:-relax} \
%{O*:-O3} %{!O*:-O1} \
%{shared:-shared} \
%{!shared: \
--- gcc/config/s390/linux.h.orig 2007-08-04 08:55:59.000000000 +0200
+++ gcc/config/s390/linux.h 2007-09-01 15:47:26.605865578 +0200
@@ -77,7 +77,7 @@
#undef LINK_SPEC
#define LINK_SPEC \
- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
+ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=both \
%{shared:-shared} \
%{!shared: \
%{static:-static} \
--- gcc/config/sparc/linux.h.orig 2007-08-04 08:56:01.000000000 +0200
+++ gcc/config/sparc/linux.h 2007-09-01 15:47:26.605865578 +0200
@@ -132,7 +132,7 @@
#undef LINK_SPEC
-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+#define LINK_SPEC "-m elf32_sparc --hash-style=both -Y P,/usr/lib %{shared:-shared} \
%{!mno-relax:%{!r:-relax}} \
%{!shared: \
%{!ibcs: \
--- gcc/config/sparc/linux64.h.orig 2007-08-04 08:56:01.000000000 +0200
+++ gcc/config/sparc/linux64.h 2007-09-01 15:47:26.605865578 +0200
@@ -166,7 +166,7 @@
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC },
-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+#define LINK_ARCH32_SPEC "-m elf32_sparc --hash-style=both -Y P,/usr/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
@@ -175,7 +175,7 @@
%{static:-static}}} \
"
-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
+#define LINK_ARCH64_SPEC "-m elf64_sparc --hash-style=both -Y P,/usr/lib64 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
@@ -256,7 +256,7 @@
#else /* !SPARC_BI_ARCH */
#undef LINK_SPEC
-#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
+#define LINK_SPEC "-m elf64_sparc --hash-style=both -Y P,/usr/lib64 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
--- gcc/config/i386/linux.h.orig 2007-08-04 08:56:07.000000000 +0200
+++ gcc/config/i386/linux.h 2007-09-01 15:47:26.605865578 +0200
@@ -108,7 +108,7 @@
{ "dynamic_linker", LINUX_DYNAMIC_LINKER }
#undef LINK_SPEC
-#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
+#define LINK_SPEC "-m %(link_emulation) --hash-style=both %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
--- gcc/config/i386/linux64.h.orig 2007-08-04 08:56:07.000000000 +0200
+++ gcc/config/i386/linux64.h 2007-09-01 15:48:27.336781690 +0200
@@ -65,7 +65,7 @@
#endif
#undef LINK_SPEC
-#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \
+#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=both \
%{shared:-shared} \
%{!shared: \
%{!static: \
--- gcc/config/ia64/linux.h.orig 2006-12-12 18:59:53.000000000 +0100
+++ gcc/config/ia64/linux.h 2007-09-01 15:47:26.605865578 +0200
@@ -40,7 +40,7 @@
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
#undef LINK_SPEC
-#define LINK_SPEC "\
+#define LINK_SPEC "--hash-style=both \
%{shared:-shared} \
%{!shared: \
%{!static: \
--- gcc/config/rs6000/sysv4.h.orig 2007-08-08 23:37:49.000000000 +0200
+++ gcc/config/rs6000/sysv4.h 2007-09-01 15:47:26.615865729 +0200
@@ -901,7 +901,7 @@
#define LINUX_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}"
--- gcc/config/rs6000/linux64.h.orig 2007-08-04 08:56:12.000000000 +0200
+++ gcc/config/rs6000/linux64.h 2007-09-01 15:47:26.615865729 +0200
@@ -354,11 +354,11 @@
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
-#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}}"
-#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC64 "-m elf64ppc --hash-style=both %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}"

View File

@ -0,0 +1,163 @@
#! /bin/sh -e
# DP: Link using --hash-style=gnu (alpha, amd64, ia64, i386, powerpc, ppc64, s390, sparc)
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2006-07-11 Jakub Jelinek <jakub@redhat.com>
* config/i386/linux.h (LINK_SPEC): Add --hash-style=gnu.
* config/i386/linux64.h (LINK_SPEC): Likewise.
* config/rs6000/sysv4.h (LINK_OS_LINUX_SPEC): Likewise.
* config/rs6000/linux64.h (LINK_OS_LINUX_SPEC32,
LINK_OS_LINUX_SPEC64): Likewise.
* config/s390/linux.h (LINK_SPEC): Likewise.
* config/ia64/linux.h (LINK_SPEC): Likewise.
* config/sparc/linux.h (LINK_SPEC): Likewise.
* config/sparc/linux64.h (LINK_SPEC, LINK_ARCH32_SPEC,
LINK_ARCH64_SPEC): Likewise.
* config/alpha/linux-elf.h (LINK_SPEC): Likewise.
--- gcc/config/alpha/linux-elf.h.orig 2007-09-01 15:49:36.997832511 +0200
+++ gcc/config/alpha/linux-elf.h 2007-09-01 15:49:48.538006592 +0200
@@ -39,7 +39,7 @@
#define ELF_DYNAMIC_LINKER LINUX_DYNAMIC_LINKER
-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
+#define LINK_SPEC "-m elf64alpha --hash-style=gnu %{G*} %{relax:-relax} \
%{O*:-O3} %{!O*:-O1} \
%{shared:-shared} \
%{!shared: \
--- gcc/config/s390/linux.h.orig 2007-09-01 15:49:36.997832511 +0200
+++ gcc/config/s390/linux.h 2007-09-01 15:49:48.548006743 +0200
@@ -77,7 +77,7 @@
#undef LINK_SPEC
#define LINK_SPEC \
- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
+ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=gnu \
%{shared:-shared} \
%{!shared: \
%{static:-static} \
--- gcc/config/sparc/linux.h.orig 2007-09-01 15:49:36.997832511 +0200
+++ gcc/config/sparc/linux.h 2007-09-01 15:49:48.548006743 +0200
@@ -132,7 +132,7 @@
#undef LINK_SPEC
-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+#define LINK_SPEC "-m elf32_sparc --hash-style=gnu -Y P,/usr/lib %{shared:-shared} \
%{!mno-relax:%{!r:-relax}} \
%{!shared: \
%{!ibcs: \
--- gcc/config/sparc/linux64.h.orig 2007-09-01 15:49:36.997832511 +0200
+++ gcc/config/sparc/linux64.h 2007-09-01 15:49:48.548006743 +0200
@@ -166,7 +166,7 @@
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC },
-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+#define LINK_ARCH32_SPEC "-m elf32_sparc --hash-style=gnu -Y P,/usr/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
@@ -175,7 +175,7 @@
%{static:-static}}} \
"
-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
+#define LINK_ARCH64_SPEC "-m elf64_sparc --hash-style=gnu -Y P,/usr/lib64 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
@@ -256,7 +256,7 @@
#else /* !SPARC_BI_ARCH */
#undef LINK_SPEC
-#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
+#define LINK_SPEC "-m elf64_sparc --hash-style=gnu -Y P,/usr/lib64 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
--- gcc/config/i386/linux.h.orig 2007-09-01 15:49:37.007832662 +0200
+++ gcc/config/i386/linux.h 2007-09-01 15:49:48.548006743 +0200
@@ -108,7 +108,7 @@
{ "dynamic_linker", LINUX_DYNAMIC_LINKER }
#undef LINK_SPEC
-#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
+#define LINK_SPEC "-m %(link_emulation) --hash-style=gnu %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
--- gcc/config/i386/linux64.h.orig 2007-09-01 15:49:37.007832662 +0200
+++ gcc/config/i386/linux64.h 2007-09-01 15:50:49.068919687 +0200
@@ -65,7 +65,7 @@
#endif
#undef LINK_SPEC
-#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \
+#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=gnu \
%{shared:-shared} \
%{!shared: \
%{!static: \
--- gcc/config/ia64/linux.h.orig 2007-09-01 15:49:37.007832662 +0200
+++ gcc/config/ia64/linux.h 2007-09-01 15:49:48.548006743 +0200
@@ -40,7 +40,7 @@
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
#undef LINK_SPEC
-#define LINK_SPEC "\
+#define LINK_SPEC "--hash-style=gnu \
%{shared:-shared} \
%{!shared: \
%{!static: \
--- gcc/config/rs6000/sysv4.h.orig 2007-09-01 15:49:37.007832662 +0200
+++ gcc/config/rs6000/sysv4.h 2007-09-01 15:49:48.548006743 +0200
@@ -901,7 +901,7 @@
#define LINUX_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}"
--- gcc/config/rs6000/linux64.h.orig 2007-09-01 15:49:37.007832662 +0200
+++ gcc/config/rs6000/linux64.h 2007-09-01 15:49:48.548006743 +0200
@@ -354,11 +354,11 @@
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
-#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}}"
-#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC64 "-m elf64ppc --hash-style=gnu %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}"

View File

@ -0,0 +1,179 @@
#! /bin/sh -e
# DP: Emit cld instruction when stringops are used (i386).
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2008-03-06 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.h (TARGET_CLD): New define.
(struct machine_function): Add needs_cld field.
(ix86_current_function_needs_cld): New define.
* config/i386/i386.md (UNSPEC_CLD): New unspec volatile constant.
("cld"): New isns pattern.
("strmov_singleop"): Set ix86_current_function_needs_cld flag.
("rep_mov"): Ditto.
("strset_singleop"): Ditto.
("rep_stos"): Ditto.
("cmpstrnqi_nz_1"): Ditto.
("cmpstrnqi_1"): Ditto.
("strlenqi_1"): Ditto.
* config/i386/i386.c (ix86_expand_prologue): Emit cld insn for
TARGET_CLD when ix86_current_function_needs_cld is set.
Index: gcc/config/i386/i386.h
===================================================================
--- gcc/config/i386/i386.h (revision 132966)
+++ gcc/config/i386/i386.h (working copy)
@@ -388,6 +388,7 @@ extern unsigned int ix86_arch_features[X
extern int x86_prefetch_sse;
+#define TARGET_CLD 1
#define TARGET_ABM x86_abm
#define TARGET_CMPXCHG16B x86_cmpxchg16b
#define TARGET_POPCNT x86_popcnt
@@ -2446,8 +2447,9 @@ struct machine_function GTY(())
int save_varrargs_registers;
int accesses_prev_frame;
int optimize_mode_switching[MAX_386_ENTITIES];
- /* Set by ix86_compute_frame_layout and used by prologue/epilogue expander to
- determine the style used. */
+ int needs_cld;
+ /* Set by ix86_compute_frame_layout and used by prologue/epilogue
+ expander to determine the style used. */
int use_fast_prologue_epilogue;
/* Number of saved registers USE_FAST_PROLOGUE_EPILOGUE has been computed
for. */
@@ -2467,6 +2469,7 @@ struct machine_function GTY(())
#define ix86_stack_locals (cfun->machine->stack_locals)
#define ix86_save_varrargs_registers (cfun->machine->save_varrargs_registers)
#define ix86_optimize_mode_switching (cfun->machine->optimize_mode_switching)
+#define ix86_current_function_needs_cld (cfun->machine->needs_cld)
#define ix86_tls_descriptor_calls_expanded_in_cfun \
(cfun->machine->tls_descriptor_call_expanded_p)
/* Since tls_descriptor_call_expanded is not cleared, even if all TLS
Index: gcc/config/i386/i386.md
===================================================================
--- gcc/config/i386/i386.md (revision 132966)
+++ gcc/config/i386/i386.md (working copy)
@@ -205,6 +205,7 @@
(UNSPECV_XCHG 12)
(UNSPECV_LOCK 13)
(UNSPECV_PROLOGUE_USE 14)
+ (UNSPECV_CLD 15)
])
;; Constants to represent pcomtrue/pcomfalse variants
@@ -18519,6 +18520,14 @@
;; Block operation instructions
+(define_insn "cld"
+ [(unspec_volatile [(const_int 0)] UNSPECV_CLD)]
+ ""
+ "cld"
+ [(set_attr "length" "1")
+ (set_attr "length_immediate" "0")
+ (set_attr "modrm" "0")])
+
(define_expand "movmemsi"
[(use (match_operand:BLK 0 "memory_operand" ""))
(use (match_operand:BLK 1 "memory_operand" ""))
@@ -18591,7 +18600,7 @@
(set (match_operand 2 "register_operand" "")
(match_operand 5 "" ""))])]
"TARGET_SINGLE_STRINGOP || optimize_size"
- "")
+ "ix86_current_function_needs_cld = 1;")
(define_insn "*strmovdi_rex_1"
[(set (mem:DI (match_operand:DI 2 "register_operand" "0"))
@@ -18708,7 +18717,7 @@
(match_operand 3 "memory_operand" ""))
(use (match_dup 4))])]
""
- "")
+ "ix86_current_function_needs_cld = 1;")
(define_insn "*rep_movdi_rex64"
[(set (match_operand:DI 2 "register_operand" "=c") (const_int 0))
@@ -18868,7 +18877,7 @@
(set (match_operand 0 "register_operand" "")
(match_operand 3 "" ""))])]
"TARGET_SINGLE_STRINGOP || optimize_size"
- "")
+ "ix86_current_function_needs_cld = 1;")
(define_insn "*strsetdi_rex_1"
[(set (mem:DI (match_operand:DI 1 "register_operand" "0"))
@@ -18962,7 +18971,7 @@
(use (match_operand 3 "register_operand" ""))
(use (match_dup 1))])]
""
- "")
+ "ix86_current_function_needs_cld = 1;")
(define_insn "*rep_stosdi_rex64"
[(set (match_operand:DI 1 "register_operand" "=c") (const_int 0))
@@ -19138,7 +19147,7 @@
(clobber (match_operand 1 "register_operand" ""))
(clobber (match_dup 2))])]
""
- "")
+ "ix86_current_function_needs_cld = 1;")
(define_insn "*cmpstrnqi_nz_1"
[(set (reg:CC FLAGS_REG)
@@ -19185,7 +19194,7 @@
(clobber (match_operand 1 "register_operand" ""))
(clobber (match_dup 2))])]
""
- "")
+ "ix86_current_function_needs_cld = 1;")
(define_insn "*cmpstrnqi_1"
[(set (reg:CC FLAGS_REG)
@@ -19254,7 +19263,7 @@
(clobber (match_operand 1 "register_operand" ""))
(clobber (reg:CC FLAGS_REG))])]
""
- "")
+ "ix86_current_function_needs_cld = 1;")
(define_insn "*strlenqi_1"
[(set (match_operand:SI 0 "register_operand" "=&c")
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c (revision 132966)
+++ gcc/config/i386/i386.c (working copy)
@@ -6498,6 +6498,10 @@ ix86_expand_prologue (void)
emit_insn (gen_prologue_use (pic_offset_table_rtx));
emit_insn (gen_blockage ());
}
+
+ /* Emit cld instruction if stringops are used in the function. */
+ if (TARGET_CLD && ix86_current_function_needs_cld)
+ emit_insn (gen_cld ());
}
/* Emit code to restore saved registers using MOV insns. First register

View File

@ -0,0 +1,44 @@
#! /bin/sh -e
# DP: Report an ICE to apport (if apport is available
# DP: and the environment variable GCC_NOAPPORT is not set)
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/gcc.c~ 2007-08-05 22:17:07.000000000 +0200
+++ gcc/gcc.c 2007-08-12 15:03:16.000000000 +0200
@@ -6119,6 +6119,15 @@
{
notice ("Preprocessed source stored into %s file, please attach this to your bugreport.\n",
temp_filenames[attempt * 2]);
+ if (!getenv ("GCC_NOAPPORT")
+ && !access ("/usr/share/apport/gcc_ice_hook", R_OK | X_OK))
+ {
+ char *cmd = xmalloc (50 + strlen (temp_filenames[attempt * 2]) + strlen (new_argv[0]));
+ sprintf (cmd, "/usr/share/apport/gcc_ice_hook %s %s",
+ new_argv[0], temp_filenames[attempt * 2]);
+ system (cmd);
+ free (cmd);
+ }
/* Make sure it is not deleted. */
free (temp_filenames[attempt * 2]);
temp_filenames[attempt * 2] = NULL;

View File

@ -0,0 +1,331 @@
#! /bin/sh -e
# DP: Retry the build on an ice, save the calling options and preprocessed
# DP: source when the ice is reproducible.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2004-01-23 Jakub Jelinek <jakub@redhat.com>
* system.h (ICE_EXIT_CODE): Define.
* gcc.c (execute): Don't free first string early, but at the end
of the function. Call retry_ice if compiler exited with
ICE_EXIT_CODE.
(retry_ice): New function.
* diagnostic.c (diagnostic_count_diagnostic,
diagnostic_action_after_output, error_recursion): Exit with
ICE_EXIT_CODE instead of FATAL_EXIT_CODE.
--- gcc/diagnostic.c.orig 2007-09-30 10:48:13.000000000 +0000
+++ gcc/diagnostic.c 2007-09-30 10:49:57.000000000 +0000
@@ -244,7 +244,7 @@
fnotice (stderr, "Please submit a full bug report,\n"
"with preprocessed source if appropriate.\n"
"See %s for instructions.\n", bug_report_url);
- exit (ICE_EXIT_CODE);
+ exit (FATAL_EXIT_CODE);
case DK_FATAL:
if (context->abort_on_error)
--- gcc/gcc.c.orig 2007-09-30 10:48:13.000000000 +0000
+++ gcc/gcc.c 2007-09-30 10:48:39.000000000 +0000
@@ -357,6 +357,9 @@
#if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
static const char *convert_filename (const char *, int, int);
#endif
+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
+static void retry_ice (const char *prog, const char **argv);
+#endif
static const char *getenv_spec_function (int, const char **);
static const char *if_exists_spec_function (int, const char **);
@@ -2999,7 +3002,7 @@
}
}
- if (string != commands[i].prog)
+ if (i && string != commands[i].prog)
free (CONST_CAST (char *, string));
}
@@ -3056,6 +3059,16 @@
else if (WIFEXITED (status)
&& WEXITSTATUS (status) >= MIN_FATAL_STATUS)
{
+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
+ /* For ICEs in cc1, cc1obj, cc1plus see if it is
+ reproducible or not. */
+ char *p;
+ if (WEXITSTATUS (status) == ICE_EXIT_CODE
+ && i == 0
+ && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR))
+ && ! strncmp (p + 1, "cc1", 3))
+ retry_ice (commands[0].prog, commands[0].argv);
+#endif
if (WEXITSTATUS (status) > greatest_status)
greatest_status = WEXITSTATUS (status);
ret_code = -1;
@@ -3076,6 +3089,9 @@
}
}
+ if (commands[0].argv[0] != commands[0].prog)
+ free ((PTR) commands[0].argv[0]);
+
return ret_code;
}
}
@@ -6016,6 +6032,224 @@
switches[switchnum].validated = 1;
}
+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
+#define RETRY_ICE_ATTEMPTS 2
+
+static void
+retry_ice (const char *prog, const char **argv)
+{
+ int nargs, out_arg = -1, quiet = 0, attempt;
+ int pid, retries, sleep_interval;
+ const char **new_argv;
+ char *temp_filenames[RETRY_ICE_ATTEMPTS * 2 + 2];
+
+ if (input_filename == NULL || ! strcmp (input_filename, "-"))
+ return;
+
+ for (nargs = 0; argv[nargs] != NULL; ++nargs)
+ /* Only retry compiler ICEs, not preprocessor ones. */
+ if (! strcmp (argv[nargs], "-E"))
+ return;
+ else if (argv[nargs][0] == '-' && argv[nargs][1] == 'o')
+ {
+ if (out_arg == -1)
+ out_arg = nargs;
+ else
+ return;
+ }
+ /* If the compiler is going to output any time information,
+ it might vary between invocations. */
+ else if (! strcmp (argv[nargs], "-quiet"))
+ quiet = 1;
+ else if (! strcmp (argv[nargs], "-ftime-report"))
+ return;
+
+ if (out_arg == -1 || !quiet)
+ return;
+
+ memset (temp_filenames, '\0', sizeof (temp_filenames));
+ new_argv = alloca ((nargs + 3) * sizeof (const char *));
+ memcpy (new_argv, argv, (nargs + 1) * sizeof (const char *));
+ new_argv[nargs++] = "-frandom-seed=0";
+ new_argv[nargs] = NULL;
+ if (new_argv[out_arg][2] == '\0')
+ new_argv[out_arg + 1] = "-";
+ else
+ new_argv[out_arg] = "-o-";
+
+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS + 1; ++attempt)
+ {
+ int fd = -1;
+ int status;
+
+ temp_filenames[attempt * 2] = make_temp_file (".out");
+ temp_filenames[attempt * 2 + 1] = make_temp_file (".err");
+
+ if (attempt == RETRY_ICE_ATTEMPTS)
+ {
+ int i;
+ int fd1, fd2;
+ struct stat st1, st2;
+ size_t n, len;
+ char *buf;
+
+ buf = xmalloc (8192);
+
+ for (i = 0; i < 2; ++i)
+ {
+ fd1 = open (temp_filenames[i], O_RDONLY);
+ fd2 = open (temp_filenames[2 + i], O_RDONLY);
+
+ if (fd1 < 0 || fd2 < 0)
+ {
+ i = -1;
+ close (fd1);
+ close (fd2);
+ break;
+ }
+
+ if (fstat (fd1, &st1) < 0 || fstat (fd2, &st2) < 0)
+ {
+ i = -1;
+ close (fd1);
+ close (fd2);
+ break;
+ }
+
+ if (st1.st_size != st2.st_size)
+ {
+ close (fd1);
+ close (fd2);
+ break;
+ }
+
+ len = 0;
+ for (n = st1.st_size; n; n -= len)
+ {
+ len = n;
+ if (len > 4096)
+ len = 4096;
+
+ if (read (fd1, buf, len) != (int) len
+ || read (fd2, buf + 4096, len) != (int) len)
+ {
+ i = -1;
+ break;
+ }
+
+ if (memcmp (buf, buf + 4096, len) != 0)
+ break;
+ }
+
+ close (fd1);
+ close (fd2);
+
+ if (n)
+ break;
+ }
+
+ free (buf);
+ if (i == -1)
+ break;
+
+ if (i != 2)
+ {
+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
+ break;
+ }
+
+ fd = open (temp_filenames[attempt * 2], O_RDWR);
+ if (fd < 0)
+ break;
+ write (fd, "//", 2);
+ for (i = 0; i < nargs; i++)
+ {
+ write (fd, " ", 1);
+ write (fd, new_argv[i], strlen (new_argv[i]));
+ }
+ write (fd, "\n", 1);
+ new_argv[nargs] = "-E";
+ new_argv[nargs + 1] = NULL;
+ }
+
+ /* Fork a subprocess; wait and retry if it fails. */
+ sleep_interval = 1;
+ pid = -1;
+ for (retries = 0; retries < 4; retries++)
+ {
+ pid = fork ();
+ if (pid >= 0)
+ break;
+ sleep (sleep_interval);
+ sleep_interval *= 2;
+ }
+
+ if (pid < 0)
+ break;
+ else if (pid == 0)
+ {
+ if (attempt != RETRY_ICE_ATTEMPTS)
+ fd = open (temp_filenames[attempt * 2], O_RDWR);
+ if (fd < 0)
+ exit (-1);
+ if (fd != 1)
+ {
+ close (1);
+ dup (fd);
+ close (fd);
+ }
+
+ fd = open (temp_filenames[attempt * 2 + 1], O_RDWR);
+ if (fd < 0)
+ exit (-1);
+ if (fd != 2)
+ {
+ close (2);
+ dup (fd);
+ close (fd);
+ }
+
+ if (prog == new_argv[0])
+ execvp (prog, (char *const *) new_argv);
+ else
+ execv (new_argv[0], (char *const *) new_argv);
+ exit (-1);
+ }
+
+ if (waitpid (pid, &status, 0) < 0)
+ break;
+
+ if (attempt < RETRY_ICE_ATTEMPTS
+ && (! WIFEXITED (status) || WEXITSTATUS (status) != ICE_EXIT_CODE))
+ {
+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
+ break;
+ }
+ else if (attempt == RETRY_ICE_ATTEMPTS)
+ {
+ close (fd);
+ if (WIFEXITED (status)
+ && WEXITSTATUS (status) == SUCCESS_EXIT_CODE)
+ {
+ notice ("Preprocessed source stored into %s file, please attach this to your bugreport.\n",
+ temp_filenames[attempt * 2]);
+ /* Make sure it is not deleted. */
+ free (temp_filenames[attempt * 2]);
+ temp_filenames[attempt * 2] = NULL;
+ break;
+ }
+ }
+ }
+
+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS * 2 + 2; attempt++)
+ if (temp_filenames[attempt])
+ {
+ unlink (temp_filenames[attempt]);
+ free (temp_filenames[attempt]);
+ }
+}
+#endif
+
/* Search for a file named NAME trying various prefixes including the
user's -B prefix and some standard ones.
Return the absolute file name found. If nothing is found, return NAME. */
--- gcc/Makefile.in.orig 2007-09-30 10:48:13.000000000 +0000
+++ gcc/Makefile.in 2007-09-30 10:48:39.000000000 +0000
@@ -192,6 +192,7 @@
build/gengtype-lex.o-warn = -Wno-error
# SYSCALLS.c misses prototypes
SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
+build/gcc.o-warn = -Wno-error
# All warnings have to be shut off in stage1 if the compiler used then
# isn't gcc; configure determines that. WARN_CFLAGS will be either

View File

@ -0,0 +1,62 @@
#! /bin/sh -e
# DP: Use lib instead of lib64 as multilibdir on amd64 and ppc64.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
Index: gcc/config/i386/t-linux64
===================================================================
--- gcc/config/i386/t-linux64 (revision 130706)
+++ gcc/config/i386/t-linux64 (working copy)
@@ -13,7 +13,7 @@
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+MULTILIB_OSDIRNAMES = ../lib $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
Index: gcc/config/rs6000/t-linux64
===================================================================
--- gcc/config/rs6000/t-linux64 (revision 130706)
+++ gcc/config/rs6000/t-linux64 (working copy)
@@ -14,13 +14,13 @@
# it doesn't tell anything about the 32bit libraries on those systems. Set
# MULTILIB_OSDIRNAMES according to what is found on the target.
-MULTILIB_OPTIONS = m64/m32 msoft-float
-MULTILIB_DIRNAMES = 64 32 nof
+MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64 32
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
-MULTILIB_EXCEPTIONS = m64/msoft-float
-MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
-MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
+MULTILIB_EXCEPTIONS =
+MULTILIB_EXCLUSIONS =
+MULTILIB_OSDIRNAMES = ../lib $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+MULTILIB_MATCHES =
softfp_wrap_start := '\#ifndef __powerpc64__'
softfp_wrap_end := '\#endif'

View File

@ -0,0 +1,726 @@
#! /bin/sh -e
# DP: Add pascal options and specs for the gcc driver.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
ln -sf p ${dir}/gcc/pascal
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
diff -urN gcc.orig/p/lang.opt gcc/p/lang.opt
--- gcc.orig/p/lang.opt 1970-01-01 01:00:00.000000000 +0100
+++ gcc/p/lang.opt 2006-03-03 20:17:49.000000000 +0100
@@ -0,0 +1,635 @@
+; This file was generated automatically by mk-lang_opt.
+; DO NOT CHANGE THIS FILE MANUALLY!
+;
+; Options for the Pascal front end.
+; Copyright (C) 2004-2006 Free Software Foundation, Inc.
+;
+; This file is part of GNU Pascal.
+;
+; GNU Pascal 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 Pascal 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 Pascal; see the file COPYING. If not, write to the
+; Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+; 02111-1307, USA.
+
+; See c.opt for a description of this file's format.
+
+; Please try to keep this file in ASCII collating order.
+
+Language
+Pascal
+
+A
+Pascal
+Ignored
+
+D
+Pascal Joined Separate
+-D<macro>[=<val>] Define a <macro> with <val> as its value. If just <macro> is given, <val> is taken to be 1
+
+E
+Pascal
+Preprocess only
+
+H
+Pascal
+Print the name of include files as they are used
+
+I
+Pascal Joined Separate
+-I <dir> Add <dir> to the end of the main include path.
+
+M
+Pascal
+Generate make dependencies
+
+MM
+Pascal
+Like -M but ignore system header files
+
+P
+Pascal
+Do not generate #line directives
+
+U
+Pascal Joined Separate
+-U<macro> Undefine <macro>
+
+Wabsolute
+Pascal
+Warn about variables at absolute adresses and `absolute' variable with non-constant addresses (default)
+
+Wall
+Pascal
+
+
+Wcomment
+Pascal
+
+
+Wdynamic-arrays
+Pascal
+Warn about arrays whose size is determined at run time (including array slices)
+
+Werror
+Pascal
+
+
+Wfloat-equal
+Pascal
+Warn about `=' and `<>' comparisons of real numbers
+
+Widentifier-case
+Pascal
+Warn about an identifier written with varying case
+
+Widentifier-case-local
+Pascal
+Warn about an identifier written with varying case within one program/module/unit
+
+Wimplicit-abstract
+Pascal
+Warn when an object type not declared `abstract' contains an abstract method (default)
+
+Wimplicit-io
+Pascal
+Warn when `Input' or `Output' are used implicitly
+
+Winherited-abstract
+Pascal
+Warn when an abstract object type inherits from a non-abstract one (default)
+
+Winterface-file-name
+Pascal
+Warn when a unit/module interface differs from the file name
+
+Wlocal-external
+Pascal
+Warn about local `external' declarations
+
+Wmissing-declarations
+Pascal
+
+
+Wmissing-prototypes
+Pascal
+
+
+Wmixed-comments
+Pascal
+Warn about mixed comments like `{ ... *)'
+
+Wnear-far
+Pascal
+Warn about use of useless `near' or `far' directives (default)
+
+Wnested-comments
+Pascal
+Warn about nested comments like `{ { } }'
+
+Wobject-assignment
+Pascal
+Warn when when assigning objects or declaring them as value parameters or function results (default)
+
+Wpointer-arith
+Pascal
+
+
+Wsemicolon
+Pascal
+Warn about a semicolon after `then', `else' or `do' (default)
+
+Wtyped-const
+Pascal
+Warn about misuse of typed constants as initialized variables (default)
+
+Wundef
+Pascal
+
+
+Wunderscore
+Pascal
+Warn about double/leading/trailing underscores in identifiers
+
+Wwarnings
+Pascal
+Enable warnings (same as `{$W+}')
+
+Wwrite-strings
+Pascal
+
+
+famtmpfile=
+Pascal Joined RejectNegative
+(Internal switch used for automake)
+
+fassertions
+Pascal
+Enable assertion checking (default)
+
+fautobuild
+Pascal
+Automatically compile all units/modules/`{$L ...}' files and link the object files provided
+
+fautolink
+Pascal
+Automatically link object files provided by units/modules or `{$L ...}' (default)
+
+fautomake
+Pascal
+Automatically compile changed units/modules/`{$L ...}' files and link the object files provided
+
+fautomake-g++=
+Pascal Joined RejectNegative
+Set the C++ compiler invoked by automake
+
+fautomake-gcc=
+Pascal Joined RejectNegative
+Set the C compiler invoked by automake
+
+fautomake-gpc=
+Pascal Joined RejectNegative
+Set the Pascal compiler invoked by automake
+
+fbig-endian
+Pascal RejectNegative
+Tell GPC that the system is big-endian (for those targets where it can vary)
+
+fborland-objects
+Pascal RejectNegative
+Choose Borland object model
+
+fborland-pascal
+Pascal RejectNegative
+Try to emulate Borland Pascal, version 7.0
+
+fcase-value-checking
+Pascal
+Cause a runtime error if a `case' matches no branch (default in ISO Pascal modes)
+
+fcidefine=
+Pascal Joined RejectNegative
+Define a case-insensitive macro
+
+fclassic-pascal
+Pascal RejectNegative
+Reject anything besides ISO 7185 Pascal
+
+fclassic-pascal-level-0
+Pascal RejectNegative
+Reject conformant arrays and anything besides ISO 7185 Pascal
+
+fcsdefine=
+Pascal Joined RejectNegative
+Define a case-sensitive macro
+
+fcstrings-as-strings
+Pascal
+Treat CStrings as strings
+
+fdebug-automake
+Pascal RejectNegative
+(For GPC developers.) Give additional information about the actions of automake
+
+fdebug-gpi
+Pascal RejectNegative
+(For GPC developers.) Show what is written to and read from GPI files (huge output!)
+
+fdebug-source
+Pascal
+Output the source while it is processed to standard error
+
+fdebug-tree=
+Pascal Joined RejectNegative
+(For GPC developers.) Show the internal representation of a given tree node (name or address)
+
+fdelphi
+Pascal RejectNegative
+Try to emulate Borland Pascal, version 7.0, with some Delphi extensions
+
+fdelphi-comments
+Pascal
+Allow Delphi style `//' comments (default)
+
+fdelphi-method-shadowing
+Pascal
+Redefining methods silently shadows old definition (default in `--delphi')
+
+fdisable-debug-info
+Pascal RejectNegative
+Inhibit `-g' options (temporary work-around, this option may disappear in the future)
+
+fdisable-default-paths
+Pascal RejectNegative
+Do not add a default path to the unit and object path
+
+fdisable-keyword=
+Pascal Joined RejectNegative
+Disable a keyword, independently of dialect defaults
+
+fdisable-predefined-identifier=
+Pascal Joined RejectNegative
+Disable a predefined identifier, independently of dialect defaults
+
+fdouble-quoted-strings
+Pascal
+Allow strings enclosed in \"\" (default)
+
+fenable-keyword=
+Pascal Joined RejectNegative
+Enable a keyword, independently of dialect defaults
+
+fenable-predefined-identifier=
+Pascal Joined RejectNegative
+Enable a predefined identifier, independently of dialect defaults
+
+fexact-compare-strings
+Pascal
+Do not blank-pad strings for comparisons
+
+fexecutable-file-name
+Pascal RejectNegative
+Derive output file name from main source file name
+
+fexecutable-file-name=
+Pascal Joined RejectNegative
+Specify the name of the output file
+
+fexecutable-path
+Pascal
+`--no-executable-path': Create the executable file in the directory where the main source is (default)
+
+fexecutable-path=
+Pascal Joined RejectNegative
+Path where to create the executable file
+
+fextended-pascal
+Pascal RejectNegative
+Reject anything besides ISO 10206 Extended Pascal
+
+fextended-syntax
+Pascal
+same as `--ignore-function-results --pointer-arithmetic --cstrings-as-strings -Wno-absolute' (same as `{$X+}')
+
+ffield-widths
+Pascal
+Use default field widths in write statements
+
+ffield-widths=
+Pascal Joined RejectNegative
+Specify as a colon-separated list the default field widths in write statements for Integer, Real, Boolean, LongInt, LongReal
+
+fgnu-objects
+Pascal RejectNegative
+Reset object model to default state
+
+fgnu-pascal
+Pascal RejectNegative
+Undo the effect of previous dialect options, allow all features again
+
+fgpc-main=
+Pascal Joined RejectNegative
+External name for the program's entry point (default: `main')
+
+fgpi-destination-path=
+Pascal Joined RejectNegative
+(Internal switch used for automake)
+
+fignore-function-results
+Pascal
+Do not complain when a function is called like a procedure
+
+fignore-garbage-after-dot
+Pascal
+Ignore anything after the terminating `.' (default in `--borland-pascal')
+
+fignore-packed
+Pascal
+Ignore `packed' in the source code (default in `--borland-pascal')
+
+fimplementation-only
+Pascal RejectNegative
+Do not produce a GPI file; only compile the implementation part
+
+fimplicit-result
+Pascal
+Enable implicit `Result' for functions (default only in `--delphi')
+
+finit-modules=
+Pascal Joined RejectNegative
+Initialize the named modules in addition to those imported regularly; kind of a kludge
+
+finterface-only
+Pascal RejectNegative
+Compile only the interface part of a unit/module and exit (creates `.gpi' file, no `.o' file)
+
+fio-checking
+Pascal
+Check I/O operations automatically (same as `{$I+}') (default)
+
+fiso-goto-restrictions
+Pascal
+Do not allow jumps into structured instructions (default)
+
+flittle-endian
+Pascal RejectNegative
+Tell GPC that the system is little-endian (for those targets where it can vary)
+
+flongjmp-all-nonlocal-labels
+Pascal
+Use `longjmp' for all nonlocal labels (default for Darwin/PPC)
+
+fmac-objects
+Pascal RejectNegative
+Choose Mac object model
+
+fmac-pascal
+Pascal RejectNegative
+Support (some features of) traditional Macintosh Pascal compilers
+
+fmacros
+Pascal
+Expand macros (default except with `--ucsd-pascal', `--borland-pascal' or `--delphi')
+
+fmaximum-field-alignment=
+Pascal Joined RejectNegative
+Set the maximum field alignment in bits if `pack-struct' is in effect
+
+fmethods-always-virtual
+Pascal
+Make all methods virtual (default in `--mac-pascal')
+
+fmixed-comments
+Pascal
+Allow comments like `{ ... *)' as required in ISO Pascal (default in ISO 7185/10206 Pascal mode)
+
+fnested-comments
+Pascal
+Allow nested comments like `{ { } }' and `(* (* *) *)'
+
+fnonlocal-exit
+Pascal
+Allow non-local `Exit' statements (default in `--ucsd-pascal' and `--mac-pascal')
+
+fobject-checking
+Pascal
+Check for valid objects on virtual method calls (default)
+
+fobject-destination-path
+Pascal
+`--no-object-destination-path': Create additional object files (e.g. of C files, not Pascal units) in the current directory (default)
+
+fobject-destination-path=
+Pascal Joined RejectNegative
+Path where to create additional object files (e.g. of C files, not Pascal units)
+
+fobject-pascal
+Pascal RejectNegative
+Reject anything besides (the implemented parts of) ANSI draft Object Pascal
+
+fobject-path
+Pascal
+`--no-object-path': Forget about directories where to look for additional object (and source) files
+
+fobject-path=
+Pascal Joined RejectNegative
+Directories where to look for additional object (and source) files
+
+fobjects-are-references
+Pascal
+Turn objects into references (default in `--mac-pascal')
+
+fobjects-require-override
+Pascal
+Require override directive for objects (default in `--mac-pascal')
+
+fooe-objects
+Pascal RejectNegative
+Choose OOE object model
+
+fpascal-sc
+Pascal RejectNegative
+Be strict about the implemented Pascal-SC extensions
+
+fpedantic
+Pascal
+Reject everything not allowed in some dialect, e.g. redefinition of its keywords
+
+fpointer-arithmetic
+Pascal
+Enable pointer arithmetic
+
+fpointer-checking
+Pascal
+Validate pointers before dereferencing
+
+fpointer-checking-user-defined
+Pascal
+Use user-defined procedure for validating pointers
+
+fpreprocessed
+Pascal RejectNegative
+Treat the input file as already preprocessed
+
+fprint-needed-options
+Pascal RejectNegative
+Print the needed options
+
+fprogress-bar
+Pascal
+Output number of processed lines while compiling
+
+fprogress-messages
+Pascal
+Output source file names and line numbers while compiling
+
+fpropagate-units
+Pascal
+Automalically export all imported identifiers from a unit
+
+frange-and-object-checking
+Pascal
+Same as `--range-checking --object-checking', same as `{$R+}'
+
+frange-checking
+Pascal
+Do automatic range checks (default)
+
+fread-base-specifier
+Pascal
+In read statements, allow input base specifier `n#' (default)
+
+fread-hex
+Pascal
+In read statements, allow hexadecimal input with `$' (default)
+
+fread-white-space
+Pascal
+In read statements, require whitespace after numbers
+
+fsetlimit=
+Pascal Joined RejectNegative
+Define the range for `set of Integer' etc.
+
+fshort-circuit
+Pascal
+Guarantee short-circuit Boolean evaluation (default; same as `{$B-}')
+
+fstack-checking
+Pascal
+Enable stack checking (same as `{$S+}')
+
+fstandard-pascal
+Pascal RejectNegative
+Synonym for `--classic-pascal'
+
+fstandard-pascal-level-0
+Pascal RejectNegative
+Synonym for `--classic-pascal-level-0'
+
+fsun-pascal
+Pascal RejectNegative
+Support (a few features of) Sun Pascal
+
+ftransparent-file-names
+Pascal
+Derive external file names from variable names
+
+ftruncate-strings
+Pascal
+Truncate strings being assigned to other strings of too short capacity
+
+ftyped-address
+Pascal
+Make the result of the address operator typed (same as `{$T+}', default)
+
+fucsd-pascal
+Pascal RejectNegative
+Try to emulate UCSD Pascal
+
+funit-destination-path
+Pascal
+`--no-unit-destination-path': Create object and GPI files of Pascal units in the current directory (default)
+
+funit-destination-path=
+Pascal Joined RejectNegative
+Path where to create object and GPI files of Pascal units
+
+funit-path
+Pascal
+`--no-unit-path': Forget about directories where to look for unit/module sources
+
+funit-path=
+Pascal Joined RejectNegative
+Directories where to look for unit/module sources
+
+fuses=
+Pascal Joined RejectNegative
+Add an implicit `uses' clause
+
+fvax-pascal
+Pascal RejectNegative
+Support (a few features of) VAX Pascal
+
+fwrite-capital-exponent
+Pascal
+Write real exponents with a capital `E'
+
+fwrite-clip-strings
+Pascal
+In write statements, truncate strings exceeding their field width (`Write (SomeLongString : 3)')
+
+fwrite-real-blank
+Pascal
+Output a blank in front of positive reals in exponential form (default)
+
+idirafter
+Pascal Joined Separate
+`-idirafter <dir>' Add <dir> to the end of the system include path
+
+imacros
+Pascal Joined Separate
+-imacros <file> Accept definition of macros in <file>
+
+include
+Pascal Joined Separate
+-include <file> Include the contents of <file> before other files
+
+iprefix
+Pascal Joined Separate
+-iprefix <path> Specify <path> as a prefix for next two options
+
+isystem
+Pascal Joined Separate
+-isystem <dir> Add <dir> to the start of the system include path
+
+iwithprefix
+Pascal Joined Separate
+-iwithprefix <dir> Add <dir> to the end of the system include path
+
+iwithprefixbefore
+Pascal Joined Separate
+-iwithprefixbefore <dir> Add <dir> to the end of the main include path
+
+nostdinc
+Pascal
+Do not search standard system include directories (those specified with -isystem will still be used)
+
+remap
+Pascal
+Remap file names when including files
+
+v
+Pascal
+Enable verbose output
+
+; This comment is to ensure we retain the blank line above.
diff -urN gcc.orig/p/lang-specs.h gcc/p/lang-specs.h
--- gcc.orig/p/lang-specs.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc/p/lang-specs.h 2006-03-25 02:53:09.000000000 +0100
@@ -0,0 +1,46 @@
+/*Definitions for specs for Pascal.
+
+ Copyright (C) 1997-2006 Free Software Foundation, Inc.
+
+ Authors: Peter Gerwinski <peter@gerwinski.de>
+ Frank Heckenbach <frank@pascal.gnu.de>
+
+ This file is part of GNU Pascal.
+
+ GNU Pascal 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 Pascal 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 Pascal; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include "p/p-version.h"
+
+/* This is the contribution to the `default_compilers' array for Pascal. */
+ {".pas", "@Pascal", 0},
+ {".p", "@Pascal", 0},
+ {".pp", "@Pascal", 0},
+ {".dpr", "@Pascal", 0},
+ {"@Pascal",
+ "gpc1 %{E:-E %{!M:%(cpp_unique_options) %1 %{m*} %{f*&W*&pedantic*} %{w} "
+ "%(cpp_debug_options) %{O*}}}"
+ "%{M:%(cpp_unique_options) %1 %{m*} %{f*&W*&pedantic*} %{w}"
+ "%(cpp_debug_options) %{O*}}"
+ "%{!E:%{!M:%{save-temps:-E %(cpp_unique_options) %1 %{m*} "
+ "%{f*&W*&pedantic*} %{w} %{O*} -o %b.i \n\
+ gpc1 -fpreprocessed %b.i} %{!save-temps:%(cpp_unique_options)} \
+ %(cc1_options)\
+ %{!famtmpfile*:%eInternal GPC problem: internal option `--amtmpfile' not given}\
+ %{!fsyntax-only:%(invoke_as)}}}", 0},
+ {"@Preprocessed-Pascal",
+ "%{!M:%{!MM:%{!E:gpc1 -fpreprocessed %i %(cc1_options)\
+ %{!famtmpfile*:%eInternal GPC problem: internal option `--amtmpfile' not given}\
+ %{!fsyntax-only:%(invoke_as)} }}}", 0},
diff -urN gcc.orig/p/p-version.h gcc/p/p-version.h
--- gcc.orig/p/p-version.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc/p/p-version.h 2006-03-25 02:53:09.000000000 +0100
@@ -0,0 +1,7 @@
+/* Generated automatically by the Makefile.
+ DO NOT CHANGE THIS FILE MANUALLY! */
+
+#define GPC_MAJOR "2"
+#define GPC_MINOR "1"
+#define GPC_VERSION_STRING "20060325"
+#define GPC_RELEASE_STRING GPC_VERSION_STRING

View File

@ -0,0 +1,209 @@
#! /bin/sh -e
# DP: Turn on -fstack-protector by default for C, C++, ObjC, ObjC++.
# DP: Build libgcc using -fno-stack-protector.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/doc/invoke.texi.orig 2007-11-29 11:21:52.863409623 +0000
+++ gcc/doc/invoke.texi 2007-11-29 11:22:35.014045455 +0000
@@ -6553,6 +6553,10 @@
when a function is entered and then checked when the function exits.
If a guard check fails, an error message is printed and the program exits.
+NOTE: In Ubuntu 6.10 and later versions this option is enabled by default
+for C, C++, ObjC, ObjC++, if neither @option{-no-fstack-protector}
+nor @option{-nostdlib} are found.
+
@item -fstack-protector-all
@opindex fstack-protector-all
Like @option{-fstack-protector} except that all functions are protected.
--- gcc/objc/lang-specs.h.orig 2007-11-29 11:21:52.863409623 +0000
+++ gcc/objc/lang-specs.h 2007-11-29 11:22:35.014045455 +0000
@@ -30,13 +30,13 @@
%{traditional|ftraditional|traditional-cpp:\
%eGNU Objective C no longer supports traditional compilation}\
%{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
- cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\
+ cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}}\
%{!save-temps:%{!no-integrated-cpp:\
- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\
+ cc1obj %(cpp_unique_options) %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}}}\
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
{".mi", "@objc-cpp-output", 0, 0, 0},
{"@objc-cpp-output",
- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
+ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
{"@objective-c-header",
"%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\
@@ -45,10 +45,10 @@
%{traditional|ftraditional|traditional-cpp:\
%eGNU Objective C no longer supports traditional compilation}\
%{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
+ cc1obj -fpreprocessed %b.mi %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\
-o %g.s %{!o*:--output-pch=%i.gch}\
%W{o*:--output-pch=%*}%V}\
%{!save-temps:%{!no-integrated-cpp:\
- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
+ cc1obj %(cpp_unique_options) %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\
-o %g.s %{!o*:--output-pch=%i.gch}\
%W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0},
--- gcc/objcp/lang-specs.h.orig 2007-11-29 11:21:52.863409623 +0000
+++ gcc/objcp/lang-specs.h 2007-11-29 11:22:35.014045455 +0000
@@ -36,7 +36,7 @@
%(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
%{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
- %(cc1_options) %2 %{+e1*}\
+ %(cc1_options) %(ssp_default) %2 %{+e1*}\
-o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}",
CPLUSPLUS_CPP_SPEC, 0, 0},
{"@objective-c++",
@@ -46,15 +46,15 @@
%(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
%{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
- %(cc1_options) %2 %{+e1*}\
+ %(cc1_options) %(ssp_default) %2 %{+e1*}\
%{!fsyntax-only:%(invoke_as)}}}}",
CPLUSPLUS_CPP_SPEC, 0, 0},
{".mii", "@objective-c++-cpp-output", 0, 0, 0},
{"@objective-c++-cpp-output",
"%{!M:%{!MM:%{!E:\
- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
+ cc1objplus -fpreprocessed %i %(cc1_options) %(ssp_default) %2 %{+e*}\
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
{"@objc++-cpp-output",
"%{!M:%{!MM:%{!E:\
- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
+ cc1objplus -fpreprocessed %i %(cc1_options) %(ssp_default) %2 %{+e*}\
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
--- gcc/cp/lang-specs.h.orig 2007-11-29 11:21:52.863409623 +0000
+++ gcc/cp/lang-specs.h 2007-11-29 11:22:35.014045455 +0000
@@ -47,7 +47,7 @@
%(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\
cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
%{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
- %(cc1_options) %2 %{+e1*}\
+ %(cc1_options) %(ssp_default) %2 %{+e1*}\
%{!fsyntax-only:-o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}}",
CPLUSPLUS_CPP_SPEC, 0, 0},
{"@c++",
@@ -57,11 +57,11 @@
%(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\
cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
%{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
- %(cc1_options) %2 %{+e1*}\
+ %(cc1_options) %(ssp_default) %2 %{+e1*}\
%{!fsyntax-only:%(invoke_as)}}}}",
CPLUSPLUS_CPP_SPEC, 0, 0},
{".ii", "@c++-cpp-output", 0, 0, 0},
{"@c++-cpp-output",
"%{!M:%{!MM:%{!E:\
- cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
+ cc1plus -fpreprocessed %i %(cc1_options) %(ssp_default) %2 %{+e*}\
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
--- gcc/Makefile.in.orig 2007-11-29 11:21:52.863409623 +0000
+++ gcc/Makefile.in 2007-11-29 11:23:23.254773156 +0000
@@ -559,6 +559,7 @@
LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
$(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
+ -fno-stack-protector \
$(INHIBIT_LIBC_CFLAGS)
# Additional options to use when compiling libgcc2.a.
@@ -572,6 +573,7 @@
CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
-finhibit-size-directive -fno-inline-functions -fno-exceptions \
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
+ -fno-stack-protector \
$(INHIBIT_LIBC_CFLAGS)
# Additional sources to handle exceptions; overridden by targets as needed.
--- gcc/gcc.c.orig 2007-11-29 11:21:52.873409773 +0000
+++ gcc/gcc.c 2007-11-29 11:22:35.024045606 +0000
@@ -701,6 +701,10 @@
#endif
#endif
+#ifndef SSP_DEFAULT_SPEC
+#define SSP_DEFAULT_SPEC "%{!fno-stack-protector:%{!nostdlib:-fstack-protector}}"
+#endif
+
#ifndef LINK_PIE_SPEC
#ifdef HAVE_LD_PIE
#define LINK_PIE_SPEC "%{pie:-pie} "
@@ -754,6 +758,7 @@
static const char *cc1plus_spec = CC1PLUS_SPEC;
static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC;
static const char *link_ssp_spec = LINK_SSP_SPEC;
+static const char *ssp_default_spec = SSP_DEFAULT_SPEC;
static const char *asm_spec = ASM_SPEC;
static const char *asm_final_spec = ASM_FINAL_SPEC;
static const char *link_spec = LINK_SPEC;
@@ -827,6 +832,7 @@
%{--help=*:--help=%(VALUE)}\
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
%{fsyntax-only:-o %j} %{-param*}\
+ %(ssp_default)\
%{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants}\
%{coverage:-fprofile-arcs -ftest-coverage}";
@@ -988,15 +994,15 @@
%{save-temps|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
%(cpp_options) -o %{save-temps:%b.i} %{!save-temps:%g.i} \n\
cc1 -fpreprocessed %{save-temps:%b.i} %{!save-temps:%g.i} \
- %(cc1_options)}\
+ %(cc1_options) %(ssp_default)}\
%{!save-temps:%{!traditional-cpp:%{!no-integrated-cpp:\
- cc1 %(cpp_unique_options) %(cc1_options)}}}\
+ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}}\
%{!fsyntax-only:%(invoke_as)}} \
%{combine:\
%{save-temps|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
%(cpp_options) -o %{save-temps:%b.i} %{!save-temps:%g.i}}\
%{!save-temps:%{!traditional-cpp:%{!no-integrated-cpp:\
- cc1 %(cpp_unique_options) %(cc1_options)}}\
+ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}\
%{!fsyntax-only:%(invoke_as)}}}}}}", 0, 1, 1},
{"-",
"%{!E:%e-E or -x required when input is from standard input}\
@@ -1019,7 +1025,7 @@
%W{o*:--output-pch=%*}%V}}}}}}", 0, 0, 0},
{".i", "@cpp-output", 0, 1, 0},
{"@cpp-output",
- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0},
+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(ssp_default) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0},
{".s", "@assembler", 0, 1, 0},
{"@assembler",
"%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 1, 0},
@@ -1579,6 +1585,7 @@
INIT_STATIC_SPEC ("cc1plus", &cc1plus_spec),
INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec),
INIT_STATIC_SPEC ("link_ssp", &link_ssp_spec),
+ INIT_STATIC_SPEC ("ssp_default", &ssp_default_spec),
INIT_STATIC_SPEC ("endfile", &endfile_spec),
INIT_STATIC_SPEC ("link", &link_spec),
INIT_STATIC_SPEC ("lib", &lib_spec),

View File

@ -0,0 +1,103 @@
#! /bin/sh -e
# DP: Set gettext's domain and textdomain to the versioned package name.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/Makefile.in.orig 2005-09-04 23:32:54.003440040 +0000
+++ gcc/Makefile.in 2005-09-04 23:40:10.954013456 +0000
@@ -4565,8 +4565,8 @@
dir=$(localedir)/$$lang/LC_MESSAGES; \
echo $(mkinstalldirs) $(DESTDIR)$$dir; \
$(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
- echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
- $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
+ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-4.3.mo; \
+ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-4.3.mo; \
done
# Rule for regenerating the message template (gcc.pot).
--- gcc/intl.c.orig 2005-09-04 23:32:54.006439584 +0000
+++ gcc/intl.c 2005-09-04 23:36:37.933397512 +0000
@@ -51,8 +51,8 @@
setlocale (LC_ALL, "");
#endif
- (void) bindtextdomain ("gcc", LOCALEDIR);
- (void) textdomain ("gcc");
+ (void) bindtextdomain ("gcc-4.3", LOCALEDIR);
+ (void) textdomain ("gcc-4.3");
/* Opening quotation mark. */
open_quote = _("`");
--- libcpp/Makefile.in.orig 2005-09-04 23:32:54.009439128 +0000
+++ libcpp/Makefile.in 2005-09-04 23:33:24.607787472 +0000
@@ -47,6 +47,7 @@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
PACKAGE = @PACKAGE@
+PACKAGE_SUFFIX = -4.3
RANLIB = @RANLIB@
SHELL = @SHELL@
USED_CATALOGS = @USED_CATALOGS@
@@ -66,6 +67,7 @@
INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
-I$(srcdir)/include
+CPPFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\"
ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
@@ -156,8 +158,8 @@
else continue; \
fi; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
- echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
- $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
+ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \
+ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \
done
mostlyclean:
--- libcpp/system.h.orig 2005-09-04 23:32:54.006439584 +0000
+++ libcpp/system.h 2005-09-04 23:33:24.606787624 +0000
@@ -260,7 +260,7 @@
#endif
#ifndef _
-# define _(msgid) dgettext (PACKAGE, msgid)
+# define _(msgid) dgettext (PACKAGE PACKAGE_SUFFIX, msgid)
#endif
#ifndef N_
--- libcpp/init.c.orig 2005-09-04 23:32:54.008439280 +0000
+++ libcpp/init.c 2005-09-04 23:33:24.607787472 +0000
@@ -122,7 +122,7 @@
init_trigraph_map ();
#ifdef ENABLE_NLS
- (void) bindtextdomain (PACKAGE, LOCALEDIR);
+ (void) bindtextdomain (PACKAGE PACKAGE_SUFFIX, LOCALEDIR);
#endif
}
}

View File

@ -0,0 +1,87 @@
#! /bin/sh -e
# gdc-fix-build-kfreebsd.dpatch by Arthur Loiret <arthur.loiret@gmail.com>
# DP: Fix gdc build on k*bsd*-gnu, update configure and target-ver-syms.sh
# DP: to build k*bsd*-gnu architectures as a freebsd
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/d/phobos/configure 2007-09-03 01:23:59.000000000 +0200
+++ gcc/d/phobos/configure 2007-09-03 01:27:18.000000000 +0200
@@ -4599,7 +4599,7 @@
case "$target_os" in
darwin6*) DCFG_LONG_DOUBLE_FUNCS=config/noldfuncs ;;
darwin*) DCFG_LONG_DOUBLE_FUNCS=config/ldfuncs-darwin ;;
- linux*)
+ linux*|k*bsd*-gnu)
case "$target_cpu" in
powerpc*)
DCFG_LONG_DOUBLE_FUNCS=config/ldfuncs-ppclinux
@@ -5687,7 +5687,7 @@
case "$d_target_os" in
# use fpmath on Linux
- linux*) d_have_fpsb=''
+ linux*|k*bsd*-gnu) d_have_fpsb=''
;;
esac
@@ -7014,7 +7014,7 @@
rm -f conftest.d conftest.$ac_objext
case "$d_target_os" in
- aix*|*bsd*|cygwin*|darwin*|linux*|skyos*|solaris*|sysv*) d_have_unix=1 ;;
+ aix*|*bsd*|cygwin*|darwin*|linux*|k*bsd*-gnu|skyos*|solaris*|sysv*) d_have_unix=1 ;;
esac
DCFG_CBRIDGE_STDIO=
@@ -7027,7 +7027,7 @@
d_sem_impl="mach"
d_have_loader=1
;;
- freebsd*)
+ freebsd*|k*bsd*-gnu)
d_have_loader=1
D_EXTRA_OBJS="$D_EXTRA_OBJS gcc/cbridge_stdio.o"
DCFG_CBRIDGE_STDIO=GNU_CBridge_Stdio
@@ -9046,7 +9046,7 @@
d_gc_stack=GC_Use_Stack_Fixed
d_gc_data="$d_gc_data GC_Use_Data_Dyld"
;;
- freebsd*) D_GC_MODULES="$D_GC_MODULES internal/gc/gc_freebsd.o"
+ freebsd*|k*bsd*-gnu) D_GC_MODULES="$D_GC_MODULES internal/gc/gc_freebsd.o"
d_gc_stack=GC_Use_Stack_FreeBSD
d_gc_data="$d_gc_data GC_Use_Data_Fixed"
;;
--- gcc/d/target-ver-syms.sh 2007-09-03 02:14:56.000000000 +0200
+++ gcc/d/target-ver-syms.sh 2007-09-03 02:52:43.000000000 +0200
@@ -30,6 +30,7 @@
darwin*) d_os_versym=darwin ; d_unix=1 ;;
elf*) ;;
freebsd*) d_os_versym=freebsd ; d_unix=1 ;;
+k*bsd*-gnu) d_os_versym=freebsd ; d_unix=1;;
linux*) d_os_versym=linux ; d_unix=1 ;;
mingw32*) d_os_versym=Win32; d_windows=1 ;;
pe*) case "$target" in

View File

@ -0,0 +1,28 @@
#! /bin/sh -e
# DP: GPC updates for GCC 4.1.2
dir=gcc/
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3/gcc"
dir="$3/gcc/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
Not yet available for GCC-4.3

View File

@ -0,0 +1,32 @@
#! /bin/sh -e
# DP: The gpc patch from the gpc tarball.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
#pdir="-d $3/gcc"
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
gpc_gcc_patch=$pdir/p/diffs/gcc-4.1.diff
gpc_gcc_patch=debian/patches/gpc-gcc-4.1.diff
case "$1" in
-patch)
echo Using patch file ${gpc_gcc_patch}
patch $pdir -f -p0 < ${gpc_gcc_patch}
;;
-unpatch)
# get the patch from the gpc source
echo Using patch file ${gpc_gcc_patch}
patch $pdir -f -R -p0 < ${gpc_gcc_patch}
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0

View File

@ -0,0 +1,117 @@
#! /bin/sh -e
# DP: versioned gpc names
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
-unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/p/doc/en/gpc.texi.orig 2007-08-27 00:21:02.340767891 +0200
+++ gcc/p/doc/en/gpc.texi 2007-08-27 00:21:29.921183935 +0200
@@ -23,11 +23,11 @@
@dircategory GNU programming tools
@direntry
-* GPC: (gpc). The GNU Pascal Compiler.
+* GPC-4.1: (gpc-4.1). The GNU Pascal Compiler (v2.1, based on GCC 4.1).
@end direntry
@dircategory Individual utilities
@direntry
-* GPC: (gpc)Invoking GPC. The GNU Pascal Compiler.
+* GPC-4.1: (gpc-4.1)Invoking GPC. The GNU Pascal Compiler (v2.1, based on GCC 4.1).
@end direntry
@c For FSF printing, turn on finalout (to get rid of the black
--- gcc/p/Make-lang.in.orig 2007-08-27 00:21:02.340767891 +0200
+++ gcc/p/Make-lang.in 2007-08-27 00:23:19.412835592 +0200
@@ -799,42 +799,43 @@
pascal.start.encap:
pascal.rest.encap: pascal.rts pascal.utils
-pascal.info: $(srcdir)/p/doc/info/gpc.info \
- $(srcdir)/p/doc/info/gpcs.info \
- $(srcdir)/p/doc/info/gpcs-de.info \
- $(srcdir)/p/doc/info/gpc-hr.info \
- $(srcdir)/p/doc/info/gpcs-hr.info \
- $(srcdir)/p/doc/info/gpc-es.info \
- $(srcdir)/p/doc/info/gpcs-es.info
+iv=-4.1
+pascal.info: $(srcdir)/p/doc/info/gpc$(iv).info \
+ $(srcdir)/p/doc/info/gpcs$(iv).info \
+ $(srcdir)/p/doc/info/gpcs-de$(iv).info \
+ $(srcdir)/p/doc/info/gpc-hr$(iv).info \
+ $(srcdir)/p/doc/info/gpcs-hr$(iv).info \
+ $(srcdir)/p/doc/info/gpc-es$(iv).info \
+ $(srcdir)/p/doc/info/gpcs-es$(iv).info
pascal.dvi: gpc.dvi
-$(srcdir)/p/doc/info/gpc.info: $(GPC_TEXI_EN)
+$(srcdir)/p/doc/info/gpc$(iv).info: $(GPC_TEXI_EN)
[ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
- $(MAKEINFO_EN) -o $(srcdir)/p/doc/info/gpc.info gpc.texi
+ $(MAKEINFO_EN) -o $(srcdir)/p/doc/info/gpc$(iv).info gpc.texi
-$(srcdir)/p/doc/info/gpcs.info: $(GPC_TEXI_EN)
+$(srcdir)/p/doc/info/gpcs$(iv).info: $(GPC_TEXI_EN)
[ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
- $(MAKEINFO_EN) --no-split -o $(srcdir)/p/doc/info/gpcs.info gpcs.texi
+ $(MAKEINFO_EN) --no-split -o $(srcdir)/p/doc/info/gpcs$(iv).info gpcs.texi
-$(srcdir)/p/doc/info/gpcs-de.info: $(GPC_TEXI_DE)
+$(srcdir)/p/doc/info/gpcs-de$(iv).info: $(GPC_TEXI_DE)
[ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
- $(MAKEINFO_DE) --no-split -o $(srcdir)/p/doc/info/gpcs-de.info gpcs.texi
+ $(MAKEINFO_DE) --no-split -o $(srcdir)/p/doc/info/gpcs-de$(iv).info gpcs.texi
-$(srcdir)/p/doc/info/gpc-hr.info: $(GPC_TEXI_HR)
+$(srcdir)/p/doc/info/gpc-hr$(iv).info: $(GPC_TEXI_HR)
[ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
- $(MAKEINFO_HR) -o $(srcdir)/p/doc/info/gpc-hr.info gpc.texi
+ $(MAKEINFO_HR) -o $(srcdir)/p/doc/info/gpc-hr$(iv).info gpc.texi
-$(srcdir)/p/doc/info/gpcs-hr.info: $(GPC_TEXI_HR)
+$(srcdir)/p/doc/info/gpcs-hr$(iv).info: $(GPC_TEXI_HR)
[ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
- $(MAKEINFO_HR) --no-split -o $(srcdir)/p/doc/info/gpcs-hr.info gpcs.texi
+ $(MAKEINFO_HR) --no-split -o $(srcdir)/p/doc/info/gpcs-hr$(iv).info gpcs.texi
-$(srcdir)/p/doc/info/gpc-es.info: $(GPC_TEXI_ES)
+$(srcdir)/p/doc/info/gpc-es$(iv).info: $(GPC_TEXI_ES)
[ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
- $(MAKEINFO_ES) -o $(srcdir)/p/doc/info/gpc-es.info gpc.texi
+ $(MAKEINFO_ES) -o $(srcdir)/p/doc/info/gpc-es$(iv).info gpc.texi
-$(srcdir)/p/doc/info/gpcs-es.info: $(GPC_TEXI_ES)
+$(srcdir)/p/doc/info/gpcs-es$(iv).info: $(GPC_TEXI_ES)
[ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
- $(MAKEINFO_ES) --no-split -o $(srcdir)/p/doc/info/gpcs-es.info gpcs.texi
+ $(MAKEINFO_ES) --no-split -o $(srcdir)/p/doc/info/gpcs-es$(iv).info gpcs.texi
gpc.dvi: $(GPC_TEXI_EN)
TEXINPUTS=$(srcdir)/p/doc:$(srcdir)/p/doc/images:$$TEXINPUTS \
@@ -1023,11 +1024,11 @@
fi
pascal.install-info: pascal.install-info-man-dirs pascal.info
- rm -f $(DESTDIR)$(infodir)/gpc.info* $(DESTDIR)$(infodir)/gpcs.info* $(DESTDIR)$(infodir)/gpcs-de.info* $(DESTDIR)$(infodir)/gpcs-hr.info* $(DESTDIR)$(infodir)/gpcs-es.info*
- for f in `cd $(srcdir)/p/doc/info && echo gpc.info* gpcs*.info*`; do \
+ rm -f $(DESTDIR)$(infodir)/gpc*.info* $(DESTDIR)$(infodir)/gpcs*.info* $(DESTDIR)$(infodir)/gpcs-de*.info* $(DESTDIR)$(infodir)/gpcs-hr*.info* $(DESTDIR)$(infodir)/gpcs-es*.info*
+ for f in `cd $(srcdir)/p/doc/info && echo gpc$(iv).info* gpcs*.info*`; do \
$(INSTALL_DATA) $(srcdir)/p/doc/info/$$f $(DESTDIR)$(infodir)/$$f || exit 1; \
done
- chmod a-x $(DESTDIR)$(infodir)/gpc.info* $(DESTDIR)$(infodir)/gpcs.info* $(DESTDIR)$(infodir)/gpcs-de.info* $(DESTDIR)$(infodir)/gpcs-hr.info* $(DESTDIR)$(infodir)/gpcs-es.info*
+ chmod a-x $(DESTDIR)$(infodir)/gpc*.info* $(DESTDIR)$(infodir)/gpcs*.info* $(DESTDIR)$(infodir)/gpcs-de*.info* $(DESTDIR)$(infodir)/gpcs-hr*.info* $(DESTDIR)$(infodir)/gpcs-es*.info*
pascal.install-man: pascal.install-info-man-dirs $(srcdir)/p/doc/en/gpc.1 $(srcdir)/p/doc/generated/gpc-run.1
-if [ -f gpc1$(exeext) ]; then \

View File

@ -0,0 +1,72 @@
#! /bin/sh -e
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
# DP: Traditional GNU systems don't have a /usr directory. However, Debian
# DP: systems do, and we support both having a /usr -> . symlink, and having a
# DP: /usr directory like the other ports. So this patch should NOT go
# DP: upstream.
# DP:
# DP: Define MAXPATHLEN and PATH_MAX.
--- gcc/config/gnu.h.orig 2004-07-05 21:49:20.000000000 +0200
+++ gcc/config/gnu.h 2006-12-10 12:28:45.000000000 +0100
@@ -6,7 +6,8 @@
/* Standard include directory. In GNU, "/usr" is a four-letter word. */
#undef STANDARD_INCLUDE_DIR
-#define STANDARD_INCLUDE_DIR "/include"
+/* Overriden for Debian GNU/Hurd. */
+#define STANDARD_INCLUDE_DIR "/usr/include"
/* The system headers under GNU are C++-aware. */
#define NO_IMPLICIT_EXTERN_C
--- gcc/config/t-gnu.orig 2004-01-10 07:40:24.000000000 +0100
+++ gcc/config/t-gnu 2006-12-10 12:28:45.000000000 +0100
@@ -1,2 +1,2 @@
# In GNU, "/usr" is a four-letter word.
-NATIVE_SYSTEM_HEADER_DIR = /include
+NATIVE_SYSTEM_HEADER_DIR = /usr/include
--- gcc/tlink.c.orig 2005-06-25 04:02:01.000000000 +0200
+++ gcc/tlink.c 2006-12-10 12:28:45.000000000 +0100
@@ -34,6 +34,10 @@
#define MAX_ITERATIONS 17
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
/* Defined in the automatically-generated underscore.c. */
extern int prepends_underscore;
--- boehm-gc/dyn_load.c.orig 2007-08-13 09:10:48.215678000 +0200
+++ boehm-gc/dyn_load.c 2007-08-13 09:11:09.743969000 +0200
@@ -26,7 +26,7 @@
* None of this is safe with dlclose and incremental collection.
* But then not much of anything is safe in the presence of dlclose.
*/
-#if (defined(__linux__) || defined(__GLIBC__)) && !defined(_GNU_SOURCE)
+#if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)) && !defined(_GNU_SOURCE)
/* Can't test LINUX, since this must be define before other includes */
# define _GNU_SOURCE
#endif

View File

@ -0,0 +1,38 @@
#! /bin/sh -e
# DP: Ignore the bootstrap comparision failure
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/Makefile.in~ 2004-02-06 08:03:12.000000000 +0100
+++ gcc/Makefile.in 2004-02-14 10:27:19.000000000 +0100
@@ -3567,7 +3567,9 @@
if [ -f .bad_compare ]; then \
echo "Bootstrap comparison failure!"; \
cat .bad_compare; \
- exit 1; \
+ echo ""; \
+ echo "Ignore the comparision failure!"; \
+ true; \
else \
case "$@" in \
*-lean ) rm -rf stage$$stage ;; \

View File

@ -0,0 +1,231 @@
#! /bin/sh -e
# Description: Ada support for GNU/k*BSD
# Author: Aurelien Jarno <aurel32@debian.Org>
# Status: submitted.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
# append the patch here and adjust the -p? flag in the patch calls.
--- src/gcc/ada/Makefile.in.orig 2008-02-09 13:03:14 +0100
+++ src/gcc/ada/Makefile.in 2008-02-09 13:03:33 +0100
@@ -866,6 +866,8 @@
s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
s-osprim.adb<s-osprim-posix.adb \
s-taprop.adb<s-taprop-linux.adb \
+ s-tasinf.ads<s-tasinf-linux.ads \
+ s-tasinf.adb<s-tasinf-linux.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
system.ads<system-freebsd-x86.ads
--- src/gcc/ada/s-osinte-kfreebsd-gnu.ads.orig 2008-02-09 12:18:43 +0100
+++ src/gcc/ada/s-osinte-kfreebsd-gnu.ads 2008-02-09 13:00:36 +0100
@@ -223,7 +223,8 @@
function sysconf (name : int) return long;
pragma Import (C, sysconf);
- SC_CLK_TCK : constant := 2;
+ SC_CLK_TCK : constant := 2;
+ SC_NPROCESSORS_ONLN : constant := 84;
-------------------------
-- Priority Scheduling --
@@ -235,7 +236,7 @@
function To_Target_Priority
(Prio : System.Any_Priority) return Interfaces.C.int;
- -- Maps System.Any_Priority to a POSIX priority.
+ -- Maps System.Any_Priority to a POSIX priority
-------------
-- Process --
@@ -255,6 +256,7 @@
type Thread_Body is access
function (arg : System.Address) return System.Address;
+ pragma Convention (C, Thread_Body);
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
@@ -438,12 +440,31 @@
pragma Import (C, pthread_getspecific, "pthread_getspecific");
type destructor_pointer is access procedure (arg : System.Address);
+ pragma Convention (C, destructor_pointer);
function pthread_key_create
(key : access pthread_key_t;
destructor : destructor_pointer) return int;
pragma Import (C, pthread_key_create, "pthread_key_create");
+ CPU_SETSIZE : constant := 1_024;
+
+ type bit_field is array (1 .. CPU_SETSIZE) of Boolean;
+ for bit_field'Size use CPU_SETSIZE;
+ pragma Pack (bit_field);
+ pragma Convention (C, bit_field);
+
+ type cpu_set_t is record
+ bits : bit_field;
+ end record;
+ pragma Convention (C, cpu_set_t);
+
+ function pthread_setaffinity_np
+ (thread : pthread_t;
+ cpusetsize : size_t;
+ cpuset : access cpu_set_t) return int;
+ pragma Import (C, pthread_setaffinity_np, "__gnat_pthread_setaffinity_np");
+
private
type sigset_t is array (1 .. 4) of unsigned;
--- src/gcc/ada/adaint.c 2008-02-10 03:14:20 +0100
+++ src/gcc/ada/adaint.c 2008-02-09 18:22:02 +0100
@@ -888,7 +888,7 @@
strcpy (path, "GNAT-XXXXXX");
#if (defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) \
- || defined (linux)) && !defined (__vxworks)
+ || defined (linux) || defined(__GLIBC__)) && !defined (__vxworks)
return mkstemp (path);
#elif defined (__Lynx__)
mktemp (path);
@@ -981,7 +981,7 @@
}
#elif defined (linux) || defined (__FreeBSD__) || defined (__NetBSD__) \
- || defined (__OpenBSD__)
+ || defined (__OpenBSD__) || defined(__GLIBC__)
#define MAX_SAFE_PATH 1000
char *tmpdir = getenv ("TMPDIR");
@@ -3001,7 +3001,7 @@
}
#endif
-#if defined (linux)
+#if defined (linux) || defined(__GLIBC__)
/* pthread affinity support */
#ifdef CPU_SETSIZE
--- src/gcc/ada/socket.c 2007-10-19 15:14:33 +0200
+++ src/gcc/ada/socket.c 2008-02-09 18:23:40 +0100
@@ -206,7 +206,7 @@
struct hostent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
#else
rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
@@ -223,7 +223,7 @@
struct hostent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) gethostbyaddr_r (addr, len, type, ret, buf, buflen, &rh, h_errnop);
#else
rh = gethostbyaddr_r (addr, len, type, ret, buf, buflen, h_errnop);
@@ -239,7 +239,7 @@
struct servent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) getservbyname_r (name, proto, ret, buf, buflen, &rh);
#else
rh = getservbyname_r (name, proto, ret, buf, buflen);
@@ -255,7 +255,7 @@
struct servent *rh;
int ri;
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
(void) getservbyport_r (port, proto, ret, buf, buflen, &rh);
#else
rh = getservbyport_r (port, proto, ret, buf, buflen);
--- src/gcc/ada/gsocket.h.orig 2008-02-10 11:50:18 +0100
+++ src/gcc/ada/gsocket.h 2008-02-10 11:50:38 +0100
@@ -167,7 +167,7 @@
#if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || defined (__osf__) || defined (_WIN32) || defined (__APPLE__)
# define HAVE_THREAD_SAFE_GETxxxBYyyy 1
-#elif defined (sgi) || defined (linux) || (defined (sun) && defined (__SVR4) && !defined (__vxworks))
+#elif defined (sgi) || defined (linux) || defined (__GLIBC__) || (defined (sun) && defined (__SVR4) && !defined (__vxworks))
# define HAVE_GETxxxBYyyy_R 1
#endif
--- src/gcc/ada/sysdep.c.orig 2008-02-10 11:55:28 +0100
+++ src/gcc/ada/sysdep.c 2008-02-10 11:58:15 +0100
@@ -342,7 +342,8 @@
|| (defined (__osf__) && ! defined (__alpha_vxworks)) || defined (WINNT) \
|| defined (__MACHTEN__) || defined (__hpux__) || defined (_AIX) \
|| (defined (__svr4__) && defined (i386)) || defined (__Lynx__) \
- || defined (__CYGWIN__) || defined (__FreeBSD__) || defined (__OpenBSD__)
+ || defined (__CYGWIN__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
+ || defined (__GLIBC__)
#ifdef __MINGW32__
#if OLD_MINGW
@@ -399,7 +400,8 @@
|| (defined (__osf__) && ! defined (__alpha_vxworks)) \
|| defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \
|| defined (_AIX) || (defined (__svr4__) && defined (i386)) \
- || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__)
+ || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
+ || defined (__GLIBC__)
char c;
int nread;
int good_one = 0;
@@ -418,7 +420,8 @@
#if defined(linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
|| defined (__osf__) || defined (__MACHTEN__) || defined (__hpux__) \
|| defined (_AIX) || (defined (__svr4__) && defined (i386)) \
- || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__)
+ || defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
+ || defined (__GLIBC__)
eof_ch = termios_rec.c_cc[VEOF];
/* If waiting (i.e. Get_Immediate (Char)), set MIN = 1 and wait for
@@ -845,7 +848,7 @@
/* Darwin, Free BSD, Linux, Tru64, where there exists a component tm_gmtoff
in struct tm */
#elif defined (__APPLE__) || defined (__FreeBSD__) || defined (linux) ||\
- (defined (__alpha__) && defined (__osf__))
+ (defined (__alpha__) && defined (__osf__)) || defined (__GLIBC__)
*off = tp->tm_gmtoff;
/* All other platforms: Treat all time values in GMT */
--- src/gcc/ada/link.c.orig 2008-02-10 11:59:07 +0100
+++ src/gcc/ada/link.c 2008-02-10 11:59:14 +0100
@@ -153,7 +153,7 @@
unsigned char __gnat_using_gnu_linker = 1;
const char *__gnat_object_library_extension = ".a";
-#elif defined (linux)
+#elif defined (linux) || defined(__GLIBC__)
const char *__gnat_object_file_option = "";
const char *__gnat_run_path_option = "";
char __gnat_shared_libgnat_default = SHARED;

View File

@ -0,0 +1,99 @@
#! /bin/sh -e
# DP: GNU/k*BSD support
# Author: Robert Millan <rmh@aybabtu.com>
# Status: Not yet submitted
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
# append the patch here and adjust the -p? flag in the patch calls.
diff -Nurd gcc-4.2.orig/gcc/config/i386/kfreebsd-gnu.h gcc-4.2/gcc/config/i386/kfreebsd-gnu.h
--- gcc-4.2.orig/gcc/config/i386/kfreebsd-gnu.h 2006-01-18 22:46:30.000000000 +0100
+++ gcc-4.2/gcc/config/i386/kfreebsd-gnu.h 2007-05-23 05:34:47.000000000 +0200
@@ -20,7 +20,29 @@
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#ifdef GLIBC_DYNAMIC_LINKER32
+#undef GLIBC_DYNAMIC_LINKER32
+#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+#endif
+
+#ifdef GLIBC_DYNAMIC_LINKER64
+#undef GLIBC_DYNAMIC_LINKER64
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-kfreebsd-x86-64.so.1"
+#endif
+
#undef LINK_EMULATION
#define LINK_EMULATION "elf_i386_fbsd"
+
+#ifdef LINK_EMULATION32
+#undef LINK_EMULATION32
+#define LINK_EMULATION32 LINK_EMULATION
+#endif
+
+#ifdef LINK_EMULATION64
+#undef LINK_EMULATION64
+#define LINK_EMULATION64 "elf_x86_64_fbsd"
+#endif
+
#undef REG_NAME
#define REG_NAME(reg) sc_ ## reg
+
diff -Nurd gcc-4.2.orig/gcc/config/i386/linux64.h gcc-4.2/gcc/config/i386/linux64.h
--- gcc-4.2.orig/gcc/config/i386/linux64.h 2007-05-22 22:25:11.000000000 +0200
+++ gcc-4.2/gcc/config/i386/linux64.h 2007-05-23 05:39:11.000000000 +0200
@@ -53,8 +53,11 @@
When the -shared link option is used a final link is not being
done. */
+/* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+#define LINK_EMULATION32 "elf_i386"
+#define LINK_EMULATION64 "elf_x86_64"
#if TARGET_64BIT_DEFAULT
#define SPEC_32 "m32"
@@ -65,7 +68,7 @@
#endif
#undef LINK_SPEC
-#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=both \
+#define LINK_SPEC "%{" SPEC_64 ":-m " LINK_EMULATION64 "} %{" SPEC_32 ":-m " LINK_EMULATION32 "} --hash-style=both \
%{shared:-shared} \
%{!shared: \
%{!static: \
diff -Nurd gcc-4.2.orig/gcc/config.gcc gcc-4.2/gcc/config.gcc
--- gcc-4.2.orig/gcc/config.gcc 2007-02-03 10:03:58.000000000 +0100
+++ gcc-4.2/gcc/config.gcc 2007-05-23 05:37:10.000000000 +0200
@@ -1102,7 +1102,7 @@
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h \
i386/x86-64.h i386/linux64.h"
case ${target} in
- x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h" ;;
+ x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;;
esac
tmake_file="${tmake_file} i386/t-linux64 i386/t-crtfm t-dfprules"

View File

@ -0,0 +1,45 @@
#! /bin/sh -e
# DP: Add --enable-libffi option to toplevel configure script
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
cd ${dir} && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- configure.ac.orig 2007-08-27 13:42:57.000000000 +0200
+++ configure.ac 2007-09-01 15:57:19.664811738 +0200
@@ -347,6 +347,16 @@
ENABLE_LIBSSP=$enableval,
ENABLE_LIBSSP=yes)
+AC_ARG_ENABLE(libffi,
+[ --enable-libffi build libffi directory],
+ENABLE_LIBFFI=$enableval,
+ENABLE_LIBFFI=yes)
+if test "${ENABLE_LIBFFI}" != "yes" ; then
+ noconfigdirs="$noconfigdirs target-libffi"
+else
+ libgcj="`echo $libgcj | sed 's/target-libffi *//'`"
+fi
+
# Save it here so that, even in case of --enable-libgcj, if the Java
# front-end isn't enabled, we still get libgcj disabled.
libgcj_saved=$libgcj

View File

@ -0,0 +1,38 @@
#! /bin/sh -e
# DP: Adjust libjava extra_ldflags for armel.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
cd ${dir}libjava && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
rm -f ${dir}libjava/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- libjava/configure.ac~ 2008-01-14 15:45:26.698717101 +0100
+++ libjava/configure.ac 2008-01-14 15:47:37.460689616 +0100
@@ -807,7 +807,7 @@
# Some of the ARM unwinder code is actually in libstdc++. We
# could in principle replicate it in libgcj, but it's better to
# have a dependency on libstdc++.
- extra_ldflags='-L$(here)/../libstdc++-v3/src/.libs -lstdc++'
+ extra_ldflags='-L$(here)/../libstdc++-v3/src -L$(here)/../libstdc++-v3/src/.libs -lstdc++'
LIBSTDCXXSPEC=-lstdc++
LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -L`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -rpath `${PWDCMD-pwd}`/.libs:`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -lstdc++"
;;

View File

@ -0,0 +1,43 @@
#! /bin/sh -e
# DP: Fix java debuginfo breakage.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2008-03-06 Andrew Haley <aph@littlepinkcloud.com>
* jcf-parse.c (give_name_to_class): Call find_sourcefile fo find full
pathname of source file.
Index: jcf-parse.c
===================================================================
--- gcc/java/jcf-parse.c (revision 131324)
+++ gcc/java/jcf-parse.c (working copy)
@@ -1208,7 +1208,7 @@
#ifdef USE_MAPPED_LOCATION
{
tree source_name = identifier_subst (class_name, "", '.', '/', ".java");
- const char *sfname = IDENTIFIER_POINTER (source_name);
+ const char *sfname = find_sourcefile (IDENTIFIER_POINTER (source_name));
linemap_add (line_table, LC_ENTER, false, sfname, 0);
input_location = linemap_line_start (line_table, 0, 1);
file_start_location = input_location;

View File

@ -0,0 +1,45 @@
#! /bin/sh -e
# DP: Disable building the static libjava.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- Makefile.in~ 2007-03-26 10:44:16.881179540 +0200
+++ Makefile.in 2007-03-26 10:48:27.564961048 +0200
@@ -43901,7 +43901,7 @@
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} --disable-static $${srcdiroption} \
|| exit 1
@endif target-libjava
@@ -44783,7 +44783,7 @@
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} --disable-static $${srcdiroption} \
|| exit 1
@endif target-boehm-gc

View File

@ -0,0 +1,227 @@
#! /bin/sh -e
# DP: gjar: support @ arguments.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
uudecode $0
tar -xv -f jar-main-classes.tar.bz2 -C ${dir}libjava
rm -f jar-main-classes.tar.bz2*
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
From: Christian Thalinger <twisti@complang.tuwien.ac.at>
While building OpenJDK b16 I noticed that jar does not support @
arguments. OpenJDK e.g. uses it to import the binary plug files.
This patch adds support for @filelist, where the file filelist may only
contain files and not options, as the spec says.
Index: libjava/classpath/tools/gnu/classpath/tools/jar/Main.java
===================================================================
RCS file: /cvsroot/classpath/classpath/tools/gnu/classpath/tools/jar/Main.java,v
retrieving revision 1.9
diff -u -3 -p -r1.9 Main.java
--- libjava/classpath/tools/gnu/classpath/tools/jar/Main.java 31 Jan 2007 17:05:34 -0000 1.9
+++ libjava/classpath/tools/gnu/classpath/tools/jar/Main.java 23 Jul 2007 18:31:19 -0000
@@ -47,6 +47,8 @@ import gnu.classpath.tools.getopt.Parser
import java.io.BufferedReader;
import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.text.MessageFormat;
@@ -102,14 +104,51 @@ public class Main
public void notifyFile(String fileArgument)
{
Entry entry;
+
+ if (fileArgument.charAt(0) == '@')
+ {
+ BufferedReader br = null;
+ String filename;
+
+ try
+ {
+ br =
+ new BufferedReader(new FileReader(fileArgument.substring(1)));
+ }
+ catch (FileNotFoundException fnfe)
+ {
+ System.err.println(fnfe);
+ System.exit(1);
+ }
+
+ try
+ {
+ while ((filename = br.readLine()) != null)
+ addEntry(filename);
+ }
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
+ }
+ else
+ {
+ addEntry(fileArgument);
+ }
+ }
+
+ private final void addEntry(String filename)
+ {
+ Entry entry;
+
if (changedDirectory != null)
{
- entry = new Entry(new File(changedDirectory, fileArgument),
- fileArgument);
+ entry = new Entry(new File(changedDirectory, filename),
+ filename);
changedDirectory = null;
}
else
- entry = new Entry(new File(fileArgument));
+ entry = new Entry(new File(filename));
entries.add(entry);
}
}
begin-base64 644 jar-main-classes.tar.bz2
QlpoOTFBWSZTWW4Pr8QAFqP/////////////////////////////////////
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
====

View File

@ -0,0 +1,94 @@
#! /bin/sh -e
# DP: - Add /usr/lib/jni to java.library.path.
# DP: - When running the i386 binaries on amd64, look in
# DP: - /usr/lib32/gcj-x.y and /usr/lib32/jni instead.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- libjava/gnu/classpath/natSystemProperties.cc~ 2006-08-02 00:53:40.000000000 +0200
+++ libjava/gnu/classpath/natSystemProperties.cc 2006-08-19 00:41:50.063803000 +0200
@@ -141,6 +141,34 @@
return retval;
}
+static char*
+AppendJniLibdir (char *path, struct utsname *u)
+{
+ char* retval;
+ const char* jnilibdir = "/usr/lib/jni";
+
+#if defined(__linux__) && defined (__i386__)
+ if (! strcmp ("x86_64", u->machine))
+ jnilibdir = "/usr/lib32/jni";
+#endif
+
+ if (path)
+ {
+ jsize total = strlen (path)
+ + (sizeof (PATH_SEPARATOR) - 1) + strlen (jnilibdir) + 1;
+ retval = (char*) _Jv_Malloc (total);
+ strcpy (retval, path);
+ strcat (retval, PATH_SEPARATOR);
+ strcat (retval, jnilibdir);
+ }
+ else
+ {
+ retval = (char*) _Jv_Malloc (strlen (jnilibdir) + 1);
+ strcpy (retval, jnilibdir);
+ }
+ return retval;
+}
+
void
gnu::classpath::SystemProperties::insertSystemProperties (java::util::Properties *newprops)
{
@@ -370,8 +398,13 @@
// Prepend GCJ_VERSIONED_LIBDIR to the module load path so that
// libgcj will find its own JNI libraries, like libgtkpeer.so.
char* val = PrependVersionedLibdir (path);
- _Jv_SetDLLSearchPath (val);
+
+ // Append jnilibdir
+ char* val2 = AppendJniLibdir (val, &u);
+
+ _Jv_SetDLLSearchPath (val2);
_Jv_Free (val);
+ _Jv_Free (val2);
}
else
{
@@ -379,9 +412,12 @@
#ifdef USE_LTDL
char *libpath = getenv (LTDL_SHLIBPATH_VAR);
char* val = _Jv_PrependVersionedLibdir (libpath);
- SET ("java.library.path", val);
- _Jv_SetDLLSearchPath (val);
+ // Append jnilibdir
+ char* val2 = AppendJniLibdir (val, &u);
+ SET ("java.library.path", val2);
+ _Jv_SetDLLSearchPath (val2);
_Jv_Free (val);
+ _Jv_Free (val2);
#else
SET ("java.library.path", "");
#endif

View File

@ -0,0 +1,431 @@
#! /bin/sh -e
# DP: Reimplement loading constraints (taken from the trunk).
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
uudecode $0
tar -xv -f class-loader-classes.tar.bz2 -C ${dir}libjava
rm -f class-loader-classes.tar.bz2*
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2008-03-13 Tom Tromey <tromey@redhat.com>
* java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader):
Check loading constraints.
(_Jv_CheckOrCreateLoadingConstraint): New function.
* java/lang/ClassLoader.java (loadingConstraints): New field.
* link.cc (_Jv_Linker::find_field): Use
_Jv_CheckOrCreateLoadingConstraint.
(_Jv_Linker::check_loading_constraints): New function.
(_Jv_Linker::resolve_method_entry): Use
check_loading_constraints.
(_Jv_Linker::append_partial_itable): Likewise.
(_Jv_Linker::layout_vtable_methods): Likewise.
* include/jvm.h (_Jv_Linker::check_loading_constraints): Declare.
(_Jv_CheckOrCreateLoadingConstraint): Declare.
--- libjava/include/jvm.h.orig 2008-03-21 22:09:54.249100837 +0100
+++ libjava/include/jvm.h 2008-03-21 22:10:20.739500439 +0100
@@ -1,6 +1,6 @@
// jvm.h - Header file for private implementation information. -*- c++ -*-
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation
This file is part of libgcj.
@@ -265,6 +265,7 @@
jclass, jclass *);
static _Jv_Field *find_field(jclass, jclass, jclass *, _Jv_Utf8Const *,
_Jv_Utf8Const *);
+ static void check_loading_constraints (_Jv_Method *, jclass, jclass);
static void prepare_constant_time_tables(jclass);
static jshort get_interfaces(jclass, _Jv_ifaces *);
static void link_symbol_table(jclass);
@@ -557,6 +558,9 @@
jboolean is_jni_call = true,
jclass iface = NULL);
+extern void _Jv_CheckOrCreateLoadingConstraint (jclass,
+ java::lang::ClassLoader *);
+
extern jobject _Jv_NewMultiArray (jclass, jint ndims, jint* dims)
__attribute__((__malloc__));
--- libjava/java/lang/ClassLoader.h.orig 2008-03-21 22:09:54.249100837 +0100
+++ libjava/java/lang/ClassLoader.h 2008-03-21 22:10:20.749500589 +0100
@@ -86,6 +86,7 @@
void checkInitialized();
public: // actually package-private
::java::util::HashMap * __attribute__((aligned(__alignof__( ::java::lang::Object)))) loadedClasses;
+ ::java::util::HashMap * loadingConstraints;
::java::util::HashMap * definedPackages;
private:
::java::lang::ClassLoader * parent;
--- libjava/java/lang/ClassLoader.java.orig 2008-03-21 22:09:54.249100837 +0100
+++ libjava/java/lang/ClassLoader.java 2008-03-21 22:10:20.749500589 +0100
@@ -1,5 +1,5 @@
/* ClassLoader.java -- responsible for loading classes into the VM
- Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,6 +45,7 @@
import java.io.IOException;
import java.io.InputStream;
+import java.lang.ref.WeakReference;
import java.net.URL;
import java.nio.ByteBuffer;
import java.security.CodeSource;
@@ -130,6 +131,15 @@
final HashMap loadedClasses = new HashMap();
/**
+ * Loading constraints registered with this classloader. This maps
+ * a class name to a weak reference to a class. When the reference
+ * is non-null, it means that a reference to the name must resolve
+ * to the indicated class.
+ */
+ final HashMap<String, WeakReference<Class>> loadingConstraints
+ = new HashMap<String, WeakReference<Class>>();
+
+ /**
* All packages defined by this classloader. It is not private in order to
* allow native code (and trusted subclasses) access to this field.
*/
--- libjava/java/lang/natClassLoader.cc.orig 2008-03-21 22:09:54.249100837 +0100
+++ libjava/java/lang/natClassLoader.cc 2008-03-21 22:10:20.749500589 +0100
@@ -1,6 +1,6 @@
// natClassLoader.cc - Implementation of java.lang.ClassLoader native methods.
-/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 Free Software Foundation
This file is part of libgcj.
@@ -41,6 +41,7 @@
#include <java/lang/StringBuffer.h>
#include <java/io/Serializable.h>
#include <java/lang/Cloneable.h>
+#include <java/lang/ref/WeakReference.h>
#include <java/util/HashMap.h>
#include <gnu/gcj/runtime/BootClassLoader.h>
#include <gnu/gcj/runtime/SystemClassLoader.h>
@@ -143,7 +144,21 @@
// them later.
return;
}
- loader->loadedClasses->put(klass->name->toString(), klass);
+
+ JvSynchronize sync (loader->loadingConstraints);
+
+ using namespace java::lang::ref;
+
+ jstring name = klass->getName();
+ WeakReference *ref = (WeakReference *) loader->loadingConstraints->get (name);
+ if (ref)
+ {
+ jclass constraint = (jclass) ref->get();
+ if (constraint && constraint != klass)
+ throw new java::lang::LinkageError(JvNewStringLatin1("loading constraint violated"));
+ }
+ loader->loadingConstraints->put(name, new WeakReference(klass));
+ loader->loadedClasses->put(name, klass);
}
// If we found an error while defining an interpreted class, we must
@@ -156,6 +171,46 @@
loader->loadedClasses->remove(klass->name->toString());
}
+// Check a loading constraint. In particular check that, if there is
+// a constraint for the name of KLASS in LOADER, that it maps to
+// KLASS. If there is no such constraint, make a new one. If the
+// constraint is violated, throw an exception. Do nothing for
+// primitive types.
+void
+_Jv_CheckOrCreateLoadingConstraint (jclass klass,
+ java::lang::ClassLoader *loader)
+{
+ // Strip arrays.
+ while (klass->isArray())
+ klass = klass->getComponentType();
+ // Ignore primitive types.
+ if (klass->isPrimitive())
+ return;
+
+ if (! loader)
+ loader = java::lang::VMClassLoader::bootLoader;
+ jstring name = klass->getName();
+
+ JvSynchronize sync (loader->loadingConstraints);
+
+ using namespace java::lang::ref;
+
+ WeakReference *ref = (WeakReference *) loader->loadingConstraints->get (name);
+ if (ref)
+ {
+ jclass constraint = (jclass) ref->get();
+ if (constraint)
+ {
+ if (klass != constraint)
+ throw new java::lang::LinkageError(JvNewStringLatin1("loading constraint violated"));
+ // Otherwise, all is ok.
+ return;
+ }
+ }
+ // No constraint (or old constraint GC'd). Make a new one.
+ loader->loadingConstraints->put(name, new WeakReference(klass));
+}
+
// Class registration.
//
--- libjava/link.cc.orig 2008-03-21 22:09:54.249100837 +0100
+++ libjava/link.cc 2008-03-21 22:24:51.692638568 +0100
@@ -246,13 +246,9 @@
if (_Jv_CheckAccess (klass, *found_class, the_field->flags))
{
// Note that the field returned by find_field_helper is always
- // resolved. There's no point checking class loaders here,
- // since we already did the work to look up all the types.
- // FIXME: being lazy here would be nice.
- if (the_field->type != field_type)
- throw new java::lang::LinkageError
- (JvNewStringLatin1
- ("field type mismatch with different loaders"));
+ // resolved. However, we still use the constraint mechanism
+ // because this may affect other lookups.
+ _Jv_CheckOrCreateLoadingConstraint (klass, (*found_class)->loader);
}
else
{
@@ -269,6 +265,23 @@
return the_field;
}
+// Check loading constraints for method.
+void
+_Jv_Linker::check_loading_constraints (_Jv_Method *method, jclass self_class,
+ jclass other_class)
+{
+ JArray<jclass> *klass_args;
+ jclass klass_return;
+
+ _Jv_GetTypesFromSignature (method, self_class, &klass_args, &klass_return);
+ jclass *klass_arg = elements (klass_args);
+ java::lang::ClassLoader *found_loader = other_class->loader;
+
+ _Jv_CheckOrCreateLoadingConstraint (klass_return, found_loader);
+ for (int i = 0; i < klass_args->length; i++)
+ _Jv_CheckOrCreateLoadingConstraint (*(klass_arg++), found_loader);
+}
+
_Jv_Method *
_Jv_Linker::resolve_method_entry (jclass klass, jclass &found_class,
int class_index, int name_and_type_index,
@@ -359,6 +372,11 @@
throw new java::lang::NoSuchMethodError (sb->toString());
}
+ // if (found_class->loader != klass->loader), then we must actually
+ // check that the types of arguments correspond. JVMS 5.4.3.3.
+ if (found_class->loader != klass->loader)
+ check_loading_constraints (the_method, klass, found_class);
+
return the_method;
}
@@ -891,7 +909,8 @@
continue;
meth = NULL;
- for (jclass cl = klass; cl; cl = cl->getSuperclass())
+ jclass cl;
+ for (cl = klass; cl; cl = cl->getSuperclass())
{
meth = _Jv_GetMethodLocal (cl, iface->methods[j].name,
iface->methods[j].signature);
@@ -913,6 +932,9 @@
itable[pos] = (void *) &_Jv_ThrowAbstractMethodError;
else
itable[pos] = meth->ncode;
+
+ if (cl->loader != iface->loader)
+ check_loading_constraints (meth, cl, iface);
}
else
{
@@ -1467,6 +1489,11 @@
sb->append(_Jv_GetMethodString(declarer, super_meth));
throw new VerifyError(sb->toString());
}
+ else if (declarer->loader != klass->loader)
+ {
+ // JVMS 5.4.2.
+ check_loading_constraints (meth, klass, declarer);
+ }
}
}
begin 644 class-loader-classes.tar.bz2
M0EIH.3%!62936;AC>/P`$B'_____________________________________
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
?RU2TG1I:U$H06)<TB$BJ$Y,>E_^+N2*<*$A<,;Q^````
`
end

View File

@ -0,0 +1,44 @@
#! /bin/sh -e
# DP: For biarch builds, disable the testsuite for the non-default architecture
# DP: for runtime libraries, which are not built by default (libjava).
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- libjava/testsuite/Makefile.in~ 2005-09-29 23:53:39.213898000 +0200
+++ libjava/testsuite/Makefile.in 2005-09-29 23:55:33.382541760 +0200
@@ -346,12 +346,14 @@
check-DEJAGNU: site.exp
+ runtestflags="`echo '$(RUNTESTFLAGS)' | sed 's/,-m[36][24]//'`"; \
+ case "$$runtestflags" in *\\{\\}) runtestflags=; esac; \
srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
EXPECT=$(EXPECT); export EXPECT; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
l='$(DEJATOOL)'; for tool in $$l; do \
- $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+ $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $$runtestflags; \
done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi

View File

@ -0,0 +1,79 @@
#! /bin/sh -e
# DP: Don't leak upon failed realloc (taken from the trunk).
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
libjava/
2008-03-10 Jim Meyering <meyering@redhat.com>
Don't leak upon failed realloc.
* gnu/classpath/natSystemProperties.cc
(SystemProperties::insertSystemProperties):
libjava/classpath/
2008-03-10 Jim Meyering <meyering@redhat.com>
Don't leak upon failed realloc.
* native/jni/classpath/jcl.c (JCL_realloc): Upon failed realloc,
free the original buffer before throwing the exception.
Index: libjava/classpath/native/jni/classpath/jcl.c
===================================================================
--- libjava/classpath/native/jni/classpath/jcl.c (revision 133093)
+++ libjava/classpath/native/jni/classpath/jcl.c (revision 133094)
@@ -1,5 +1,5 @@
/* jcl.c
- Copyright (C) 1998, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2005, 2006, 2008 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -152,9 +152,11 @@
JNIEXPORT void *JNICALL
JCL_realloc (JNIEnv * env, void *ptr, size_t size)
{
+ void *orig_ptr = ptr;
ptr = realloc (ptr, size);
if (ptr == 0)
{
+ free (orig_ptr);
JCL_ThrowException (env, "java/lang/OutOfMemoryError",
"malloc() failed.");
return NULL;
Index: libjava/gnu/classpath/natSystemProperties.cc
===================================================================
--- libjava/gnu/classpath/natSystemProperties.cc (revision 133093)
+++ libjava/gnu/classpath/natSystemProperties.cc (revision 133094)
@@ -270,7 +270,10 @@
if (errno != ERANGE)
break;
buflen = 2 * buflen;
+ char *orig_buf = buffer;
buffer = (char *) realloc (buffer, buflen);
+ if (buffer == NULL)
+ free (orig_buf);
}
if (buffer != NULL)
free (buffer);

View File

@ -0,0 +1,49 @@
#! /bin/sh -e
# DP: - Link ecjx with -rpath $(dbexecdir)
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
#cd ${dir}libjava && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#rm -f ${dir}libjava/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- libjava/Makefile.am~ 2007-03-04 18:50:01.000000000 +0100
+++ libjava/Makefile.am 2007-03-04 19:19:32.000000000 +0100
@@ -683,7 +683,7 @@
ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
endif !ENABLE_SHARED
-ecjx_LDADD = -L$(here)/.libs libgcj.la
+ecjx_LDADD = -L$(here)/.libs libgcj.la -rpath $(dbexecdir)
ecjx_DEPENDENCIES = libgcj.la libgcj.spec
else !NATIVE
--- libjava/Makefile.in~ 2007-03-04 18:50:01.000000000 +0100
+++ libjava/Makefile.in 2007-03-04 19:21:22.000000000 +0100
@@ -7787,7 +7787,7 @@
@ENABLE_SHARED_TRUE@@NATIVE_TRUE@ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) -Djava.class.path=$(ECJ_JAR)
@NATIVE_FALSE@ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
@NATIVE_FALSE@ecjx_LDADD =
-@NATIVE_TRUE@ecjx_LDADD = -L$(here)/.libs libgcj.la
+@NATIVE_TRUE@ecjx_LDADD = -L$(here)/.libs libgcj.la -rpath $(dbexecdir)
@NATIVE_FALSE@ecjx_DEPENDENCIES =
@NATIVE_TRUE@ecjx_DEPENDENCIES = libgcj.la libgcj.spec
gappletviewer_SOURCES =

View File

@ -0,0 +1,65 @@
#! /bin/sh -e
# DP: Don't try to use _Unwind_Backtrace on SJLJ targets.
# DP: See bug #387875, #388505, GCC PR 29206.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
---
libjava/sysdep/generic/backtrace.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
Index: src/libjava/sysdep/generic/backtrace.h
===================================================================
--- src.orig/libjava/sysdep/generic/backtrace.h 2006-11-06 14:00:32.000000000 -0500
+++ src/libjava/sysdep/generic/backtrace.h 2006-11-06 14:04:38.000000000 -0500
@@ -13,6 +13,20 @@ details. */
#include <java-stack.h>
+#ifdef SJLJ_EXCEPTIONS
+
+#undef _Unwind_GetIPInfo
+#define _Unwind_GetIPInfo(ctx,ip_before_insn) \
+ (abort (), (void) (ctx), *ip_before_insn = 1, 0)
+
+#undef _Unwind_GetRegionStart
+#define _Unwind_GetRegionStart(ctx) \
+ (abort (), (void) (ctx), 0)
+
+#undef _Unwind_Backtrace
+#define _Unwind_Backtrace(trace_fn,state_ptr) \
+ (fallback_backtrace (trace_fn, state_ptr))
+
/* Unwind through the call stack calling TRACE_FN with STATE for every stack
frame. Returns the reason why the unwinding was stopped. */
_Unwind_Reason_Code
@@ -20,4 +34,7 @@ fallback_backtrace (_Unwind_Trace_Fn, _J
{
return _URC_NO_REASON;
}
+
+#endif /* SJLJ_EXCEPTIONS */
+
#endif

View File

@ -0,0 +1,34 @@
#! /bin/sh -e
# DP: Bump the libgcj soversion.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- libjava/libtool-version~ 2006-01-18 22:52:29.000000000 +0100
+++ libjava/libtool-version 2006-04-03 23:32:44.934656864 +0200
@@ -3,4 +3,4 @@
# a separate file so that version updates don't involve re-running
# automake.
# CURRENT:REVISION:AGE
-9:0:0
+90:0:0

View File

@ -0,0 +1,70 @@
#! /bin/sh -e
# DP: libgcj: Lookup source file name and line number in separated
# DP: debug files found in /usr/lib/debug
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- libjava/stacktrace.cc.orig 2006-06-16 13:54:07.078577632 +0200
+++ libjava/stacktrace.cc 2006-06-16 13:56:08.032189888 +0200
@@ -20,6 +20,11 @@
#endif
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include <java/lang/Class.h>
#include <java/lang/Long.h>
@@ -222,6 +227,28 @@
finder->lookup (binaryName, (jlong) offset);
*sourceFileName = finder->getSourceFile();
*lineNum = finder->getLineNum();
+ if (*lineNum == -1 && info.file_name[0] == '/')
+ {
+ const char *debugPrefix = "/usr/lib/debug";
+ char *debugPath = (char *) malloc (strlen(debugPrefix)
+ + strlen(info.file_name)
+ + 2);
+
+ if (debugPath)
+ {
+ strcpy (debugPath, debugPrefix);
+ strcat (debugPath, info.file_name);
+ //printf ("%s: 0x%x\n", debugPath, offset);
+ if (!access (debugPath, R_OK))
+ {
+ binaryName = JvNewStringUTF (debugPath);
+ finder->lookup (binaryName, (jlong) offset);
+ *sourceFileName = finder->getSourceFile();
+ *lineNum = finder->getLineNum();
+ }
+ free (debugPath);
+ }
+ }
if (*lineNum == -1 && NameFinder::showRaw())
{
gnu::gcj::runtime::StringBuffer *t =

View File

@ -0,0 +1,246 @@
#! /bin/sh -e
# DP: - Set the libjava sublibdir to /usr/lib/gcj-4.3
# DP: - Set the default libgcj database dir to /var/lib/gcj-4.3
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
cd ${dir}libjava && aclocal -I . -I .. -I ../config -I libltdl && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
rm -f ${dir}libjava/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/java/Make-lang.in.orig 2007-09-06 21:19:09.582719152 +0200
+++ gcc/java/Make-lang.in 2007-09-06 21:20:32.543970604 +0200
@@ -313,12 +313,13 @@
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ZLIBINC) \
$(srcdir)/java/jcf-io.c $(OUTPUT_OPTION)
+short_version := $(shell echo $(version) | sed -r 's/([0-9]+\.[0-9]+).*/\1/')
# jcf-path.o needs a -D.
java/jcf-path.o: java/jcf-path.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
java/jcf.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
- -DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(version).jar"' \
- -DDEFAULT_TARGET_VERSION=\"$(version)\" \
+ -DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(short_version).jar"' \
+ -DDEFAULT_TARGET_VERSION=\"$(short_version)\" \
$(srcdir)/java/jcf-path.c $(OUTPUT_OPTION)
TEXI_JAVA_FILES = java/gcj.texi $(gcc_docdir)/include/fdl.texi \
--- libjava/classpath/configure.ac.orig 2008-01-13 17:18:19.000000000 +0100
+++ libjava/classpath/configure.ac 2008-01-13 17:18:45.000000000 +0100
@@ -301,7 +301,7 @@
nativeexeclibdir=${withval}
],
[
- nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[[^#]].*:/ { print $1 }' ${srcdir}/../libtool-version`
+ nativeexeclibdir='${toolexeclibdir}/gcj-'`sed -r 's/([[0-9]]+\.[[0-9]]+).*/\1/' ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[[^#]].*:/ { print $1 }' ${srcdir}/../libtool-version`
])
AC_SUBST(nativeexeclibdir)
--- libjava/classpath/configure.orig 2008-01-13 17:18:20.000000000 +0100
+++ libjava/classpath/configure 2008-01-13 17:18:45.000000000 +0100
@@ -4771,7 +4771,7 @@
else
- nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[^#].*:/ { print $1 }' ${srcdir}/../libtool-version`
+ nativeexeclibdir='${toolexeclibdir}/gcj-'`sed -r 's/([0-9]+\.[0-9]+).*/\1/' ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[^#].*:/ { print $1 }' ${srcdir}/../libtool-version`
fi;
--- libjava/testsuite/lib/libjava.exp.orig 2008-01-13 17:18:20.000000000 +0100
+++ libjava/testsuite/lib/libjava.exp 2008-01-13 17:18:45.000000000 +0100
@@ -169,6 +169,7 @@
set text [eval exec "$GCJ_UNDER_TEST -B$specdir -v 2>@ stdout"]
regexp " version \[^\n\r\]*" $text version
set libjava_version [lindex $version 1]
+ set libjava_version "4.3"
verbose "version: $libjava_version"
--- libjava/testsuite/Makefile.am.orig 2008-01-13 17:18:20.000000000 +0100
+++ libjava/testsuite/Makefile.am 2008-01-13 17:18:45.000000000 +0100
@@ -4,6 +4,7 @@
# May be used by various substitution variables.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_short_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER)
# autoconf2.13's target_alias
target_noncanonical = @target_noncanonical@
@@ -59,11 +60,11 @@
rm -rf $$testtmpdir; $(mkdir_p) $$testtmpdir; \
if test -n "$$testdep"; then \
$(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \
- $(top_builddir)/libgcj-$(gcc_version).jar::$$testtmpdir \
+ $(top_builddir)/libgcj-$(gcc_short_version).jar::$$testtmpdir \
-d $$testtmpdir $(srcdir)/$$testdep || exit; \
fi; \
$(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \
- $(top_builddir)/libgcj-$(gcc_version).jar:$$testtmpdir \
+ $(top_builddir)/libgcj-$(gcc_short_version).jar:$$testtmpdir \
-d $$testtmpdir $(srcdir)/$$test || exit; \
case "$$test" in \
libjava.loader/dummy.java) \
@@ -75,7 +76,7 @@
esac; \
if test -n "$$genheader"; then \
$(MYGCJH) $$genheader $$testtmpdir/*.class \
- -bootclasspath $(top_builddir)/libgcj-$(gcc_version).jar \
+ -bootclasspath $(top_builddir)/libgcj-$(gcc_short_version).jar \
-d $$testtmpdir/ || exit; \
mv $$testtmpdir/*.h $(srcdir)/`dirname $$test`/ 2>/dev/null; \
fi; \
--- libjava/testsuite/Makefile.in.orig 2008-01-13 17:18:20.000000000 +0100
+++ libjava/testsuite/Makefile.in 2008-01-13 17:18:45.000000000 +0100
@@ -327,6 +327,7 @@
# May be used by various substitution variables.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_short_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER)
# Setup the testing framework, if you have one
EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then \
@@ -576,11 +577,11 @@
@JAVA_MAINTAINER_MODE_TRUE@ rm -rf $$testtmpdir; $(mkdir_p) $$testtmpdir; \
@JAVA_MAINTAINER_MODE_TRUE@ if test -n "$$testdep"; then \
@JAVA_MAINTAINER_MODE_TRUE@ $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \
-@JAVA_MAINTAINER_MODE_TRUE@ $(top_builddir)/libgcj-$(gcc_version).jar::$$testtmpdir \
+@JAVA_MAINTAINER_MODE_TRUE@ $(top_builddir)/libgcj-$(gcc_short_version).jar::$$testtmpdir \
@JAVA_MAINTAINER_MODE_TRUE@ -d $$testtmpdir $(srcdir)/$$testdep || exit; \
@JAVA_MAINTAINER_MODE_TRUE@ fi; \
@JAVA_MAINTAINER_MODE_TRUE@ $(GCJ) -C -g -w --encoding=UTF-8 -bootclasspath \
-@JAVA_MAINTAINER_MODE_TRUE@ $(top_builddir)/libgcj-$(gcc_version).jar:$$testtmpdir \
+@JAVA_MAINTAINER_MODE_TRUE@ $(top_builddir)/libgcj-$(gcc_short_version).jar:$$testtmpdir \
@JAVA_MAINTAINER_MODE_TRUE@ -d $$testtmpdir $(srcdir)/$$test || exit; \
@JAVA_MAINTAINER_MODE_TRUE@ case "$$test" in \
@JAVA_MAINTAINER_MODE_TRUE@ libjava.loader/dummy.java) \
@@ -592,7 +593,7 @@
@JAVA_MAINTAINER_MODE_TRUE@ esac; \
@JAVA_MAINTAINER_MODE_TRUE@ if test -n "$$genheader"; then \
@JAVA_MAINTAINER_MODE_TRUE@ $(MYGCJH) $$genheader $$testtmpdir/*.class \
-@JAVA_MAINTAINER_MODE_TRUE@ -bootclasspath $(top_builddir)/libgcj-$(gcc_version).jar \
+@JAVA_MAINTAINER_MODE_TRUE@ -bootclasspath $(top_builddir)/libgcj-$(gcc_short_version).jar \
@JAVA_MAINTAINER_MODE_TRUE@ -d $$testtmpdir/ || exit; \
@JAVA_MAINTAINER_MODE_TRUE@ mv $$testtmpdir/*.h $(srcdir)/`dirname $$test`/ 2>/dev/null; \
@JAVA_MAINTAINER_MODE_TRUE@ fi; \
--- libjava/Makefile.am.orig 2008-01-13 17:18:20.000000000 +0100
+++ libjava/Makefile.am 2008-01-13 17:18:45.000000000 +0100
@@ -5,7 +5,8 @@
ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl
# May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_full_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER)
SUBDIRS = $(DIRLTDL) gcj include classpath
if TESTSUBDIR
@@ -27,9 +28,9 @@
target_noncanonical = @target_noncanonical@
# This is required by TL_AC_GXX_INCLUDE_DIR.
-libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
+libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_full_version)
-libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
+libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_full_version)
##
## What gets installed, and where.
@@ -141,7 +142,7 @@
-DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
-DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
-DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \
- -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
+ -DLIBGCJ_DEFAULT_DATABASE="\"/var/lib/gcj-4.3/$(db_name)\"" \
-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\""
AM_GCJFLAGS = \
--- libjava/Makefile.in.orig 2008-01-13 17:18:20.000000000 +0100
+++ libjava/Makefile.in 2008-01-13 17:18:45.000000000 +0100
@@ -816,7 +816,8 @@
ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl
# May be used by various substitution variables.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_full_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcc_version := $(shell sed -r 's/([0-9]+\.[0-9]+).*/\1/' $(top_srcdir)/../gcc/BASE-VER)
SUBDIRS = $(DIRLTDL) gcj include classpath $(am__append_1)
# write_entries_to_file - writes each entry in a list
@@ -829,8 +830,8 @@
write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) $(foreach object,$(1),$(shell echo $(object) >> $(2)))
# This is required by TL_AC_GXX_INCLUDE_DIR.
-libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
-libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
+libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_full_version)
+libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_full_version)
toolexeclib_LTLIBRARIES = libgcj.la libgij.la libgcj-tools.la \
$(am__append_2) $(am__append_3)
toolexecmainlib_DATA = libgcj.spec
@@ -875,7 +876,7 @@
-DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
-DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
-DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \
- -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
+ -DLIBGCJ_DEFAULT_DATABASE="\"/var/lib/gcj-4.3/$(db_name)\"" \
-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\""
AM_GCJFLAGS = \
--- libjava/configure.ac.orig 2008-01-13 17:18:20.000000000 +0100
+++ libjava/configure.ac 2008-01-13 17:18:45.000000000 +0100
@@ -511,6 +511,9 @@
AS_HELP_STRING([--with-java-home=DIRECTORY],
[value of java.home system property]),
[JAVA_HOME="${withval}"], [JAVA_HOME=""])
+if test -n "$with_multisubdir"; then
+ JAVA_HOME=`echo $JAVA_HOME | sed "s,/usr/lib/,/usr/lib$with_multisubdir/,"`
+fi
AM_CONDITIONAL(JAVA_HOME_SET, test ! -z "$JAVA_HOME")
AC_SUBST(JAVA_HOME)
@@ -1385,6 +1388,7 @@
multi_os_directory=`$CC -print-multi-os-directory`
case $multi_os_directory in
.) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /.
+ ../lib*) toolexeclibdir='$(subst /lib/../lib,/lib,'$toolexecmainlibdir/$multi_os_directory')' ;;
*) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;;
esac
;;
@@ -1395,6 +1399,7 @@
# Determine gcj and libgcj version number.
gcjversion=`cat "$srcdir/../gcc/BASE-VER"`
+short_version=`sed -r 's/([[0-9]]+\.[[0-9]]+).*/\1/' $srcdir/../gcc/BASE-VER`
libgcj_soversion=`awk -F: '/^[[^#]].*:/ { print $1 }' $srcdir/libtool-version`
GCJVERSION=$gcjversion
AC_SUBST(GCJVERSION)
@@ -1402,7 +1407,7 @@
# Determine where the standard .db file and GNU Classpath JNI
# libraries are found.
-gcjsubdir=gcj-$gcjversion-$libgcj_soversion
+gcjsubdir=gcj-$short_version-$libgcj_soversion
multi_os_directory=`$CC -print-multi-os-directory`
case $multi_os_directory in
.)

View File

@ -0,0 +1,41 @@
#! /bin/sh -e
# DP: Add configure check for xulrunner-1.9.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
cd ${dir}libjava/classpath && aclocal -I m4 -I ../.. -I ../../config && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
rm -f ${dir}libjava/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- libjava/classpath/configure.ac~ 2008-02-22 08:37:10.356094701 +0100
+++ libjava/classpath/configure.ac 2008-02-22 08:38:49.397588719 +0100
@@ -702,7 +702,10 @@
dnl Check for plugin support headers and libraries.
if test "x${COMPILE_PLUGIN}" = xyes; then
- PKG_CHECK_MODULES(MOZILLA, mozilla-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
+ PKG_CHECK_MODULES(MOZILLA, mozilla-plugin libxul-unstable, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
+ if test "x${MOZILLA_FOUND}" = xno; then
+ PKG_CHECK_MODULES(MOZILLA, mozilla-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
+ fi
if test "x${MOZILLA_FOUND}" = xno; then
PKG_CHECK_MODULES(MOZILLA, firefox-plugin firefox-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
fi

View File

@ -0,0 +1,73 @@
#! /bin/sh -e
# DP: Link libobjc_gc with libgcjgc_convenience.la.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
cd ${dir}libobjc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
rm -f ${dir}libobjc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2008-02-06 Matthias Klose <doko@ubuntu.com>
* configure.ac (OBJC_BOEHM_GC_LIBS): Link with libgcjgc_convenience.la.
* configure: Regenerate.
* Makefile.in (libobjc_gc$(libsuffix).la): Link with OBJC_BOEHM_GC_LIBS.
--- libobjc/Makefile.in~ 2007-07-05 10:18:52.000000000 +0200
+++ libobjc/Makefile.in 2008-02-07 17:17:17.243167905 +0100
@@ -95,6 +95,7 @@
OBJC_THREAD_FILE=thr-objc
OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
OBJC_BOEHM_GC_INCLUDES=@OBJC_BOEHM_GC_INCLUDES@
+OBJC_BOEHM_GC_LIBS=@OBJC_BOEHM_GC_LIBS@
INCLUDES = -I$(srcdir)/objc -I$(srcdir)/$(MULTISRCTOP)../gcc \
-I$(srcdir)/$(MULTISRCTOP)../gcc/config \
@@ -281,6 +282,7 @@
libobjc_gc$(libsuffix).la: $(OBJS_GC)
$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) \
+ $(OBJC_BOEHM_GC_LIBS) \
-rpath $(toolexeclibdir) \
-version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc)
--- libobjc/configure.ac~ 2007-10-19 15:14:58.000000000 +0200
+++ libobjc/configure.ac 2008-02-07 17:25:15.750386077 +0100
@@ -66,15 +66,18 @@
no)
OBJC_BOEHM_GC=''
OBJC_BOEHM_GC_INCLUDES=''
+ OBJC_BOEHM_GC_LIBS=''
;;
*)
OBJC_BOEHM_GC=libobjc_gc.la
OBJC_BOEHM_GC_INCLUDES='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include'
+ OBJC_BOEHM_GC_LIBS='../boehm-gc/libgcjgc_convenience.la -pthread'
;;
esac],
[OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES=''])
AC_SUBST(OBJC_BOEHM_GC)
AC_SUBST(OBJC_BOEHM_GC_INCLUDES)
+AC_SUBST(OBJC_BOEHM_GC_LIBS)
# -----------
# Directories

View File

@ -0,0 +1,52 @@
#! /bin/sh -e
# DP: GNU/k*BSD support
# Author: Aurelien Jarno <aurel32@debian.org>
# Status: Submitted: http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01962.html
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
# append the patch here and adjust the -p? flag in the patch calls.
--- src.orig/gcc/configure 2008-03-01 15:51:06 +0100
+++ src/gcc/configure 2008-03-01 16:02:24 +0100
@@ -17110,7 +17110,7 @@
else
gcc_cv_libc_provides_ssp=no
case "$target" in
- *-*-linux*)
+ *-*-*-gnu*)
if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
if test "x$with_sysroot" = x; then
glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
--- src.orig/gcc/configure.ac 2008-02-01 19:55:55 +0100
+++ src/gcc/configure.ac 2008-03-01 16:02:06 +0100
@@ -3379,7 +3379,7 @@
gcc_cv_libc_provides_ssp,
[gcc_cv_libc_provides_ssp=no
case "$target" in
- *-*-linux*)
+ *-*-*-gnu*)
if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
if test "x$with_sysroot" = x; then
glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"

View File

@ -0,0 +1,51 @@
#! /bin/sh -e
# DP: adjust hrefs to point to the local documentation
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- libstdc++-v3/doc/doxygen/mainpage.html~ 2008-02-19 21:08:07.375796572 +0100
+++ libstdc++-v3/doc/doxygen/mainpage.html 2008-02-19 21:14:20.841430216 +0100
@@ -30,8 +30,8 @@
<p>There are two types of documentation for libstdc++. One is the
distribution documentation, which can be read online
<a href="http://gcc.gnu.org/onlinedocs/libstdc++/index.html">here</a>
- or offline from the file doc/html/index.html in the library source
- directory.
+ or offline in the documentation directory
+ <a href="documentation.html">here</a>.
</p>
<p>The other type is the source documentation, of which this is the first page.
@@ -71,9 +71,9 @@
This style guide can also be viewed on the <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01apas04.html">web</a>.
<h2>License, Copyright, and Other Lawyerly Verbosity</h2>
-<p>The libstdc++ documentation is released under
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01s02.html">
- these terms</a>.
+<p>The libstdc++ documentation is released under these terms
+ (<a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01s02.html">read online</a>, or
+ <a href="17_intro/license.html">read offline</a>).
</p>
<p>Part of the generated documentation involved comments and notes from
SGI, who says we gotta say this:

View File

@ -0,0 +1,71 @@
#! /bin/sh -e
# DP: Build and install libstdc++_pic.a library.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
diff -ur libstdc++-v3/src/Makefile.am libstdc++-v3/src/Makefile.am
--- libstdc++-v3/src/Makefile.am~ 2004-04-16 21:04:05.000000000 +0200
+++ libstdc++-v3/src/Makefile.am 2004-07-03 20:22:43.000000000 +0200
@@ -210,6 +210,10 @@
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+install-exec-local:
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
# Added bits to build debug library.
if GLIBCXX_BUILD_DEBUG
all-local: build_debug
diff -ur libstdc++-v3/src/Makefile.in libstdc++-v3/src/Makefile.in
--- libstdc++-v3/src/Makefile.in 2004-07-03 06:41:13.000000000 +0200
+++ libstdc++-v3/src/Makefile.in 2004-07-03 20:25:05.000000000 +0200
@@ -611,7 +611,7 @@
install-data-am: install-data-local
-install-exec-am: install-toolexeclibLTLIBRARIES
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
install-info: install-info-am
@@ -644,6 +644,7 @@
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-data-local install-exec \
+ install-exec-local \
install-exec-am install-info install-info-am install-man \
install-strip install-toolexeclibLTLIBRARIES installcheck \
installcheck-am installdirs maintainer-clean \
@@ -729,6 +730,11 @@
install_debug:
(cd ${debugdir} && $(MAKE) \
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
+
+install-exec-local:
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,369 @@
#! /bin/sh -e
# DP: Update libstdc++ baseline symbols for hppa.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
Index: libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt
===================================================================
--- libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (revision 133733)
+++ libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (working copy)
@@ -33,19 +33,51 @@
FUNC:_ZN10__gnu_norm15_List_node_base6unhookEv@@GLIBCXX_3.4
FUNC:_ZN10__gnu_norm15_List_node_base7reverseEv@@GLIBCXX_3.4
FUNC:_ZN10__gnu_norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4
+FUNC:_ZN11__gnu_debug19_Safe_iterator_base12_M_get_mutexEv@@GLIBCXX_3.4.9
+FUNC:_ZN11__gnu_debug19_Safe_iterator_base16_M_attach_singleEPNS_19_Safe_sequence_baseEb@@GLIBCXX_3.4.9
+FUNC:_ZN11__gnu_debug19_Safe_iterator_base16_M_detach_singleEv@@GLIBCXX_3.4.9
FUNC:_ZN11__gnu_debug19_Safe_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb@@GLIBCXX_3.4
FUNC:_ZN11__gnu_debug19_Safe_iterator_base9_M_detachEv@@GLIBCXX_3.4
+FUNC:_ZN11__gnu_debug19_Safe_sequence_base12_M_get_mutexEv@@GLIBCXX_3.4.9
FUNC:_ZN11__gnu_debug19_Safe_sequence_base13_M_detach_allEv@@GLIBCXX_3.4
FUNC:_ZN11__gnu_debug19_Safe_sequence_base18_M_detach_singularEv@@GLIBCXX_3.4
FUNC:_ZN11__gnu_debug19_Safe_sequence_base22_M_revalidate_singularEv@@GLIBCXX_3.4
FUNC:_ZN11__gnu_debug19_Safe_sequence_base7_M_swapERS0_@@GLIBCXX_3.4
+FUNC:_ZN14__gnu_parallel9_Settings3getEv@@GLIBCXX_3.4.10
+FUNC:_ZN14__gnu_parallel9_Settings3setERS0_@@GLIBCXX_3.4.10
FUNC:_ZN9__gnu_cxx12__atomic_addEPVii@@GLIBCXX_3.4
FUNC:_ZN9__gnu_cxx17__pool_alloc_base12_M_get_mutexEv@@GLIBCXX_3.4.2
FUNC:_ZN9__gnu_cxx17__pool_alloc_base16_M_get_free_listEj@@GLIBCXX_3.4.2
FUNC:_ZN9__gnu_cxx17__pool_alloc_base9_M_refillEj@@GLIBCXX_3.4.2
FUNC:_ZN9__gnu_cxx18__exchange_and_addEPVii@@GLIBCXX_3.4
FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEE4fileEv@@GLIBCXX_3.4.2
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEE4syncEv@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEE5uflowEv@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEE6xsgetnEPci@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEE6xsputnEPKci@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEE7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEE7seekposESt4fposI11__mbstate_tESt13_Ios_Openmode@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEE8overflowEi@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEE9pbackfailEi@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEE9underflowEv@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEEC1EP8_IO_FILE@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEEC2EP8_IO_FILE@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEED0Ev@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEED1Ev@@GLIBCXX_3.4.10
FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE4fileEv@@GLIBCXX_3.4.2
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE4syncEv@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE5uflowEv@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE6xsgetnEPwi@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE6xsputnEPKwi@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE7seekposESt4fposI11__mbstate_tESt13_Ios_Openmode@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE8overflowEj@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9pbackfailEj@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9underflowEv@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEEC1EP8_IO_FILE@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEEC2EP8_IO_FILE@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEED0Ev@@GLIBCXX_3.4.10
+FUNC:_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEED1Ev@@GLIBCXX_3.4.10
FUNC:_ZN9__gnu_cxx27__verbose_terminate_handlerEv@@CXXABI_1.3
FUNC:_ZN9__gnu_cxx6__poolILb0EE10_M_destroyEv@@GLIBCXX_3.4.4
FUNC:_ZN9__gnu_cxx6__poolILb0EE13_M_initializeEv@@GLIBCXX_3.4.4
@@ -53,6 +85,7 @@
FUNC:_ZN9__gnu_cxx6__poolILb0EE16_M_reserve_blockEjj@@GLIBCXX_3.4.4
FUNC:_ZN9__gnu_cxx6__poolILb1EE10_M_destroyEv@@GLIBCXX_3.4.4
FUNC:_ZN9__gnu_cxx6__poolILb1EE13_M_initializeEPFvPvE@@GLIBCXX_3.4.4
+FUNC:_ZN9__gnu_cxx6__poolILb1EE13_M_initializeEv@@GLIBCXX_3.4.6
FUNC:_ZN9__gnu_cxx6__poolILb1EE16_M_get_thread_idEv@@GLIBCXX_3.4.4
FUNC:_ZN9__gnu_cxx6__poolILb1EE16_M_reclaim_blockEPcj@@GLIBCXX_3.4.4
FUNC:_ZN9__gnu_cxx6__poolILb1EE16_M_reserve_blockEjj@@GLIBCXX_3.4.4
@@ -81,6 +114,7 @@
FUNC:_ZNK11__gnu_debug16_Error_formatter10_Parameter20_M_print_descriptionEPKS0_@@GLIBCXX_3.4
FUNC:_ZNK11__gnu_debug16_Error_formatter13_M_print_wordEPKc@@GLIBCXX_3.4
FUNC:_ZNK11__gnu_debug16_Error_formatter15_M_print_stringEPKc@@GLIBCXX_3.4
+FUNC:_ZNK11__gnu_debug16_Error_formatter17_M_get_max_lengthEv@@GLIBCXX_3.4.10
FUNC:_ZNK11__gnu_debug16_Error_formatter8_M_errorEv@@GLIBCXX_3.4
FUNC:_ZNK11__gnu_debug19_Safe_iterator_base11_M_singularEv@@GLIBCXX_3.4
FUNC:_ZNK11__gnu_debug19_Safe_iterator_base14_M_can_compareERKS0_@@GLIBCXX_3.4
@@ -203,6 +237,7 @@
FUNC:_ZNKSs8max_sizeEv@@GLIBCXX_3.4
FUNC:_ZNKSs9_M_ibeginEv@@GLIBCXX_3.4
FUNC:_ZNKSsixEj@@GLIBCXX_3.4
+FUNC:_ZNKSt10bad_typeid4whatEv@@GLIBCXX_3.4.9
FUNC:_ZNKSt10istrstream5rdbufEv@@GLIBCXX_3.4
FUNC:_ZNKSt10moneypunctIcLb0EE10neg_formatEv@@GLIBCXX_3.4
FUNC:_ZNKSt10moneypunctIcLb0EE10pos_formatEv@@GLIBCXX_3.4
@@ -301,6 +336,7 @@
FUNC:_ZNKSt11logic_error4whatEv@@GLIBCXX_3.4
FUNC:_ZNKSt12__basic_fileIcE7is_openEv@@GLIBCXX_3.4
FUNC:_ZNKSt12strstreambuf6pcountEv@@GLIBCXX_3.4
+FUNC:_ZNKSt13bad_exception4whatEv@@GLIBCXX_3.4.9
FUNC:_ZNKSt13basic_filebufIcSt11char_traitsIcEE7is_openEv@@GLIBCXX_3.4
FUNC:_ZNKSt13basic_filebufIwSt11char_traitsIwEE7is_openEv@@GLIBCXX_3.4
FUNC:_ZNKSt13basic_fstreamIcSt11char_traitsIcEE5rdbufEv@@GLIBCXX_3.4
@@ -353,6 +389,16 @@
FUNC:_ZNKSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
FUNC:_ZNKSt19basic_ostringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
FUNC:_ZNKSt19basic_ostringstreamIwSt11char_traitsIwESaIwEE5rdbufEv@@GLIBCXX_3.4
+FUNC:_ZNKSt3tr14hashIRKSbIwSt11char_traitsIwESaIwEEEclES6_@@GLIBCXX_3.4.10
+FUNC:_ZNKSt3tr14hashIRKSsEclES2_@@GLIBCXX_3.4.10
+FUNC:_ZNKSt3tr14hashISbIwSt11char_traitsIwESaIwEEEclES4_@@GLIBCXX_3.4.10
+FUNC:_ZNKSt3tr14hashISsEclESs@@GLIBCXX_3.4.10
+FUNC:_ZNKSt3tr14hashIeEclEe@@GLIBCXX_3.4.10
+FUNC:_ZNKSt4hashIRKSbIwSt11char_traitsIwESaIwEEEclES5_@@GLIBCXX_3.4.10
+FUNC:_ZNKSt4hashIRKSsEclES1_@@GLIBCXX_3.4.10
+FUNC:_ZNKSt4hashISbIwSt11char_traitsIwESaIwEEEclES3_@@GLIBCXX_3.4.10
+FUNC:_ZNKSt4hashISsEclESs@@GLIBCXX_3.4.10
+FUNC:_ZNKSt4hashIeEclEe@@GLIBCXX_3.4.10
FUNC:_ZNKSt5ctypeIcE10do_tolowerEPcPKc@@GLIBCXX_3.4
FUNC:_ZNKSt5ctypeIcE10do_tolowerEc@@GLIBCXX_3.4
FUNC:_ZNKSt5ctypeIcE10do_toupperEPcPKc@@GLIBCXX_3.4
@@ -515,6 +561,7 @@
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
+FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
FUNC:_ZNKSt8messagesIcE20_M_convert_from_charEPc@@GLIBCXX_3.4
@@ -591,6 +638,7 @@
FUNC:_ZNKSt8time_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE3putES3_RSt8ios_basewPK2tmcc@@GLIBCXX_3.4
FUNC:_ZNKSt8time_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewPK2tmcc@@GLIBCXX_3.4
FUNC:_ZNKSt8valarrayIjE4sizeEv@@GLIBCXX_3.4
+FUNC:_ZNKSt9bad_alloc4whatEv@@GLIBCXX_3.4.9
FUNC:_ZNKSt9basic_iosIcSt11char_traitsIcEE10exceptionsEv@@GLIBCXX_3.4
FUNC:_ZNKSt9basic_iosIcSt11char_traitsIcEE3badEv@@GLIBCXX_3.4
FUNC:_ZNKSt9basic_iosIcSt11char_traitsIcEE3eofEv@@GLIBCXX_3.4
@@ -774,6 +822,17 @@
FUNC:_ZNSdD0Ev@@GLIBCXX_3.4
FUNC:_ZNSdD1Ev@@GLIBCXX_3.4
FUNC:_ZNSdD2Ev@@GLIBCXX_3.4
+FUNC:_ZNSi10_M_extractIPvEERSiRT_@@GLIBCXX_3.4.9
+FUNC:_ZNSi10_M_extractIbEERSiRT_@@GLIBCXX_3.4.9
+FUNC:_ZNSi10_M_extractIdEERSiRT_@@GLIBCXX_3.4.9
+FUNC:_ZNSi10_M_extractIeEERSiRT_@@GLIBCXX_3.4.9
+FUNC:_ZNSi10_M_extractIfEERSiRT_@@GLIBCXX_3.4.9
+FUNC:_ZNSi10_M_extractIjEERSiRT_@@GLIBCXX_3.4.9
+FUNC:_ZNSi10_M_extractIlEERSiRT_@@GLIBCXX_3.4.9
+FUNC:_ZNSi10_M_extractImEERSiRT_@@GLIBCXX_3.4.9
+FUNC:_ZNSi10_M_extractItEERSiRT_@@GLIBCXX_3.4.9
+FUNC:_ZNSi10_M_extractIxEERSiRT_@@GLIBCXX_3.4.9
+FUNC:_ZNSi10_M_extractIyEERSiRT_@@GLIBCXX_3.4.9
FUNC:_ZNSi3getEPci@@GLIBCXX_3.4
FUNC:_ZNSi3getEPcic@@GLIBCXX_3.4
FUNC:_ZNSi3getERSt15basic_streambufIcSt11char_traitsIcEE@@GLIBCXX_3.4
@@ -833,6 +892,14 @@
FUNC:_ZNSo6sentryD1Ev@@GLIBCXX_3.4
FUNC:_ZNSo6sentryD2Ev@@GLIBCXX_3.4
FUNC:_ZNSo8_M_writeEPKci@@GLIBCXX_3.4
+FUNC:_ZNSo9_M_insertIPKvEERSoT_@@GLIBCXX_3.4.9
+FUNC:_ZNSo9_M_insertIbEERSoT_@@GLIBCXX_3.4.9
+FUNC:_ZNSo9_M_insertIdEERSoT_@@GLIBCXX_3.4.9
+FUNC:_ZNSo9_M_insertIeEERSoT_@@GLIBCXX_3.4.9
+FUNC:_ZNSo9_M_insertIlEERSoT_@@GLIBCXX_3.4.9
+FUNC:_ZNSo9_M_insertImEERSoT_@@GLIBCXX_3.4.9
+FUNC:_ZNSo9_M_insertIxEERSoT_@@GLIBCXX_3.4.9
+FUNC:_ZNSo9_M_insertIyEERSoT_@@GLIBCXX_3.4.9
FUNC:_ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE@@GLIBCXX_3.4
FUNC:_ZNSoC1Ev@@GLIBCXX_3.4
FUNC:_ZNSoC2EPSt15basic_streambufIcSt11char_traitsIcEE@@GLIBCXX_3.4
@@ -1206,6 +1273,17 @@
FUNC:_ZNSt13basic_fstreamIwSt11char_traitsIwEED0Ev@@GLIBCXX_3.4
FUNC:_ZNSt13basic_fstreamIwSt11char_traitsIwEED1Ev@@GLIBCXX_3.4
FUNC:_ZNSt13basic_fstreamIwSt11char_traitsIwEED2Ev@@GLIBCXX_3.4
+FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIPvEERS2_RT_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIbEERS2_RT_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIdEERS2_RT_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIeEERS2_RT_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIfEERS2_RT_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIjEERS2_RT_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIlEERS2_RT_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractImEERS2_RT_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractItEERS2_RT_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIxEERS2_RT_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIyEERS2_RT_@@GLIBCXX_3.4.9
FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE3getEPwi@@GLIBCXX_3.4
FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE3getEPwiw@@GLIBCXX_3.4
FUNC:_ZNSt13basic_istreamIwSt11char_traitsIwEE3getERSt15basic_streambufIwS1_E@@GLIBCXX_3.4
@@ -1265,6 +1343,14 @@
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEE6sentryD1Ev@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEE6sentryD2Ev@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEE8_M_writeEPKwi@@GLIBCXX_3.4
+FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIPKvEERS2_T_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIbEERS2_T_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIdEERS2_T_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIeEERS2_T_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIlEERS2_T_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertImEERS2_T_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIxEERS2_T_@@GLIBCXX_3.4.9
+FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIyEERS2_T_@@GLIBCXX_3.4.9
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEEC1EPSt15basic_streambufIwS1_E@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEEC1Ev@@GLIBCXX_3.4
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEEC2EPSt15basic_streambufIwS1_E@@GLIBCXX_3.4
@@ -1386,6 +1472,7 @@
FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv@@GLIBCXX_3.4
FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE6setbufEPci@@GLIBCXX_3.4
FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE6snextcEv@@GLIBCXX_3.4
+FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE6stosscEv@@GLIBCXX_3.4.10
FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsgetnEPci@@GLIBCXX_3.4
FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsputnEPKci@@GLIBCXX_3.4
FUNC:_ZNSt15basic_streambufIcSt11char_traitsIcEE7pubsyncEv@@GLIBCXX_3.4
@@ -1424,6 +1511,7 @@
FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv@@GLIBCXX_3.4
FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE6setbufEPwi@@GLIBCXX_3.4
FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE6snextcEv@@GLIBCXX_3.4
+FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE6stosscEv@@GLIBCXX_3.4.10
FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE6xsgetnEPwi@@GLIBCXX_3.4
FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE6xsputnEPKwi@@GLIBCXX_3.4
FUNC:_ZNSt15basic_streambufIwSt11char_traitsIwEE7pubsyncEv@@GLIBCXX_3.4
@@ -1455,6 +1543,7 @@
FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE7seekposESt4fposI11__mbstate_tESt13_Ios_Openmode@@GLIBCXX_3.4
FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE8overflowEi@@GLIBCXX_3.4
FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE9pbackfailEi@@GLIBCXX_3.4
+FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE9showmanycEv@@GLIBCXX_3.4.6
FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE9underflowEv@@GLIBCXX_3.4
FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEEC1ERKSsSt13_Ios_Openmode@@GLIBCXX_3.4
FUNC:_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEEC1ESt13_Ios_Openmode@@GLIBCXX_3.4
@@ -1471,6 +1560,7 @@
FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE7seekposESt4fposI11__mbstate_tESt13_Ios_Openmode@@GLIBCXX_3.4
FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE8overflowEj@@GLIBCXX_3.4
FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE9pbackfailEj@@GLIBCXX_3.4
+FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE9showmanycEv@@GLIBCXX_3.4.6
FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE9underflowEv@@GLIBCXX_3.4
FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEEC1ERKSbIwS1_S2_ESt13_Ios_Openmode@@GLIBCXX_3.4
FUNC:_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEEC1ESt13_Ios_Openmode@@GLIBCXX_3.4
@@ -1660,10 +1750,16 @@
FUNC:_ZNSt5ctypeIwED0Ev@@GLIBCXX_3.4
FUNC:_ZNSt5ctypeIwED1Ev@@GLIBCXX_3.4
FUNC:_ZNSt5ctypeIwED2Ev@@GLIBCXX_3.4
+FUNC:_ZNSt6__norm15_List_node_base4hookEPS0_@@GLIBCXX_3.4.9
+FUNC:_ZNSt6__norm15_List_node_base4swapERS0_S1_@@GLIBCXX_3.4.9
+FUNC:_ZNSt6__norm15_List_node_base6unhookEv@@GLIBCXX_3.4.9
+FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9
+FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9
FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4
FUNC:_ZNSt6locale21_S_normalize_categoryEi@@GLIBCXX_3.4
+FUNC:_ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj@@GLIBCXX_3.4.7
FUNC:_ZNSt6locale5_Impl16_M_install_facetEPKNS_2idEPKNS_5facetE@@GLIBCXX_3.4
FUNC:_ZNSt6locale5_Impl16_M_replace_facetEPKS0_PKNS_2idE@@GLIBCXX_3.4
FUNC:_ZNSt6locale5_Impl19_M_replace_categoryEPKS0_PKPKNS_2idE@@GLIBCXX_3.4
@@ -1676,6 +1772,7 @@
FUNC:_ZNSt6locale5_ImplC2Ej@@GLIBCXX_3.4
FUNC:_ZNSt6locale5_ImplD1Ev@@GLIBCXX_3.4
FUNC:_ZNSt6locale5_ImplD2Ev@@GLIBCXX_3.4
+FUNC:_ZNSt6locale5facet13_S_get_c_nameEv@@GLIBCXX_3.4.6
FUNC:_ZNSt6locale5facet15_S_get_c_localeEv@@GLIBCXX_3.4
FUNC:_ZNSt6locale5facet17_S_clone_c_localeERP15__locale_struct@@GLIBCXX_3.4
FUNC:_ZNSt6locale5facet18_S_create_c_localeERP15__locale_structPKcS2_@@GLIBCXX_3.4
@@ -1753,7 +1850,9 @@
FUNC:_ZNSt8bad_castD2Ev@@GLIBCXX_3.4
FUNC:_ZNSt8ios_base13_M_grow_wordsEib@@GLIBCXX_3.4
FUNC:_ZNSt8ios_base15sync_with_stdioEb@@GLIBCXX_3.4
+FUNC:_ZNSt8ios_base17_M_call_callbacksENS_5eventE@@GLIBCXX_3.4.6
FUNC:_ZNSt8ios_base17register_callbackEPFvNS_5eventERS_iEi@@GLIBCXX_3.4
+FUNC:_ZNSt8ios_base20_M_dispose_callbacksEv@@GLIBCXX_3.4.6
FUNC:_ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4
FUNC:_ZNSt8ios_base4InitC2Ev@@GLIBCXX_3.4
FUNC:_ZNSt8ios_base4InitD1Ev@@GLIBCXX_3.4
@@ -1832,6 +1931,11 @@
FUNC:_ZNSt8valarrayIjED1Ev@@GLIBCXX_3.4
FUNC:_ZNSt8valarrayIjED2Ev@@GLIBCXX_3.4
FUNC:_ZNSt8valarrayIjEixEj@@GLIBCXX_3.4
+FUNC:_ZNSt9__cxx199815_List_node_base4hookEPS0_@@GLIBCXX_3.4.10
+FUNC:_ZNSt9__cxx199815_List_node_base4swapERS0_S1_@@GLIBCXX_3.4.10
+FUNC:_ZNSt9__cxx199815_List_node_base6unhookEv@@GLIBCXX_3.4.10
+FUNC:_ZNSt9__cxx199815_List_node_base7reverseEv@@GLIBCXX_3.4.10
+FUNC:_ZNSt9__cxx199815_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.10
FUNC:_ZNSt9bad_allocD0Ev@@GLIBCXX_3.4
FUNC:_ZNSt9bad_allocD1Ev@@GLIBCXX_3.4
FUNC:_ZNSt9bad_allocD2Ev@@GLIBCXX_3.4
@@ -1913,8 +2017,13 @@
FUNC:_ZSt14__convert_to_vIfEvPKcRT_RSt12_Ios_IostateRKP15__locale_struct@@GLIBCXX_3.4
FUNC:_ZSt14set_unexpectedPFvvE@@GLIBCXX_3.4
FUNC:_ZSt15set_new_handlerPFvvE@@GLIBCXX_3.4
+FUNC:_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_i@@GLIBCXX_3.4.9
+FUNC:_ZSt16__ostream_insertIwSt11char_traitsIwEERSt13basic_ostreamIT_T0_ES6_PKS3_i@@GLIBCXX_3.4.9
FUNC:_ZSt16__throw_bad_castv@@GLIBCXX_3.4
+FUNC:_ZSt17__copy_streambufsIcSt11char_traitsIcEEiPSt15basic_streambufIT_T0_ES6_@@GLIBCXX_3.4.6
+FUNC:_ZSt17__copy_streambufsIwSt11char_traitsIwEEiPSt15basic_streambufIT_T0_ES6_@@GLIBCXX_3.4.6
FUNC:_ZSt17__throw_bad_allocv@@GLIBCXX_3.4
+FUNC:_ZSt17__verify_groupingPKcjRKSs@@GLIBCXX_3.4.10
FUNC:_ZSt18_Rb_tree_decrementPKSt18_Rb_tree_node_base@@GLIBCXX_3.4
FUNC:_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base@@GLIBCXX_3.4
FUNC:_ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base@@GLIBCXX_3.4
@@ -1930,6 +2039,8 @@
FUNC:_ZSt20__throw_length_errorPKc@@GLIBCXX_3.4
FUNC:_ZSt20__throw_out_of_rangePKc@@GLIBCXX_3.4
FUNC:_ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_@@GLIBCXX_3.4
+FUNC:_ZSt21__copy_streambufs_eofIcSt11char_traitsIcEEiPSt15basic_streambufIT_T0_ES6_Rb@@GLIBCXX_3.4.9
+FUNC:_ZSt21__copy_streambufs_eofIwSt11char_traitsIwEEiPSt15basic_streambufIT_T0_ES6_Rb@@GLIBCXX_3.4.9
FUNC:_ZSt21__throw_bad_exceptionv@@GLIBCXX_3.4
FUNC:_ZSt21__throw_runtime_errorPKc@@GLIBCXX_3.4
FUNC:_ZSt22__throw_overflow_errorPKc@@GLIBCXX_3.4
@@ -2162,36 +2273,23 @@
FUNC:__cxa_vec_new@@CXXABI_1.3
FUNC:__dynamic_cast@@CXXABI_1.3
FUNC:__gxx_personality_v0@@CXXABI_1.3
-FUNC:acosl@@GLIBCXX_3.4.3
-FUNC:asinl@@GLIBCXX_3.4.3
-FUNC:atan2l@@GLIBCXX_3.4
-FUNC:atanl@@GLIBCXX_3.4.3
-FUNC:ceill@@GLIBCXX_3.4.3
-FUNC:coshl@@GLIBCXX_3.4
-FUNC:cosl@@GLIBCXX_3.4
-FUNC:expl@@GLIBCXX_3.4
-FUNC:floorl@@GLIBCXX_3.4.3
-FUNC:fmodl@@GLIBCXX_3.4.3
-FUNC:frexpl@@GLIBCXX_3.4.3
-FUNC:hypotl@@GLIBCXX_3.4
-FUNC:ldexpl@@GLIBCXX_3.4.3
-FUNC:log10l@@GLIBCXX_3.4
-FUNC:logl@@GLIBCXX_3.4
-FUNC:modfl@@GLIBCXX_3.4.3
-FUNC:powl@@GLIBCXX_3.4
-FUNC:sinhl@@GLIBCXX_3.4
-FUNC:sinl@@GLIBCXX_3.4
-FUNC:sqrtl@@GLIBCXX_3.4
-FUNC:tanhl@@GLIBCXX_3.4
-FUNC:tanl@@GLIBCXX_3.4
+FUNC:__signbitl@@GLIBCXX_3.4
OBJECT:0:CXXABI_1.3
OBJECT:0:CXXABI_1.3.1
+OBJECT:0:CXXABI_1.3.2
OBJECT:0:GLIBCXX_3.4
OBJECT:0:GLIBCXX_3.4.1
+OBJECT:0:GLIBCXX_3.4.10
OBJECT:0:GLIBCXX_3.4.2
OBJECT:0:GLIBCXX_3.4.3
OBJECT:0:GLIBCXX_3.4.4
OBJECT:0:GLIBCXX_3.4.5
+OBJECT:0:GLIBCXX_3.4.6
+OBJECT:0:GLIBCXX_3.4.7
+OBJECT:0:GLIBCXX_3.4.8
+OBJECT:0:GLIBCXX_3.4.9
+OBJECT:1028:_ZNSt3tr18__detail12__prime_listE@@GLIBCXX_3.4.10
+OBJECT:1028:_ZNSt8__detail12__prime_listE@@GLIBCXX_3.4.10
OBJECT:12:_ZTIN10__cxxabiv116__enum_type_infoE@@CXXABI_1.3
OBJECT:12:_ZTIN10__cxxabiv117__array_type_infoE@@CXXABI_1.3
OBJECT:12:_ZTIN10__cxxabiv117__class_type_infoE@@CXXABI_1.3
@@ -3135,6 +3233,8 @@
OBJECT:8:_ZGVNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE@@GLIBCXX_3.4
OBJECT:8:_ZGVNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE@@GLIBCXX_3.4
OBJECT:8:_ZGVNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE@@GLIBCXX_3.4
+OBJECT:8:_ZTIN10__cxxabiv115__forced_unwindE@@CXXABI_1.3.2
+OBJECT:8:_ZTIN10__cxxabiv119__foreign_exceptionE@@CXXABI_1.3.2
OBJECT:8:_ZTINSt6locale5facetE@@GLIBCXX_3.4
OBJECT:8:_ZTISt10ctype_base@@GLIBCXX_3.4
OBJECT:8:_ZTISt10money_base@@GLIBCXX_3.4

View File

@ -0,0 +1,157 @@
#! /bin/sh -e
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/config/t-slibgcc-elf-ver.orig 2006-10-03 18:16:53.094898500 +0200
+++ gcc/config/t-slibgcc-elf-ver 2006-10-03 18:17:40.061833750 +0200
@@ -14,6 +14,7 @@
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,--soname=$(SHLIB_SONAME) \
-Wl,--version-script=$(SHLIB_MAP) \
+ -Wl,-O1 \
-o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
$(SHLIB_OBJS) $(SHLIB_LC) && \
rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
--- libstdc++-v3/src/Makefile.am.orig 2006-10-03 18:16:53.186904250 +0200
+++ libstdc++-v3/src/Makefile.am 2006-10-03 18:17:40.121837500 +0200
@@ -185,6 +185,7 @@
libstdc___la_DEPENDENCIES = ${version_dep} $(libstdc___la_LIBADD)
libstdc___la_LDFLAGS = \
+ -Wl,-O1 \
-version-info $(libtool_VERSION) ${version_arg} -lm
# Use special rules for the deprecated source files so that they find
--- libstdc++-v3/src/Makefile.in.orig 2006-10-03 18:16:53.206905500 +0200
+++ libstdc++-v3/src/Makefile.in 2006-10-03 18:17:40.137838500 +0200
@@ -387,6 +387,7 @@
libstdc___la_DEPENDENCIES = ${version_dep} $(libstdc___la_LIBADD)
libstdc___la_LDFLAGS = \
+ -Wl,-O1 \
-version-info $(libtool_VERSION) ${version_arg} -lm
--- libobjc/Makefile.in.orig 2006-10-03 18:16:53.098898750 +0200
+++ libobjc/Makefile.in 2006-10-03 18:17:40.061833750 +0200
@@ -276,11 +276,13 @@
libobjc$(libext).la: $(OBJS)
$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
-rpath $(toolexeclibdir) \
+ -Wl,-O1 \
-version-info $(LIBOBJC_VERSION) $(extra_ldflags_libobjc)
libobjc_gc$(libext).la: $(OBJS_GC)
$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) \
-rpath $(toolexeclibdir) \
+ -Wl,-O1 \
-version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc)
#
--- libgfortran/Makefile.am.orig 2006-10-03 18:16:53.102899000 +0200
+++ libgfortran/Makefile.am 2006-10-03 18:18:59.566802500 +0200
@@ -7,7 +7,7 @@
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
toolexeclib_LTLIBRARIES = libgfortran.la
-libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran)
+libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran) -Wl,-O1
myexeclib_LTLIBRARIES = libgfortranbegin.la
myexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
--- libgfortran/Makefile.in.orig 2006-10-03 18:16:53.106899250 +0200
+++ libgfortran/Makefile.in 2006-10-03 18:19:17.543926000 +0200
@@ -359,7 +359,7 @@
ACLOCAL_AMFLAGS = -I ../config
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
toolexeclib_LTLIBRARIES = libgfortran.la
-libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran)
+libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran) -Wl,-O1
myexeclib_LTLIBRARIES = libgfortranbegin.la
myexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
libgfortranbegin_la_SOURCES = fmain.c
--- libmudflap/Makefile.am.orig 2006-10-03 18:16:53.182904000 +0200
+++ libmudflap/Makefile.am 2006-10-03 18:17:40.117837250 +0200
@@ -34,7 +34,7 @@
mf-hooks2.c
libmudflap_la_LIBADD =
libmudflap_la_DEPENDENCIES = $(libmudflap_la_LIBADD)
-libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
+libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1
clean-local:
rm -f pth/*.o pth/*.lo
--- libmudflap/Makefile.in.orig 2006-10-03 18:16:53.182904000 +0200
+++ libmudflap/Makefile.in 2006-10-03 18:17:40.121837500 +0200
@@ -241,7 +241,7 @@
libmudflap_la_LIBADD =
libmudflap_la_DEPENDENCIES = $(libmudflap_la_LIBADD)
-libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
+libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1
libmudflapth_la_SOURCES =
libmudflapth_la_LIBADD = \
pth/mf-runtime.lo \
--- libffi/Makefile.am.orig 2006-10-03 18:16:53.098898750 +0200
+++ libffi/Makefile.am 2006-10-03 18:17:40.061833750 +0200
@@ -154,7 +154,7 @@
AM_CFLAGS = -Wall -g -fexceptions
-libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
+libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
AM_CCASFLAGS = $(AM_CPPFLAGS)
--- libffi/Makefile.in.orig 2006-10-03 18:16:53.102899000 +0200
+++ libffi/Makefile.in 2006-10-03 18:17:40.065834000 +0200
@@ -436,7 +436,7 @@
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
AM_CFLAGS = -Wall -g -fexceptions
-libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
+libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
AM_CCASFLAGS = $(AM_CPPFLAGS)
all: fficonfig.h
--- libjava/Makefile.am.orig 2006-10-03 18:16:53.130900750 +0200
+++ libjava/Makefile.am 2006-10-03 18:17:40.093835750 +0200
@@ -97,7 +97,7 @@
GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \
$(LDFLAGS) -o $@
LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
- $(LDFLAGS) $(extra_ldflags_libjava) -o $@
+ $(LDFLAGS) $(extra_ldflags_libjava) -Wl,-O1 -o $@
GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
--- libjava/Makefile.in.orig 2006-10-03 18:16:53.162902750 +0200
+++ libjava/Makefile.in 2006-10-03 18:17:40.117837250 +0200
@@ -733,7 +733,7 @@
$(LDFLAGS) -o $@
LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
- $(LDFLAGS) $(extra_ldflags_libjava) -o $@
+ $(LDFLAGS) $(extra_ldflags_libjava) -Wl,-O1 -o $@
WARNINGS = -Wextra -Wall
AM_CXXFLAGS = \

View File

@ -0,0 +1,61 @@
#! /bin/sh -e
# DP: Patch author: Stuart Anderson <anderson@netsweng.com>
# DP: Upstream status: Not submitted
# DP: Description: add full tri-arch support. Include linux64.h also fix up
# DP: Description: the directory names so that o32 is the default and follow
# DP: Description: the glibc convention for 32 & 64 bit names
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- src/gcc/config/mips/linux64.h 2007-08-02 12:49:31.000000000 +0200
+++ src/gcc/config/mips/linux64.h 2008-03-14 14:33:41.000000000 +0100
@@ -24,7 +24,7 @@
#define DRIVER_SELF_SPECS \
NO_SHARED_SPECS \
" %{!EB:%{!EL:%(endian_spec)}}" \
-" %{!mabi=*: -mabi=n32}"
+" %{!mabi=*: -mabi=32}"
#undef SUBTARGET_ASM_SPEC
#define SUBTARGET_ASM_SPEC "\
--- src/gcc/config/mips/t-linux64 2006-06-06 14:51:24.000000000 +0200
+++ src/gcc/config/mips/t-linux64 2008-03-14 14:26:21.000000000 +0100
@@ -1,5 +1,5 @@
MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
-MULTILIB_DIRNAMES = n32 32 64
+MULTILIB_DIRNAMES = n32 . 64
MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
--- src/gcc/config.gcc 2008-01-29 17:28:10.000000000 +0100
+++ src/gcc/config.gcc 2008-03-14 14:26:21.000000000 +0100
@@ -1680,7 +1680,8 @@
test x$with_llsc != x || with_llsc=yes
;;
mips*-*-linux*) # Linux MIPS, either endian.
- tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h mips/linux64.h"
+ tmake_file="${tmake_file} mips/t-linux64"
case ${target} in
mipsisa32r2*)
tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"

View File

@ -0,0 +1,36 @@
#! /bin/sh -e
# DP: Disable running the libmudflap testsuite. Getting killed on alpha.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- libmudflap/testsuite/Makefile.in~ 2005-09-23 18:33:47.000000000 +0200
+++ libmudflap/testsuite/Makefile.in 2006-03-25 20:31:45.044903808 +0100
@@ -218,6 +218,8 @@
check-DEJAGNU: site.exp
+ @echo target $@ disabled for Debian build.
+check-DEJAGNU-disabled: site.exp
srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
EXPECT=$(EXPECT); export EXPECT; \
runtest=$(RUNTEST); \

View File

@ -0,0 +1,138 @@
#! /bin/sh -e
# DP: biarch-include.dpatch
# DP:
# DP: Adds biarch include directories
# DP: /usr/local/include/<arch>-linux-gnu
# DP: /usr/include/<arch>-linux-gnu
# DP: to the system include paths, depending on 32/64 bit mode.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
Index: gcc/cppdefault.c
===================================================================
--- gcc/cppdefault.c (revision 112832)
+++ gcc/cppdefault.c (working copy)
@@ -60,6 +60,7 @@
#endif
#ifdef LOCAL_INCLUDE_DIR
/* /usr/local/include comes before the fixincluded header files. */
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
{ LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
#endif
#ifdef PREFIX_INCLUDE_DIR
@@ -83,6 +84,7 @@
#endif
#ifdef STANDARD_INCLUDE_DIR
/* /usr/include comes dead last. */
+ { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 2 },
{ STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 0 },
#endif
{ 0, 0, 0, 0, 0, 0 }
Index: gcc/c-incpath.c
===================================================================
--- gcc/c-incpath.c (revision 112832)
+++ gcc/c-incpath.c (working copy)
@@ -30,6 +30,7 @@
#include "intl.h"
#include "c-incpath.h"
#include "cppdefault.h"
+#include "errors.h"
/* Windows does not natively support inodes, and neither does MSDOS.
Cygwin's emulation can generate non-unique inodes, so don't use it.
@@ -121,6 +121,31 @@
}
}
+struct multiarch_mapping
+{
+ const char *const multilib;
+ const char *const multiarch;
+};
+
+const struct multiarch_mapping multiarch_mappings[]
+= {
+#include "multiarch.inc"
+ { 0, 0 }
+};
+
+static const char*
+multilib_to_multiarch (const char *imultilib)
+{
+ const struct multiarch_mapping *p;
+
+ for (p = multiarch_mappings; p->multiarch; p++)
+ {
+ if (!strcmp(p->multilib, imultilib ? imultilib : ""))
+ return p->multiarch;
+ }
+ internal_error("no multiarch mapping for multilib (%s)\n", imultilib);
+}
+
/* Append the standard include chain defined in cppdefault.c. */
static void
add_standard_paths (const char *sysroot, const char *iprefix,
@@ -128,6 +153,7 @@
{
const struct default_include *p;
size_t len;
+ const char *multiarch;
if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0)
{
@@ -146,8 +172,15 @@
if (!strncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
{
char *str = concat (iprefix, p->fname + len, NULL);
- if (p->multilib && imultilib)
+ if (p->multilib == 1 && imultilib)
str = concat (str, dir_separator_str, imultilib, NULL);
+ if (p->multilib == 2)
+ {
+ multiarch = multilib_to_multiarch (imultilib);
+ if (!multiarch)
+ continue;
+ str = concat (str, dir_separator_str, multiarch, NULL);
+ }
add_path (str, SYSTEM, p->cxx_aware, false);
}
}
@@ -166,9 +199,17 @@
else
str = update_path (p->fname, p->component);
- if (p->multilib && imultilib)
+ if (p->multilib == 1 && imultilib)
str = concat (str, dir_separator_str, imultilib, NULL);
+ if (p->multilib == 2)
+ {
+ multiarch = multilib_to_multiarch (imultilib);
+ if (!multiarch)
+ continue;
+ str = concat (str, dir_separator_str, multiarch, NULL);
+ }
+
add_path (str, SYSTEM, p->cxx_aware, false);
}
}

View File

@ -0,0 +1,52 @@
#! /bin/sh -e
# multiarch-lib.dpatch by Stephen Frost <sfrost@debian.org>
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
diff -urN gcc.old/config/i386/t-linux64 gcc/config/i386/t-linux64
--- gcc.old/config/i386/t-linux64 2002-11-28 15:47:02.000000000 +0100
+++ gcc/config/i386/t-linux64 2004-07-10 07:28:01.000000000 +0200
@@ -6,7 +6,7 @@
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64 ../lib
+MULTILIB_OSDIRNAMES = x86_64-linux i486-linux
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
diff -urN gcc.old/config/t-linux gcc/config/t-linux
--- gcc.old/config/t-linux 2004-05-04 18:09:38.000000000 +0200
+++ gcc/config/t-linux 2004-07-10 07:28:01.000000000 +0200
@@ -11,3 +11,11 @@
LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
$(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
+
+MULTILIB_OPTIONS = m32
+MULTILIB_DIRNAMES = 32
+MULTILIB_OSDIRNAMES = $TARGET_ARCH
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+

View File

@ -0,0 +1,316 @@
#! /bin/sh -e
# DP: Add .note.GNU-stack sections for gcc's crt files, libffi and boehm-gc
# DP: Taken from FC.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
gcc/
2004-09-20 Jakub Jelinek <jakub@redhat.com>
* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
on ppc64-linux.
* config/ia64/lib1funcs.asm: Add .note.GNU-stack section on
ia64-linux.
* config/ia64/crtbegin.asm: Likewise.
* config/ia64/crtend.asm: Likewise.
* config/ia64/crti.asm: Likewise.
* config/ia64/crtn.asm: Likewise.
2004-05-14 Jakub Jelinek <jakub@redhat.com>
* config/ia64/linux.h (TARGET_ASM_FILE_END): Define.
boehm-gc/
2005-02-08 Jakub Jelinek <jakub@redhat.com>
* ia64_save_regs_in_stack.s: Moved to...
* ia64_save_regs_in_stack.S: ... this. Add .note.GNU-stack
on Linux.
libffi/
2007-05-11 Daniel Jacobowitz <dan@debian.org>
* src/arm/sysv.S: Fix ARM comment marker.
2005-02-08 Jakub Jelinek <jakub@redhat.com>
* src/alpha/osf.S: Add .note.GNU-stack on Linux.
* src/s390/sysv.S: Likewise.
* src/powerpc/linux64.S: Likewise.
* src/powerpc/linux64_closure.S: Likewise.
* src/powerpc/ppc_closure.S: Likewise.
* src/powerpc/sysv.S: Likewise.
* src/x86/unix64.S: Likewise.
* src/x86/sysv.S: Likewise.
* src/sparc/v8.S: Likewise.
* src/sparc/v9.S: Likewise.
* src/m68k/sysv.S: Likewise.
* src/ia64/unix.S: Likewise.
* src/arm/sysv.S: Likewise.
Index: boehm-gc/ia64_save_regs_in_stack.s
===================================================================
--- boehm-gc/ia64_save_regs_in_stack.s (revision 107431)
+++ boehm-gc/ia64_save_regs_in_stack.s (revision 107432)
@@ -1,12 +0,0 @@
- .text
- .align 16
- .global GC_save_regs_in_stack
- .proc GC_save_regs_in_stack
-GC_save_regs_in_stack:
- .body
- flushrs
- ;;
- mov r8=ar.bsp
- br.ret.sptk.few rp
- .endp GC_save_regs_in_stack
-
Index: boehm-gc/ia64_save_regs_in_stack.S
===================================================================
--- boehm-gc/ia64_save_regs_in_stack.S (revision 0)
+++ boehm-gc/ia64_save_regs_in_stack.S (revision 107432)
@@ -0,0 +1,15 @@
+ .text
+ .align 16
+ .global GC_save_regs_in_stack
+ .proc GC_save_regs_in_stack
+GC_save_regs_in_stack:
+ .body
+ flushrs
+ ;;
+ mov r8=ar.bsp
+ br.ret.sptk.few rp
+ .endp GC_save_regs_in_stack
+
+#ifdef __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--- gcc/config/ia64/linux.h.orig 2006-10-12 02:01:00.000000000 +0200
+++ gcc/config/ia64/linux.h 2006-12-11 10:33:13.000000000 +0100
@@ -5,6 +5,8 @@
#define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+
/* This is for -profile to use -lc_p instead of -lc. */
#undef CC1_SPEC
#define CC1_SPEC "%{profile:-p} %{G*}"
--- gcc/config/ia64/lib1funcs.asm.orig 2006-01-18 22:46:41.000000000 +0100
+++ gcc/config/ia64/lib1funcs.asm 2006-12-11 10:33:13.000000000 +0100
@@ -792,3 +792,7 @@
}
.endp __floattitf
#endif
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- gcc/config/ia64/crti.asm.orig 2006-01-18 22:46:41.000000000 +0100
+++ gcc/config/ia64/crti.asm 2006-12-11 10:33:13.000000000 +0100
@@ -64,3 +64,7 @@
.body
# end of crti.asm
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- gcc/config/ia64/crtn.asm.orig 2006-01-18 22:46:41.000000000 +0100
+++ gcc/config/ia64/crtn.asm 2006-12-11 10:33:13.000000000 +0100
@@ -54,3 +54,7 @@
br.ret.sptk.many b0
# end of crtn.asm
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- gcc/config/ia64/crtend.asm.orig 2006-01-18 22:46:41.000000000 +0100
+++ gcc/config/ia64/crtend.asm 2006-12-11 10:33:13.000000000 +0100
@@ -122,3 +122,7 @@
br.ret.sptk.many rp
.endp __do_global_ctors_aux
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- gcc/config/ia64/crtbegin.asm.orig 2006-01-18 22:46:41.000000000 +0100
+++ gcc/config/ia64/crtbegin.asm 2006-12-11 10:33:13.000000000 +0100
@@ -255,3 +255,7 @@
.weak __cxa_finalize
#endif
.weak _Jv_RegisterClasses
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- gcc/config/rs6000/ppc-asm.h.orig 2006-01-18 22:46:46.000000000 +0100
+++ gcc/config/rs6000/ppc-asm.h 2006-12-11 10:33:14.000000000 +0100
@@ -158,7 +158,7 @@
.size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
#endif
-#if defined __linux__ && !defined __powerpc64__
+#if defined __linux__
.section .note.GNU-stack
.previous
#endif
--- libffi/src/powerpc/ppc_closure.S.orig 2006-03-25 09:16:06.000000000 +0100
+++ libffi/src/powerpc/ppc_closure.S 2006-12-11 10:33:14.000000000 +0100
@@ -281,3 +281,7 @@
.LEFDE1:
#endif
+
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--- libffi/src/powerpc/sysv.S.orig 2006-03-25 09:16:06.000000000 +0100
+++ libffi/src/powerpc/sysv.S 2006-12-11 10:33:14.000000000 +0100
@@ -217,3 +217,7 @@
.align 2
.LEFDE1:
#endif
+
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--- libffi/src/powerpc/linux64_closure.S.orig 2006-01-18 22:49:27.000000000 +0100
+++ libffi/src/powerpc/linux64_closure.S 2006-12-11 10:33:14.000000000 +0100
@@ -204,3 +204,7 @@
.align 3
.LEFDE1:
#endif
+
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--- libffi/src/powerpc/linux64.S.orig 2006-03-25 09:16:06.000000000 +0100
+++ libffi/src/powerpc/linux64.S 2006-12-11 10:33:14.000000000 +0100
@@ -175,3 +175,7 @@
.align 3
.LEFDE1:
#endif
+
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--- libffi/src/arm/sysv.S.orig 2006-10-12 02:00:57.000000000 +0200
+++ libffi/src/arm/sysv.S 2006-12-11 10:33:14.000000000 +0100
@@ -255,3 +255,6 @@
.ffi_closure_SYSV_end:
.size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",%progbits
+#endif
--- libffi/src/m68k/sysv.S.orig 2006-01-18 22:49:27.000000000 +0100
+++ libffi/src/m68k/sysv.S 2006-12-11 10:33:14.000000000 +0100
@@ -207,3 +207,7 @@
rts
CFI_ENDPROC()
.size ffi_closure_struct_SYSV,.-ffi_closure_struct_SYSV
+
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--- libffi/src/alpha/osf.S.orig 2006-01-18 22:49:27.000000000 +0100
+++ libffi/src/alpha/osf.S 2006-12-11 10:33:14.000000000 +0100
@@ -356,4 +356,8 @@
.byte 16 # uleb128 offset 16*-8
.align 3
$LEFDE3:
+
+#ifdef __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
#endif
--- libffi/src/x86/sysv.S.orig 2006-01-18 22:49:28.000000000 +0100
+++ libffi/src/x86/sysv.S 2006-12-11 10:33:14.000000000 +0100
@@ -376,3 +376,7 @@
#endif
#endif /* ifndef __x86_64__ */
+
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--- libffi/src/x86/unix64.S.orig 2006-01-18 22:49:28.000000000 +0100
+++ libffi/src/x86/unix64.S 2006-12-11 10:33:14.000000000 +0100
@@ -410,3 +410,7 @@
.LEFDE3:
#endif /* __x86_64__ */
+
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--- libffi/src/s390/sysv.S.orig 2006-01-18 22:49:28.000000000 +0100
+++ libffi/src/s390/sysv.S 2006-12-11 10:33:14.000000000 +0100
@@ -427,3 +427,6 @@
#endif
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--- libffi/src/ia64/unix.S.orig 2006-01-18 22:49:29.000000000 +0100
+++ libffi/src/ia64/unix.S 2006-12-11 10:33:14.000000000 +0100
@@ -553,3 +553,7 @@
data8 @pcrel(.Lld_hfa_float) // FFI_IA64_TYPE_HFA_FLOAT
data8 @pcrel(.Lld_hfa_double) // FFI_IA64_TYPE_HFA_DOUBLE
data8 @pcrel(.Lld_hfa_ldouble) // FFI_IA64_TYPE_HFA_LDOUBLE
+
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--- libffi/src/sparc/v9.S.orig 2006-01-18 22:49:29.000000000 +0100
+++ libffi/src/sparc/v9.S 2006-12-11 10:33:14.000000000 +0100
@@ -300,3 +300,7 @@
.align 8
.LLEFDE2:
#endif
+
+#ifdef __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--- libffi/src/sparc/v8.S.orig 2006-01-18 22:49:29.000000000 +0100
+++ libffi/src/sparc/v8.S 2006-12-11 10:33:14.000000000 +0100
@@ -265,3 +265,7 @@
.byte 0x1f ! uleb128 0x1f
.align WS
.LLEFDE2:
+
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif

View File

@ -0,0 +1,47 @@
#! /bin/sh -e
# DP: enable biarch for 32 bit compiler
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/config/rs6000/t-linux64.orig 2007-09-29 16:03:54.000000000 +0000
+++ gcc/config/rs6000/t-linux64 2007-09-30 10:36:47.000000000 +0000
@@ -14,13 +14,13 @@
# it doesn't tell anything about the 32bit libraries on those systems. Set
# MULTILIB_OSDIRNAMES according to what is found on the target.
-MULTILIB_OPTIONS = m64/m32 msoft-float
-MULTILIB_DIRNAMES = 64 32 nof
+MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64 32
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
-MULTILIB_EXCEPTIONS = m64/msoft-float
-MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
-MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
+MULTILIB_EXCEPTIONS =
+MULTILIB_EXCLUSIONS =
+MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+MULTILIB_MATCHES =
softfp_wrap_start := '\#ifndef __powerpc64__'
softfp_wrap_end := '\#endif'

View File

@ -0,0 +1,257 @@
#! /bin/sh -e
# DP: Add gcc/ada/system-linux-ppc64.ads and use it in gcc/ada/Makefile.in
# DP:
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
diff -urN src.orig/gcc/ada/Makefile.in src/gcc/ada/Makefile.in
--- src.orig/gcc/ada/Makefile.in 2005-05-02 16:39:32.000000000 +0200
+++ src/gcc/ada/Makefile.in 2005-05-02 16:36:37.000000000 +0200
@@ -1346,6 +1346,31 @@
LIBRARY_VERSION := $(LIB_VERSION)
endif
+ifeq ($(strip $(filter-out powerpc64% linux%,$(arch) $(osys))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-linux.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+ s-intman.adb<s-intman-posix.adb \
+ s-osinte.adb<s-osinte-posix.adb \
+ s-osinte.ads<s-osinte-linux.ads \
+ s-osprim.adb<s-osprim-posix.adb \
+ s-taprop.adb<s-taprop-linux.adb \
+ s-taspri.ads<s-taspri-linux.ads \
+ s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
+ s-parame.adb<s-parame-linux.adb \
+ system.ads<system-linux-ppc64.ads
+
+ TOOLS_TARGET_PAIRS = \
+ mlib-tgt.adb<mlib-tgt-linux.adb \
+ indepsw.adb<indepsw-linux.adb
+
+ THREADSLIB = -lpthread
+ GNATLIB_SHARED = gnatlib-shared-dual
+ GMEM_LIB = gmemlib
+ PREFIX_OBJS = $(PREFIX_REAL_OBJS)
+ LIBRARY_VERSION := $(LIB_VERSION)
+endif
+
ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-linux.ads \
diff -urN src.orig/gcc/ada/system-linux-ppc64.ads src/gcc/ada/system-linux-ppc64.ads
--- src.orig/gcc/ada/system-linux-ppc64.ads 1970-01-01 01:00:00.000000000 +0100
+++ src/gcc/ada/system-linux-ppc64.ads 2005-05-02 16:33:38.000000000 +0200
@@ -0,0 +1,151 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- S Y S T E M --
+-- --
+-- S p e c --
+-- (GNU-Linux/PPC64 Version) --
+-- --
+-- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the contents of the part following the private keyword. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT 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 distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
+-- MA 02111-1307, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package System is
+pragma Pure (System);
+-- Note that we take advantage of the implementation permission to
+-- make this unit Pure instead of Preelaborable, see RM 13.7(36)
+
+ type Name is (SYSTEM_NAME_GNAT);
+ System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+ -- System-Dependent Named Numbers
+
+ Min_Int : constant := Long_Long_Integer'First;
+ Max_Int : constant := Long_Long_Integer'Last;
+
+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
+ Max_Nonbinary_Modulus : constant := Integer'Last;
+
+ Max_Base_Digits : constant := Long_Long_Float'Digits;
+ Max_Digits : constant := Long_Long_Float'Digits;
+
+ Max_Mantissa : constant := 63;
+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
+
+ Tick : constant := 0.000_001;
+
+ -- Storage-related Declarations
+
+ type Address is private;
+ Null_Address : constant Address;
+
+ Storage_Unit : constant := 8;
+ Word_Size : constant := 64;
+ Memory_Size : constant := 2 ** 64;
+
+ -- Address comparison
+
+ function "<" (Left, Right : Address) return Boolean;
+ function "<=" (Left, Right : Address) return Boolean;
+ function ">" (Left, Right : Address) return Boolean;
+ function ">=" (Left, Right : Address) return Boolean;
+ function "=" (Left, Right : Address) return Boolean;
+
+ pragma Import (Intrinsic, "<");
+ pragma Import (Intrinsic, "<=");
+ pragma Import (Intrinsic, ">");
+ pragma Import (Intrinsic, ">=");
+ pragma Import (Intrinsic, "=");
+
+ -- Other System-Dependent Declarations
+
+ type Bit_Order is (High_Order_First, Low_Order_First);
+ Default_Bit_Order : constant Bit_Order := High_Order_First;
+
+ -- Priority-related Declarations (RM D.1)
+
+ Max_Priority : constant Positive := 30;
+ Max_Interrupt_Priority : constant Positive := 31;
+
+ subtype Any_Priority is Integer range 0 .. 31;
+ subtype Priority is Any_Priority range 0 .. 30;
+ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
+
+ Default_Priority : constant Priority := 15;
+
+private
+
+ type Address is mod Memory_Size;
+ Null_Address : constant Address := 0;
+
+ --------------------------------------
+ -- System Implementation Parameters --
+ --------------------------------------
+
+ -- These parameters provide information about the target that is used
+ -- by the compiler. They are in the private part of System, where they
+ -- can be accessed using the special circuitry in the Targparm unit
+ -- whose source should be consulted for more detailed descriptions
+ -- of the individual switch values.
+
+ AAMP : constant Boolean := False;
+ Backend_Divide_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := False;
+ Command_Line_Args : constant Boolean := True;
+ Configurable_Run_Time : constant Boolean := False;
+ Denorm : constant Boolean := True;
+ Duration_32_Bits : constant Boolean := False;
+ Exit_Status_Supported : constant Boolean := True;
+ Fractional_Fixed_Ops : constant Boolean := False;
+ Frontend_Layout : constant Boolean := False;
+ Functions_Return_By_DSP : constant Boolean := False;
+ Machine_Overflows : constant Boolean := False;
+ Machine_Rounds : constant Boolean := True;
+ OpenVMS : constant Boolean := False;
+ Preallocated_Stacks : constant Boolean := False;
+ Signed_Zeros : constant Boolean := True;
+ Stack_Check_Default : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := False;
+ Support_64_Bit_Divides : constant Boolean := True;
+ Support_Aggregates : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
+ Suppress_Standard_Library : constant Boolean := False;
+ Use_Ada_Main_Program_Name : constant Boolean := False;
+ ZCX_By_Default : constant Boolean := True;
+ GCC_ZCX_Support : constant Boolean := True;
+ Front_End_ZCX_Support : constant Boolean := False;
+
+ -- Obsolete entries, to be removed eventually (bootstrap issues!)
+
+ High_Integrity_Mode : constant Boolean := False;
+ Long_Shifts_Inlined : constant Boolean := True;
+
+end System;
diff -urN tmp/gcc/ada/s-auxdec.ads src/gcc/ada/s-auxdec.ads
--- tmp/gcc/ada/s-auxdec.ads 2004-06-11 12:47:36.000000000 +0200
+++ src/gcc/ada/s-auxdec.ads 2005-05-03 11:34:17.000000000 +0200
@@ -108,13 +108,13 @@
pragma Warnings (Off);
type F_Float is digits 6;
- pragma Float_Representation (VAX_Float, F_Float);
+-- pragma Float_Representation (VAX_Float, F_Float);
type D_Float is digits 9;
- pragma Float_Representation (Vax_Float, D_Float);
+-- pragma Float_Representation (Vax_Float, D_Float);
type G_Float is digits 15;
- pragma Float_Representation (Vax_Float, G_Float);
+-- pragma Float_Representation (Vax_Float, G_Float);
-- Floating point type declarations for IEEE floating point data types
--- tmp/gcc/ada/s-vaflop.ads 2003-10-21 15:42:18.000000000 +0200
+++ src/gcc/ada/s-vaflop.ads 2005-05-03 15:24:24.000000000 +0200
@@ -40,15 +40,15 @@
-- Suppress warnings if not on Alpha/VAX
type D is digits 9;
- pragma Float_Representation (VAX_Float, D);
+-- pragma Float_Representation (VAX_Float, D);
-- D Float type on Vax
type G is digits 15;
- pragma Float_Representation (VAX_Float, G);
+-- pragma Float_Representation (VAX_Float, G);
-- G Float type on Vax
type F is digits 6;
- pragma Float_Representation (VAX_Float, F);
+-- pragma Float_Representation (VAX_Float, F);
-- F Float type on Vax
type S is digits 6;

View File

@ -0,0 +1,88 @@
#! /bin/sh -e
# DP: Fix PR libgcj/24170.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
cd ${dir}libjava && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
rm -f ${dir}libjava/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2008-02-20 Tom Tromey <tromey@redhat.com>
PR libgcj/24170:
* java/io/natFilePosix.cc (File::performList): Don't use
readdir_r.
* configure, include/config.h.in: Rebuilt.
* configure.ac: Don't check for readdir_r.
Index: libjava/configure.ac
===================================================================
--- libjava/configure.ac (revision 132490)
+++ libjava/configure.ac (revision 132491)
@@ -1023,7 +1023,7 @@
PLATFORMNET=NoNet
else
AC_CHECK_FUNCS([strerror_r select fstat open fsync sleep opendir \
- localtime_r readdir_r getpwuid_r getcwd \
+ localtime_r getpwuid_r getcwd \
access stat lstat mkdir rename rmdir unlink utime chmod readlink \
nl_langinfo setlocale \
inet_pton uname inet_ntoa \
Index: libjava/include/config.h.in
===================================================================
--- libjava/include/config.h.in (revision 132490)
+++ libjava/include/config.h.in (revision 132491)
@@ -214,9 +214,6 @@
/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
-/* Define to 1 if you have the `readdir_r' function. */
-#undef HAVE_READDIR_R
-
/* Define to 1 if you have the `readlink' function. */
#undef HAVE_READLINK
Index: libjava/java/io/natFilePosix.cc
===================================================================
--- libjava/java/io/natFilePosix.cc (revision 132490)
+++ libjava/java/io/natFilePosix.cc (revision 132491)
@@ -1,6 +1,6 @@
// natFile.cc - Native part of File class for POSIX.
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2008
Free Software Foundation
This file is part of libgcj.
@@ -292,13 +292,7 @@
java::util::ArrayList *list = new java::util::ArrayList ();
struct dirent *d;
-#if defined(HAVE_READDIR_R) && defined(_POSIX_PTHREAD_SEMANTICS)
- int name_max = pathconf (buf, _PC_NAME_MAX);
- char dbuf[sizeof (struct dirent) + name_max + 1];
- while (readdir_r (dir, (struct dirent *) dbuf, &d) == 0 && d != NULL)
-#else /* HAVE_READDIR_R */
while ((d = readdir (dir)) != NULL)
-#endif /* HAVE_READDIR_R */
{
// Omit "." and "..".
if (d->d_name[0] == '.'

View File

@ -0,0 +1,90 @@
#! /bin/sh -e
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
# DP: PR target/27880: Restore static linking on ia64 with system libunwind
# DP: by adding unwind-compat to the static libgcc.
2006-06-19 Andreas Schwab <schwab@suse.de>
PR target/27880
* unwind-compat.c: Wrap everything except _Unwind_GetIPInfo inside
SHARED.
* config/t-libunwind (LIB2ADDEHSTATIC): Add
$(srcdir)/unwind-compat.c.
Index: gcc/config/t-libunwind
===================================================================
--- gcc/config/t-libunwind (revision 114767)
+++ gcc/config/t-libunwind (working copy)
@@ -6,7 +6,8 @@
SHLIB_LC = -lunwind -lc
LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \
$(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c
-LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \
+ $(srcdir)/unwind-compat.c
T_CFLAGS += -DUSE_LIBUNWIND_EXCEPTIONS
TARGET_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER
Index: gcc/unwind-compat.c
===================================================================
--- gcc/unwind-compat.c (revision 114767)
+++ gcc/unwind-compat.c (working copy)
@@ -35,6 +35,7 @@
#include "unwind-dw2-fde.h"
#include "unwind-compat.h"
+#ifdef SHARED
extern _Unwind_Reason_Code __libunwind_Unwind_Backtrace
(_Unwind_Trace_Fn, void *);
@@ -136,13 +137,6 @@ _Unwind_GetIP (struct _Unwind_Context *c
}
symver (_Unwind_GetIP, GCC_3.0);
-_Unwind_Ptr
-_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
-{
- *ip_before_insn = 0;
- return __libunwind_Unwind_GetIP (context);
-}
-
extern void *__libunwind_Unwind_GetLanguageSpecificData
(struct _Unwind_Context *);
@@ -212,4 +206,14 @@ _Unwind_SetIP (struct _Unwind_Context *c
return __libunwind_Unwind_SetIP (context, val);
}
symver (_Unwind_SetIP, GCC_3.0);
+#endif /* SHARED */
+
+extern _Unwind_Ptr __libunwind_Unwind_GetIP (struct _Unwind_Context *);
+
+_Unwind_Ptr
+_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
+{
+ *ip_before_insn = 0;
+ return __libunwind_Unwind_GetIP (context);
+}
#endif

View File

@ -0,0 +1,45 @@
#! /bin/sh -e
# DP: Apply proposed fix for PR target/28102.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2006-07-15 Alfred M. Szmidt <ams@gnu.org>
* config/i386/gnu.h (TARGET_C99_FUNCTIONS): Undefine macro.
Index: gcc/config/i386/gnu.h
===================================================================
--- gcc/config/i386/gnu.h (revision 115472)
+++ gcc/config/i386/gnu.h (working copy)
@@ -36,3 +36,9 @@
/* FIXME: Is a Hurd-specific fallback mechanism necessary? */
#undef MD_UNWIND_SUPPORT
+
+/* config.gcc includes i386/linux.h. */
+#undef TARGET_C99_FUNCTIONS
+#define TARGET_C99_FUNCTIONS 1
+#undef TARGET_HAS_SINCOS
+#define TARGET_HAS_SINCOS 1

View File

@ -0,0 +1,151 @@
#! /bin/sh -e
# DP: Fix PR other/28322, GCC new warnings and compatibility.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
gcc/
2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR other/28322
* toplev.c (toplev_main): If there are warnings or error, print
errors for ignored options.
* opts.c (ignored_options): New static variable.
(postpone_unknown_option_error): New.
(print_ignored_options): New.
(handle_option): Postpone errors for unknown -Wno-* options.
* opts.h (print_ignored_options): Declare.
gcc/testsuite/
2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR other/28322
* gcc.dg/pr28322.c: New.
* gcc.dg/pr28322-2.c: New.
* lib/prune.exp: Ignore "At top level" even if there is no ':'
preceding it.
Index: gcc/toplev.c
===================================================================
--- gcc/toplev.c (revision 132801)
+++ gcc/toplev.c (working copy)
@@ -2278,6 +2278,9 @@
if (!exit_after_options)
do_compile ();
+ if (warningcount || errorcount)
+ print_ignored_options ();
+
if (errorcount || sorrycount)
return (FATAL_EXIT_CODE);
Index: gcc/testsuite/lib/prune.exp
===================================================================
--- gcc/testsuite/lib/prune.exp (revision 132801)
+++ gcc/testsuite/lib/prune.exp (working copy)
@@ -21,7 +21,7 @@
#send_user "Before:$text\n"
regsub -all "(^|\n)(\[^\n\]*: )?In ((static member )?function|member|method|(copy )?constructor|destructor|instantiation|program|subroutine|block-data) \[^\n\]*" $text "" text
- regsub -all "(^|\n)\[^\n\]*: At (top level|global scope):\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*(: )?At (top level|global scope):\[^\n\]*" $text "" text
regsub -all "(^|\n)\[^\n\]*: instantiated from \[^\n\]*" $text "" text
regsub -all "(^|\n) inlined from \[^\n\]*" $text "" text
regsub -all "(^|\n)collect2: ld returned \[^\n\]*" $text "" text
Index: gcc/opts.c
===================================================================
--- gcc/opts.c (revision 132801)
+++ gcc/opts.c (working copy)
@@ -356,6 +356,12 @@
static VEC(char_p,heap) *flag_instrument_functions_exclude_functions;
static VEC(char_p,heap) *flag_instrument_functions_exclude_files;
+typedef const char *const_char_p; /* For DEF_VEC_P. */
+DEF_VEC_P(const_char_p);
+DEF_VEC_ALLOC_P(const_char_p,heap);
+
+static VEC(const_char_p,heap) *ignored_options;
+
/* Input file names. */
const char **in_fnames;
unsigned num_in_fnames;
@@ -434,6 +440,33 @@
free (bad_lang);
}
+/* Buffer the unknown option described by the string OPT. Currently,
+ we only complain about unknown -Wno-* options if they may have
+ prevented a diagnostic. Otherwise, we just ignore them. */
+
+static void postpone_unknown_option_error(const char *opt)
+{
+ VEC_safe_push (const_char_p, heap, ignored_options, opt);
+}
+
+/* Produce an error for each option previously buffered. */
+
+void print_ignored_options (void)
+{
+ location_t saved_loc = input_location;
+
+ input_location = 0;
+
+ while (!VEC_empty (const_char_p, ignored_options))
+ {
+ const char *opt;
+ opt = VEC_pop (const_char_p, ignored_options);
+ error ("unrecognized command line option \"%s\"", opt);
+ }
+
+ input_location = saved_loc;
+}
+
/* Handle the switch beginning at ARGV for the language indicated by
LANG_MASK. Returns the number of switches consumed. */
static unsigned int
@@ -463,6 +496,14 @@
opt = dup;
value = 0;
opt_index = find_opt (opt + 1, lang_mask | CL_COMMON | CL_TARGET);
+ if (opt_index == cl_options_count && opt[1] == 'W')
+ {
+ /* We don't generate errors for unknown -Wno-* options
+ unless we issue diagnostics. */
+ postpone_unknown_option_error (argv[0]);
+ result = 1;
+ goto done;
+ }
}
if (opt_index == cl_options_count)
Index: gcc/opts.h
===================================================================
--- gcc/opts.h (revision 132801)
+++ gcc/opts.h (working copy)
@@ -105,4 +105,5 @@
extern void enable_warning_as_error (const char *arg, int value,
unsigned int lang_mask);
+extern void print_ignored_options (void);
#endif

View File

@ -0,0 +1,179 @@
#! /bin/sh -e
# DP: <your description>
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
From: "H.J. Lu" <hjl@lucon.org>
Sender: gcc-patches-owner@gcc.gnu.org
To: gcc-patches@gcc.gnu.org
Subject: PATCH: PR target/30961: [4.1/4.2/4.3 regression] redundant reg/mem stores/moves
Date: Mon, 27 Aug 2007 11:34:12 -0700
We start with
(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
(insn:HI 6 3 10 2 c.c:3 (set (reg:DF 58 [ <result> ])
(subreg:DF (reg/v:DI 59 [ in ]) 0)) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg/v:DI 59 [ in ])
(nil)))
(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
(reg:DF 58 [ <result> ])) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg:DF 58 [ <result> ])
(nil)))
(insn:HI 16 10 0 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
we are trying to allocate registers for insn 6 and we allocate
xmm0 for the return value. Reload doesn't check if xmm0 can be used for
DF 59, it allocates xmm1 for DF 59 and generates:
Reloads for insn # 6
Reload 0: reload_in (DF) = (reg:DF 5 di)
SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
reload_reg_rtx: (reg:DF 22 xmm1)
...
(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
(const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
(reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
(insn 23 22 6 2 c.c:3 (set (reg:DF 22 xmm1)
(mem/c:DF (plus:DI (reg/f:DI 7 sp)
(const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
(insn:HI 6 23 16 2 c.c:3 (set (reg:DF 21 xmm0 [orig:58 <result> ] [58])
(reg:DF 22 xmm1)) 102 {*movdf_integer_rex64} (nil))
(insn 16 6 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
This patch tries to use the destination register when reloading for input. It
generates
Reloads for insn # 6
Reload 0: reload_in (DF) = (reg:DF 5 di)
SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
reload_reg_rtx: (reg:DF 21 xmm0)
...
(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
(const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
(reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
(insn 23 22 6 2 c.c:3 (set (reg:DF 21 xmm0)
(mem/c:DF (plus:DI (reg/f:DI 7 sp)
(const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
(insn:HI 6 23 10 2 c.c:3 (set (reg:DF 22 xmm1 [orig:58 <result> ] [58])
(reg:DF 21 xmm0)) 102 {*movdf_integer_rex64} (nil))
(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
(reg:DF 22 xmm1 [orig:58 <result> ] [58])) 102 {*movdf_integer_rex64} (nil))
(insn 16 10 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
H.J.
----
gcc/
2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/30961
* reload1.c (find_reg): Favor the hard register in destination
if it is usable and a memory location is needed for reload
input.
gcc/testsuite/
2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/30961
* gcc.target/i386/pr30961-1.c: New.
--- gcc/reload1.c.second 2007-08-27 09:35:08.000000000 -0700
+++ gcc/reload1.c 2007-08-27 09:36:33.000000000 -0700
@@ -1781,6 +1781,20 @@ find_reg (struct insn_chain *chain, int
HARD_REG_SET not_usable;
HARD_REG_SET used_by_other_reload;
reg_set_iterator rsi;
+#ifdef SECONDARY_MEMORY_NEEDED
+ rtx body = PATTERN (chain->insn);
+ unsigned int dest_reg = FIRST_PSEUDO_REGISTER;
+
+ if (GET_CODE (body) == SET)
+ {
+ rtx dest = SET_DEST (body);
+
+ if ((REG_P (dest)
+ || (GET_CODE (dest) == SUBREG
+ && REG_P (SUBREG_REG (dest)))))
+ dest_reg = reg_or_subregno (dest);
+ }
+#endif
COPY_HARD_REG_SET (not_usable, bad_spill_regs);
IOR_HARD_REG_SET (not_usable, bad_spill_regs_global);
@@ -1821,6 +1835,18 @@ find_reg (struct insn_chain *chain, int
this_cost--;
if (rl->out && REG_P (rl->out) && REGNO (rl->out) == regno)
this_cost--;
+#ifdef SECONDARY_MEMORY_NEEDED
+ /* If a memory location is needed for rl->in and dest_reg
+ is usable, we will favor it. */
+ else if (dest_reg == regno
+ && rl->in
+ && REG_P (rl->in)
+ && REGNO (rl->in) < FIRST_PSEUDO_REGISTER
+ && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (rl->in)),
+ rl->class,
+ rl->mode))
+ this_cost = 0;
+#endif
if (this_cost < best_cost
/* Among registers with equal cost, prefer caller-saved ones, or
use REG_ALLOC_ORDER if it is defined. */
--- gcc/testsuite/gcc.target/i386/pr30961-1.c.second 2007-08-27 11:01:59.000000000 -0700
+++ gcc/testsuite/gcc.target/i386/pr30961-1.c 2007-08-27 11:02:51.000000000 -0700
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2" } */
+
+double
+convert (long long in)
+{
+ double f;
+ __builtin_memcpy( &f, &in, sizeof( in ) );
+ return f;
+}
+
+/* { dg-final { scan-assembler-not "movapd" } } */

View File

@ -0,0 +1,94 @@
#! /bin/sh -e
# DP: Fix (neg (lt X 0)) optimization (PR rtl-optimization/33148)
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
From: Jakub Jelinek <jakub@redhat.com>
Sender: gcc-patches-owner@gcc.gnu.org
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix (neg (lt X 0)) optimization (PR rtl-optimization/33148)
Date: Mon, 27 Aug 2007 07:22:44 -0400
Hi!
PR25600 change introduced an optimization of (neg (lt x 0)) to
(ashirtrt x C), but it is not checking whether x's mode is suitable
for it. As it checks that op1 is const0_rtx, I believe MODE_FLOAT
or VECTOR_MODE_P modes are not a problem, CC modes can certainly appear
in LT's first operand with second operand const0_rtx.
So, when we optimize
(neg:DI (lt:DI (reg:CC ...) (const_int 0)))
we create something like
(sign_extend:DI (ashirtrt:CC (reg:CC ...) (const_int 31)))
which is IMHO invalid RTL, ashirtrt is documented on fixed point modes
only (guess vector modes aren't listed just by omission) and so is
sign_extend.
Ok for 4.2/trunk?
2007-08-27 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/33148
* simplify-rtx.c (simplify_unary_operation_1): Only optimize
(neg (lt X 0)) if X has scalar int mode.
* gcc.c-torture/compile/20070827-1.c: New test.
--- gcc/simplify-rtx.c.jj 2007-08-27 10:15:33.000000000 +0200
+++ gcc/simplify-rtx.c 2007-08-27 12:12:51.000000000 +0200
@@ -583,7 +583,8 @@ simplify_unary_operation_1 (enum rtx_cod
/* (neg (lt x 0)) is (ashiftrt X C) if STORE_FLAG_VALUE is 1. */
/* (neg (lt x 0)) is (lshiftrt X C) if STORE_FLAG_VALUE is -1. */
if (GET_CODE (op) == LT
- && XEXP (op, 1) == const0_rtx)
+ && XEXP (op, 1) == const0_rtx
+ && SCALAR_INT_MODE_P (GET_MODE (XEXP (op, 0))))
{
enum machine_mode inner = GET_MODE (XEXP (op, 0));
int isize = GET_MODE_BITSIZE (inner);
--- gcc/testsuite/gcc.c-torture/compile/20070827-1.c.jj 2007-08-27 12:17:20.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/compile/20070827-1.c 2007-08-27 12:15:45.000000000 +0200
@@ -0,0 +1,20 @@
+/* PR rtl-optimization/33148 */
+
+int
+foo (unsigned int *p, int *q, unsigned int w, unsigned int b)
+{
+ unsigned int i;
+ int mask;
+
+ if (q[0] < q[1])
+ mask = 0xff;
+ else
+ mask = 0;
+
+ for (i = 0; 8 * i < w; i++)
+ {
+ b ^= mask;
+ *p++ = b;
+ }
+ return 0;
+}
Jakub

View File

@ -0,0 +1,63 @@
#! /bin/sh -e
# DP: Proposed patch for PR target/34571 (alpha)
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2007-12-26 Rask Ingemann Lambertsen <rask@sygehus.dk>
PR target/34571
* config/alpha/alpha.c (alpha_cannot_force_const_mem): Use
symbolic_operand.
* varasm.c (output_constant_pool_1): Fix typo.
Index: gcc/config/alpha/alpha.c
===================================================================
--- gcc/config/alpha/alpha.c (revision 131132)
+++ gcc/config/alpha/alpha.c (working copy)
@@ -1112,10 +1112,9 @@ alpha_legitimize_address (rtx x, rtx scr
static bool
alpha_cannot_force_const_mem (rtx x)
{
- enum rtx_code code = GET_CODE (x);
- return code == SYMBOL_REF || code == LABEL_REF || code == CONST;
+ return symbolic_operand (x, GET_MODE (x));
}
/* We do not allow indirect calls to be optimized into sibling calls, nor
can we allow a call to a function with a different GP to be optimized
Index: gcc/varasm.c
===================================================================
--- gcc/varasm.c (revision 131132)
+++ gcc/varasm.c (working copy)
@@ -3709,9 +3709,9 @@ output_constant_pool_1 (struct constant_
tmp = XEXP (XEXP (x, 0), 0);
/* FALLTHRU */
case LABEL_REF:
- tmp = XEXP (x, 0);
+ tmp = XEXP (tmp, 0);
gcc_assert (!INSN_DELETED_P (tmp));
gcc_assert (!NOTE_P (tmp)
|| NOTE_KIND (tmp) != NOTE_INSN_DELETED);
break;

View File

@ -0,0 +1,710 @@
#! /bin/sh -e
# DP: Allow transformations on info file names. Reference the
# DP: transformed info file names in the texinfo files.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
gcc/ChangeLog:
2004-02-17 Matthias Klose <doko@debian.org>
* Makefile.in: Allow transformations on info file names.
Define MAKEINFODEFS, macros to pass transformated info file
names to makeinfo.
* doc/cpp.texi: Use macros defined in MAKEINFODEFS for references.
* doc/cppinternals.texi: Likewise.
* doc/extend.texi: Likewise.
* doc/gcc.texi: Likewise.
* doc/gccint.texi: Likewise.
* doc/invoke.texi: Likewise.
* doc/libgcc.texi: Likewise.
* doc/makefile.texi: Likewise.
* doc/passes.texi: Likewise.
* doc/sourcebuild.texi: Likewise.
* doc/standards.texi: Likewise.
* doc/trouble.texi: Likewise.
gcc/fortran/ChangeLog:
* Make-lang.in: Allow transformations on info file names.
Pass macros of transformated info file defined in MAKEINFODEFS
names to makeinfo.
* gfortran.texi: Use macros defined in MAKEINFODEFS for references.
gcc/java/ChangeLog:
* Make-lang.in: Allow transformations on info file names.
Pass macros of transformated info file defined in MAKEINFODEFS
names to makeinfo.
* gcj.texi: Use macros defined in MAKEINFODEFS for references.
gcc/treelang/ChangeLog:
* Make-lang.in: Allow transformations on info file names.
Pass macros of transformated info file defined in MAKEINFODEFS
names to makeinfo.
Define TREELANG_MAKEINFODEFS macros to pass transformated info file
names to makeinfo.
* treelang.texi: Use macros defined in MAKEINFO_DEFS for references.
Index: libgomp/libgomp.texi
===================================================================
--- libgomp/libgomp.texi.orig 2007-10-29 12:36:42.000000000 +0100
+++ libgomp/libgomp.texi 2008-02-08 16:27:44.000000000 +0100
@@ -32,7 +32,7 @@ texts being (a) (see below), and with th
@ifinfo
@dircategory GNU Libraries
@direntry
-* libgomp: (libgomp). GNU OpenMP runtime library
+* @value{fnlibgomp}: (@value{fnlibgomp}). GNU OpenMP runtime library
@end direntry
This manual documents the GNU implementation of the OpenMP API for
Index: libgomp/Makefile.am
===================================================================
--- libgomp/Makefile.am.orig 2007-12-12 12:01:26.000000000 +0100
+++ libgomp/Makefile.am 2008-02-08 16:27:44.000000000 +0100
@@ -91,16 +91,19 @@ endif
all-local: $(STAMP_GENINSRC)
-stamp-geninsrc: libgomp.info
- cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info
+INFO_LIBGOMP_NAME = $(shell echo libgomp|sed '$(program_transform_name)')
+stamp-geninsrc: $(INFO_LIBGOMP_NAME).info
+ cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info
@touch $@
-libgomp.info: $(STAMP_BUILD_INFO)
+libgomp.info: $(INFO_LIBGOMP_NAME).info
+ cp $(INFO_LIBGOMP_NAME).info libgomp.info
+$(INFO_LIBGOMP_NAME).info: $(STAMP_BUILD_INFO)
stamp-build-info: libgomp.texi
- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi
+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibgomp $(INFO_LIBGOMP_NAME)' -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.texi
@touch $@
-CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) libgomp.info
+CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) $(INFO_LIBGOMP_NAME).info
MAINTAINERCLEANFILES = $(srcdir)/libgomp.info
Index: libgomp/Makefile.in
===================================================================
--- libgomp/Makefile.in.orig 2008-01-08 17:45:56.000000000 +0100
+++ libgomp/Makefile.in 2008-02-08 16:27:44.000000000 +0100
@@ -316,7 +316,8 @@ info_TEXINFOS = libgomp.texi
# AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
@BUILD_INFO_TRUE@STAMP_BUILD_INFO = stamp-build-info
-CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) libgomp.info
+INFO_LIBGOMP_NAME = $(shell echo libgomp|sed '$(program_transform_name)')
+CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) $(INFO_LIBGOMP_NAME).info
MAINTAINERCLEANFILES = $(srcdir)/libgomp.info
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -1079,15 +1080,16 @@ install-pdf: $(PDFS)
done
all-local: $(STAMP_GENINSRC)
-
-stamp-geninsrc: libgomp.info
- cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info
+stamp-geninsrc: $(INFO_LIBGOMP_NAME).info
+ cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info
@touch $@
-libgomp.info: $(STAMP_BUILD_INFO)
+libgomp.info: $(INFO_LIBGOMP_NAME).info
+ cp $(INFO_LIBGOMP_NAME).info libgomp.info
+$(INFO_LIBGOMP_NAME).info: $(STAMP_BUILD_INFO)
stamp-build-info: libgomp.texi
- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi
+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibgomp $(INFO_LIBGOMP_NAME)' -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.texi
@touch $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
Index: gcc/doc/cpp.texi
===================================================================
--- gcc/doc/cpp.texi.orig 2008-02-04 11:28:51.000000000 +0100
+++ gcc/doc/cpp.texi 2008-02-08 16:27:44.000000000 +0100
@@ -52,7 +52,7 @@ This manual contains no Invariant Sectio
@ifinfo
@dircategory Software development
@direntry
-* Cpp: (cpp). The GNU C preprocessor.
+* @value{fncpp}: (@value{fncpp}). The GNU C preprocessor.
@end direntry
@end ifinfo
Index: gcc/doc/cppinternals.texi
===================================================================
--- gcc/doc/cppinternals.texi.orig 2007-03-11 13:17:34.000000000 +0100
+++ gcc/doc/cppinternals.texi 2008-02-08 16:27:44.000000000 +0100
@@ -7,7 +7,7 @@
@ifinfo
@dircategory Software development
@direntry
-* Cpplib: (cppinternals). Cpplib internals.
+* @value{fncppint}: (@value{fncppint}). Cpplib internals.
@end direntry
@end ifinfo
Index: gcc/doc/extend.texi
===================================================================
--- gcc/doc/extend.texi.orig 2008-02-04 11:28:51.000000000 +0100
+++ gcc/doc/extend.texi 2008-02-08 16:27:44.000000000 +0100
@@ -11497,7 +11497,7 @@ want to write code that checks whether t
test for the GNU compiler the same way as for C programs: check for a
predefined macro @code{__GNUC__}. You can also use @code{__GNUG__} to
test specifically for GNU C++ (@pxref{Common Predefined Macros,,
-Predefined Macros,cpp,The GNU C Preprocessor}).
+Predefined Macros,@value{fncpp},The GNU C Preprocessor}).
@menu
* Volatiles:: What constitutes an access to a volatile object.
Index: gcc/doc/gcc.texi
===================================================================
--- gcc/doc/gcc.texi.orig 2008-01-24 17:57:55.000000000 +0100
+++ gcc/doc/gcc.texi 2008-02-08 16:27:44.000000000 +0100
@@ -65,8 +65,8 @@ included in the section entitled ``GNU F
@ifnottex
@dircategory Software development
@direntry
-* gcc: (gcc). The GNU Compiler Collection.
-* g++: (gcc). The GNU C++ compiler.
+* @value{fngcc}: (@value{fngcc}). The GNU Compiler Collection.
+* @value{fngxx}: (@value{fngcc}). The GNU C++ compiler.
@end direntry
This file documents the use of the GNU compilers.
@sp 1
@@ -126,7 +126,7 @@ version @value{version-GCC}.
The internals of the GNU compilers, including how to port them to new
targets and some information about how to write front ends for new
languages, are documented in a separate manual. @xref{Top,,
-Introduction, gccint, GNU Compiler Collection (GCC) Internals}.
+Introduction, @value{fngccint}, GNU Compiler Collection (GCC) Internals}.
@menu
* G++ and GCC:: You can compile C or C++ programs.
Index: gcc/doc/gccint.texi
===================================================================
--- gcc/doc/gccint.texi.orig 2007-10-29 14:31:38.000000000 +0100
+++ gcc/doc/gccint.texi 2008-02-08 16:27:44.000000000 +0100
@@ -51,7 +51,7 @@ included in the section entitled ``GNU F
@ifnottex
@dircategory Software development
@direntry
-* gccint: (gccint). Internals of the GNU Compiler Collection.
+* @value{fngccint}: (@value{fngccint}). Internals of the GNU Compiler Collection.
@end direntry
This file documents the internals of the GNU compilers.
@sp 1
@@ -83,7 +83,7 @@ write front ends for new languages. It
@value{VERSION_PACKAGE}
@end ifset
version @value{version-GCC}. The use of the GNU compilers is documented in a
-separate manual. @xref{Top,, Introduction, gcc, Using the GNU
+separate manual. @xref{Top,, Introduction, @value{fngcc}, Using the GNU
Compiler Collection (GCC)}.
This manual is mainly a reference manual rather than a tutorial. It
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi.orig 2008-02-07 12:10:09.000000000 +0100
+++ gcc/doc/invoke.texi 2008-02-08 16:27:44.000000000 +0100
@@ -7456,7 +7456,7 @@ One of the standard libraries bypassed b
@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
that GCC uses to overcome shortcomings of particular machines, or special
needs for some languages.
-(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
+(@xref{Interface,,Interfacing to GCC Output,@value{fngccint},GNU Compiler
Collection (GCC) Internals},
for more discussion of @file{libgcc.a}.)
In most cases, you need @file{libgcc.a} even when you want to avoid
@@ -7464,7 +7464,7 @@ other standard libraries. In other word
or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well.
This ensures that you have no unresolved references to internal GCC
library subroutines. (For example, @samp{__main}, used to ensure C++
-constructors will be called; @pxref{Collect2,,@code{collect2}, gccint,
+constructors will be called; @pxref{Collect2,,@code{collect2}, @value{fngccint},
GNU Compiler Collection (GCC) Internals}.)
@item -pie
@@ -15215,7 +15215,7 @@ Note that you can also specify places to
@option{-B}, @option{-I} and @option{-L} (@pxref{Directory Options}). These
take precedence over places specified using environment variables, which
in turn take precedence over those specified by the configuration of GCC@.
-@xref{Driver,, Controlling the Compilation Driver @file{gcc}, gccint,
+@xref{Driver,, Controlling the Compilation Driver @file{gcc}, @value{fngccint},
GNU Compiler Collection (GCC) Internals}.
@table @env
@@ -15370,7 +15370,7 @@ the headers it contains change.
A precompiled header file will be searched for when @code{#include} is
seen in the compilation. As it searches for the included file
-(@pxref{Search Path,,Search Path,cpp,The C Preprocessor}) the
+(@pxref{Search Path,,Search Path,@value{fncpp},The C Preprocessor}) the
compiler looks for a precompiled header in each directory just before it
looks for the include file in that directory. The name searched for is
the name specified in the @code{#include} with @samp{.gch} appended. If
Index: gcc/doc/libgcc.texi
===================================================================
--- gcc/doc/libgcc.texi.orig 2007-10-29 14:31:38.000000000 +0100
+++ gcc/doc/libgcc.texi 2008-02-08 16:27:44.000000000 +0100
@@ -24,7 +24,7 @@ that needs them.
GCC will also generate calls to C library routines, such as
@code{memcpy} and @code{memset}, in some cases. The set of routines
that GCC may possibly use is documented in @ref{Other
-Builtins,,,gcc, Using the GNU Compiler Collection (GCC)}.
+Builtins,,,@value{fngcc}, Using the GNU Compiler Collection (GCC)}.
These routines take arguments and return values of a specific machine
mode, not a specific C type. @xref{Machine Modes}, for an explanation
Index: gcc/doc/makefile.texi
===================================================================
--- gcc/doc/makefile.texi.orig 2008-02-04 11:28:51.000000000 +0100
+++ gcc/doc/makefile.texi 2008-02-08 16:27:44.000000000 +0100
@@ -139,7 +139,7 @@ regardless of how it itself was compiled
@item profiledbootstrap
Builds a compiler with profiling feedback information. For more
information, see
-@ref{Building,,Building with profile feedback,gccinstall,Installing GCC}.
+@ref{Building,,Building with profile feedback,@value{fngccinstall},Installing GCC}.
@item restrap
Restart a bootstrap, so that everything that was not built with
Index: gcc/doc/passes.texi
===================================================================
--- gcc/doc/passes.texi.orig 2008-02-04 11:28:51.000000000 +0100
+++ gcc/doc/passes.texi 2008-02-08 16:27:44.000000000 +0100
@@ -191,7 +191,7 @@ rid of it. This pass is located in @fil
@item Mudflap declaration registration
If mudflap (@pxref{Optimize Options,,-fmudflap -fmudflapth
--fmudflapir,gcc,Using the GNU Compiler Collection (GCC)}) is
+-fmudflapir,@value{fngcc},Using the GNU Compiler Collection (GCC)}) is
enabled, we generate code to register some variable declarations with
the mudflap runtime. Specifically, the runtime tracks the lifetimes of
those variable declarations that have their addresses taken, or whose
Index: gcc/doc/standards.texi
===================================================================
--- gcc/doc/standards.texi.orig 2007-12-12 12:01:27.000000000 +0100
+++ gcc/doc/standards.texi 2008-02-08 16:27:44.000000000 +0100
@@ -230,8 +230,8 @@ HTML format.
GNAT Reference Manual}, for information on standard
conformance and compatibility of the Ada compiler.
-@xref{Standards,,Standards, gfortran, The GNU Fortran Compiler}, for details
+@xref{Standards,,Standards, @value{fngfortran}, The GNU Fortran Compiler}, for details
of standards supported by GNU Fortran.
-@xref{Compatibility,,Compatibility with the Java Platform, gcj, GNU gcj},
+@xref{Compatibility,,Compatibility with the Java Platform, @value{fngcj}, GNU gcj},
for details of compatibility between @command{gcj} and the Java Platform.
Index: gcc/java/Make-lang.in
===================================================================
--- gcc/java/Make-lang.in.orig 2008-02-07 12:10:09.000000000 +0100
+++ gcc/java/Make-lang.in 2008-02-08 16:27:44.000000000 +0100
@@ -127,11 +127,23 @@ java.tags: force
etags --include TAGS.sub --include ../TAGS.sub
-java.info: doc/gcj.info
+TEXI_GCJ_FILES = java/gcj.texi \
+ $(gcc_docdir)/include/gpl.texi $(gcc_docdir)/include/funding.texi \
+ $(gcc_docdir)/include/fdl.texi $(gcc_docdir)/include/gcc-common.texi gcc-vers.texi
+INFO_GCJ_NAME = $(shell echo gcj|sed '$(program_transform_name)')
-java.srcinfo: doc/gcj.info
+java.info: doc/$(INFO_GCJ_NAME).info
+
+java.srcinfo: doc/$(INFO_GCJ_NAME).info
-cp -p $^ $(srcdir)/doc
+doc/$(INFO_GCJ_NAME).info: $(TEXI_GCJ_FILES)
+ if test "x$(BUILD_INFO)" = xinfo; then \
+ rm -f $(@)*; \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) \
+ -I$(gcc_docdir)/include -I$(srcdir)/f -o$@ $<; \
+ fi
+
java.dvi: doc/gcj.dvi
JAVA_PDFFILES = doc/gcj.pdf
@@ -187,8 +199,9 @@ java.uninstall:
-rm -rf $(DESTDIR)$(man1dir)/gij$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/jv-convert$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/gcj-dbtool$(man1ext)
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCJ_NAME).info*
-java.install-info: $(DESTDIR)$(infodir)/gcj.info
+java.install-info: $(DESTDIR)$(infodir)/$(INFO_GCJ_NAME).info
java.install-pdf: $(JAVA_PDFFILES)
@$(NORMAL_INSTALL)
Index: gcc/java/gcj.texi
===================================================================
--- gcc/java/gcj.texi.orig 2007-12-12 12:01:27.000000000 +0100
+++ gcc/java/gcj.texi 2008-02-08 17:19:48.000000000 +0100
@@ -56,21 +56,21 @@ man page gfdl(7).
@format
@dircategory Software development
@direntry
-* Gcj: (gcj). Ahead-of-time compiler for the Java language
+* @value{fngcj}: (@value{fngcj}). Ahead-of-time compiler for the Java language
@end direntry
@dircategory Individual utilities
@direntry
-* jcf-dump: (gcj)Invoking jcf-dump.
+* jcf-dump: (@value{fngcj}) Invoking jcf-dump.
Print information about Java class files
-* gij: (gcj)Invoking gij. GNU interpreter for Java bytecode
-* gcj-dbtool: (gcj)Invoking gcj-dbtool.
+* gij: (@value{fngcj}) Invoking gij. GNU interpreter for Java bytecode
+* gcj-dbtool: (@value{fngcj}) Invoking gcj-dbtool.
Tool for manipulating class file databases.
-* jv-convert: (gcj)Invoking jv-convert.
+* jv-convert: (@value{fngcj}) Invoking jv-convert.
Convert file from one encoding to another
-* grmic: (gcj)Invoking grmic.
+* grmic: (@value{fngcj}) Invoking grmic.
Generate stubs for Remote Method Invocation.
-* gc-analyze: (gcj)Invoking gc-analyze.
+* gc-analyze: (@value{fngcj}) Invoking gc-analyze.
Analyze Garbage Collector (GC) memory dumps.
@end direntry
@end format
@@ -152,7 +152,7 @@ and the Info entries for @file{gcj} and
As @command{gcj} is just another front end to @command{gcc}, it supports many
of the same options as gcc. @xref{Option Summary, , Option Summary,
-gcc, Using the GNU Compiler Collection (GCC)}. This manual only documents the
+@value{fngcc}, Using the GNU Compiler Collection (GCC)}. This manual only documents the
options specific to @command{gcj}.
@c man end
Index: gcc/fortran/Make-lang.in
===================================================================
--- gcc/fortran/Make-lang.in.orig 2008-02-07 12:10:11.000000000 +0100
+++ gcc/fortran/Make-lang.in 2008-02-08 16:27:44.000000000 +0100
@@ -112,7 +112,8 @@ fortran.tags: force
cd $(srcdir)/fortran; etags -o TAGS.sub *.c *.h; \
etags --include TAGS.sub --include ../TAGS.sub
-fortran.info: doc/gfortran.info doc/gfc-internals.info
+INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)')
+fortran.info: doc/$(INFO_FORTRAN_NAME).info
fortran.dvi: doc/gfortran.dvi doc/gfc-internals.dvi
fortran.html: $(build_htmldir)/gfortran/index.html
@@ -154,10 +155,10 @@ GFORTRAN_TEXI = \
$(srcdir)/doc/include/gcc-common.texi \
gcc-vers.texi
-doc/gfortran.info: $(GFORTRAN_TEXI)
+doc/$(INFO_FORTRAN_NAME).info: $(GFORTRAN_TEXI)
if [ x$(BUILD_INFO) = xinfo ]; then \
rm -f doc/gfortran.info-*; \
- $(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
+ $(MAKEINFO) $(MAKEINFODEFS) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
-o $@ $<; \
else true; fi
@@ -225,7 +226,7 @@ fortran.install-common: install-finclude
fi ; \
fi
-fortran.install-info: $(DESTDIR)$(infodir)/gfortran.info
+fortran.install-info: $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info
fortran.install-man: $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext)
@@ -243,7 +244,7 @@ fortran.uninstall:
rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
rm -rf $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext); \
rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
- rm -rf $(DESTDIR)$(infodir)/gfortran.info*
+ rm -rf $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info*
#
# Clean hooks:
Index: gcc/fortran/gfortran.texi
===================================================================
--- gcc/fortran/gfortran.texi.orig 2008-01-25 16:49:43.000000000 +0100
+++ gcc/fortran/gfortran.texi 2008-02-08 16:27:44.000000000 +0100
@@ -102,7 +102,7 @@ texts being (a) (see below), and with th
@ifinfo
@dircategory Software development
@direntry
-* gfortran: (gfortran). The GNU Fortran Compiler.
+* @value{fngfortran}: (@value{fngfortran}). The GNU Fortran Compiler.
@end direntry
This file documents the use and the internals of
the GNU Fortran compiler, (@command{gfortran}).
Index: gcc/treelang/Make-lang.in
===================================================================
--- gcc/treelang/Make-lang.in.orig 2008-02-07 12:10:11.000000000 +0100
+++ gcc/treelang/Make-lang.in 2008-02-08 16:27:44.000000000 +0100
@@ -153,9 +153,12 @@ treelang.tags: force
cd $(srcdir)/treelang; etags -o TAGS.sub *.y *.l *.c *.h; \
etags --include TAGS.sub --include ../TAGS.sub
-treelang.info: doc/treelang.info
+INFO_TREELANG_NAME = $(shell echo treelang|sed '$(program_transform_name)')
+TREELANG_MAKEINFODEFS = -D 'fntreelang $(INFO_TREELANG_NAME)'
-treelang.srcinfo: doc/treelang.info
+treelang.info: doc/$(INFO_TREELANG_NAME).info
+
+treelang.srcinfo: doc/$(INFO_TREELANG_NAME).info
-cp -p $^ $(srcdir)/doc
treelang.dvi: doc/treelang.dvi
@@ -171,8 +174,8 @@ TEXI_TREELANG_FILES = treelang/treelang.
$(gcc_docdir)/include/funding.texi \
gcc-vers.texi
-doc/treelang.info: $(TEXI_TREELANG_FILES)
- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir)/include -o $@ $<
+doc/$(INFO_TREELANG_NAME).info: $(TEXI_TREELANG_FILES)
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(TREELANG_MAKEINFODEFS) -I $(gcc_docdir)/include -o $@ $<
doc/treelang.dvi: $(TEXI_TREELANG_FILES)
$(TEXI2DVI) -I $(abs_docdir)/include -o $@ $<
@@ -210,7 +213,7 @@ treelang.install.common.done: installdi
$(STAMP) treelang.install.common.done
# We might not be able to build the info files
-treelang.install-info: $(DESTDIR)$(infodir)/treelang.info
+treelang.install-info: $(DESTDIR)$(infodir)/$(INFO_TREELANG_NAME).info
treelang.install-pdf: $(TREELANG_PDFFILES)
@$(NORMAL_INSTALL)
@@ -233,6 +236,7 @@ treelang.uninstall:
echo -rm -rf $(DESTDIR)$(bindir)/$$name2$(exeext); \
rm -rf $(DESTDIR)$(bindir)/$$name2$(exeext); \
done
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_TREELANG_NAME).info*
-rm treelang.install.common.done
#
Index: gcc/treelang/treelang.texi
===================================================================
--- gcc/treelang/treelang.texi.orig 2007-10-29 14:33:20.000000000 +0100
+++ gcc/treelang/treelang.texi 2008-02-08 16:27:44.000000000 +0100
@@ -107,7 +107,7 @@ texts being (a) (see below), and with th
@ifnottex
@dircategory Software development
@direntry
-* treelang: (treelang). The GNU Treelang compiler.
+* @value{fntreelang}: (@value{fntreelang}). The GNU Treelang compiler.
@end direntry
@ifset INTERNALS
@ifset USING
@@ -260,7 +260,7 @@ James A. Morrison.
@item
The packaging and compiler portions of GNU Treelang are based largely
on the GCC compiler.
-@xref{Contributors,,Contributors to GCC,GCC,Using and Maintaining GCC},
+@xref{Contributors,,Contributors to GCC,@value{fngcc},Using and Maintaining GCC},
for more information.
@item
@@ -880,7 +880,7 @@ files and accepts Treelang-specific comm
command-line options that are designed to cater to Treelang users
but apply to other languages as well.
-@xref{G++ and GCC,,Programming Languages Supported by GCC,GCC,Using
+@xref{G++ and GCC,,Programming Languages Supported by GCC,@value{fngcc},Using
the GNU Compiler Collection (GCC)},
for information on the way different languages are handled
by the GCC compiler (@code{gcc}).
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in.orig 2008-02-08 16:27:44.000000000 +0100
+++ gcc/Makefile.in 2008-02-08 17:18:23.000000000 +0100
@@ -3617,8 +3617,27 @@ stmp-install-fixproto: fixproto
doc: $(BUILD_INFO) $(GENERATED_MANPAGES) gccbug
-INFOFILES = doc/cpp.info doc/gcc.info doc/gccint.info \
- doc/gccinstall.info doc/cppinternals.info
+INFO_CPP_NAME = $(shell echo cpp|sed '$(program_transform_name)')
+INFO_GCC_NAME = $(shell echo gcc|sed '$(program_transform_name)')
+INFO_GXX_NAME = $(shell echo g++|sed '$(program_transform_name)')
+INFO_GCCINT_NAME = $(shell echo gccint|sed '$(program_transform_name)')
+INFO_GCCINSTALL_NAME = $(shell echo gccinstall|sed '$(program_transform_name)')
+INFO_CPPINT_NAME = $(shell echo cppinternals|sed '$(program_transform_name)')
+
+INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)')
+INFO_GCJ_NAME = $(shell echo gcj|sed '$(program_transform_name)')
+
+INFOFILES = doc/$(INFO_CPP_NAME).info doc/$(INFO_GCC_NAME).info \
+ doc/$(INFO_GCCINT_NAME).info \
+ doc/$(INFO_GCCINSTALL_NAME).info doc/$(INFO_CPPINT_NAME).info
+
+MAKEINFODEFS = -D 'fncpp $(INFO_CPP_NAME)' -D 'fngcc $(INFO_GCC_NAME)' \
+ -D 'fngxx $(INFO_GXX_NAME)' \
+ -D 'fngccint $(INFO_GCCINT_NAME)' \
+ -D 'fngccinstall $(INFO_GCCINSTALL_NAME)' \
+ -D 'fncppint $(INFO_CPPINT_NAME)' \
+ -D 'fngfortran $(INFO_FORTRAN_NAME)' \
+ -D 'fngcj $(INFO_GCJ_NAME)'
info: $(INFOFILES) lang.info @GENINSRC@ srcinfo lang.srcinfo
@@ -3668,21 +3687,41 @@ gcc-vers.texi: $(BASEVER) $(DEVPHASE)
# patterns. To use them, put each of the specific targets with its
# specific dependencies but no build commands.
-doc/cpp.info: $(TEXI_CPP_FILES)
-doc/gcc.info: $(TEXI_GCC_FILES)
-doc/gccint.info: $(TEXI_GCCINT_FILES)
-doc/cppinternals.info: $(TEXI_CPPINT_FILES)
-
+# Generic entry to handle info files, which are not renamed (currently Ada)
doc/%.info: %.texi
if [ x$(BUILD_INFO) = xinfo ]; then \
$(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
-I $(gcc_docdir)/include -o $@ $<; \
fi
+doc/$(INFO_CPP_NAME).info: $(TEXI_CPP_FILES)
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
+ -I $(gcc_docdir)/include -o $@ $<; \
+ fi
+
+doc/$(INFO_GCC_NAME).info: $(TEXI_GCC_FILES)
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
+ -I $(gcc_docdir)/include -o $@ $<; \
+ fi
+
+doc/$(INFO_GCCINT_NAME).info: $(TEXI_GCCINT_FILES)
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
+ -I $(gcc_docdir)/include -o $@ $<; \
+ fi
+
+doc/$(INFO_CPPINT_NAME).info: $(TEXI_CPPINT_FILES)
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
+ -I $(gcc_docdir)/include -o $@ $<; \
+ fi
+
# Duplicate entry to handle renaming of gccinstall.info
-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES)
+doc/$(INFO_GCCINSTALL_NAME).info: $(TEXI_GCCINSTALL_FILES)
if [ x$(BUILD_INFO) = xinfo ]; then \
- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
-I $(gcc_docdir)/include -o $@ $<; \
fi
@@ -3990,11 +4029,11 @@ install-driver: installdirs xgcc$(exeext
# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
# to do the install.
install-info:: doc installdirs \
- $(DESTDIR)$(infodir)/cpp.info \
- $(DESTDIR)$(infodir)/gcc.info \
- $(DESTDIR)$(infodir)/cppinternals.info \
- $(DESTDIR)$(infodir)/gccinstall.info \
- $(DESTDIR)$(infodir)/gccint.info \
+ $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info \
+ $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info \
+ $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info \
+ $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info \
+ $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info \
lang.install-info
$(DESTDIR)$(infodir)/%.info: doc/%.info installdirs
@@ -4195,8 +4234,11 @@ uninstall: lang.uninstall
-rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/protoize$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/unprotoize$(man1ext)
- -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
- -rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info*
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info*
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info*
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info*
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info*
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info*
#
# These targets are for the dejagnu testsuites. The file site.exp
# contains global variables that all the testsuites will use.
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi.orig 2008-01-30 11:21:55.000000000 +0100
+++ gcc/doc/install.texi 2008-02-08 16:29:13.000000000 +0100
@@ -96,7 +96,7 @@ Free Documentation License}''.
@end ifinfo
@dircategory Software development
@direntry
-* gccinstall: (gccinstall). Installing the GNU Compiler Collection.
+* @value{fngccinstall}: (@value{fngccinstall}). Installing the GNU Compiler Collection.
@end direntry
@c Part 3 Titlepage and Copyright
Index: gcc/ada/gnat-style.texi
===================================================================
--- gcc/ada/gnat-style.texi.orig 2007-10-29 12:59:35.000000000 +0100
+++ gcc/ada/gnat-style.texi 2008-02-08 17:15:59.000000000 +0100
@@ -31,7 +31,7 @@
@dircategory Software development
@direntry
-* gnat-style: (gnat-style). GNAT Coding Style
+* gnat-style: (gnat-style-4.3). GNAT Coding Style
@end direntry
@macro syntax{element}
Index: gcc/ada/gnat_rm.texi
===================================================================
--- gcc/ada/gnat_rm.texi.orig 2008-01-02 11:19:07.000000000 +0100
+++ gcc/ada/gnat_rm.texi 2008-02-08 17:15:12.000000000 +0100
@@ -30,7 +30,7 @@
@dircategory GNU Ada tools
@direntry
-* GNAT Reference Manual: (gnat_rm). Reference Manual for GNU Ada tools.
+* GNAT Reference Manual: (gnat_rm-4.3). Reference Manual for GNU Ada tools.
@end direntry
@copying
Index: gcc/ada/gnat_ugn.texi
===================================================================
--- gcc/ada/gnat_ugn.texi.orig 2008-01-02 11:19:08.000000000 +0100
+++ gcc/ada/gnat_ugn.texi 2008-02-08 17:15:37.000000000 +0100
@@ -96,7 +96,7 @@
@ifset unw
@set PLATFORM
-@set FILE gnat_ugn_unw
+@set FILE gnat_ugn_unw-4.3
@end ifset
@ifset vms

View File

@ -0,0 +1,36 @@
#! /bin/sh -e
# DP: enable biarch for 31 bit compiler
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- gcc/config.gcc~ 2006-06-02 01:59:42.000000000 +0200
+++ gcc/config.gcc 2006-06-04 18:20:56.272554984 +0200
@@ -1884,7 +1884,7 @@
;;
s390-*-linux*)
tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
- tmake_file="${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux"
+ tmake_file="${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux s390/t-linux64"
;;
s390x-*-linux*)
tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"

View File

@ -0,0 +1,80 @@
#! /bin/sh -e
# 10_newpatch.dpatch by <schizo@debian.org>
# updated for 4.0, 4.1, 4.2 by Matthias Klose <doko@debian.org>
#
# DP: Enable biarch support for the 32bit sparc compiler
if [ $# -eq 3 ] && [ "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
cd ${dir}libcpp && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
cd ${dir}libcpp && autoconf
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
--- gcc/config/sparc/linux64.h.orig 2006-06-04 13:09:21.857528428 -0300
+++ gcc/config/sparc/linux64.h 2006-06-04 13:11:15.385012057 -0300
@@ -54,8 +54,8 @@
+ MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
#endif
-#undef ASM_CPU_DEFAULT_SPEC
-#define ASM_CPU_DEFAULT_SPEC "-Av9a"
+#undef ASM_CPU64_DEFAULT_SPEC
+#define ASM_CPU64_DEFAULT_SPEC "-Av9a"
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
--- gcc/config.gcc.orig 2006-06-04 13:09:21.882530957 -0300
+++ gcc/config.gcc 2006-06-04 13:14:13.577036688 -0300
@@ -315,6 +315,7 @@
;;
sparc*-*-*)
cpu_type=sparc
+ need_64bit_hwint=yes
;;
s390*-*-*)
cpu_type=s390
@@ -2105,9 +2106,16 @@
use_fixproto=yes
;;
sparc-*-linux*) # SPARC's running GNU/Linux, libc6
+ # If cpu is specified, assume we want a 32/64 compiler
+ if test x$with_cpu = x; then
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h"
extra_options="${extra_options} sparc/long-double-switch.opt"
tmake_file="${tmake_file} sparc/t-linux sparc/t-crtfm"
+ else
+ tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h"
+ extra_options="${extra_options} sparc/long-double-switch.opt"
+ tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
+ fi
;;
sparc-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h"
--- libcpp/configure.ac~ 2006-01-18 22:52:36.862072128 +0100
+++ libcpp/configure.ac 2006-08-15 14:48:00.484137064 +0200
@@ -124,7 +124,7 @@
powerpc*-*-* | \
rs6000*-*-* | \
s390*-*-* | \
- sparc64*-*-* | ultrasparc-*-freebsd* | \
+ sparc*-*-* | ultrasparc-*-freebsd* | \
sparcv9-*-solaris2* | \
sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \
sh[123456789l]*-*-*)

View File

@ -0,0 +1,55 @@
#! /bin/sh -e
# DP: updated class files from the 4.2 branch upto 20070804.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
set -x
uudecode class-files.tar.bz2.uue
tar -xv -f class-files.tar.bz2 -C $dir
rm -f class-files.tar.bz2
;;
-unpatch)
echo "cannot undo patch $(basename $0)"
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
#! /bin/sh
dir=gcc-4_2-ubuntu-branch
tag=ubuntu/gcc-4_2_1-release
branch=ubuntu/gcc-4_2-branch
tmplist=files$$
svn diff --summarize \
svn://gcc.gnu.org/svn/gcc/tags/$tag \
svn://gcc.gnu.org/svn/gcc/branches/$branch \
| grep '\.class$' > $tmplist
sed -n '/^[AM].*\.class$/s,.*/'$tag'/\(.*\),\1,p' $tmplist \
> neworchanged.list
sed -n '/^[D].*\.class$/s,.*/'$tag'/\(.*\),\1,p' $tmplist \
> removed.list
sed -n '/^[^ADM].*\.class$/s,.*/'$tag'/\(.*\),\1,p' $tmplist \
> unknown.list
echo "new or changed: $(wc -l neworchanged.list | cut '-d ' -f1), removed $(wc -l removed.list | cut '-d ' -f1): , unknown: $(wc -l unknown.list | cut '-d ' -f1)"
tar -c -j -f class-files.tar.bz2 -C $dir -T neworchanged.list
uuencode class-files.tar.bz2 class-files.tar.bz2 > class-files.tar.bz2.uue
rm -f $tmplist neworchanged.list removed.list unknown.list

View File

@ -0,0 +1,79 @@
#! /bin/sh -e
# DP: updates from the 4.3 branch upto 20080321 (documentation).
last_updated()
{
cat > ${dir}LAST_UPDATED <<EOF
Fri Mar 21 20:55:21 CET 2008
Fri Mar 21 19:55:21 UTC 2008 (revision 133434)
EOF
}
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
last_updated
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
# svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_3_0_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_3-branch \
# | awk '/^Index:.*\.class/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
Index: gcc/doc/extend.texi
===================================================================
--- gcc/doc/extend.texi (.../tags/gcc_4_3_0_release) (revision 133434)
+++ gcc/doc/extend.texi (.../branches/gcc-4_3-branch) (revision 133434)
@@ -3380,7 +3380,8 @@
Some machines never actually require alignment; they allow reference to any
data type even at an odd address. For these machines, @code{__alignof__}
-reports the @emph{recommended} alignment of a type.
+reports the smallest alignment that GCC will give the data type, usually as
+mandated by the target ABI.
If the operand of @code{__alignof__} is an lvalue rather than a type,
its value is the required alignment for its type, taking into account
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi (.../tags/gcc_4_3_0_release) (revision 133434)
+++ gcc/doc/invoke.texi (.../branches/gcc-4_3-branch) (revision 133434)
@@ -5208,8 +5208,9 @@
@opindex O3
Optimize yet more. @option{-O3} turns on all optimizations specified by
@option{-O2} and also turns on the @option{-finline-functions},
-@option{-funswitch-loops}, @option{-fpredictive-commoning} and
-@option{-fgcse-after-reload} options.
+@option{-funswitch-loops}, @option{-fpredictive-commoning},
+@option{-fgcse-after-reload} and @option{-ftree-vectorize}
+options.
@item -O0
@opindex O0
@@ -5973,7 +5974,8 @@
@item -ftree-vectorize
@opindex ftree-vectorize
-Perform loop vectorization on trees.
+Perform loop vectorization on trees. This flag is enabled by default at
+@option{-O3}.
@item -ftree-vect-loop-version
@opindex ftree-vect-loop-version

View File

@ -0,0 +1,137 @@
#! /bin/sh -e
# svn-gdc-updates.dpatch by Arthur Loiret <arthur.loiret@gmail.com>
# DP: SVN updates from the gdc branch up to 20070831.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
diff -ruN gcc/d/ChangeLog gcc/d/ChangeLog
--- gcc/d/ChangeLog 2007-08-26 22:34:22.000000000 +0200
+++ gcc/d/ChangeLog 2007-09-02 19:33:43.000000000 +0200
@@ -1,3 +1,20 @@
+2007-08-31 David Friedman <dvdfrdmn@users.sf.net>
+
+ * d-objfile.cc (outdata): Do not set TREE_CONSTANT on initializers
+ (Bugzilla 1453)
+
+2007-08-29 David Friedman <dvdfrdmn@users.sf.net>
+
+ * d-decls.cc (uniqueName): Allow multiple static declaration with
+ the same name if in a function. (SF 1783085)
+
+2007-08-28 David Friedman <dvdfrdmn@users.sf.net>
+
+ * d-codegen.cc (call): Use CommaExp correctly. (Bugzilla 1443)
+
+ * dmd/todt.c (createTsarrayDt): Don't take quadratic time to build
+ the initializer. (Bugzilla 1440)
+
2007-08-22 David Friedman <dvdfrdmn@users.sf.net>
Release GDC 0.24
diff -ruN gcc/d/d-codegen.cc gcc/d/d-codegen.cc
--- gcc/d/d-codegen.cc 2007-08-26 22:34:22.000000000 +0200
+++ gcc/d/d-codegen.cc 2007-09-02 19:33:43.000000000 +0200
@@ -780,10 +780,12 @@
if (expr->op == TOKcomma)
{
CommaExp * ce = (CommaExp *) expr;
+ expr = ce->e2;
+
VarExp * ve;
- expr = ce->e1;
- gcc_assert( ce->e2->op == TOKvar &&
- ((VarExp *) ce->e2)->var->isFuncDeclaration() );
+ gcc_assert( ce->e2->op == TOKvar );
+ ve = (VarExp *) ce->e2;
+ gcc_assert(ve->var->isFuncDeclaration() && ! ve->var->needThis());
}
Type* t = expr->type->toBasetype();
diff -ruN gcc/d/d-decls.cc gcc/d/d-decls.cc
--- gcc/d/d-decls.cc 2007-08-26 22:34:22.000000000 +0200
+++ gcc/d/d-decls.cc 2007-09-02 19:33:43.000000000 +0200
@@ -137,10 +137,17 @@
FuncDeclaration * f = d->isFuncDeclaration();
VarDeclaration * v = d->isVarDeclaration();
- if (d->protection == PROTprivate &&
- !(f && ! f->fbody) &&
+ /* Check cases for which it is okay to have a duplicate symbol name.
+ Otherwise, duplicate names are an error and the condition will
+ be caught by the assembler. */
+ if (!(f && ! f->fbody) &&
!(v && (v->storage_class & STCextern)) &&
- (!p || p->isModule()))
+ (
+ // Static declarations in different scope statements
+ (p && p->isFuncDeclaration()) ||
+
+ // Top-level duplicate names are okay if private.
+ ((!p || p->isModule()) && d->protection == PROTprivate) ))
{
StringValue * sv;
diff -ruN gcc/d/dmd/todt.c gcc/d/dmd/todt.c
--- gcc/d/dmd/todt.c 2007-08-26 22:34:22.000000000 +0200
+++ gcc/d/dmd/todt.c 2007-09-02 19:33:43.000000000 +0200
@@ -73,17 +73,18 @@
target_size_t dim = tsa->dim->toInteger();
dt_t * adt = NULL;
+ dt_t ** padt = & adt;
if (eoa_size * dim == eoa_size)
{
for (target_size_t i = 0; i < dim; i++)
- dtcontainer(& adt, NULL, elem_or_all);
+ padt = dtcontainer(padt, NULL, elem_or_all);
}
else
{
assert(tsa->size(0) % eoa_size == 0);
for (target_size_t i = 0; i < dim; i++)
- dtcontainer(& adt, NULL,
+ padt = dtcontainer(padt, NULL,
createTsarrayDt(elem_or_all, tsa->next));
}
dt_t * fdt = NULL;
diff -ruN gcc/d/d-objfile.cc gcc/d/d-objfile.cc
--- gcc/d/d-objfile.cc 2007-08-26 22:34:22.000000000 +0200
+++ gcc/d/d-objfile.cc 2007-09-02 19:33:43.000000000 +0200
@@ -954,11 +954,8 @@
assert( t );
- if (sym->Sdt && DECL_INITIAL( t ) == NULL_TREE) {
- tree ini = dt2tree( sym->Sdt );
- TREE_CONSTANT( ini ) = TREE_CONSTANT( t );
- DECL_INITIAL( t ) = ini;
- }
+ if (sym->Sdt && DECL_INITIAL( t ) == NULL_TREE)
+ DECL_INITIAL( t ) = dt2tree( sym->Sdt );
if (! g.ofile->shouldEmit(sym))
return;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
#! /bin/sh -e
# All lines beginning with `# DPATCH:' are a description of the patch.
# DP: <your description>
# remove the next line
exit 0
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
# append the patch here and adjust the -p? flag in the patch calls.

View File

@ -0,0 +1,102 @@
2007-10-02 Jakub Jelinek <jakub@redhat.com>
* decl.c (duplicate_decls): When redeclaring a builtin function,
keep the merged decl builtin whenever types match, even if new
decl defines a function.
* gcc.dg/builtins-65.c: New test.
* g++.dg/ext/builtin10.C: New test.
--- gcc/cp/decl.c.jj 2007-10-01 22:11:09.000000000 +0200
+++ gcc/cp/decl.c 2007-10-02 11:39:46.000000000 +0200
@@ -1988,23 +1988,21 @@ duplicate_decls (tree newdecl, tree oldd
DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl);
DECL_RESULT (olddecl) = DECL_RESULT (newdecl);
}
+ /* If redeclaring a builtin function, it stays built in. */
+ if (types_match && DECL_BUILT_IN (olddecl))
+ {
+ DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
+ DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
+ /* If we're keeping the built-in definition, keep the rtl,
+ regardless of declaration matches. */
+ COPY_DECL_RTL (olddecl, newdecl);
+ }
if (new_defines_function)
/* If defining a function declared with other language
linkage, use the previously declared language linkage. */
SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl));
else if (types_match)
{
- /* If redeclaring a builtin function, and not a definition,
- it stays built in. */
- if (DECL_BUILT_IN (olddecl))
- {
- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
- /* If we're keeping the built-in definition, keep the rtl,
- regardless of declaration matches. */
- COPY_DECL_RTL (olddecl, newdecl);
- }
-
DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
/* Don't clear out the arguments if we're redefining a function. */
if (DECL_ARGUMENTS (olddecl))
--- gcc/testsuite/gcc.dg/builtins-65.c.jj 2007-10-02 11:23:51.000000000 +0200
+++ gcc/testsuite/gcc.dg/builtins-65.c 2007-10-02 11:24:12.000000000 +0200
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef __SIZE_TYPE__ size_t;
+extern void __chk_fail (void);
+extern int snprintf (char *, size_t, const char *, ...);
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
+{
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
+ __chk_fail ();
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
+}
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
+
+char buf[10];
+
+int
+main (void)
+{
+ snprintf (buf, 10, "%d%d\n", 10, 10);
+ return 0;
+}
+
+/* { dg-final { scan-assembler "mysnprintf" } } */
+/* { dg-final { scan-assembler-not "__chk_fail" } } */
--- gcc/testsuite/g++.dg/ext/builtin10.C.jj 2007-10-02 11:19:45.000000000 +0200
+++ gcc/testsuite/g++.dg/ext/builtin10.C 2007-10-02 11:23:26.000000000 +0200
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-O2" }
+
+typedef __SIZE_TYPE__ size_t;
+extern "C" {
+extern void __chk_fail (void);
+extern int snprintf (char *, size_t, const char *, ...);
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
+{
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
+ __chk_fail ();
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
+}
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
+}
+
+char buf[10];
+
+int
+main (void)
+{
+ snprintf (buf, 10, "%d%d\n", 10, 10);
+ return 0;
+}
+
+// { dg-final { scan-assembler "mysnprintf" } }
+// { dg-final { scan-assembler-not "__chk_fail" } }

View File

@ -0,0 +1,284 @@
2008-02-26 Jakub Jelinek <jakub@redhat.com>
* c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA
and CPP_PRAGMA_EOL.
* c-pragma.c (pragma_ns_name): New typedef.
(registered_pp_pragmas): New variable.
(c_pp_lookup_pragma): New function.
(c_register_pragma_1): If flag_preprocess_only, do nothing
for non-expanded pragmas, for expanded ones push pragma's
namespace and name into registered_pp_pragmas vector.
(c_invoke_pragma_handler): Register OpenMP pragmas even when
flag_preprocess_only, don't register GCC pch_preprocess
pragma if flag_preprocess_only.
* c-opts.c (c_common_init): Call init_pragma even if
flag_preprocess_only.
* c-pragma.c (c_pp_lookup_pragma): New prototype.
* config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS): Don't call
cpp_register_pragma if flag_preprocess_only.
* gcc.dg/gomp/preprocess-1.c: New test.
--- gcc/c-ppoutput.c.jj 2008-01-26 18:01:16.000000000 +0100
+++ gcc/c-ppoutput.c 2008-02-26 22:54:57.000000000 +0100
@@ -1,6 +1,6 @@
/* Preprocess only, using cpplib.
- Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
+ 2008 Free Software Foundation, Inc.
Written by Per Bothner, 1994-95.
This program is free software; you can redistribute it and/or modify it
@@ -177,7 +177,24 @@ scan_translation_unit (cpp_reader *pfile
avoid_paste = false;
print.source = NULL;
print.prev = token;
- cpp_output_token (token, print.outf);
+ if (token->type == CPP_PRAGMA)
+ {
+ const char *space;
+ const char *name;
+
+ maybe_print_line (token->src_loc);
+ fputs ("#pragma ", print.outf);
+ c_pp_lookup_pragma (token->val.pragma, &space, &name);
+ if (space)
+ fprintf (print.outf, "%s %s", space, name);
+ else
+ fprintf (print.outf, "%s", name);
+ print.printed = 1;
+ }
+ else if (token->type == CPP_PRAGMA_EOL)
+ maybe_print_line (token->src_loc);
+ else
+ cpp_output_token (token, print.outf);
if (token->type == CPP_COMMENT)
account_for_newlines (token->val.str.text, token->val.str.len);
--- gcc/c-pragma.c.jj 2008-02-15 18:43:03.000000000 +0100
+++ gcc/c-pragma.c 2008-02-26 22:59:44.000000000 +0100
@@ -1,6 +1,6 @@
/* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack.
Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007 Free Software Foundation, Inc.
+ 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -872,6 +872,61 @@ DEF_VEC_ALLOC_O (pragma_handler, heap);
static VEC(pragma_handler, heap) *registered_pragmas;
+typedef struct
+{
+ const char *space;
+ const char *name;
+} pragma_ns_name;
+
+DEF_VEC_O (pragma_ns_name);
+DEF_VEC_ALLOC_O (pragma_ns_name, heap);
+
+static VEC(pragma_ns_name, heap) *registered_pp_pragmas;
+
+struct omp_pragma_def { const char *name; unsigned int id; };
+static const struct omp_pragma_def omp_pragmas[] = {
+ { "atomic", PRAGMA_OMP_ATOMIC },
+ { "barrier", PRAGMA_OMP_BARRIER },
+ { "critical", PRAGMA_OMP_CRITICAL },
+ { "flush", PRAGMA_OMP_FLUSH },
+ { "for", PRAGMA_OMP_FOR },
+ { "master", PRAGMA_OMP_MASTER },
+ { "ordered", PRAGMA_OMP_ORDERED },
+ { "parallel", PRAGMA_OMP_PARALLEL },
+ { "section", PRAGMA_OMP_SECTION },
+ { "sections", PRAGMA_OMP_SECTIONS },
+ { "single", PRAGMA_OMP_SINGLE },
+ { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
+};
+
+void
+c_pp_lookup_pragma (unsigned int id, const char **space, const char **name)
+{
+ const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
+ int i;
+
+ for (i = 0; i < n_omp_pragmas; ++i)
+ if (omp_pragmas[i].id == id)
+ {
+ *space = "omp";
+ *name = omp_pragmas[i].name;
+ return;
+ }
+
+ if (id >= PRAGMA_FIRST_EXTERNAL
+ && (id < PRAGMA_FIRST_EXTERNAL
+ + VEC_length (pragma_ns_name, registered_pp_pragmas)))
+ {
+ *space = VEC_index (pragma_ns_name, registered_pp_pragmas,
+ id - PRAGMA_FIRST_EXTERNAL)->space;
+ *name = VEC_index (pragma_ns_name, registered_pp_pragmas,
+ id - PRAGMA_FIRST_EXTERNAL)->name;
+ return;
+ }
+
+ gcc_unreachable ();
+}
+
/* Front-end wrappers for pragma registration to avoid dragging
cpplib.h in almost everywhere. */
@@ -881,13 +936,29 @@ c_register_pragma_1 (const char *space,
{
unsigned id;
- VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
- id = VEC_length (pragma_handler, registered_pragmas);
- id += PRAGMA_FIRST_EXTERNAL - 1;
-
- /* The C++ front end allocates 6 bits in cp_token; the C front end
- allocates 7 bits in c_token. At present this is sufficient. */
- gcc_assert (id < 64);
+ if (flag_preprocess_only)
+ {
+ pragma_ns_name ns_name;
+
+ if (!allow_expansion)
+ return;
+
+ ns_name.space = space;
+ ns_name.name = name;
+ VEC_safe_push (pragma_ns_name, heap, registered_pp_pragmas, &ns_name);
+ id = VEC_length (pragma_ns_name, registered_pp_pragmas);
+ id += PRAGMA_FIRST_EXTERNAL - 1;
+ }
+ else
+ {
+ VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
+ id = VEC_length (pragma_handler, registered_pragmas);
+ id += PRAGMA_FIRST_EXTERNAL - 1;
+
+ /* The C++ front end allocates 6 bits in cp_token; the C front end
+ allocates 7 bits in c_token. At present this is sufficient. */
+ gcc_assert (id < 64);
+ }
cpp_register_deferred_pragma (parse_in, space, name, id,
allow_expansion, false);
@@ -921,24 +992,8 @@ c_invoke_pragma_handler (unsigned int id
void
init_pragma (void)
{
- if (flag_openmp && !flag_preprocess_only)
+ if (flag_openmp)
{
- struct omp_pragma_def { const char *name; unsigned int id; };
- static const struct omp_pragma_def omp_pragmas[] = {
- { "atomic", PRAGMA_OMP_ATOMIC },
- { "barrier", PRAGMA_OMP_BARRIER },
- { "critical", PRAGMA_OMP_CRITICAL },
- { "flush", PRAGMA_OMP_FLUSH },
- { "for", PRAGMA_OMP_FOR },
- { "master", PRAGMA_OMP_MASTER },
- { "ordered", PRAGMA_OMP_ORDERED },
- { "parallel", PRAGMA_OMP_PARALLEL },
- { "section", PRAGMA_OMP_SECTION },
- { "sections", PRAGMA_OMP_SECTIONS },
- { "single", PRAGMA_OMP_SINGLE },
- { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
- };
-
const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
int i;
@@ -947,8 +1002,9 @@ init_pragma (void)
omp_pragmas[i].id, true, true);
}
- cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
- PRAGMA_GCC_PCH_PREPROCESS, false, false);
+ if (!flag_preprocess_only)
+ cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
+ PRAGMA_GCC_PCH_PREPROCESS, false, false);
#ifdef HANDLE_PRAGMA_PACK
#ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
--- gcc/c-opts.c.jj 2008-02-26 22:53:23.000000000 +0100
+++ gcc/c-opts.c 2008-02-26 22:54:57.000000000 +0100
@@ -1,5 +1,5 @@
/* C/ObjC/C++ command line option handling.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Neil Booth.
@@ -1239,6 +1239,9 @@ c_common_init (void)
if (version_flag)
c_common_print_pch_checksum (stderr);
+ /* Has to wait until now so that cpplib has its hash table. */
+ init_pragma ();
+
if (flag_preprocess_only)
{
finish_options ();
@@ -1246,9 +1249,6 @@ c_common_init (void)
return false;
}
- /* Has to wait until now so that cpplib has its hash table. */
- init_pragma ();
-
return true;
}
--- gcc/c-pragma.h.jj 2008-01-26 18:01:16.000000000 +0100
+++ gcc/c-pragma.h 2008-02-26 22:54:57.000000000 +0100
@@ -1,6 +1,6 @@
/* Pragma related interfaces.
Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2007 Free Software Foundation, Inc.
+ 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -124,4 +124,6 @@ extern enum cpp_ttype pragma_lex (tree *
extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *,
int);
+extern void c_pp_lookup_pragma (unsigned int, const char **, const char **);
+
#endif /* GCC_C_PRAGMA_H */
--- gcc/config/darwin.h.jj 2008-02-11 14:48:12.000000000 +0100
+++ gcc/config/darwin.h 2008-02-26 22:54:57.000000000 +0100
@@ -892,8 +892,9 @@ enum machopic_addr_class {
#define DARWIN_REGISTER_TARGET_PRAGMAS() \
do { \
- cpp_register_pragma (parse_in, NULL, "mark", \
- darwin_pragma_ignore, false); \
+ if (!flag_preprocess_only) \
+ cpp_register_pragma (parse_in, NULL, "mark", \
+ darwin_pragma_ignore, false); \
c_register_pragma (0, "options", darwin_pragma_options); \
c_register_pragma (0, "segment", darwin_pragma_ignore); \
c_register_pragma (0, "unused", darwin_pragma_unused); \
--- gcc/testsuite/gcc.dg/gomp/preprocess-1.c.jj 2008-02-26 22:54:57.000000000 +0100
+++ gcc/testsuite/gcc.dg/gomp/preprocess-1.c 2008-02-26 22:54:57.000000000 +0100
@@ -0,0 +1,16 @@
+/* { dg-do preprocess } */
+
+void foo (void)
+{
+ int i1, j1, k1;
+#define p parallel
+#define P(x) private (x##1)
+#define S(x) shared (x##1)
+#define F(x) firstprivate (x##1)
+#pragma omp p P(i) \
+ S(j) \
+ F(k)
+ ;
+}
+
+/* { dg-final { scan-file preprocess-1.i "(^|\n)#pragma omp parallel private \\(i1\\) shared \\(j1\\) firstprivate \\(k1\\)($|\n)" } } */

View File

@ -0,0 +1,61 @@
Build i386.rpm libgomp and libsupc++.a(guard.o) as i486+, pre-i486
hardware isn't supported because NPTL doesn't support it anyway.
--- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100
+++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100
@@ -44,14 +44,14 @@ if test $enable_linux_futex = yes; then
;;
# Note that bare i386 is not included here. We need cmpxchg.
- i[456]86-*-linux*)
+ i[3456]86-*-linux*)
config_path="linux/x86 linux posix"
case " ${CC} ${CFLAGS} " in
*" -m64 "*)
;;
*)
if test -z "$with_arch"; then
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
fi
esac
;;
@@ -63,7 +63,7 @@ if test $enable_linux_futex = yes; then
config_path="linux/x86 linux posix"
case " ${CC} ${CFLAGS} " in
*" -m32 "*)
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
;;
esac
;;
--- libstdc++-v3/libsupc++/guard.cc.jj 2008-03-01 00:58:24.000000000 +0100
+++ libstdc++-v3/libsupc++/guard.cc 2008-03-27 14:08:44.000000000 +0100
@@ -35,6 +35,27 @@
#include <new>
#include <ext/atomicity.h>
#include <ext/concurrence.h>
+#if defined __i386__ && !defined _GLIBCXX_ATOMIC_BUILTINS
+# define _GLIBCXX_ATOMIC_BUILTINS 1
+# define __sync_val_compare_and_swap(a, b, c) \
+ ({ \
+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
+ int sltas; \
+ __asm __volatile ("lock; cmpxchgl %3, (%1)" \
+ : "=a" (sltas) \
+ : "r" (a), "0" (b), "r" (c) : "memory"); \
+ sltas; \
+ })
+# define __sync_lock_test_and_set(a, b) \
+ ({ \
+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
+ int sltas; \
+ __asm __volatile ("xchgl (%1), %0" \
+ : "=r" (sltas) \
+ : "r" (a), "0" (b) : "memory"); \
+ sltas; \
+ })
+#endif
#if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
&& defined(_GLIBCXX_ATOMIC_BUILTINS) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
# include <climits>

View File

@ -0,0 +1,538 @@
2004-11-27 Jakub Jelinek <jakub@redhat.com>
* config.gcc (ia64*-*-linux*): If native and libelf is installed,
use ia64/t-glibc-no-libunwind instead of the other t-*unwind*
fragments.
* config/ia64/t-glibc-no-libunwind: New file.
* config/ia64/change-symver.c: New file.
* config/ia64/unwind-ia64.c: If USE_SYMVER_GLOBAL and SHARED,
define _Unwind_* to __symverglobal_Unwind_*.
(alias): Undefine.
(symverglobal): Define. Use it on _Unwind_*.
* config/ia64/mkmap-symver-multi.awk: New file.
* config/ia64/libgcc-ia64-no-libunwind.ver: New file.
--- gcc/config.gcc.jj 2004-10-04 08:55:44.000000000 -0400
+++ gcc/config.gcc 2004-11-13 05:23:50.000000000 -0500
@@ -1185,9 +1185,16 @@ ia64*-*-freebsd*)
;;
ia64*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
- if test x$with_system_libunwind != xyes ; then
- tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
+ tmake_file="${tmake_file} ia64/t-ia64"
+ if test x${target} = x${host} && test x${target} = x${build} \
+ && grep gelf_getverdef /usr/include/gelf.h > /dev/null 2>&1 \
+ && test -f /usr/lib/libelf.so; then
+ tmake_file="${tmake_file} ia64/t-glibc-no-libunwind"
+ else
+ tmake_file="${tmake_file} t-libunwind ia64/t-glibc"
+ if test x$with_system_libunwind != xyes ; then
+ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
+ fi
fi
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
--- gcc/config/ia64/t-glibc-no-libunwind.jj 2004-02-18 10:27:36.000000000 -0500
+++ gcc/config/ia64/t-glibc-no-libunwind 2004-11-15 09:56:33.000000000 -0500
@@ -0,0 +1,30 @@
+# Don't use system libunwind library on IA-64 GLIBC based system,
+# but make _Unwind_* symbols unversioned, so that created programs
+# are usable even when libgcc_s uses libunwind.
+LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c
+SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64-no-libunwind.ver
+SHLIB_MKMAP = $(srcdir)/config/ia64/mkmap-symver-multi.awk
+
+SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
+ -Wl,--soname=$(SHLIB_SONAME) \
+ -Wl,--version-script=$(SHLIB_MAP) \
+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+ if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
+ mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
+ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
+ else true; fi && \
+ gcc -O2 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tweak \
+ $$(gcc_srcdir)/config/ia64/change-symver.c -lelf && \
+ $(SHLIB_DIR)/$(SHLIB_SONAME).tweak $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
+ GCC_3.4.2 _GLOBAL_ \
+ _Unwind_GetGR _Unwind_RaiseException _Unwind_GetRegionStart _Unwind_SetIP \
+ _Unwind_GetIP _Unwind_GetLanguageSpecificData _Unwind_Resume \
+ _Unwind_DeleteException _Unwind_SetGR _Unwind_ForcedUnwind \
+ _Unwind_Backtrace _Unwind_FindEnclosingFunction _Unwind_GetCFA \
+ _Unwind_Resume_or_Rethrow _Unwind_GetBSP && \
+ rm -f $(SHLIB_DIR)/$(SHLIB_SONAME).tweak && \
+ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
+ $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
+
+TARGET_LIBGCC2_CFLAGS += -DUSE_SYMVER_GLOBAL
--- gcc/config/ia64/change-symver.c.jj 2004-02-18 10:27:36.000000000 -0500
+++ gcc/config/ia64/change-symver.c 2004-11-13 05:23:50.000000000 -0500
@@ -0,0 +1,211 @@
+#define _GNU_SOURCE 1
+#define _FILE_OFFSET_BITS 64
+#include <endian.h>
+#include <errno.h>
+#include <error.h>
+#include <fcntl.h>
+#include <fnmatch.h>
+#include <gelf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+int
+compute_veridx (const char *name, Elf *elf, Elf_Data *verd, GElf_Shdr *verd_shdr)
+{
+ if (strcmp (name, "_GLOBAL_") == 0)
+ return 1;
+
+ int cnt;
+ size_t offset = 0;
+ for (cnt = verd_shdr->sh_info; --cnt >= 0; )
+ {
+ GElf_Verdef defmem;
+ GElf_Verdef *def;
+ GElf_Verdaux auxmem;
+ GElf_Verdaux *aux;
+ unsigned int auxoffset;
+
+ /* Get the data at the next offset. */
+ def = gelf_getverdef (verd, offset, &defmem);
+ if (def == NULL)
+ break;
+
+ auxoffset = offset + def->vd_aux;
+ aux = gelf_getverdaux (verd, auxoffset, &auxmem);
+ if (aux == NULL)
+ break;
+
+ if (strcmp (name, elf_strptr (elf, verd_shdr->sh_link,
+ aux->vda_name)) == 0)
+ return def->vd_ndx;
+
+ /* Find the next offset. */
+ offset += def->vd_next;
+ }
+
+ return -1;
+}
+
+int
+main (int argc, char **argv)
+{
+ if (argc < 4)
+ error (1, 0, "Usage: change_symver library from_symver to_symver symbol...\nExample: change_symver libfoo.so FOO_1.0 *global* bar baz");
+
+ const char *fname = argv[1];
+
+ /* Open the file. */
+ int fd;
+ fd = open (fname, O_RDWR);
+ if (fd == -1)
+ error (1, errno, fname);
+
+ elf_version (EV_CURRENT);
+
+ /* Now get the ELF descriptor. */
+ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
+ if (elf == NULL || elf_kind (elf) != ELF_K_ELF)
+ error (1, 0, "Couldn't open %s: %s", fname, elf_errmsg (-1));
+
+ size_t shstrndx;
+ /* Get the section header string table index. */
+ if (elf_getshstrndx (elf, &shstrndx) < 0)
+ error (1, 0, "cannot get shstrndx from %s", fname);
+
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr *ehdr;
+
+ /* We need the ELF header in a few places. */
+ ehdr = gelf_getehdr (elf, &ehdr_mem);
+ if (ehdr == NULL)
+ error (1, 0, "couldn't get ELF headers %s: %s", fname, elf_errmsg (-1));
+
+ Elf_Scn *scn = NULL;
+ GElf_Shdr shdr_mem, verd_shdr, ver_shdr, dynsym_shdr;
+ Elf_Data *ver = NULL, *verd = NULL, *dynsym = NULL;
+
+ while ((scn = elf_nextscn (elf, scn)) != NULL)
+ {
+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
+
+ if (shdr == NULL)
+ error (1, 0, "couldn't get shdr from %s", fname);
+
+ if ((shdr->sh_flags & SHF_ALLOC) != 0)
+ {
+ const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
+ Elf_Data **p;
+
+ if (strcmp (name, ".gnu.version") == 0)
+ {
+ p = &ver;
+ ver_shdr = *shdr;
+ }
+ else if (strcmp (name, ".gnu.version_d") == 0)
+ {
+ p = &verd;
+ verd_shdr = *shdr;
+ }
+ else if (strcmp (name, ".dynsym") == 0)
+ {
+ p = &dynsym;
+ dynsym_shdr = *shdr;
+ }
+ else
+ continue;
+
+ if (*p != NULL)
+ error (1, 0, "Two %s sections in %s", name, fname);
+ *p = elf_getdata (scn, NULL);
+ if (*p == NULL || elf_getdata (scn, *p) != NULL)
+ error (1, 0, "No data or non-contiguous data in %s section in %s",
+ name, fname);
+ }
+ }
+
+ if (ver == NULL || verd == NULL || dynsym == NULL)
+ error (1, 0, "Couldn't find one of the needed sections in %s", fname);
+
+ int from_idx = compute_veridx (argv[2], elf, verd, &verd_shdr);
+ if (from_idx == -1)
+ error (1, 0, "Could not find symbol version %s in %s", argv[2], fname);
+
+ int to_idx = compute_veridx (argv[3], elf, verd, &verd_shdr);
+ if (to_idx == -1)
+ error (1, 0, "Could not find symbol version %s in %s", argv[3], fname);
+
+ if (dynsym_shdr.sh_entsize != gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version)
+ || dynsym_shdr.sh_size % dynsym_shdr.sh_entsize
+ || ver_shdr.sh_entsize != 2
+ || (ver_shdr.sh_size & 1)
+ || dynsym_shdr.sh_size / dynsym_shdr.sh_entsize != ver_shdr.sh_size / 2)
+ error (1, 0, "Unexpected sh_size or sh_entsize in %s", fname);
+
+ size_t nentries = ver_shdr.sh_size / 2;
+ size_t cnt;
+ GElf_Versym array[nentries];
+ for (cnt = 0; cnt < nentries; ++cnt)
+ {
+ GElf_Versym vsymmem;
+ GElf_Versym *vsym;
+
+ vsym = gelf_getversym (ver, cnt, &vsymmem);
+ if (vsym == NULL)
+ error (1, 0, "gelt_getversym failed in %s: %s", fname, elf_errmsg (-1));
+
+ array[cnt] = *vsym;
+ if (*vsym != from_idx)
+ continue;
+
+ GElf_Sym sym_mem;
+ GElf_Sym *sym;
+ sym = gelf_getsym (dynsym, cnt, &sym_mem);
+ if (sym == NULL)
+ error (1, 0, "gelt_getsym failed in %s: %s", fname, elf_errmsg (-1));
+
+ const char *name = elf_strptr (elf, dynsym_shdr.sh_link, sym->st_name);
+
+ int argn;
+ for (argn = 4; argn < argc; ++argn)
+ if (fnmatch (argv[argn], name, 0) == 0)
+ {
+ array[cnt] = to_idx;
+ break;
+ }
+ }
+
+ if (sizeof (array[0]) != 2)
+ abort ();
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
+ ;
+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
+ ;
+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
+#else
+# error Unsupported endianity
+#endif
+ {
+ for (cnt = 0; cnt < nentries; ++cnt)
+ array[cnt] = ((array[cnt] & 0xff) << 8) | ((array[cnt] & 0xff00) >> 8);
+ }
+ else
+ error (1, 0, "Unknown EI_DATA %d in %s", ehdr->e_ident[EI_DATA], fname);
+
+ if (elf_end (elf) != 0)
+ error (1, 0, "couldn't close %s: %s", fname, elf_errmsg (-1));
+
+ if (lseek (fd, ver_shdr.sh_offset, SEEK_SET) != (off_t) ver_shdr.sh_offset)
+ error (1, 0, "failed to seek to %zd in %s", (size_t) ver_shdr.sh_offset,
+ fname);
+
+ if (write (fd, array, 2 * nentries) != (ssize_t) (2 * nentries))
+ error (1, 0, "failed to write .gnu.version section into %s", fname);
+
+ close (fd);
+ return 0;
+}
--- gcc/config/ia64/unwind-ia64.c.jj 2004-10-04 08:55:57.000000000 -0400
+++ gcc/config/ia64/unwind-ia64.c 2004-11-15 09:07:45.000000000 -0500
@@ -51,6 +51,51 @@
#define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000L)
#define UNW_LENGTH(x) ((x) & 0x00000000ffffffffL)
+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
+extern _Unwind_Reason_Code __symverglobal_Unwind_Backtrace
+ (_Unwind_Trace_Fn, void *);
+extern void __symverglobal_Unwind_DeleteException
+ (struct _Unwind_Exception *);
+extern void * __symverglobal_Unwind_FindEnclosingFunction (void *);
+extern _Unwind_Reason_Code __symverglobal_Unwind_ForcedUnwind
+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
+extern _Unwind_Word __symverglobal_Unwind_GetCFA
+ (struct _Unwind_Context *);
+extern _Unwind_Word __symverglobal_Unwind_GetBSP
+ (struct _Unwind_Context *);
+extern _Unwind_Word __symverglobal_Unwind_GetGR
+ (struct _Unwind_Context *, int );
+extern _Unwind_Ptr __symverglobal_Unwind_GetIP (struct _Unwind_Context *);
+extern void *__symverglobal_Unwind_GetLanguageSpecificData
+ (struct _Unwind_Context *);
+extern _Unwind_Ptr __symverglobal_Unwind_GetRegionStart
+ (struct _Unwind_Context *);
+extern _Unwind_Reason_Code __symverglobal_Unwind_RaiseException
+ (struct _Unwind_Exception *);
+extern void __symverglobal_Unwind_Resume (struct _Unwind_Exception *);
+extern _Unwind_Reason_Code __symverglobal_Unwind_Resume_or_Rethrow
+ (struct _Unwind_Exception *);
+extern void __symverglobal_Unwind_SetGR
+ (struct _Unwind_Context *, int, _Unwind_Word);
+extern void __symverglobal_Unwind_SetIP
+ (struct _Unwind_Context *, _Unwind_Ptr);
+#define _Unwind_Backtrace __symverglobal_Unwind_Backtrace
+#define _Unwind_DeleteException __symverglobal_Unwind_DeleteException
+#define _Unwind_FindEnclosingFunction __symverglobal_Unwind_FindEnclosingFunction
+#define _Unwind_ForcedUnwind __symverglobal_Unwind_ForcedUnwind
+#define _Unwind_GetBSP __symverglobal_Unwind_GetBSP
+#define _Unwind_GetCFA __symverglobal_Unwind_GetCFA
+#define _Unwind_GetGR __symverglobal_Unwind_GetGR
+#define _Unwind_GetIP __symverglobal_Unwind_GetIP
+#define _Unwind_GetLanguageSpecificData __symverglobal_Unwind_GetLanguageSpecificData
+#define _Unwind_GetRegionStart __symverglobal_Unwind_GetRegionStart
+#define _Unwind_RaiseException __symverglobal_Unwind_RaiseException
+#define _Unwind_Resume __symverglobal_Unwind_Resume
+#define _Unwind_Resume_or_Rethrow __symverglobal_Unwind_Resume_or_Rethrow
+#define _Unwind_SetGR __symverglobal_Unwind_SetGR
+#define _Unwind_SetIP __symverglobal_Unwind_SetIP
+#endif
+
enum unw_application_register
{
UNW_AR_BSP,
@@ -2402,4 +2447,44 @@ alias (_Unwind_SetGR);
alias (_Unwind_SetIP);
#endif
+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
+#undef alias
+#define symverglobal(name, version) \
+__typeof (__symverglobal##name) __symverlocal##name \
+ __attribute__ ((alias ("__symverglobal" #name))); \
+__asm__ (".symver __symverglobal" #name"," #name "@@GCC_3.4.2");\
+__asm__ (".symver __symverlocal" #name"," #name "@" #version)
+
+#undef _Unwind_Backtrace
+#undef _Unwind_DeleteException
+#undef _Unwind_FindEnclosingFunction
+#undef _Unwind_ForcedUnwind
+#undef _Unwind_GetBSP
+#undef _Unwind_GetCFA
+#undef _Unwind_GetGR
+#undef _Unwind_GetIP
+#undef _Unwind_GetLanguageSpecificData
+#undef _Unwind_GetRegionStart
+#undef _Unwind_RaiseException
+#undef _Unwind_Resume
+#undef _Unwind_Resume_or_Rethrow
+#undef _Unwind_SetGR
+#undef _Unwind_SetIP
+symverglobal (_Unwind_Backtrace, GCC_3.3);
+symverglobal (_Unwind_DeleteException, GCC_3.0);
+symverglobal (_Unwind_FindEnclosingFunction, GCC_3.3);
+symverglobal (_Unwind_ForcedUnwind, GCC_3.0);
+symverglobal (_Unwind_GetBSP, GCC_3.3.2);
+symverglobal (_Unwind_GetCFA, GCC_3.3);
+symverglobal (_Unwind_GetGR, GCC_3.0);
+symverglobal (_Unwind_GetIP, GCC_3.0);
+symverglobal (_Unwind_GetLanguageSpecificData, GCC_3.0);
+symverglobal (_Unwind_GetRegionStart, GCC_3.0);
+symverglobal (_Unwind_RaiseException, GCC_3.0);
+symverglobal (_Unwind_Resume, GCC_3.0);
+symverglobal (_Unwind_Resume_or_Rethrow, GCC_3.3);
+symverglobal (_Unwind_SetGR, GCC_3.0);
+symverglobal (_Unwind_SetIP, GCC_3.0);
+#endif
+
#endif
--- gcc/config/ia64/mkmap-symver-multi.awk.jj 2004-02-18 10:27:36.000000000 -0500
+++ gcc/config/ia64/mkmap-symver-multi.awk 2004-11-15 09:46:50.000000000 -0500
@@ -0,0 +1,133 @@
+# Generate an ELF symbol version map a-la Solaris and GNU ld.
+# Contributed by Richard Henderson <rth@cygnus.com>
+#
+# This file is part of GCC.
+#
+# GCC 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.
+#
+# GCC 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 GCC; see the file COPYING. If not, write to the Free
+# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+BEGIN {
+ state = "nm";
+ sawsymbol = 0;
+}
+
+# Remove comment and blank lines.
+/^ *#/ || /^ *$/ {
+ next;
+}
+
+# We begin with nm input. Collect the set of symbols that are present
+# so that we can not emit them into the final version script -- Solaris
+# complains at us if we do.
+
+state == "nm" && /^%%/ {
+ state = "ver";
+ next;
+}
+
+state == "nm" && ($1 == "U" || $2 == "U") {
+ next;
+}
+
+state == "nm" && NF == 3 {
+ if ($3 ~ /^[^@]*@GCC_[0-9.]*$/) {
+ def[$3] = 1
+ tl=$3
+ sub(/^.*@/,"",tl)
+ ver[$3] = tl
+ } else {
+ sub(/@@?GCC_[0-9.]*$/,"",$3)
+ def[$3] = 1;
+ }
+ sawsymbol = 1;
+ next;
+}
+
+state == "nm" {
+ next;
+}
+
+# Now we process a simplified variant of the Solaris symbol version
+# script. We have one symbol per line, no semicolons, simple markers
+# for beginning and ending each section, and %inherit markers for
+# describing version inheritence. A symbol may appear in more than
+# one symbol version, and the last seen takes effect.
+
+NF == 3 && $1 == "%inherit" {
+ inherit[$2] = $3;
+ next;
+}
+
+NF == 2 && $2 == "{" {
+ libs[$1] = 1;
+ thislib = $1;
+ next;
+}
+
+$1 == "}" {
+ thislib = "";
+ next;
+}
+
+{
+ ver[$1] = thislib;
+ next;
+}
+
+END {
+ if (!sawsymbol)
+ {
+ print "No symbols seen -- broken or mis-installed nm?" | "cat 1>&2";
+ exit 1;
+ }
+ for (l in libs)
+ output(l);
+}
+
+function output(lib) {
+ if (done[lib])
+ return;
+ done[lib] = 1;
+ if (inherit[lib])
+ output(inherit[lib]);
+
+ empty=1
+ for (sym in ver)
+ if ((ver[sym] == lib) && (sym in def))
+ {
+ if (empty)
+ {
+ printf("%s {\n", lib);
+ printf(" global:\n");
+ empty = 0;
+ }
+ symp = sym;
+ sub(/@GCC_[0-9.]*$/,"",symp);
+ printf("\t%s;\n", symp);
+ if (dotsyms)
+ printf("\t.%s;\n", symp);
+ }
+
+ if (empty)
+ {
+ for (l in libs)
+ if (inherit[l] == lib)
+ inherit[l] = inherit[lib];
+ }
+ else if (inherit[lib])
+ printf("} %s;\n", inherit[lib]);
+ else
+ printf ("\n local:\n\t*;\n};\n");
+}
--- gcc/config/ia64/libgcc-ia64-no-libunwind.ver.jj 2004-02-18 10:27:36.000000000 -0500
+++ gcc/config/ia64/libgcc-ia64-no-libunwind.ver 2004-11-15 09:19:56.000000000 -0500
@@ -0,0 +1,17 @@
+GCC_3.4.2 {
+ _Unwind_GetGR
+ _Unwind_RaiseException
+ _Unwind_GetRegionStart
+ _Unwind_SetIP
+ _Unwind_GetIP
+ _Unwind_GetLanguageSpecificData
+ _Unwind_Resume
+ _Unwind_DeleteException
+ _Unwind_SetGR
+ _Unwind_ForcedUnwind
+ _Unwind_Backtrace
+ _Unwind_FindEnclosingFunction
+ _Unwind_GetCFA
+ _Unwind_Resume_or_Rethrow
+ _Unwind_GetBSP
+}

View File

@ -0,0 +1,17 @@
2008-01-25 Jakub Jelinek <jakub@redhat.com>
* lang.c (java_classify_record): Revert 2007-12-20 change.
--- gcc/java/lang.c 2007-12-27 09:09:49.000000000 +0100
+++ gcc/java/lang.c 2008-01-25 17:43:57.000000000 +0100
@@ -965,9 +965,7 @@ java_classify_record (tree type)
if (! CLASS_P (type))
return RECORD_IS_STRUCT;
- /* ??? GDB does not support DW_TAG_interface_type as of December,
- 2007. Re-enable this at a later time. */
- if (0 && CLASS_INTERFACE (TYPE_NAME (type)))
+ if (CLASS_INTERFACE (TYPE_NAME (type)))
return RECORD_IS_INTERFACE;
return RECORD_IS_CLASS;

View File

@ -0,0 +1,44 @@
--- libjava/configure.ac.jj 2007-12-07 17:55:50.000000000 +0100
+++ libjava/configure.ac 2007-12-07 18:36:56.000000000 +0100
@@ -82,6 +82,13 @@ AC_ARG_ENABLE(java-maintainer-mode,
[allow rebuilding of .class and .h files]))
AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
+AC_ARG_ENABLE(libjava-multilib,
+ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
+if test "$enable_libjava_multilib" = no; then
+ multilib=no
+ ac_configure_args="$ac_configure_args --disable-multilib"
+fi
+
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
GCC_NO_EXECUTABLES
--- libjava/configure.jj 2007-12-07 17:55:50.000000000 +0100
+++ libjava/configure 2007-12-07 18:39:58.000000000 +0100
@@ -1018,6 +1018,8 @@ Optional Features:
--enable-gconf-peer compile GConf native peers for util.preferences
--enable-java-maintainer-mode
allow rebuilding of .class and .h files
+ --enable-libjava-multilib
+ build libjava as multilib
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-maintainer-mode enable make rules and dependencies not useful
@@ -1848,6 +1850,16 @@ else
fi
+# Check whether --enable-libjava-multilib was given.
+if test "${enable_libjava_multilib+set}" = set; then
+ enableval=$enable_libjava_multilib;
+fi
+
+if test "$enable_libjava_multilib" = no; then
+ multilib=no
+ ac_configure_args="$ac_configure_args --disable-multilib"
+fi
+
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,86 @@
2005-11-28 Jakub Jelinek <jakub@redhat.com>
* config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0,
read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx
instead of doing an extran indirection from frame_pointer_rtx.
* gcc.dg/20051128-1.c: New test.
--- gcc/config/rs6000/rs6000.c.jj 2005-11-26 14:38:01.000000000 +0100
+++ gcc/config/rs6000/rs6000.c 2005-11-28 20:32:18.000000000 +0100
@@ -13166,17 +13166,22 @@ rs6000_return_addr (int count, rtx frame
don't try to be too clever here. */
if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
{
+ rtx x;
cfun->machine->ra_needs_full_frame = 1;
- return
- gen_rtx_MEM
- (Pmode,
- memory_address
- (Pmode,
- plus_constant (copy_to_reg
- (gen_rtx_MEM (Pmode,
- memory_address (Pmode, frame))),
- RETURN_ADDRESS_OFFSET)));
+ if (count == 0)
+ {
+ gcc_assert (frame == frame_pointer_rtx);
+ x = arg_pointer_rtx;
+ }
+ else
+ {
+ x = memory_address (Pmode, frame);
+ x = copy_to_reg (gen_rtx_MEM (Pmode, x));
+ }
+
+ x = plus_constant (x, RETURN_ADDRESS_OFFSET);
+ return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
}
cfun->machine->ra_need_lr = 1;
--- gcc/testsuite/gcc.dg/20051128-1.c.jj 2005-10-10 11:21:41.096999000 +0200
+++ gcc/testsuite/gcc.dg/20051128-1.c 2005-11-28 12:30:57.000000000 +0100
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fpic" } */
+
+extern void exit (int);
+extern void abort (void);
+
+int b;
+
+struct A
+{
+ void *pad[147];
+ void *ra, *h;
+ long o;
+};
+
+void
+__attribute__((noinline))
+foo (struct A *a, void *x)
+{
+ __builtin_memset (a, 0, sizeof (a));
+ if (!b)
+ exit (0);
+}
+
+void
+__attribute__((noinline))
+bar (void)
+{
+ struct A a;
+
+ __builtin_unwind_init ();
+ foo (&a, __builtin_return_address (0));
+}
+
+int
+main (void)
+{
+ bar ();
+ abort ();
+ return 0;
+}

View File

@ -0,0 +1,16 @@
2006-08-18 Jakub Jelinek <jakub@redhat.com>
PR c/27898
* gcc.dg/pr27898.c: New test.
--- gcc/testsuite/gcc.dg/pr27898.c.jj 2006-08-18 09:19:33.000000000 +0200
+++ gcc/testsuite/gcc.dg/pr27898.c 2006-08-18 09:19:27.000000000 +0200
@@ -0,0 +1,8 @@
+/* PR c/27898 */
+/* { dg-do compile } */
+/* { dg-options "--combine" } */
+/* { dg-additional-sources "pr27898.c" } */
+
+union u { struct { int i; }; };
+
+extern int foo (union u *);

View File

@ -0,0 +1,19 @@
2007-06-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/32139
* gcc.c-torture/compile/20070531-1.c: New test.
--- gcc/testsuite/gcc.c-torture/compile/20070531-1.c.jj 2007-05-31 13:47:22.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/compile/20070531-1.c 2007-06-01 10:57:15.000000000 +0200
@@ -0,0 +1,11 @@
+/* PR tree-optimization/32139 */
+int foo (void);
+int bar (void) __attribute__ ((const));
+
+int
+test (int x)
+{
+ int a = (x == 10000 ? foo : bar) ();
+ int b = (x == 10000 ? foo : bar) ();
+ return a + b;
+}

View File

@ -0,0 +1,153 @@
2007-11-06 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/33763
* gcc.dg/pr33763.c: New test.
* g++.dg/opt/inline13.C: New test.
2007-11-06 Jan Hubicka <jh@suse.cz>
PR tree-optimization/33763
* tree-inline.c (expand_call_inline): Silently ignore always_inline
attribute for redefined extern inline functions.
--- gcc/tree-inline.c.jj 2007-11-06 09:29:04.000000000 +0100
+++ gcc/tree-inline.c 2007-11-06 16:19:12.000000000 +0100
@@ -2582,6 +2582,12 @@ expand_call_inline (basic_block bb, tree
if (!cgraph_inline_p (cg_edge, &reason))
{
if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
+ /* For extern inline functions that get redefined we always
+ silently ignored alway_inline flag. Better behaviour would
+ be to be able to keep both bodies and use extern inline body
+ for inlining, but we can't do that because frontends overwrite
+ the body. */
+ && !cg_edge->callee->local.redefined_extern_inline
/* Avoid warnings during early inline pass. */
&& (!flag_unit_at_a_time || cgraph_global_info_ready))
{
--- gcc/testsuite/gcc.dg/pr33763.c.jj 2007-11-06 16:19:12.000000000 +0100
+++ gcc/testsuite/gcc.dg/pr33763.c 2007-11-06 16:19:12.000000000 +0100
@@ -0,0 +1,60 @@
+/* PR tree-optimization/33763 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef struct
+{
+ void *a;
+ void *b;
+} T;
+extern void *foo (const char *, const char *);
+extern void *bar (void *, const char *, T);
+extern int baz (const char *, int);
+
+extern inline __attribute__ ((always_inline, gnu_inline)) int
+baz (const char *x, int y)
+{
+ return 2;
+}
+
+int
+baz (const char *x, int y)
+{
+ return 1;
+}
+
+int xa, xb;
+
+static void *
+inl (const char *x, const char *y)
+{
+ T t = { &xa, &xb };
+ int *f = (int *) __builtin_malloc (sizeof (int));
+ const char *z;
+ int o = 0;
+ void *r = 0;
+
+ for (z = y; *z; z++)
+ {
+ if (*z == 'r')
+ o |= 1;
+ if (*z == 'w')
+ o |= 2;
+ }
+ if (o == 1)
+ *f = baz (x, 0);
+ if (o == 2)
+ *f = baz (x, 1);
+ if (o == 3)
+ *f = baz (x, 2);
+
+ if (o && *f > 0)
+ r = bar (f, "w", t);
+ return r;
+}
+
+void *
+foo (const char *x, const char *y)
+{
+ return inl (x, y);
+}
--- gcc/testsuite/g++.dg/opt/inline13.C.jj 2007-11-06 16:20:20.000000000 +0100
+++ gcc/testsuite/g++.dg/opt/inline13.C 2007-11-06 16:21:30.000000000 +0100
@@ -0,0 +1,60 @@
+// PR tree-optimization/33763
+// { dg-do compile }
+// { dg-options "-O2" }
+
+typedef struct
+{
+ void *a;
+ void *b;
+} T;
+extern void *foo (const char *, const char *);
+extern void *bar (void *, const char *, T);
+extern int baz (const char *, int);
+
+extern inline __attribute__ ((always_inline, gnu_inline)) int
+baz (const char *x, int y)
+{
+ return 2;
+}
+
+int
+baz (const char *x, int y)
+{
+ return 1;
+}
+
+int xa, xb;
+
+static void *
+inl (const char *x, const char *y)
+{
+ T t = { &xa, &xb };
+ int *f = (int *) __builtin_malloc (sizeof (int));
+ const char *z;
+ int o = 0;
+ void *r = 0;
+
+ for (z = y; *z; z++)
+ {
+ if (*z == 'r')
+ o |= 1;
+ if (*z == 'w')
+ o |= 2;
+ }
+ if (o == 1)
+ *f = baz (x, 0);
+ if (o == 2)
+ *f = baz (x, 1);
+ if (o == 3)
+ *f = baz (x, 2);
+
+ if (o && *f > 0)
+ r = bar (f, "w", t);
+ return r;
+}
+
+void *
+foo (const char *x, const char *y)
+{
+ return inl (x, y);
+}

Some files were not shown because too many files have changed in this diff Show More