[LEDE-DEV] [Jool-list] It seems to me like the build system ignores EXTRA_FLAGS?
Dan Lüdtke
mail at danrl.com
Thu Dec 1 11:36:14 PST 2016
Hi guys,
you are totally right. I had the -largp in the wrong place the whole time.
I found that the easiest way to work around the issue is to patch the Makefile.am files when they are getting pulled in by the build system. See patch below.
In the meantime, Jo came up with a fixed Makefile that does not need patches of upstream Makefile.am files. I tested it and it builds fine. Thank you very much! So I threw away the patches and use the proper Makefile now.
Building works, tests on the target platform have been successful as well. I opened a pull request where we can discuss any other issues that need to get sorted out before merging.
Thanks for you help and the super-fast responses!
Dan
Pull Request is here: https://github.com/openwrt/packages/pull/3604
> On Thu, Dec 1, 2016 at 9:34 AM, Alberto Leiva <ydahhrk at gmail.com> wrote:
>>
>> Not sure if "x86_64-openwrt-linux-musl-gcc" implies that you're using gcc,
>> but at least in stock gcc, order matters. If you're going to force -largp,
>> do so at the end, along with the other libraries.
> On 1 Dec 2016, at 10:20, John Szakmeister <john at szakmeister.net> wrote:
>
> I can't help you with the actual issues, but you don't have -largp in
> the correct location. It need probably needs to come before the last
> few libraries, but after the jool-related ones (at the very least the
> ones that depend on it). Linkers link in the order given, so at the
> point you've placed it, nothing depends on argp and therefore nothing
> is used from it.
--- a/usr/stateful/Makefile.am 2016-10-07 20:17:00.000000000 +0200
+++ b/usr/stateful/Makefile.am 2016-12-01 13:40:23.034974511 +0100
@@ -25,7 +25,7 @@
../common/target/pool6.c \
../common/target/session.c
-jool_LDADD = ${LIBNLGENL3_LIBS}
+jool_LDADD = -largp ${LIBNLGENL3_LIBS}
jool_CFLAGS = -Wall -O2
jool_CFLAGS += -I${srcdir}/../../include
jool_CFLAGS += ${LIBNLGENL3_CFLAGS} ${JOOL_FLAGS}
--- a/usr/stateless/Makefile.am 2016-10-07 20:17:00.000000000 +0200
+++ b/usr/stateless/Makefile.am 2016-12-01 13:40:01.034717994 +0100
@@ -25,7 +25,7 @@
../common/target/pool6.c \
../common/target/session.c
-jool_siit_LDADD = ${LIBNLGENL3_LIBS}
+jool_siit_LDADD = -largp ${LIBNLGENL3_LIBS}
jool_siit_CFLAGS = -Wall -O2
jool_siit_CFLAGS += -I${srcdir}/../../include
jool_siit_CFLAGS += ${LIBNLGENL3_CFLAGS} ${JOOL_FLAGS}
More information about the Lede-dev
mailing list