Define _GNU_SOURCE for all users of syscall lib

Move the definition of '_GNU_SOURCE' from 'import-lx_hybrid.mk' to
'import-syscall.mk' because this definition may (potentially) affect all
programs that include Linux headers installed on the host - not only
hybrid Linux/Genode programs. Fixes #52
This commit is contained in:
Norman Feske 2011-12-24 02:21:09 +08:00 committed by Christian Helmuth
parent 032f9810a9
commit 7a8ad10ffd
2 changed files with 13 additions and 12 deletions

View File

@ -85,18 +85,6 @@ EXT_OBJECTS += $(shell cc -print-file-name=crtn.o)
EXT_OBJECTS += -lgcc -lgcc_s -lsupc++ -lc
EXT_OBJECTS += -lpthread
#
# Some header files installed on GNU/Linux test for the GNU compiler. For
# example, 'stdio.h' might complain with the following error otherwise:
#
# /usr/include/stdio.h:432:27: error: expected initializer before throw
# /usr/include/stdio.h:488:6: error: expected initializer before throw
#
# By manually defining '_GNU_SOURCE', the header files are processed as
# expected.
#
CC_OPT += -D_GNU_SOURCE
USE_HOST_LD_SCRIPT = yes
ifeq (x86_64,$(findstring x86_64,$(SPECS)))

View File

@ -4,3 +4,16 @@ HOST_INC_DIR += /usr/include
# needed for Ubuntu 11.04
HOST_INC_DIR += /usr/include/i386-linux-gnu
HOST_INC_DIR += /usr/include/x86_64-linux-gnu
#
# Some header files installed on GNU/Linux test for the GNU compiler. For
# example, 'stdio.h' might complain with the following error otherwise:
#
# /usr/include/stdio.h:432:27: error: expected initializer before throw
# /usr/include/stdio.h:488:6: error: expected initializer before throw
#
# By manually defining '_GNU_SOURCE', the header files are processed as
# expected.
#
CC_OPT += -D_GNU_SOURCE