From 1edf478667ae8b988cabb49afa66c25bfe350cb7 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 22 Dec 2000 13:29:29 +0000 Subject: [PATCH] [project @ 2000-12-22 13:29:29 by simonmar] Recent versions of gcc seem to output strings as sequences of .bytes, which the splitter didn't recognise. The result was that constant strings were being duplicated in all the split .o files (again... this is a particularly fragile "optimisation" and breaks on a regular basis). --- ghc/driver/split/ghc-split.lprl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/driver/split/ghc-split.lprl b/ghc/driver/split/ghc-split.lprl index 0cff062..6ed909a 100644 --- a/ghc/driver/split/ghc-split.lprl +++ b/ghc/driver/split/ghc-split.lprl @@ -290,7 +290,7 @@ sub process_asm_block_iX86 { $str = "\.text\n\t.align 4\n" . $str; # remove/record any literal constants defined here - while ( ($str =~ /(\.?(LC\d+):\n(\t\.(ascii|string).*\n)+)/ )) { + while ( ($str =~ /(\.?(LC\d+):\n(\t\.(ascii|string).*\n|\.byte.*\n)+)/ )) { local($label) = $2; local($body) = $1; @@ -299,7 +299,7 @@ sub process_asm_block_iX86 { $LocalConstant{$label} = $body; - $str =~ s/\.?LC\d+:\n(\t\.(ascii|string).*\n)+//; + $str =~ s/\.?LC\d+:\n(\t\.(ascii|string).*\n|\.byte.*\n)+//; } # inject definitions for any local constants now used herein -- 1.7.10.4