smarter wrapper; detect -r link option
/home/builder/.ghc/android-14/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: fatal error: -pie and -r are incompatible
This commit is contained in:
parent
a3ec1d9c12
commit
51dd68a28c
2 changed files with 13 additions and 3 deletions
|
@ -14,9 +14,7 @@ fi
|
|||
VER="$(perl -e '$_=<>;print m/\((.*?)\)/'<../../CHANGELOG)"
|
||||
|
||||
wrap () {
|
||||
echo "#!/bin/sh -e" > "$2"
|
||||
echo "echo \"$1 added options: $3\" >&2" >> "$2"
|
||||
echo "$1 $3 "'"$@"' >> "$2"
|
||||
sed -e "s!PROG!$1!" -e "s!OPTS!$3! < wrapper.pl > "$2"
|
||||
chmod +x "$2"
|
||||
}
|
||||
|
||||
|
|
12
standalone/android/wrapper.pl
Normal file
12
standalone/android/wrapper.pl
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/perl
|
||||
my $prog=q{PROG}; # replaced
|
||||
my @opts=qw{OPTS}; # replaced
|
||||
|
||||
if (grep { $_ eq "-r" || $_ eq "--relocatable" } @ARGV) {
|
||||
print "running $prog withthout extra opts, as relocatable build detected\n";
|
||||
exec($prog,@ARGV) || die "failed to run $prog";
|
||||
}
|
||||
else {
|
||||
print "running $prog with extra opts @opts\n";
|
||||
exec($prog,@opts,@ARGV) || die "failed to run $prog";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue