Using this flag enables position-independent code even when not strictly
required. It is impossible to use --disable-pic to forcibly disable PIC
when other properties mandate it.
Originally committed as revision 19672 to svn://svn.ffmpeg.org/ffmpeg/trunk
... | ... |
@@ -221,6 +221,7 @@ show_help(){ |
221 | 221 |
echo " --disable-neon disable neon optimizations" |
222 | 222 |
echo " --disable-vis disable VIS optimizations" |
223 | 223 |
echo " --disable-yasm disable use of yasm assembler" |
224 |
+ echo " --enable-pic build position-independent code" |
|
224 | 225 |
echo |
225 | 226 |
echo "Developer options (useful when working on FFmpeg itself):" |
226 | 227 |
echo " --disable-debug disable debugging symbols" |
... | ... |
@@ -840,6 +841,7 @@ CONFIG_LIST=" |
840 | 840 |
mpegaudio_hp |
841 | 841 |
network |
842 | 842 |
nonfree |
843 |
+ pic |
|
843 | 844 |
postproc |
844 | 845 |
powerpc_perf |
845 | 846 |
rdft |
... | ... |
@@ -1743,7 +1745,7 @@ case "$arch" in |
1743 | 1743 |
arch="alpha" |
1744 | 1744 |
enable fast_64bit |
1745 | 1745 |
check_cflags -mieee |
1746 |
- pic=$shared |
|
1746 |
+ spic=$shared |
|
1747 | 1747 |
;; |
1748 | 1748 |
arm|armv[4567]*l) |
1749 | 1749 |
arch="arm" |
... | ... |
@@ -1756,29 +1758,29 @@ case "$arch" in |
1756 | 1756 |
ia64) |
1757 | 1757 |
arch="ia64" |
1758 | 1758 |
enable fast_64bit |
1759 |
- pic=$shared |
|
1759 |
+ spic=$shared |
|
1760 | 1760 |
;; |
1761 | 1761 |
m68k) |
1762 | 1762 |
arch="m68k" |
1763 | 1763 |
;; |
1764 | 1764 |
mips|mipsel|IP*) |
1765 | 1765 |
arch="mips" |
1766 |
- pic=$shared |
|
1766 |
+ spic=$shared |
|
1767 | 1767 |
;; |
1768 | 1768 |
mips64) |
1769 | 1769 |
arch="mips" |
1770 | 1770 |
subarch="mips64" |
1771 | 1771 |
enable fast_64bit |
1772 |
- pic=$shared |
|
1772 |
+ spic=$shared |
|
1773 | 1773 |
;; |
1774 | 1774 |
parisc|hppa) |
1775 | 1775 |
arch="parisc" |
1776 |
- pic=$shared |
|
1776 |
+ spic=$shared |
|
1777 | 1777 |
;; |
1778 | 1778 |
parisc64|hppa64) |
1779 | 1779 |
arch="parisc" |
1780 | 1780 |
enable fast_64bit |
1781 |
- pic=$shared |
|
1781 |
+ spic=$shared |
|
1782 | 1782 |
;; |
1783 | 1783 |
"Power Macintosh"|ppc|powerpc) |
1784 | 1784 |
arch="ppc" |
... | ... |
@@ -1798,13 +1800,13 @@ case "$arch" in |
1798 | 1798 |
;; |
1799 | 1799 |
sparc) |
1800 | 1800 |
arch="sparc" |
1801 |
- pic=$shared |
|
1801 |
+ spic=$shared |
|
1802 | 1802 |
;; |
1803 | 1803 |
sun4u|sparc64) |
1804 | 1804 |
arch="sparc" |
1805 | 1805 |
subarch="sparc64" |
1806 | 1806 |
enable fast_64bit |
1807 |
- pic=$shared |
|
1807 |
+ spic=$shared |
|
1808 | 1808 |
;; |
1809 | 1809 |
i386|i486|i586|i686|i86pc|BePC) |
1810 | 1810 |
arch="x86" |
... | ... |
@@ -1817,7 +1819,7 @@ case "$arch" in |
1817 | 1817 |
enable cmov |
1818 | 1818 |
enable fast_cmov |
1819 | 1819 |
enable fast_unaligned |
1820 |
- check_cc <<EOF && enable fast_64bit && subarch="x86_64" && pic=$shared |
|
1820 |
+ check_cc <<EOF && enable fast_64bit && subarch="x86_64" && spic=$shared |
|
1821 | 1821 |
int test[sizeof(char*) - 7]; |
1822 | 1822 |
EOF |
1823 | 1823 |
;; |
... | ... |
@@ -1827,6 +1829,7 @@ EOF |
1827 | 1827 |
esac |
1828 | 1828 |
|
1829 | 1829 |
enable $arch $subarch |
1830 |
+enabled spic && enable pic |
|
1830 | 1831 |
|
1831 | 1832 |
# OS specific |
1832 | 1833 |
case $target_os in |