On 03/24/2017 09:17 PM, Bruce Dubbs wrote:
Tim Tassonis wrote:
Hi all
I am just in the process of building lfs 8.0 and came across the
situation
that binutils seems to link against flex if available, but is compiled
before it.
Would there be a problem if I compile flex before binutils? This would
allow me to get the same results later if I recompile binutils when flex
is available.
Or is there a good reason why flex has to be done later?
When I build binutils with flex present, I see in the configure portions
of the output:
checking for flex... flex
When running make, configure is called several times and the same line
is output. However, I see no place were flex is actually called.
Looking further, it appears that the ar and ranlib programs link to the
flex library libfl.so. That seems to be hard coded:
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wshadow -Wstack-usage=262144 -g -O2 -static-libstdc++ -static-libgcc -o
.libs/ar arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o
emul_vanilla.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.so
-L/sources/binutils-2.28/build/bfd/../libiberty/pic -liberty -lz
../libiberty/libiberty.a
/usr/lib/libfl.so <----
-lm -ldl
If the flex library was really needed, then -lfl would suffice.
There is only one header installed by flex: FlexLexer.h. That is not
found anywhere in the binutils source code.
My conclusion is that although binutils looks for flex and explicitly
includes the flex library in two programs when present, it is not
actually used.
Yes, seems like it. Have built it now in the proposed order.
Cheers
Tim
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style