This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: Handle copying symlinks in libstdc++-v3


libstdc++-v3 doesn't copy symlinks right. As the result, I got some
bogus files in libstdc++-v3/testsuite and bogus falures. Here is a
patch.


H.J.
-----
2001-08-13  H.J. Lu  (hjl@gnu.org)

	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init):
	Properly copying symlinks.

--- libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp.symlink	Fri Aug 10 14:46:59 2001
+++ libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp	Mon Aug 13 12:14:25 2001
@@ -38,10 +38,20 @@ proc libstdc++-v3-init { args } {
 
     # Copy any required data files.
     foreach tst [glob -nocomplain "$srcdir/*/*.tst"] {
-	file copy -force $tst $outdir
+	if { [catch { set symlink [file readlink $tst] } x] } then {
+	    file copy -force $tst $outdir
+	} else {
+	    set dirname [file dirname $tst]
+	    file copy -force $dirname/$symlink $outdir
+	}
     }
     foreach txt [glob -nocomplain "$srcdir/*/*.txt"] {
-	file copy -force $txt $outdir
+	if { [catch { set symlink [file readlink $txt] } x] } then {
+	    file copy -force $txt $outdir
+	} else {
+	    set dirname [file dirname $txt]
+	    file copy -force $dirname/$symlink $outdir
+	}
     }
 
     # set LD_LIBRARY_PATH so that libgcc_s, libstdc++ binaries can be found.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]