Fix build on Ubuntu 16.10 for x86_64

Ubuntu provides position independent shared objects for libraries, e.g.,
libsdl1.2-dev. To appropriatly link it to Genode, the linker flag
'-no-pie' has to be added to the make file.
This commit is contained in:
Dr. Florian M. Grätz 2016-12-27 20:51:42 +01:00 committed by Norman Feske
parent 4da52517c1
commit b2934c7aec
1 changed files with 10 additions and 0 deletions

View File

@ -109,3 +109,13 @@ LD_CMD = c++
# disable format-string security checks, which prevent non-literal format strings
CC_OPT += -Wno-format-security
#
# Disable position-independent executables (which are enabled by default on
# Ubuntu 16.10 or newer)
#
CXX_LINK_OPT_NO_PIE := $(shell \
(echo "int main(){}" | $(LD_CMD) -no-pie -x c++ - -o /dev/null >& /dev/null \
&& echo "-no-pie") || true)
CXX_LINK_OPT += $(CXX_LINK_OPT_NO_PIE)