X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=ms%2Fuplink-x86_64.pl;h=5564c2c7bab1c57861a87489cc202cbe7880c021;hp=9acbf6be6f485d2193765cb15d6f6cddd704921b;hb=HEAD;hpb=be01f79d3d1b1e661d390d86cff4335daed8bfcd diff --git a/ms/uplink-x86_64.pl b/ms/uplink-x86_64.pl index 9acbf6be6f..e27e74536b 100755 --- a/ms/uplink-x86_64.pl +++ b/ms/uplink-x86_64.pl @@ -1,8 +1,19 @@ -#!/usr/bin/env perl +#! /usr/bin/env perl +# Copyright 2008-2024 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the Apache License 2.0 (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + +# $output is the last argument if it looks like a file (it has an extension) +$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef; +$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef; -$output=shift; $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; -open STDOUT,"| $^X ${dir}../crypto/perlasm/x86_64-xlate.pl $output"; +open OUT,"| \"$^X\" \"${dir}../crypto/perlasm/x86_64-xlate.pl\" $flavour \"$output\"" + or die "can't call ${dir}../crypto/perlasm/x86_64-xlate.pl: $!"; +*STDOUT=*OUT; push(@INC,"${dir}."); require "uplink-common.pl";