binutils: Avoid linking to flex shared lib
[termux-packages] / packages / binutils / ld-emultempl-elf32.em.patch
CommitLineData
fd000fc6
FF
1diff -u -r ../binutils-2.26/ld/emultempl/elf32.em ./ld/emultempl/elf32.em
2--- ../binutils-2.26/ld/emultempl/elf32.em 2015-11-13 03:27:42.000000000 -0500
3+++ ./ld/emultempl/elf32.em 2016-01-28 10:20:11.534910516 -0500
4@@ -115,8 +115,13 @@
5 static void
6 gld${EMULATION_NAME}_after_parse (void)
7 {
8+#ifndef __ANDROID__
9+ /** The Android linker does not support DF_1_PIE but prints a warning:
10+ 'unsupported flags DT_FLAGS_1=0x8000000'
11+ due to validation in linker.cpp (see "case DT_FLAGS_1" there. */ */
12 if (bfd_link_pie (&link_info))
13 link_info.flags_1 |= (bfd_vma) DF_1_PIE;
14+#endif
15
16 after_parse_default ();
17 }