make: fix the build on Ubuntu

"-Wl,--no-as-needed" needs to be included before the libraries,
otherwise it has no effect.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
This commit is contained in:
Tomasz Grabiec
2014-09-15 19:59:24 +02:00
committed by Avi Kivity
parent 8b86f9d93c
commit 26a02f30c8

View File

@@ -18,15 +18,15 @@ libs = -laio -lboost_program_options -lboost_system
libs += $(libs.$(mode))
LDFLAGS = $(libs)
# Ubuntu fails without this, see https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201
LDFLAGS = -Wl,--no-as-needed
LDFLAGS += $(libs)
CXXFLAGS = -std=gnu++1y -g -Wall -Werror $(opt) -MD -MT $@ -MP $(sanitize) -fvisibility=hidden
CXXFLAGS += -pthread
CXXFLAGS += -I $(src)
# Ubuntu fails without this, see https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201
LDFLAGS += -Wl,--no-as-needed
tests = tests/test-reactor tests/fileiotest tests/virtiotest tests/l3_test tests/ip_test tests/timertest
tests += tests/tcp_test