Discover partial linking arguments dynamically.

clang for android doesn't work with -Wl,-r,-d without -static.
This commit is contained in:
Vladimir Serbinenko committed 2017-01-27 20:12:00 +00:00
1 parent 69743d7d1b
commit f0cdef6ef5
5 files changed
+30 -10

No files matched your search

+2 -2
View File
@@ -79,9 +79,9 @@ else
for dep in $deps; do echo "char moddep_$dep[] __attribute__ ((section(\"_moddeps, _moddeps\"))) = \"$dep\";" >>$t2; done
if test -n "$deps"; then
@TARGET_CC@ @TARGET_LDFLAGS@ -ffreestanding -nostdlib -o $tmpfile2 $t1 $t2 $tmpfile -Wl,-r,-d
@TARGET_CC@ @TARGET_LDFLAGS@ @TARGET_INCREMENTAL_LINK@ -ffreestanding -nostdlib -o $tmpfile2 $t1 $t2 $tmpfile
else
@TARGET_CC@ @TARGET_LDFLAGS@ -ffreestanding -nostdlib -o $tmpfile2 $t1 $tmpfile -Wl,-r,-d
@TARGET_CC@ @TARGET_LDFLAGS@ @TARGET_INCREMENTAL_LINK@ -ffreestanding -nostdlib -o $tmpfile2 $t1 $tmpfile
fi
rm -f $t1 $t2 $tmpfile
mv $tmpfile2 $tmpfile