classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Workaround for source file order compilation problems


From: Mark Wielaard
Subject: [cp-patches] Workaround for source file order compilation problems
Date: Fri, 06 May 2005 16:39:38 +0200

Hi,

This patch works around GCJ bug http://gcc.gnu.org/PR21418
On some systems find returns thee source files to compile in a different
order leading to a gcj bug where it picks up classes from the wrong
package.  By sorting the list we at least get uniform behavior on all
platforms.

2005-05-06  Mark Wielaard  <address@hidden>

        Reported by Kalle Olavi Niemitalo <address@hidden>.
        Woraround for gcj bug #21418
        * lib/gen-classlist.sh.in: Set LC_ALL and LANG to C. Sort result of
        find.

I am checking this in.

Cheers,

Mark
? lib/classes.standard.b
? lib/classes.standard.bla
Index: lib/gen-classlist.sh.in
===================================================================
RCS file: /cvsroot/classpath/classpath/lib/gen-classlist.sh.in,v
retrieving revision 1.21
diff -u -r1.21 gen-classlist.sh.in
--- lib/gen-classlist.sh.in     5 Jan 2005 23:01:03 -0000       1.21
+++ lib/gen-classlist.sh.in     6 May 2005 14:38:43 -0000
@@ -1,17 +1,22 @@
 #! @SH@
 # @configure_input@
 
+# Make sure sorting is done the same on all configurations
+LC_ALL=C; export LC_ALL
+LANG=C; export LANG
+
 echo "Adding java source files from srcdir '@top_srcdir@'."
 @FIND@ @top_srcdir@/java @top_srcdir@/javax @top_srcdir@/gnu \
        @top_srcdir@/org @top_srcdir@/vm/reference \
        @top_srcdir@/external/w3c_dom @top_srcdir@/external/sax \
-       -follow -type f -print | grep '\.java$' > ${top_builddir}/lib/classes.1
+       -follow -type f -print | sort | grep '\.java$' \
+       > ${top_builddir}/lib/classes.1
 
 # Only include generated files once.
 if test ! "${top_builddir}" -ef "@top_srcdir@"; then
   echo "Adding generated files in builddir '${top_builddir}'."
   @FIND@ ${top_builddir}/gnu ${top_builddir}/java -follow -type f -print \
-  | grep '\.java$' >> ${top_builddir}/lib/classes.1
+  | sort | grep '\.java$' >> ${top_builddir}/lib/classes.1
 fi
 
 for filexp in `cat @top_srcdir@/lib/$1.omit` ; do { grep -v ${filexp} < 
${top_builddir}/lib/classes.1 > ${top_builddir}/lib/classes.2 ; mv 
${top_builddir}/lib/classes.2 ${top_builddir}/lib/classes.1 ; } ; done

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]