autotools: delete args from postdep objects when %fj (#16274)

This commit is contained in:
Tomoki, Karatsu 2020-05-22 03:50:57 +09:00 committed by GitHub
parent 661832a6c6
commit a9b64bcaf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@
import shutil import shutil
import stat import stat
import sys import sys
import re
from subprocess import PIPE from subprocess import PIPE
from subprocess import check_call from subprocess import check_call
@ -185,6 +186,8 @@ def _do_patch_libtool(self):
if line == 'pic_flag=""\n': if line == 'pic_flag=""\n':
line = 'pic_flag="{0}"\n'\ line = 'pic_flag="{0}"\n'\
.format(self.compiler.cc_pic_flag) .format(self.compiler.cc_pic_flag)
if self.spec.satisfies('%fj') and 'fjhpctag.o' in line:
line = re.sub(r'/\S*/fjhpctag.o', '', line)
sys.stdout.write(line) sys.stdout.write(line)
@property @property