I am building flex-2.5.39 which I configured using:
./configure --enable-static LDFLAGS=-static CC=/x86_64-linux-musl/bin/x86_64-linux-musl-gcc
But at the very end, libtool is not linking statically. It is, in fact, simply discarding the flag:
[ root@836843e09b55:/flex-2.5.39 ]$ make flex
/bin/bash ./libtool --tag=CC --mode=link /x86_64-linux-musl/bin/x86_64-linux-musl-gcc -g -O2 -static -o flex ccl.o dfa.o ecs.o scanflags.o gen.o main.o misc.o nfa.o parse.o scan.o skel.o sym.o tblcmp.o yylex.o options.o scanopt.o buf.o tables.o tables_shared.o filter.o regex.o lib/libcompat.la -lm
libtool: link: /x86_64-linux-musl/bin/x86_64-linux-musl-gcc -g -O2 -o flex ccl.o dfa.o ecs.o scanflags.o gen.o main.o misc.o nfa.o parse.o scan.o skel.o sym.o tblcmp.o yylex.o options.o scanopt.o buf.o tables.o tables_shared.o filter.o regex.o lib/.libs/libcompat.a -lm
[ root@836843e09b55:/flex-2.5.39 ]$
How can I make libtool accept the flag and pass it on?
Using --static
(extra minus), it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With