From 1753d1237429bace72a944f7654ce4b1c4364f60 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sun, 24 Jun 2018 13:29:29 +0200 Subject: PA-RISC assembly pack: make it work with GNU assembler for HP-UX. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6583) --- crypto/pariscid.pl | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'crypto/pariscid.pl') diff --git a/crypto/pariscid.pl b/crypto/pariscid.pl index 3d4a5f8aef..5a231c49f0 100644 --- a/crypto/pariscid.pl +++ b/crypto/pariscid.pl @@ -255,9 +255,22 @@ L\$done2 .PROCEND ___ } -$code =~ s/cmpib,\*/comib,/gm if ($SIZE_T==4); -$code =~ s/,\*/,/gm if ($SIZE_T==4); -$code =~ s/\bbv\b/bve/gm if ($SIZE_T==8); -print $code; + +if (`$ENV{CC} -Wa,-v -c -o /dev/null -x assembler /dev/null 2>&1` + =~ /GNU assembler/) { + $gnuas = 1; +} + +foreach(split("\n",$code)) { + + s/(\.LEVEL\s+2\.0)W/$1w/ if ($gnuas && $SIZE_T==8); + s/\.SPACE\s+\$TEXT\$/.text/ if ($gnuas && $SIZE_T==8); + s/\.SUBSPA.*// if ($gnuas && $SIZE_T==8); + s/cmpib,\*/comib,/ if ($SIZE_T==4); + s/,\*/,/ if ($SIZE_T==4); + s/\bbv\b/bve/ if ($SIZE_T==8); + + print $_,"\n"; +} close STDOUT; -- cgit v1.2.3