gcc : fixed spec file

This commit is contained in:
Massimiliano Culpo 2015-10-06 18:20:48 +02:00
parent d44571257a
commit 17de9a37f1

View file

@ -122,12 +122,11 @@ def write_rpath_specs(self):
return return
gcc = Executable(join_path(self.prefix.bin, 'gcc')) gcc = Executable(join_path(self.prefix.bin, 'gcc'))
lines = gcc('-dumpspecs', return_output=True).split("\n") lines = gcc('-dumpspecs', return_output=True).strip().split("\n")
specs_file = join_path(self.spec_dir, 'specs') specs_file = join_path(self.spec_dir, 'specs')
with closing(open(specs_file, 'w')) as out: with closing(open(specs_file, 'w')) as out:
for line in lines: for line in lines:
if line.startswith("*link:"):
out.write(line + "\n")
out.write("-rpath %s/lib:%s/lib64 \\\n"% (self.prefix, self.prefix))
out.write(line + "\n") out.write(line + "\n")
if line.startswith("*link:"):
out.write("-rpath %s/lib:%s/lib64 \\\n"% (self.prefix, self.prefix))
set_install_permissions(specs_file) set_install_permissions(specs_file)