Skip to content

Commit

Permalink
Fix perl handling of paths w/ spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Nov 20, 2024
1 parent 0d4dab7 commit 663cb9e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,16 @@ if(PERL_EXECUTABLE)
set(PERLASM_FLAGS "${PERLASM_FLAGS} -DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX")
endif()

set(PERL_COMMAND "${PERL_EXECUTABLE}")
list(APPEND PERL_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/${src}")
list(APPEND PERL_COMMAND "${PERLASM_STYLE}")
list(APPEND PERL_COMMAND "${dest}")
list(APPEND PERL_COMMAND ${PERLASM_FLAGS})

add_custom_command(
OUTPUT ${dest}
COMMAND ${CMAKE_COMMAND} -E make_directory ${dir}
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${PERLASM_STYLE} ${dest} ${PERLASM_FLAGS}
COMMAND ${PERL_COMMAND}
DEPENDS
${src}
${PROJECT_SOURCE_DIR}/crypto/perlasm/arm-xlate.pl
Expand Down
2 changes: 1 addition & 1 deletion crypto/cipher_extra/asm/chacha20_poly1305_armv8.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";

open OUT,"| \"$^X\" $xlate $flavour $output";
open OUT, qq{| "$^X" "$xlate" $flavour "$output"};
*STDOUT=*OUT;

my ($oup,$inp,$inl,$adp,$adl,$keyp,$itr1,$itr2) = ("x0","x1","x2","x3","x4","x5","x6","x7");
Expand Down
2 changes: 1 addition & 1 deletion crypto/fipsmodule/ec/asm/p256-armv8-asm.pl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
( $xlate="${dir}../../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";

open OUT,"| \"$^X\" $xlate $flavour $output";
open OUT, qq{| "$^X" "$xlate" $flavour "$output"};
*STDOUT=*OUT;

{
Expand Down
2 changes: 1 addition & 1 deletion crypto/fipsmodule/ec/asm/p256_beeu-armv8-asm.pl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
( $xlate="${dir}../../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";
open OUT,"| \"$^X\" $xlate $flavour $output";
open OUT, qq{| "$^X" "$xlate" $flavour "$output"};
*STDOUT=*OUT;
#############################################################################
# extern int beeu_mod_inverse_vartime(BN_ULONG out[P256_LIMBS],
Expand Down
2 changes: 1 addition & 1 deletion crypto/fipsmodule/md5/asm/md5-armv8.pl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
( $xlate="${dir}../../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";

open OUT,"| \"$^X\" $xlate $flavour \"$output\""
open OUT, qq{| "$^X" "$xlate" $flavour "$output"}
or die "can't call $xlate: $1";
*STDOUT=*OUT;

Expand Down
2 changes: 1 addition & 1 deletion crypto/fipsmodule/modes/asm/aesv8-gcm-armv8.pl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
( $xlate="${dir}../../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";

open OUT,"| \"$^X\" $xlate $flavour $output";
open OUT, qq{| "$^X" "$xlate" $flavour "$output"};
*STDOUT=*OUT;

$code=<<___;
Expand Down

0 comments on commit 663cb9e

Please sign in to comment.